vibe-editor 0.0.0 → 0.0.1-dev

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.
Files changed (38) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +12 -9
  3. package/package.json +11 -5
  4. package/src/scripts/js/Core.js +212 -186
  5. package/src/scripts/js/MusicProcessor.js +286 -128
  6. package/src/scripts/js/{VerovioScoreEditor.js → VIBE.js} +62 -28
  7. package/src/scripts/js/assets/mei_template.js +5 -1
  8. package/src/scripts/js/datastructures/MeasureMatrix.js +6 -85
  9. package/src/scripts/js/datastructures/ScoreGraph.js +1 -1
  10. package/src/scripts/js/entry.js +3 -2
  11. package/src/scripts/js/gui/Annotations.js +188 -111
  12. package/src/scripts/js/gui/HarmonyLabel.js +26 -2
  13. package/src/scripts/js/gui/ScoreManipulator.js +61 -31
  14. package/src/scripts/js/gui/Tabbar.js +41 -21
  15. package/src/scripts/js/gui/Toolbar.js +4 -4
  16. package/src/scripts/js/handlers/AnnotationChangeHandler.js +131 -60
  17. package/src/scripts/js/handlers/ClickModeHandler.js +406 -143
  18. package/src/scripts/js/handlers/CustomToolbarHandler.js +26 -24
  19. package/src/scripts/js/handlers/GlobalKeyboardHandler.js +12 -7
  20. package/src/scripts/js/handlers/InsertModeHandler.js +26 -32
  21. package/src/scripts/js/handlers/KeyModeHandler.js +12 -86
  22. package/src/scripts/js/handlers/LabelHandler.js +3 -2
  23. package/src/scripts/js/handlers/PhantomElementHandler.js +1 -1
  24. package/src/scripts/js/handlers/ScoreManipulatorHandler.js +101 -14
  25. package/src/scripts/js/handlers/SelectionHandler.js +80 -36
  26. package/src/scripts/js/handlers/SideBarHandler.js +10 -3
  27. package/src/scripts/js/handlers/WindowHandler.js +25 -4
  28. package/src/scripts/js/utils/DOMCreator.js +1 -1
  29. package/src/scripts/js/utils/MEIConverter.js +13 -1
  30. package/src/scripts/js/utils/MEIOperations.js +180 -187
  31. package/src/scripts/js/utils/Mouse2SVG.js +200 -43
  32. package/src/scripts/js/utils/ReactWrapper.js +46 -0
  33. package/src/scripts/js/utils/RectWrapper.js +10 -0
  34. package/src/scripts/js/utils/SVGEditor.js +94 -3
  35. package/src/scripts/js/utils/VerovioWrapper.js +6 -1
  36. package/src/scripts/js/utils/convenienceQueries.js +2 -0
  37. package/src/scripts/js/utils/mappings.js +322 -56
  38. package/src/styles/VerovioScoreEditor.css +0 -694
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 mnowakow
3
+ Copyright (c) 2023 Matthias Nowakowski
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # VerovioScoreEditor
1
+ # VIBE = Verovio Interface for Browser-based Editing
2
2
 
