Skip to content

Commit 17f70e1

Browse files
author
Andreas Riepl
committed
Merge remote-tracking branch 'origin/feat/scroll-on-touch-sync' into feat/scroll-on-touch-sync
# Conflicts: # packages/react-sketch-canvas/src/Canvas/index.tsx
2 parents 74ddf26 + 62f389d commit 17f70e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+8649
-23432
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["documentation", "tests"]
11+
}

.changeset/pre.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"mode": "pre",
3+
"tag": "next",
4+
"initialVersions": {
5+
"documentation": "1.0.0",
6+
"eslint-config-custom": "0.0.0",
7+
"react-sketch-canvas": "6.2.0",
8+
"tests": "1.0.0",
9+
"tsconfig": "0.0.0"
10+
},
11+
"changesets": [
12+
"serious-bobcats-burn"
13+
]
14+
}

.changeset/serious-bobcats-burn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"react-sketch-canvas": major
3+
---
4+
5+
- Add option to use Windows surface pen button as eraser
6+
- Memoize functions to reduce re-rendering

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
root: true,
3+
// This tells ESLint to load the config from the package `eslint-config-custom`
4+
extends: ["custom"],
5+
settings: {
6+
next: {
7+
rootDir: ["apps/*/"],
8+
},
9+
},
10+
ignorePatterns: ["*.config.js"],
11+
};

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ coverage/
1111
jest-coverage/
1212
cypress-coverage/
1313
reports/
14+
packages/tests/cypress/screenshots/
15+
packages/tests/cypress/videos/
16+
packages/tests/.nyc_output/
17+
packages/tests/coverage/
18+
packages/tests/cypress/downloads/
19+
.idea/

.hintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["development"],
3+
"hints": {
4+
"no-inline-styles": "off"
5+
}
6+
}

.nycrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"report-dir": "packages/tests/coverage",
3+
"temp-dir": "packages/tests/.nyc_output",
4+
"reporter": ["lcov", "text"]
5+
}

.release-it.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
<p align="center">
1+
<p style="text-align: center;">
22
<img src="https://i.imgur.com/ajs39FC.png" height="150" alt="React Sketch Canvas" />
33
</p>
44
<br/>
5-
<h3 align="center">
5+
<h3 style="text-align: center;">
66
Freehand vector drawing component for React using SVG as canvas 🖌
77
</h3>
88
<br/>
99
<br/>
10-
<div align="center">
10+
<div style="text-align: center;">
1111

1212
![npm](https://img.shields.io/npm/v/react-sketch-canvas?style=flat-square) &nbsp;&nbsp; ![NPM](https://img.shields.io/npm/l/react-sketch-canvas?style=flat-square) &nbsp;&nbsp; ![npm](https://img.shields.io/npm/dm/react-sketch-canvas?style=flat-square) <br/>
1313
![npm bundle size](https://img.shields.io/bundlephobia/min/react-sketch-canvas?style=flat-square) &nbsp;&nbsp; ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-sketch-canvas?style=flat-square) <br/>
1414
[![codecov](https://codecov.io/gh/vinothpandian/react-sketch-canvas/branch/master/graph/badge.svg?token=NJcqGRgbSa)](https://codecov.io/gh/vinothpandian/react-sketch-canvas)
1515
<br/>
16-
This project was generated using [DTS](https://github.com/weiran-zsd/dts-cli).
16+
This project was built using [Turborepo](https://turbo.build/).
1717

1818
</div>
1919

@@ -26,7 +26,7 @@ This project was generated using [DTS](https://github.com/weiran-zsd/dts-cli).
2626

2727
### Requirements
2828

29-
- **<span style="color:red">**Requires React >= 16.4**</span>**
29+
- **<span style="color:red">**Requires React >= 16.8**</span>**
3030

3131
### Wanna test React Sketch Canvas before using it?
3232

@@ -51,12 +51,12 @@ yarn add react-sketch-canvas
5151
Common usage example
5252

5353
```javascript
54-
import * as React from 'react';
55-
import { ReactSketchCanvas } from 'react-sketch-canvas';
54+
import * as React from "react";
55+
import { ReactSketchCanvas } from "react-sketch-canvas";
5656

5757
const styles = {
58-
border: '0.0625rem solid #9c9c9c',
59-
borderRadius: '0.25rem',
58+
border: "0.0625rem solid #9c9c9c",
59+
borderRadius: "0.25rem",
6060
};
6161

6262
const Canvas = () => {
@@ -80,7 +80,7 @@ import { ReactSketchCanvas } from "react-sketch-canvas";
8080

8181
const styles = {
8282
border: "0.0625rem solid #9c9c9c",
83-
borderRadius: "0.25rem"
83+
borderRadius: "0.25rem",
8484
};
8585

8686
const Canvas = class extends React.Component {
@@ -100,12 +100,12 @@ const Canvas = class extends React.Component {
100100
/>
101101
<button
102102
onClick={() => {
103-
this.canvas.current.
103+
this.canvas.current
104104
.exportImage("png")
105-
.then(data => {
105+
.then((data) => {
106106
console.log(data);
107107
})
108-
.catch(e => {
108+
.catch((e) => {
109109
console.log(e);
110110
});
111111
}}
@@ -169,7 +169,7 @@ _Use ref to access the element and call the following functions to export image_
169169
## Types
170170

171171
```ts
172-
type ExportImageType = 'jpeg' | 'png';
172+
type ExportImageType = "jpeg" | "png";
173173

174174
interface Point {
175175
x: number;

apps/documentation/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

0 commit comments

Comments
 (0)