Comparing version 0.0.14 to 0.1.0
@@ -99,7 +99,7 @@ import * as react from 'react'; | ||
} | null; | ||
className: string; | ||
className?: string; | ||
}; | ||
type CornerOptions = { | ||
cornerSize: number; | ||
noClipping: boolean; | ||
useClipPath: boolean; | ||
above: Scraps<Layer>; | ||
@@ -106,0 +106,0 @@ below: Scraps<Layer>; |
@@ -174,3 +174,3 @@ var __create = Object.create; | ||
var DEFAULT_LAYER = { | ||
color: `black`, | ||
color: `transparent`, | ||
blur: 0, | ||
@@ -183,3 +183,3 @@ spread: 0, | ||
var DEFAULT_OPTIONS = { | ||
noClipping: false, | ||
useClipPath: true, | ||
cornerSize: 15, | ||
@@ -402,7 +402,6 @@ above: null, | ||
function withCorners(WrappedComponent, options, ...corners2) { | ||
const { cornerSize, noClipping, above, below } = options; | ||
const clipPathfinder = noClipping ? null : createClipPathfinder(cornerSize, ...corners2); | ||
const { cornerSize, useClipPath, above, below } = options; | ||
const clipPathfinder = useClipPath ? createClipPathfinder(cornerSize, ...corners2) : null; | ||
const pathfinder = above || below ? createPathfinder(cornerSize, ...corners2) : null; | ||
const WithCorners = (props) => { | ||
var _a; | ||
const pathId = import_react2.useId ? (0, import_react2.useId)() : Math.random().toString(); | ||
@@ -420,4 +419,3 @@ const nodeRef = (0, import_react2.useRef)(null); | ||
...props.style, | ||
clipPath: clipPathfinder ? `url(#${pathId})` : void 0, | ||
background: noClipping ? `none` : (_a = props.style) == null ? void 0 : _a.background | ||
clipPath: clipPathfinder ? `url(#${pathId})` : void 0 | ||
} | ||
@@ -424,0 +422,0 @@ }, |
{ | ||
"name": "corners", | ||
"version": "0.0.14", | ||
"version": "0.1.0", | ||
"files": [ | ||
@@ -9,17 +9,4 @@ "dist" | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"dev": "esbuild example/client.tsx --outfile=example/web/client.js --servedir=example/web --serve=6144 --bundle --minify --sourcemap", | ||
"build:example": "esbuild example/client.tsx --outfile=example/web/client.js --bundle --minify --sourcemap", | ||
"predeploy": "yarn build:example", | ||
"deploy": "gh-pages -d example/web", | ||
"build": "tsup src/index.ts --format cjs,esm --dts", | ||
"test": "vitest", | ||
"test:once": "vitest run", | ||
"lint": "eslint \"{src,test}/**/*.ts{,x}\"", | ||
"lint:fix": "yarn lint -- --fix", | ||
"release": "yarn build && changeset publish", | ||
"notes": "changeset" | ||
}, | ||
"dependencies": { | ||
"@react-hook/resize-observer": "^1.2.5" | ||
"@react-hook/resize-observer": "1.2.6" | ||
}, | ||
@@ -31,27 +18,17 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@banka/eslint-config-react": "1.4.0", | ||
"@changesets/cli": "2.26.1", | ||
"@emotion/react": "11.11.1", | ||
"@emotion/styled": "11.11.0", | ||
"@types/react": "18.2.11", | ||
"@types/react-dom": "18.2.4", | ||
"c8": "7.14.0", | ||
"esbuild": "0.18.0", | ||
"eslint": "8.42.0", | ||
"@types/react": "18.2.14", | ||
"@types/react-dom": "18.2.6", | ||
"c8": "8.0.0", | ||
"esbuild": "0.18.10", | ||
"gh-pages": "5.0.0", | ||
"husky": "8.0.3", | ||
"jsdom": "22.1.0", | ||
"lint-staged": "13.2.2", | ||
"prettier": "2.8.8", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"tsconfig-paths": "4.2.0", | ||
"tsup": "6.7.0", | ||
"typescript": "5.1.3", | ||
"tsup": "7.1.0", | ||
"vite-tsconfig-paths": "4.2.0", | ||
"vitest": "0.32.0" | ||
"vitest": "0.32.2" | ||
}, | ||
"lint-staged": { | ||
"*.ts{,x}": "yarn lint" | ||
}, | ||
"eslintConfig": { | ||
@@ -62,6 +39,12 @@ "extends": [ | ||
}, | ||
"homepage": "https://github.com/jeremybanka/corners#readme", | ||
"bugs": { | ||
"url": "https://github.com/jeremybanka/corners/issues" | ||
"scripts": { | ||
"dev": "esbuild example/client.tsx --outfile=example/web/client.js --servedir=example/web --serve=6144 --bundle --minify --sourcemap", | ||
"build:example": "esbuild example/client.tsx --outfile=example/web/client.js --bundle --minify --sourcemap", | ||
"build:package": "tsup src/index.ts --format cjs,esm --dts", | ||
"build": "pnpm run build:package & pnpm run build:example", | ||
"test": "vitest", | ||
"test:once": "vitest run", | ||
"lint": "eslint \"{src,test}/**/*.ts{,x}\"", | ||
"lint:fix": "pnpm run lint -- --fix" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14
0
44078
1184
2
2
2
0