New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

@forbetterorworse/shapes-and-lines

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forbetterorworse/shapes-and-lines - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

6

.storybook/preview.ts
import type { Preview } from '@storybook/react'
const preview: Preview = {
tags: ['autodocs'],
parameters: {

@@ -11,2 +12,7 @@ controls: {

},
options: {
storySort: {
order: ['Components', 'Internal'],
},
},
},

@@ -13,0 +19,0 @@ }

2

package.json
{
"name": "@forbetterorworse/shapes-and-lines",
"description": "A library that provides shape and line components.",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": {

@@ -13,4 +13,6 @@ # shapes-and-lines

## Installation
## Usage
### Installation
To install the library in your project, run:

@@ -20,11 +22,31 @@

# npm
npm i shapes-and-lines
npm i @forbetterorworse/shapes-and-lines
# yarn
yarn add shapes-and-lines
yarn add @forbetterorworse/shapes-and-lines
# pnpm
pnpm add shapes-and-lines
pnpm add @forbetterorworse/shapes-and-lines
```
### Using the components
```tsx
import {
Shapes,
CurvedLines,
Polylines,
} from '@forbetterorworse/shapes-and-lines'
const MyApp = () => {
return (
<>
<Shapes />
<CurvedLines />
<Polylines />
</>
)
}
```
## Development

@@ -31,0 +53,0 @@

@@ -0,4 +1,5 @@

export const SHAPE_TYPES = ['circle', 'square', 'triangle'] as const
export const MAX_MARGIN = 30
export const COLORS = ['#eb5353', '#efbb00', '#36ae7c', '#187498']
export const VIEWBOX_SIZE = 200
export const VIEW_BOX_SIZE = 200

@@ -5,0 +6,0 @@ /** A polyline requires at least two points */

@@ -8,3 +8,3 @@ import sample from 'lodash/sample'

MIN_POINTS_PER_POLYLINE,
VIEWBOX_SIZE,
VIEW_BOX_SIZE,
} from './constants'

@@ -26,4 +26,5 @@

// The divisor is 1 so that the coordinates can spread the entire SVG size
export const randomCoordinate = (max = VIEWBOX_SIZE) =>
// The divisor is 1 so that the coordinates can spread the entire SVG size.
// Adjust the value if the display is not desirable.
export const randomCoordinate = (max = VIEW_BOX_SIZE) =>
Math.floor(Math.random() * (max / 1))

@@ -30,0 +31,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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