@nasser-sw/fabric 7.0.1-beta3 → 7.0.1-beta4
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/0 +0 -0
- package/dist/index.js +323 -155
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +323 -155
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +323 -155
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +323 -155
- package/dist/index.node.mjs.map +1 -1
- package/dist/package.json.min.mjs +1 -1
- package/dist/package.json.mjs +1 -1
- package/dist/src/shapes/Line.d.ts +31 -86
- package/dist/src/shapes/Line.d.ts.map +1 -1
- package/dist/src/shapes/Line.min.mjs +1 -1
- package/dist/src/shapes/Line.min.mjs.map +1 -1
- package/dist/src/shapes/Line.mjs +323 -154
- package/dist/src/shapes/Line.mjs.map +1 -1
- package/dist-extensions/src/shapes/CustomLine.d.ts +10 -0
- package/dist-extensions/src/shapes/CustomLine.d.ts.map +1 -0
- package/dist-extensions/src/shapes/Line.d.ts +31 -86
- package/dist-extensions/src/shapes/Line.d.ts.map +1 -1
- package/fabric-test-editor.html +157 -8
- package/fabric-test2.html +513 -0
- package/fabric.ts +182 -182
- package/package.json +1 -1
- package/src/shapes/Line.ts +372 -158
- package/debug/konva/CHANGELOG.md +0 -1474
- package/debug/konva/LICENSE +0 -22
- package/debug/konva/README.md +0 -205
- package/debug/konva/gulpfile.mjs +0 -110
- package/debug/konva/package.json +0 -139
- package/debug/konva/release.sh +0 -65
- package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -6
- package/debug/konva/resources/doc-includes/NodeParams.txt +0 -20
- package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -53
- package/debug/konva/resources/jsdoc.conf.json +0 -28
- package/debug/konva/rollup.config.mjs +0 -32
- package/debug/konva/src/Animation.ts +0 -237
- package/debug/konva/src/BezierFunctions.ts +0 -826
- package/debug/konva/src/Canvas.ts +0 -193
- package/debug/konva/src/Container.ts +0 -649
- package/debug/konva/src/Context.ts +0 -1017
- package/debug/konva/src/Core.ts +0 -5
- package/debug/konva/src/DragAndDrop.ts +0 -173
- package/debug/konva/src/Factory.ts +0 -246
- package/debug/konva/src/FastLayer.ts +0 -29
- package/debug/konva/src/Global.ts +0 -210
- package/debug/konva/src/Group.ts +0 -31
- package/debug/konva/src/Layer.ts +0 -546
- package/debug/konva/src/Node.ts +0 -3477
- package/debug/konva/src/PointerEvents.ts +0 -67
- package/debug/konva/src/Shape.ts +0 -2081
- package/debug/konva/src/Stage.ts +0 -1000
- package/debug/konva/src/Tween.ts +0 -811
- package/debug/konva/src/Util.ts +0 -1123
- package/debug/konva/src/Validators.ts +0 -210
- package/debug/konva/src/_CoreInternals.ts +0 -85
- package/debug/konva/src/_FullInternals.ts +0 -171
- package/debug/konva/src/canvas-backend.ts +0 -36
- package/debug/konva/src/filters/Blur.ts +0 -388
- package/debug/konva/src/filters/Brighten.ts +0 -48
- package/debug/konva/src/filters/Brightness.ts +0 -30
- package/debug/konva/src/filters/Contrast.ts +0 -75
- package/debug/konva/src/filters/Emboss.ts +0 -207
- package/debug/konva/src/filters/Enhance.ts +0 -154
- package/debug/konva/src/filters/Grayscale.ts +0 -25
- package/debug/konva/src/filters/HSL.ts +0 -108
- package/debug/konva/src/filters/HSV.ts +0 -106
- package/debug/konva/src/filters/Invert.ts +0 -23
- package/debug/konva/src/filters/Kaleidoscope.ts +0 -274
- package/debug/konva/src/filters/Mask.ts +0 -220
- package/debug/konva/src/filters/Noise.ts +0 -44
- package/debug/konva/src/filters/Pixelate.ts +0 -107
- package/debug/konva/src/filters/Posterize.ts +0 -46
- package/debug/konva/src/filters/RGB.ts +0 -82
- package/debug/konva/src/filters/RGBA.ts +0 -103
- package/debug/konva/src/filters/Sepia.ts +0 -27
- package/debug/konva/src/filters/Solarize.ts +0 -29
- package/debug/konva/src/filters/Threshold.ts +0 -44
- package/debug/konva/src/index.ts +0 -3
- package/debug/konva/src/shapes/Arc.ts +0 -176
- package/debug/konva/src/shapes/Arrow.ts +0 -231
- package/debug/konva/src/shapes/Circle.ts +0 -76
- package/debug/konva/src/shapes/Ellipse.ts +0 -121
- package/debug/konva/src/shapes/Image.ts +0 -319
- package/debug/konva/src/shapes/Label.ts +0 -386
- package/debug/konva/src/shapes/Line.ts +0 -364
- package/debug/konva/src/shapes/Path.ts +0 -1013
- package/debug/konva/src/shapes/Rect.ts +0 -79
- package/debug/konva/src/shapes/RegularPolygon.ts +0 -167
- package/debug/konva/src/shapes/Ring.ts +0 -94
- package/debug/konva/src/shapes/Sprite.ts +0 -370
- package/debug/konva/src/shapes/Star.ts +0 -125
- package/debug/konva/src/shapes/Text.ts +0 -1065
- package/debug/konva/src/shapes/TextPath.ts +0 -583
- package/debug/konva/src/shapes/Transformer.ts +0 -1889
- package/debug/konva/src/shapes/Wedge.ts +0 -129
- package/debug/konva/src/skia-backend.ts +0 -35
- package/debug/konva/src/types.ts +0 -84
- package/debug/konva/tsconfig.json +0 -31
- package/debug/konva/tsconfig.test.json +0 -7
package/debug/konva/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
|
4
|
-
Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
package/debug/konva/README.md
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://konvajs.org/android-chrome-192x192.png" alt="Konva logo" height="180" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">Konva</h1>
|
|
6
|
-
|
|
7
|
-
[](https://opencollective.com/konva)
|
|
8
|
-
[](http://badge.fury.io/js/konva)
|
|
9
|
-
[](https://github.com/konvajs/konva/actions/workflows/test-browser.ym)
|
|
10
|
-
[](https://github.com/konvajs/konva/actions/workflows/test-node.ym)[](https://cdnjs.com/libraries/konva)
|
|
11
|
-
|
|
12
|
-
Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.
|
|
13
|
-
|
|
14
|
-
You can draw things onto the stage, add event listeners to them, move them, scale them, and rotate them independently from other shapes to support high performance animations, even if your application uses thousands of shapes. Served hot with a side of awesomeness.
|
|
15
|
-
|
|
16
|
-
This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github.com/ericdrowell/KineticJS).
|
|
17
|
-
|
|
18
|
-
- **Visit:** The [Home Page](http://konvajs.org/) and follow on [Twitter](https://twitter.com/lavrton)
|
|
19
|
-
- **Discover:** [Tutorials](http://konvajs.org/docs/index.html), [API Documentation](http://konvajs.org/api/Konva.html)
|
|
20
|
-
- **Help:** [StackOverflow](http://stackoverflow.com/questions/tagged/konvajs), [Discord Chat](https://discord.gg/8FqZwVT)
|
|
21
|
-
|
|
22
|
-
# Quick Look
|
|
23
|
-
|
|
24
|
-
```html
|
|
25
|
-
<script src="https://unpkg.com/konva@9/konva.min.js"></script>
|
|
26
|
-
<div id="container"></div>
|
|
27
|
-
<script>
|
|
28
|
-
var stage = new Konva.Stage({
|
|
29
|
-
container: 'container',
|
|
30
|
-
width: window.innerWidth,
|
|
31
|
-
height: window.innerHeight,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// add canvas element
|
|
35
|
-
var layer = new Konva.Layer();
|
|
36
|
-
stage.add(layer);
|
|
37
|
-
|
|
38
|
-
// create shape
|
|
39
|
-
var box = new Konva.Rect({
|
|
40
|
-
x: 50,
|
|
41
|
-
y: 50,
|
|
42
|
-
width: 100,
|
|
43
|
-
height: 50,
|
|
44
|
-
fill: '#00D2FF',
|
|
45
|
-
stroke: 'black',
|
|
46
|
-
strokeWidth: 4,
|
|
47
|
-
draggable: true,
|
|
48
|
-
});
|
|
49
|
-
layer.add(box);
|
|
50
|
-
|
|
51
|
-
// add cursor styling
|
|
52
|
-
box.on('mouseover', function () {
|
|
53
|
-
document.body.style.cursor = 'pointer';
|
|
54
|
-
});
|
|
55
|
-
box.on('mouseout', function () {
|
|
56
|
-
document.body.style.cursor = 'default';
|
|
57
|
-
});
|
|
58
|
-
</script>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
# Browsers support
|
|
62
|
-
|
|
63
|
-
Konva works in all modern mobile and desktop browsers. A browser need to be capable to run javascript code from ES2015 spec. For older browsers you may need polyfills for missing functions.
|
|
64
|
-
|
|
65
|
-
At the current moment `Konva` doesn't work in IE11 directly. To make it work you just need to provide some polyfills such as `Array.prototype.find`, `String.prototype.trimLeft`, `String.prototype.trimRight`, `Array.from`.
|
|
66
|
-
|
|
67
|
-
# Debugging
|
|
68
|
-
|
|
69
|
-
The Chrome inspector simply shows the canvas element. To see the Konva objects and their details, install the konva-dev extension at https://github.com/konvajs/konva-devtool.
|
|
70
|
-
|
|
71
|
-
# Loading and installing Konva
|
|
72
|
-
|
|
73
|
-
Konva supports UMD loading. So you can use all possible variants to load the framework into your project:
|
|
74
|
-
|
|
75
|
-
### Load Konva via classical `<script>` tag from CDN:
|
|
76
|
-
|
|
77
|
-
```html
|
|
78
|
-
<script src="https://unpkg.com/konva@9/konva.min.js"></script>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Install with npm:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npm install konva --save
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
// The modern way (e.g. an ES6-style import for webpack, parcel)
|
|
89
|
-
import Konva from 'konva';
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
#### Typescript usage
|
|
93
|
-
|
|
94
|
-
Add DOM definitions into your `tsconfig.json`:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
{
|
|
98
|
-
"compilerOptions": {
|
|
99
|
-
"lib": [
|
|
100
|
-
"es6",
|
|
101
|
-
"dom"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 3 Minimal bundle
|
|
108
|
-
|
|
109
|
-
```javascript
|
|
110
|
-
import Konva from 'konva/lib/Core';
|
|
111
|
-
// Now you have a Konva object with Stage, Layer, FastLayer, Group, Shape and some additional utils function.
|
|
112
|
-
// Also core currently already have support for drag&drop and animations.
|
|
113
|
-
// BUT there are no shapes (rect, circle, etc), no filters.
|
|
114
|
-
|
|
115
|
-
// but you can simply add anything you need:
|
|
116
|
-
import { Rect } from 'konva/lib/shapes/Rect';
|
|
117
|
-
// importing a shape will automatically inject it into Konva object
|
|
118
|
-
|
|
119
|
-
var rect1 = new Rect();
|
|
120
|
-
// or:
|
|
121
|
-
var shape = new Konva.Rect();
|
|
122
|
-
|
|
123
|
-
// for filters you can use this:
|
|
124
|
-
import { Blur } from 'konva/lib/filters/Blur';
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### 4 NodeJS env
|
|
128
|
-
|
|
129
|
-
In order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
npm install konva canvas
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Then you can use the same Konva API and all Konva demos will work just fine. You just don't need to use `container` attribute in your stage.
|
|
136
|
-
|
|
137
|
-
```js
|
|
138
|
-
import Konva from 'konva';
|
|
139
|
-
|
|
140
|
-
const stage = new Konva.Stage({
|
|
141
|
-
width: 500,
|
|
142
|
-
height: 500,
|
|
143
|
-
});
|
|
144
|
-
// then all regular Konva code will work
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
# Backers
|
|
148
|
-
|
|
149
|
-

|
|
150
|
-

|
|
151
|
-
|
|
152
|
-
- [myposter GmbH](https://www.myposter.de/)
|
|
153
|
-
- [queue.gg](https://queue.gg/)
|
|
154
|
-
|
|
155
|
-
# Change log
|
|
156
|
-
|
|
157
|
-
See [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md).
|
|
158
|
-
|
|
159
|
-
## Building the Konva Framework
|
|
160
|
-
|
|
161
|
-
To make a full build run `npm run build`. The command will compile all typescript files, combine then into one bundle and run minifier.
|
|
162
|
-
|
|
163
|
-
## Testing
|
|
164
|
-
|
|
165
|
-
Konva uses Mocha for testing.
|
|
166
|
-
|
|
167
|
-
- If you need run test only one time run `npm run test`.
|
|
168
|
-
- While developing it is easy to use `npm start`. Just run it and go to [http://localhost:1234/unit-tests.html](http://localhost:1234/unit-tests.html). The watcher will rebuild the bundle on any change.
|
|
169
|
-
|
|
170
|
-
Konva is covered with hundreds of tests and well over a thousand assertions.
|
|
171
|
-
Konva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test.
|
|
172
|
-
|
|
173
|
-
## Generate documentation
|
|
174
|
-
|
|
175
|
-
Run `npx gulp api` which will build the documentation files and place them in the `api` folder.
|
|
176
|
-
|
|
177
|
-
# Pull Requests
|
|
178
|
-
|
|
179
|
-
I'd be happy to review any pull requests that may better the Konva project,
|
|
180
|
-
in particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the tests pass (`npm run test`).
|
|
181
|
-
|
|
182
|
-
## Contributors
|
|
183
|
-
|
|
184
|
-
### Financial Contributors
|
|
185
|
-
|
|
186
|
-
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/konva/contribute)]
|
|
187
|
-
|
|
188
|
-
#### Individuals
|
|
189
|
-
|
|
190
|
-
<a href="https://opencollective.com/konva"><img src="https://opencollective.com/konva/individuals.svg?width=890"></a>
|
|
191
|
-
|
|
192
|
-
#### Organizations
|
|
193
|
-
|
|
194
|
-
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/konva/contribute)]
|
|
195
|
-
|
|
196
|
-
<a href="https://opencollective.com/konva/organization/0/website"><img src="https://opencollective.com/konva/organization/0/avatar.svg"></a>
|
|
197
|
-
<a href="https://opencollective.com/konva/organization/1/website"><img src="https://opencollective.com/konva/organization/1/avatar.svg"></a>
|
|
198
|
-
<a href="https://opencollective.com/konva/organization/2/website"><img src="https://opencollective.com/konva/organization/2/avatar.svg"></a>
|
|
199
|
-
<a href="https://opencollective.com/konva/organization/3/website"><img src="https://opencollective.com/konva/organization/3/avatar.svg"></a>
|
|
200
|
-
<a href="https://opencollective.com/konva/organization/4/website"><img src="https://opencollective.com/konva/organization/4/avatar.svg"></a>
|
|
201
|
-
<a href="https://opencollective.com/konva/organization/5/website"><img src="https://opencollective.com/konva/organization/5/avatar.svg"></a>
|
|
202
|
-
<a href="https://opencollective.com/konva/organization/6/website"><img src="https://opencollective.com/konva/organization/6/avatar.svg"></a>
|
|
203
|
-
<a href="https://opencollective.com/konva/organization/7/website"><img src="https://opencollective.com/konva/organization/7/avatar.svg"></a>
|
|
204
|
-
<a href="https://opencollective.com/konva/organization/8/website"><img src="https://opencollective.com/konva/organization/8/avatar.svg"></a>
|
|
205
|
-
<a href="https://opencollective.com/konva/organization/9/website"><img src="https://opencollective.com/konva/organization/9/avatar.svg"></a>
|
package/debug/konva/gulpfile.mjs
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import gulp from 'gulp';
|
|
2
|
-
import rename from 'gulp-rename';
|
|
3
|
-
import uglify from 'gulp-uglify-es';
|
|
4
|
-
import replace from 'gulp-replace';
|
|
5
|
-
import jsdoc from 'gulp-jsdoc3';
|
|
6
|
-
import connect from 'gulp-connect';
|
|
7
|
-
import gutil from 'gulp-util';
|
|
8
|
-
|
|
9
|
-
import fs from 'fs';
|
|
10
|
-
var NodeParams = fs
|
|
11
|
-
.readFileSync('./resources/doc-includes/NodeParams.txt')
|
|
12
|
-
.toString();
|
|
13
|
-
var ContainerParams = fs
|
|
14
|
-
.readFileSync('./resources/doc-includes/ContainerParams.txt')
|
|
15
|
-
.toString();
|
|
16
|
-
var ShapeParams = fs
|
|
17
|
-
.readFileSync('./resources/doc-includes/ShapeParams.txt')
|
|
18
|
-
.toString();
|
|
19
|
-
|
|
20
|
-
const conf = JSON.parse(fs.readFileSync('./package.json'));
|
|
21
|
-
|
|
22
|
-
function build() {
|
|
23
|
-
return gulp
|
|
24
|
-
.src(['./konva.js'])
|
|
25
|
-
.pipe(replace('@@shapeParams', ShapeParams))
|
|
26
|
-
.pipe(replace('@@nodeParams', NodeParams))
|
|
27
|
-
.pipe(replace('@@containerParams', ContainerParams))
|
|
28
|
-
.pipe(replace('@@version', conf.version))
|
|
29
|
-
.pipe(replace('@@date', new Date().toDateString()));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
gulp.task('update-version-lib', function () {
|
|
33
|
-
return gulp
|
|
34
|
-
.src(['./lib/Global.js'])
|
|
35
|
-
.pipe(replace('@@version', conf.version))
|
|
36
|
-
.pipe(rename('Global.js'))
|
|
37
|
-
.pipe(gulp.dest('./lib'));
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
gulp.task('update-version-cmj', function () {
|
|
41
|
-
return gulp
|
|
42
|
-
.src(['./cmj/Global.js'])
|
|
43
|
-
.pipe(replace('@@version', conf.version))
|
|
44
|
-
.pipe(rename('Global.js'))
|
|
45
|
-
.pipe(gulp.dest('./cmj'));
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
gulp.task('update-version-es-to-cmj-index', function () {
|
|
49
|
-
return gulp
|
|
50
|
-
.src(['./lib/index.js'])
|
|
51
|
-
.pipe(
|
|
52
|
-
replace(`import { Konva } from './_F`, `import { Konva } from '../cmj/_F`)
|
|
53
|
-
)
|
|
54
|
-
.pipe(rename('index.js'))
|
|
55
|
-
.pipe(gulp.dest('./lib'));
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
gulp.task('update-version-es-to-cmj-node', function () {
|
|
59
|
-
return gulp
|
|
60
|
-
.src(['./lib/index-node.js'])
|
|
61
|
-
.pipe(
|
|
62
|
-
replace(`import { Konva } from './_F`, `import { Konva } from '../cmj/_F`)
|
|
63
|
-
)
|
|
64
|
-
.pipe(rename('index-node.js'))
|
|
65
|
-
.pipe(gulp.dest('./lib'));
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// create usual build konva.js and konva.min.js
|
|
69
|
-
gulp.task('pre-build', function () {
|
|
70
|
-
return build()
|
|
71
|
-
.pipe(rename('konva.js'))
|
|
72
|
-
.pipe(gulp.dest('./'))
|
|
73
|
-
.pipe(
|
|
74
|
-
uglify.default({ output: { comments: /^!|@preserve|@license|@cc_on/i } })
|
|
75
|
-
)
|
|
76
|
-
.on('error', function (err) {
|
|
77
|
-
gutil.log(gutil.colors.red('[Error]'), err.toString());
|
|
78
|
-
})
|
|
79
|
-
.pipe(rename('konva.min.js'))
|
|
80
|
-
.pipe(gulp.dest('./'));
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
gulp.task(
|
|
84
|
-
'build',
|
|
85
|
-
gulp.parallel([
|
|
86
|
-
'update-version-lib',
|
|
87
|
-
// 'update-version-cmj',
|
|
88
|
-
// 'update-version-es-to-cmj-index',
|
|
89
|
-
// 'update-version-es-to-cmj-node',
|
|
90
|
-
'pre-build',
|
|
91
|
-
])
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
// local server for better development
|
|
95
|
-
gulp.task('server', function () {
|
|
96
|
-
connect.server();
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
// // generate documentation
|
|
100
|
-
gulp.task('api', function () {
|
|
101
|
-
return gulp.src('./konva.js').pipe(
|
|
102
|
-
jsdoc({
|
|
103
|
-
opts: {
|
|
104
|
-
destination: './api',
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
gulp.task('default', gulp.parallel(['server']));
|
package/debug/konva/package.json
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "konva",
|
|
3
|
-
"version": "10.0.0-0",
|
|
4
|
-
"description": "HTML5 2d canvas library.",
|
|
5
|
-
"author": "Anton Lavrenov",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"files": [
|
|
8
|
-
"README.md",
|
|
9
|
-
"konva.js",
|
|
10
|
-
"konva.min.js",
|
|
11
|
-
"lib"
|
|
12
|
-
],
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./lib/index.d.ts",
|
|
16
|
-
"default": "./lib/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./lib/*": {
|
|
19
|
-
"types": "./lib/*.d.ts",
|
|
20
|
-
"default": "./lib/*.js"
|
|
21
|
-
},
|
|
22
|
-
"./lib/*.js": {
|
|
23
|
-
"types": "./lib/*.d.ts",
|
|
24
|
-
"default": "./lib/*.js"
|
|
25
|
-
},
|
|
26
|
-
"./canvas-backend": {
|
|
27
|
-
"types": "./lib/canvas-backend.d.ts",
|
|
28
|
-
"default": "./lib/canvas-backend.js"
|
|
29
|
-
},
|
|
30
|
-
"./skia-backend": {
|
|
31
|
-
"types": "./lib/skia-backend.d.ts",
|
|
32
|
-
"default": "./lib/skia-backend.js"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"main": "./lib/index.js",
|
|
36
|
-
"types": "./lib/index.d.ts",
|
|
37
|
-
"scripts": {
|
|
38
|
-
"start": "npm run test:watch",
|
|
39
|
-
"compile": "npm run clean && npm run tsc && npm run rollup",
|
|
40
|
-
"build": "npm run compile && gulp build",
|
|
41
|
-
"fmt": "prettier --write .",
|
|
42
|
-
"fmt:check": "prettier --check .",
|
|
43
|
-
"test:import": "npm run build && node ./test/import-test.cjs && node ./test/import-test.mjs",
|
|
44
|
-
"test": "npm run test:browser && npm run test:node && npm run test:import",
|
|
45
|
-
"test:build": "PARCEL_WORKER_BACKEND=process parcel build ./test/unit-tests.html --dist-dir ./test-build --target none --public-url ./ --no-source-maps",
|
|
46
|
-
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security -a no-sandbox -a disable-setuid-sandbox",
|
|
47
|
-
"test:watch": "rm -rf ./.parcel-cache && PARCEL_WORKERS=0 parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html ./test/text-paths.html ./test/bunnies.html",
|
|
48
|
-
"test:node:canvas": "mocha -r tsx -r ./test/node-canvas-global-setup.mjs --extension ts --recursive './test/unit/' --exit",
|
|
49
|
-
"test:node:skia": "mocha -r tsx -r ./test/node-skia-global-setup.mjs --extension ts --recursive './test/unit/' --exit",
|
|
50
|
-
"test:node": "npm run test:node:canvas && npm run test:node:skia",
|
|
51
|
-
"tsc": "tsc --removeComments",
|
|
52
|
-
"rollup": "rollup -c",
|
|
53
|
-
"clean": "rm -rf ./lib && rm -rf ./types && rm -rf ./cmj && rm -rf ./test-build",
|
|
54
|
-
"watch": "rollup -c -w",
|
|
55
|
-
"size": "size-limit"
|
|
56
|
-
},
|
|
57
|
-
"targets": {
|
|
58
|
-
"none": {}
|
|
59
|
-
},
|
|
60
|
-
"funding": [
|
|
61
|
-
{
|
|
62
|
-
"type": "patreon",
|
|
63
|
-
"url": "https://www.patreon.com/lavrton"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "opencollective",
|
|
67
|
-
"url": "https://opencollective.com/konva"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "github",
|
|
71
|
-
"url": "https://github.com/sponsors/lavrton"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
"size-limit": [
|
|
75
|
-
{
|
|
76
|
-
"limit": "45 KB",
|
|
77
|
-
"path": "./lib/index.js"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"limit": "26 KB",
|
|
81
|
-
"path": "./lib/Core.js"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"path": "./konva.min.js"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"devDependencies": {
|
|
88
|
-
"@parcel/transformer-image": "2.15.4",
|
|
89
|
-
"@size-limit/preset-big-lib": "^11.2.0",
|
|
90
|
-
"@types/mocha": "^10.0.10",
|
|
91
|
-
"canvas": "^3.2.0",
|
|
92
|
-
"chai": "6.0.1",
|
|
93
|
-
"filehound": "^1.17.6",
|
|
94
|
-
"gulp": "^5.0.1",
|
|
95
|
-
"gulp-concat": "^2.6.1",
|
|
96
|
-
"gulp-connect": "^5.7.0",
|
|
97
|
-
"gulp-exec": "^5.0.0",
|
|
98
|
-
"gulp-jsdoc3": "^3.0.0",
|
|
99
|
-
"gulp-rename": "^2.1.0",
|
|
100
|
-
"gulp-replace": "^1.1.4",
|
|
101
|
-
"gulp-typescript": "^5.0.1",
|
|
102
|
-
"gulp-uglify": "^3.0.2",
|
|
103
|
-
"gulp-uglify-es": "^3.0.0",
|
|
104
|
-
"gulp-util": "^3.0.8",
|
|
105
|
-
"mocha": "^10",
|
|
106
|
-
"mocha-headless-chrome": "^4.0.0",
|
|
107
|
-
"parcel": "2.15.4",
|
|
108
|
-
"prettier": "^3.6.2",
|
|
109
|
-
"process": "^0.11.10",
|
|
110
|
-
"rollup": "^4.48.0",
|
|
111
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
112
|
-
"size-limit": "^11.2.0",
|
|
113
|
-
"skia-canvas": "^3.0.4",
|
|
114
|
-
"ts-mocha": "^11.1.0",
|
|
115
|
-
"ts-node": "^10.9.2",
|
|
116
|
-
"tsx": "^4.20.5",
|
|
117
|
-
"typescript": "^5.9.2"
|
|
118
|
-
},
|
|
119
|
-
"keywords": [
|
|
120
|
-
"canvas",
|
|
121
|
-
"animations",
|
|
122
|
-
"graphic",
|
|
123
|
-
"html5"
|
|
124
|
-
],
|
|
125
|
-
"prettier": {
|
|
126
|
-
"singleQuote": true,
|
|
127
|
-
"trailingComma": "es5"
|
|
128
|
-
},
|
|
129
|
-
"bugs": {
|
|
130
|
-
"url": "https://github.com/konvajs/konva/issues"
|
|
131
|
-
},
|
|
132
|
-
"homepage": "http://konvajs.org/",
|
|
133
|
-
"readmeFilename": "README.md",
|
|
134
|
-
"repository": {
|
|
135
|
-
"type": "git",
|
|
136
|
-
"url": "git://github.com/konvajs/konva.git"
|
|
137
|
-
},
|
|
138
|
-
"license": "MIT"
|
|
139
|
-
}
|
package/debug/konva/release.sh
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
set -e
|
|
4
|
-
old_version="$(git describe --abbrev=0 --tags)"
|
|
5
|
-
new_version=$1
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
old_cdn="https://unpkg.com/konva@${old_version}/konva.js"
|
|
9
|
-
new_cdn="https://unpkg.com/konva@${new_version}/konva.js"
|
|
10
|
-
|
|
11
|
-
old_cdn_min="https://unpkg.com/konva@${old_version}/konva.min.js"
|
|
12
|
-
new_cdn_min="https://unpkg.com/konva@${new_version}/konva.min.js"
|
|
13
|
-
|
|
14
|
-
# make sure new version parameter is passed
|
|
15
|
-
if [ -z "$1" ]
|
|
16
|
-
then
|
|
17
|
-
echo "ERROR - pass new version. usage release.sh 0.11.0"
|
|
18
|
-
exit 2
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# make sure changle log updated
|
|
22
|
-
while true; do
|
|
23
|
-
read -p "Did you update CHANGELOG.md? " yn
|
|
24
|
-
case $yn in
|
|
25
|
-
[Yy]* ) break;;
|
|
26
|
-
[Nn]* ) exit;;
|
|
27
|
-
* ) echo "Please answer yes or no.";;
|
|
28
|
-
esac
|
|
29
|
-
done
|
|
30
|
-
|
|
31
|
-
echo "Old version: ${old_version}"
|
|
32
|
-
echo "New version: ${new_version}"
|
|
33
|
-
|
|
34
|
-
echo "Pulling"
|
|
35
|
-
git pull >/dev/null
|
|
36
|
-
|
|
37
|
-
echo "build and test"
|
|
38
|
-
npm run build >/dev/null
|
|
39
|
-
# npm run test
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
echo "commit change log updates"
|
|
43
|
-
git commit -am "update CHANGELOG with new version" --allow-empty >/dev/null
|
|
44
|
-
|
|
45
|
-
echo "npm version $1 --no-git-tag-version"
|
|
46
|
-
npm version $1 --no-git-tag-version --allow-same-version >/dev/null
|
|
47
|
-
|
|
48
|
-
echo "build for $1"
|
|
49
|
-
npm run build >/dev/null
|
|
50
|
-
git commit -am "build for $1" --allow-empty >/dev/null
|
|
51
|
-
|
|
52
|
-
echo "update CDN link in README"
|
|
53
|
-
perl -i -pe "s|${old_cdn_min}|${new_cdn_min}|g" ./README.md >/dev/null
|
|
54
|
-
git commit -am "update cdn link" --allow-empty >/dev/null
|
|
55
|
-
|
|
56
|
-
echo "create new git tag"
|
|
57
|
-
git tag $1 >/dev/null
|
|
58
|
-
|
|
59
|
-
cd ../konva
|
|
60
|
-
git push >/dev/null
|
|
61
|
-
git push --tags >/dev/null
|
|
62
|
-
npm publish --tag next
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
echo "DONE!"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
* @param {Object} [config.clip] set clip
|
|
2
|
-
* @param {Number} [config.clipX] set clip x
|
|
3
|
-
* @param {Number} [config.clipY] set clip y
|
|
4
|
-
* @param {Number} [config.clipWidth] set clip width
|
|
5
|
-
* @param {Number} [config.clipHeight] set clip height
|
|
6
|
-
* @param {Function} [config.clipFunc] set clip func
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
@param {Number} [config.x]
|
|
2
|
-
* @param {Number} [config.y]
|
|
3
|
-
* @param {Number} [config.width]
|
|
4
|
-
* @param {Number} [config.height]
|
|
5
|
-
* @param {Boolean} [config.visible]
|
|
6
|
-
* @param {Boolean} [config.listening] whether or not the node is listening for events
|
|
7
|
-
* @param {String} [config.id] unique id
|
|
8
|
-
* @param {String} [config.name] non-unique name
|
|
9
|
-
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
|
10
|
-
* @param {Object} [config.scale] set scale
|
|
11
|
-
* @param {Number} [config.scaleX] set scale x
|
|
12
|
-
* @param {Number} [config.scaleY] set scale y
|
|
13
|
-
* @param {Number} [config.rotation] rotation in degrees
|
|
14
|
-
* @param {Object} [config.offset] offset from center point and rotation point
|
|
15
|
-
* @param {Number} [config.offsetX] set offset x
|
|
16
|
-
* @param {Number} [config.offsetY] set offset y
|
|
17
|
-
* @param {Boolean} [config.draggable] makes the node draggable. When stages are draggable, you can drag and drop
|
|
18
|
-
* the entire stage by dragging any portion of the stage
|
|
19
|
-
* @param {Number} [config.dragDistance]
|
|
20
|
-
* @param {Function} [config.dragBoundFunc]
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
@param {String} [config.fill] fill color
|
|
2
|
-
* @param {Image} [config.fillPatternImage] fill pattern image
|
|
3
|
-
* @param {Number} [config.fillPatternX]
|
|
4
|
-
* @param {Number} [config.fillPatternY]
|
|
5
|
-
* @param {Object} [config.fillPatternOffset] object with x and y component
|
|
6
|
-
* @param {Number} [config.fillPatternOffsetX]
|
|
7
|
-
* @param {Number} [config.fillPatternOffsetY]
|
|
8
|
-
* @param {Object} [config.fillPatternScale] object with x and y component
|
|
9
|
-
* @param {Number} [config.fillPatternScaleX]
|
|
10
|
-
* @param {Number} [config.fillPatternScaleY]
|
|
11
|
-
* @param {Number} [config.fillPatternRotation]
|
|
12
|
-
* @param {String} [config.fillPatternRepeat] can be "repeat", "repeat-x", "repeat-y", or "no-repeat". The default is "no-repeat"
|
|
13
|
-
* @param {Object} [config.fillLinearGradientStartPoint] object with x and y component
|
|
14
|
-
* @param {Number} [config.fillLinearGradientStartPointX]
|
|
15
|
-
* @param {Number} [config.fillLinearGradientStartPointY]
|
|
16
|
-
* @param {Object} [config.fillLinearGradientEndPoint] object with x and y component
|
|
17
|
-
* @param {Number} [config.fillLinearGradientEndPointX]
|
|
18
|
-
* @param {Number} [config.fillLinearGradientEndPointY]
|
|
19
|
-
* @param {Array} [config.fillLinearGradientColorStops] array of color stops
|
|
20
|
-
* @param {Object} [config.fillRadialGradientStartPoint] object with x and y component
|
|
21
|
-
* @param {Number} [config.fillRadialGradientStartPointX]
|
|
22
|
-
* @param {Number} [config.fillRadialGradientStartPointY]
|
|
23
|
-
* @param {Object} [config.fillRadialGradientEndPoint] object with x and y component
|
|
24
|
-
* @param {Number} [config.fillRadialGradientEndPointX]
|
|
25
|
-
* @param {Number} [config.fillRadialGradientEndPointY]
|
|
26
|
-
* @param {Number} [config.fillRadialGradientStartRadius]
|
|
27
|
-
* @param {Number} [config.fillRadialGradientEndRadius]
|
|
28
|
-
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
|
|
29
|
-
* @param {Boolean} [config.fillEnabled] flag which enables or disables the fill. The default value is true
|
|
30
|
-
* @param {String} [config.fillPriority] can be color, linear-gradient, radial-graident, or pattern. The default value is color. The fillPriority property makes it really easy to toggle between different fill types. For example, if you want to toggle between a fill color style and a fill pattern style, simply set the fill property and the fillPattern properties, and then use setFillPriority('color') to render the shape with a color fill, or use setFillPriority('pattern') to render the shape with the pattern fill configuration
|
|
31
|
-
* @param {String} [config.stroke] stroke color
|
|
32
|
-
* @param {Number} [config.strokeWidth] stroke width
|
|
33
|
-
* @param {Boolean} [config.fillAfterStrokeEnabled]. Should we draw fill AFTER stroke? Default is false.
|
|
34
|
-
* @param {Number} [config.hitStrokeWidth] size of the stroke on hit canvas. The default is "auto" - equals to strokeWidth
|
|
35
|
-
* @param {Boolean} [config.strokeHitEnabled] flag which enables or disables stroke hit region. The default is true
|
|
36
|
-
* @param {Boolean} [config.perfectDrawEnabled] flag which enables or disables using buffer canvas. The default is true
|
|
37
|
-
* @param {Boolean} [config.shadowForStrokeEnabled] flag which enables or disables shadow for stroke. The default is true
|
|
38
|
-
* @param {Boolean} [config.strokeScaleEnabled] flag which enables or disables stroke scale. The default is true
|
|
39
|
-
* @param {Boolean} [config.strokeEnabled] flag which enables or disables the stroke. The default value is true
|
|
40
|
-
* @param {String} [config.lineJoin] can be miter, round, or bevel. The default
|
|
41
|
-
* is miter
|
|
42
|
-
* @param {String} [config.lineCap] can be butt, round, or square. The default
|
|
43
|
-
* is butt
|
|
44
|
-
* @param {String} [config.shadowColor]
|
|
45
|
-
* @param {Number} [config.shadowBlur]
|
|
46
|
-
* @param {Object} [config.shadowOffset] object with x and y component
|
|
47
|
-
* @param {Number} [config.shadowOffsetX]
|
|
48
|
-
* @param {Number} [config.shadowOffsetY]
|
|
49
|
-
* @param {Number} [config.shadowOpacity] shadow opacity. Can be any real number
|
|
50
|
-
* between 0 and 1
|
|
51
|
-
* @param {Boolean} [config.shadowEnabled] flag which enables or disables the shadow. The default value is true
|
|
52
|
-
* @param {Array} [config.dash]
|
|
53
|
-
* @param {Boolean} [config.dashEnabled] flag which enables or disables the dashArray. The default value is true
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"path": "ink-docstrap",
|
|
3
|
-
"tags": {
|
|
4
|
-
"allowUnknownTags": true
|
|
5
|
-
},
|
|
6
|
-
"plugins": ["plugins/markdown"],
|
|
7
|
-
|
|
8
|
-
"templates": {
|
|
9
|
-
"cleverLinks": false,
|
|
10
|
-
"monospaceLinks": false,
|
|
11
|
-
"dateFormat": "ddd MMM Do YYYY",
|
|
12
|
-
"outputSourceFiles": true,
|
|
13
|
-
"outputSourcePath": true,
|
|
14
|
-
"systemName": "Konva",
|
|
15
|
-
"footer": "",
|
|
16
|
-
"copyright": "Konva Copyright © 2015 The contributors to the Konva project.",
|
|
17
|
-
"navType": "vertical",
|
|
18
|
-
"theme": "cosmo",
|
|
19
|
-
"linenums": true,
|
|
20
|
-
"collapseSymbols": false,
|
|
21
|
-
"inverseNav": true,
|
|
22
|
-
"highlightTutorialCode": true
|
|
23
|
-
},
|
|
24
|
-
"markdown": {
|
|
25
|
-
"parser": "gfm",
|
|
26
|
-
"hardwrap": true
|
|
27
|
-
}
|
|
28
|
-
}
|