3
- Current version in npm repo: ![npm](https://img.shields.io/npm/v/verovioscoreeditor)
3
+ Current version in npm repo: ![npm](https://img.shields.io/npm/v/vibe-editor)
4
4
 
5
- Current version on github: ![GitHub package.json version](https://img.shields.io/github/package-json/v/mnowakow/VerovioScoreEditor)
5
+ Current version on github: ![GitHub package.json version](https://img.shields.io/github/package-json/v/mnowakow/VIBE)
6
6
 
7
7
  A score editor using verovio as rendering engine
8
8
 
@@ -17,35 +17,38 @@ The data can be present in different forms. So to indicate which kind of process
17
17
  The `xmlData` can be passed either as String of the corresponding MusicXML or MEI, or as Document.
18
18
 
19
19
  ```
20
- var vse = new VerovioScoreEditor(container, {data: xmlData})
20
+ var vibe = new VIBE(container, {data: xmlData})
21
21
  ```
22
22
 
23
23
  ### urls
24
24
  The `url` must include a source for MEI data.
25
25
 
26
26
  ```
27
- var vse = new VerovioScoreEditor(container, {meiURL: url})
27
+ var vibe = new VIBE(container, {meiURL: url})
28
28
  ```
29
29
 
30
30
  ### empty score
31
31
  Initialization with an empty measure
32
32
  ```
33
- var vse = new VerovioScoreEditor(container, null)
33
+ var vibe = new VIBE(container, null)
34
34
  ```
35
35
 
36
36
  ### callbacks
37
37
  A callback can be passed to return the changed data as MEI. The MEI is returned as String
38
38
 
39
39
  ```
40
- var vse = new VerovioScoreEditor(container, {data: xmlData}, callback)
40
+ var vibe = new VIBE(container, {data: xmlData}, callback)
41
41
  ```
42
42
  or
43
43
  ```
44
- var vse = new VerovioScoreEditor(container, {meiURL: url}, callback)
44
+ var vibe = new VIBE(container, {meiURL: url}, callback)
45
45
  ```
46
46
  or
47
47
  ```
48
- var vse = new VerovioScoreEditor(container, null, callback)
48
+ var vibe = new VIBE(container, null, callback)
49
49
  ```
50
50
 
51
51
 
52
+ ## Sources
53
+
54
+ Parts of the Code are based on the [Neon Editor](https://github.com/DDMAL/Neon) by DDMAL.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vibe-editor",
3
- "version": "0.0.0",
4
- "main": "src/scripts/js/VerovioScoreEditor.js",
3
+ "version": "0.0.1-dev",
4
+ "main": "src/scripts/js/VIBE.js",
5
5
  "keywords": [],
6
6
  "author": "Matthias Nowakowski",
7
7
  "license": "MIT",
@@ -12,7 +12,6 @@
12
12
  "build": "./node_modules/.bin/webpack --mode=production"
13
13
  },
14
14
  "files": [
15
- "src/styles/*.css",
16
15
  "src/images/*/*",
17
16
  "src/scripts/js/*",
18
17
  "src/fonts/*"
@@ -22,6 +21,8 @@
22
21
  "@babel/preset-env": "^7.16.11",
23
22
  "@popperjs/core": "^2.11.6",
24
23
  "@tonejs/midi": "^2.0.28",
24
+ "@types/react": "^18.2.28",
25
+ "@types/react-dom": "^18.2.13",
25
26
  "axios": "^1.4.0",
26
27
  "babel": "^6.23.0",
27
28
  "babel-loader": "^8.2.3",
@@ -32,6 +33,7 @@
32
33
  "css-loader": "^6.7.1",
33
34
  "d3": "^5.11.0",
34
35
  "esbuild": "0.17.14",
36
+ "eslint-plugin-react-hooks": "^4.6.0",
35
37
  "file-loader": "^6.2.0",
36
38
  "h5p-lib-controls": "^0.0.15",
37
39
  "interactjs": "^1.10.11",
@@ -39,6 +41,8 @@
39
41
  "mini-css-extract-plugin": "^2.6.0",
40
42
  "node-sass": "^7.0.1",
41
43
  "postcss-loader": "^6.2.1",
44
+ "react-color": "^2.19.3",
45
+ "react-dom": "^18.2.0",
42
46
  "sass-loader": "^12.6.0",
43
47
  "soundfont-player": "^0.12.0",
44
48
  "style-loader": "^3.3.1",
@@ -46,11 +50,13 @@
46
50
  "typescript": "^4.6.2",
47
51
  "update": "^0.7.4",
48
52
  "web-midi-api": "^2.2.5",
49
- "webpack": "^5.70.0",
53
+ "webpack": "^5.88.2",
50
54
  "webpack-bundle-analyzer": "^4.5.0",
51
55
  "webpack-cli": "^4.9.2"
52
56
  },
53
57
  "devDependencies": {
54
- "@types/verovio": "^3.13.0"
58
+ "@types/verovio": "^3.13.0",
59
+ "raw-loader": "^4.0.2",
60
+ "url-loader": "^4.1.1"
55
61
  }
56
62
  }