js-draw 1.0.0 → 1.0.2
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/LICENSE +21 -0
- package/README.md +20 -6
- package/dist/bundle.js +1 -1
- package/dist/cjs/Editor.js +1 -1
- package/dist/cjs/Editor.loadFrom.test.d.ts +1 -0
- package/dist/cjs/Editor.test.d.ts +1 -0
- package/dist/cjs/Editor.toSVG.test.d.ts +1 -0
- package/dist/cjs/EditorImage.test.d.ts +1 -0
- package/dist/cjs/EventDispatcher.test.d.ts +1 -0
- package/dist/cjs/SVGLoader.test.d.ts +1 -0
- package/dist/cjs/UndoRedoHistory.test.d.ts +1 -0
- package/dist/cjs/commands/uniteCommands.test.d.ts +1 -0
- package/dist/cjs/components/AbstractComponent.transformBy.test.d.ts +1 -0
- package/dist/cjs/components/BackgroundComponent.test.d.ts +1 -0
- package/dist/cjs/components/Stroke.test.d.ts +1 -0
- package/dist/cjs/components/TextComponent.test.d.ts +1 -0
- package/dist/cjs/components/UnknownSVGObject.test.d.ts +1 -0
- package/dist/cjs/components/builders/FreehandLineBuilder.test.d.ts +1 -0
- package/dist/cjs/localizations/getLocalizationTable.test.d.ts +1 -0
- package/dist/cjs/rendering/RenderingStyle.test.d.ts +1 -0
- package/dist/cjs/rendering/caching/CacheRecord.test.d.ts +1 -0
- package/dist/cjs/rendering/caching/RenderingCache.test.d.ts +1 -0
- package/dist/cjs/rendering/renderers/DummyRenderer.test.d.ts +1 -0
- package/dist/cjs/rendering/renderers/TextOnlyRenderer.test.d.ts +1 -0
- package/dist/cjs/shortcuts/KeyBinding.test.d.ts +1 -0
- package/dist/cjs/shortcuts/KeyboardShortcutManager.test.d.ts +1 -0
- package/dist/cjs/toolbar/EdgeToolbar.test.d.ts +1 -0
- package/dist/cjs/tools/Eraser.test.d.ts +1 -0
- package/dist/cjs/tools/FindTool.test.d.ts +1 -0
- package/dist/cjs/tools/InputFilter/InputPipeline.test.d.ts +1 -0
- package/dist/cjs/tools/PanZoom.test.d.ts +1 -0
- package/dist/cjs/tools/Pen.test.d.ts +1 -0
- package/dist/cjs/tools/SelectionTool/SelectionTool.test.d.ts +1 -0
- package/dist/cjs/tools/UndoRedoShortcut.test.d.ts +1 -0
- package/dist/cjs/util/ReactiveValue.test.d.ts +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.test.d.ts +1 -0
- package/dist/mjs/Editor.loadFrom.test.d.ts +1 -0
- package/dist/mjs/Editor.mjs +1 -1
- package/dist/mjs/Editor.test.d.ts +1 -0
- package/dist/mjs/Editor.toSVG.test.d.ts +1 -0
- package/dist/mjs/EditorImage.test.d.ts +1 -0
- package/dist/mjs/EventDispatcher.test.d.ts +1 -0
- package/dist/mjs/SVGLoader.test.d.ts +1 -0
- package/dist/mjs/UndoRedoHistory.test.d.ts +1 -0
- package/dist/mjs/commands/uniteCommands.test.d.ts +1 -0
- package/dist/mjs/components/AbstractComponent.transformBy.test.d.ts +1 -0
- package/dist/mjs/components/BackgroundComponent.test.d.ts +1 -0
- package/dist/mjs/components/Stroke.test.d.ts +1 -0
- package/dist/mjs/components/TextComponent.test.d.ts +1 -0
- package/dist/mjs/components/UnknownSVGObject.test.d.ts +1 -0
- package/dist/mjs/components/builders/FreehandLineBuilder.test.d.ts +1 -0
- package/dist/mjs/localizations/getLocalizationTable.test.d.ts +1 -0
- package/dist/mjs/rendering/RenderingStyle.test.d.ts +1 -0
- package/dist/mjs/rendering/caching/CacheRecord.test.d.ts +1 -0
- package/dist/mjs/rendering/caching/RenderingCache.test.d.ts +1 -0
- package/dist/mjs/rendering/renderers/DummyRenderer.test.d.ts +1 -0
- package/dist/mjs/rendering/renderers/TextOnlyRenderer.test.d.ts +1 -0
- package/dist/mjs/shortcuts/KeyBinding.test.d.ts +1 -0
- package/dist/mjs/shortcuts/KeyboardShortcutManager.test.d.ts +1 -0
- package/dist/mjs/toolbar/EdgeToolbar.test.d.ts +1 -0
- package/dist/mjs/tools/Eraser.test.d.ts +1 -0
- package/dist/mjs/tools/FindTool.test.d.ts +1 -0
- package/dist/mjs/tools/InputFilter/InputPipeline.test.d.ts +1 -0
- package/dist/mjs/tools/PanZoom.test.d.ts +1 -0
- package/dist/mjs/tools/Pen.test.d.ts +1 -0
- package/dist/mjs/tools/SelectionTool/SelectionTool.test.d.ts +1 -0
- package/dist/mjs/tools/UndoRedoShortcut.test.d.ts +1 -0
- package/dist/mjs/util/ReactiveValue.test.d.ts +1 -0
- package/dist/mjs/version.mjs +1 -1
- package/dist/mjs/version.test.d.ts +1 -0
- package/docs/img/readme-images/js-draw.jpg +0 -0
- package/docs/img/readme-images/unsupported-elements--in-editor.png +0 -0
- package/package.json +5 -4
- package/tools/allLocales.js +0 -4
- package/tools/copyREADME.ts +0 -62
package/dist/cjs/Editor.js
CHANGED
@@ -1047,7 +1047,7 @@ class Editor {
|
|
1047
1047
|
const iconLicenseText = this.icons.licenseInfo();
|
1048
1048
|
const notices = [];
|
1049
1049
|
notices.push({
|
1050
|
-
heading:
|
1050
|
+
heading: 'js-draw',
|
1051
1051
|
text: [
|
1052
1052
|
`v${version_1.default.number}`,
|
1053
1053
|
'',
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/cjs/version.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/mjs/Editor.mjs
CHANGED
@@ -1018,7 +1018,7 @@ export class Editor {
|
|
1018
1018
|
const iconLicenseText = this.icons.licenseInfo();
|
1019
1019
|
const notices = [];
|
1020
1020
|
notices.push({
|
1021
|
-
heading:
|
1021
|
+
heading: 'js-draw',
|
1022
1022
|
text: [
|
1023
1023
|
`v${version.number}`,
|
1024
1024
|
'',
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/mjs/version.mjs
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
Binary file
|
Binary file
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "js-draw",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.2",
|
4
4
|
"description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ",
|
5
5
|
"types": "./dist/mjs/lib.d.ts",
|
6
6
|
"main": "./dist/cjs/lib.js",
|
@@ -64,11 +64,11 @@
|
|
64
64
|
"postpack": "ts-node tools/copyREADME.ts revert"
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
|
-
"@js-draw/math": "1.0.
|
67
|
+
"@js-draw/math": "^1.0.2",
|
68
68
|
"@melloware/coloris": "0.21.0"
|
69
69
|
},
|
70
70
|
"devDependencies": {
|
71
|
-
"@js-draw/build-tool": "^1.0.
|
71
|
+
"@js-draw/build-tool": "^1.0.2",
|
72
72
|
"@types/bezier-js": "4.1.0",
|
73
73
|
"@types/jest": "29.5.3",
|
74
74
|
"@types/jsdom": "21.1.1"
|
@@ -86,5 +86,6 @@
|
|
86
86
|
"pen",
|
87
87
|
"freehand",
|
88
88
|
"svg"
|
89
|
-
]
|
89
|
+
],
|
90
|
+
"gitHead": "f5a92284625b49b2ef6541bdafce1bd926c10441"
|
90
91
|
}
|
package/tools/allLocales.js
DELETED
package/tools/copyREADME.ts
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
|
2
|
-
// Copies this repository's root README and its resources to the js-draw folder
|
3
|
-
// prior to bundling. This allows the README to be shown on NPM.
|
4
|
-
import * as fs from 'node:fs';
|
5
|
-
import * as path from 'node:path';
|
6
|
-
|
7
|
-
// Path to the root repository
|
8
|
-
const packagePath = path.dirname(__dirname);
|
9
|
-
const rootPath = path.dirname(path.dirname(packagePath));
|
10
|
-
|
11
|
-
const relativeReadmeResourcesPath = path.join('docs', 'img', 'readme-images');
|
12
|
-
const originalReadmePath = path.join(rootPath, 'README.md');
|
13
|
-
const targetReadmePath = path.join(packagePath, 'README.md');
|
14
|
-
const originalReadmeResourcesPath = path.join(rootPath, relativeReadmeResourcesPath);
|
15
|
-
const targetReadmeResourcesPath = path.join(packagePath, relativeReadmeResourcesPath);
|
16
|
-
|
17
|
-
const lastArg = process.argv[process.argv.length - 1];
|
18
|
-
if (lastArg !== 'revert' && lastArg !== 'copy') {
|
19
|
-
console.log(`Usage: ${process.argv0} revert`);
|
20
|
-
console.log(` or ${process.argv0} copy`);
|
21
|
-
process.exit(1);
|
22
|
-
}
|
23
|
-
|
24
|
-
if (lastArg === 'copy') {
|
25
|
-
console.log('Copying README.md and its dependencies to the js-draw package...');
|
26
|
-
if (fs.existsSync(targetReadmePath)) {
|
27
|
-
console.error('ERROR: README already exists in target location. Exiting.');
|
28
|
-
console.error('Be careful running postpack: It will DELETE this README and associated resources');
|
29
|
-
process.exit(1);
|
30
|
-
}
|
31
|
-
|
32
|
-
if (fs.existsSync(targetReadmeResourcesPath)) {
|
33
|
-
console.error('ERROR: README resources directory already exists in this package. Exiting.');
|
34
|
-
console.error('Be careful running postpack: It will delete this resources directory.');
|
35
|
-
process.exit(1);
|
36
|
-
}
|
37
|
-
|
38
|
-
fs.copyFileSync(originalReadmePath, targetReadmePath);
|
39
|
-
fs.mkdirSync(targetReadmeResourcesPath, { recursive: true });
|
40
|
-
|
41
|
-
for (const filePath of fs.readdirSync(originalReadmeResourcesPath)) {
|
42
|
-
const sourcePath = path.join(originalReadmeResourcesPath, filePath);
|
43
|
-
const targetPath = path.join(targetReadmeResourcesPath, filePath);
|
44
|
-
fs.copyFileSync(sourcePath, targetPath);
|
45
|
-
}
|
46
|
-
} else {
|
47
|
-
console.log('Removing the copied README.md and its dependencies from the js-draw package...');
|
48
|
-
if (!fs.existsSync(targetReadmePath)) {
|
49
|
-
console.error('ERROR: README does not exist in target location. Exiting.');
|
50
|
-
process.exit(1);
|
51
|
-
}
|
52
|
-
|
53
|
-
if (!fs.existsSync(targetReadmeResourcesPath)) {
|
54
|
-
console.error('ERROR: README resources directory does not exist in the target location. Exiting.');
|
55
|
-
process.exit(1);
|
56
|
-
}
|
57
|
-
|
58
|
-
fs.unlinkSync(targetReadmePath);
|
59
|
-
fs.rmSync(targetReadmeResourcesPath, { recursive: true });
|
60
|
-
}
|
61
|
-
|
62
|
-
|