js-draw 0.10.2 → 0.11.0

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 (47) hide show
  1. package/.github/ISSUE_TEMPLATE/translation.yml +72 -0
  2. package/CHANGELOG.md +7 -0
  3. package/dist/bundle.js +1 -1
  4. package/dist/src/Editor.d.ts +3 -1
  5. package/dist/src/Editor.js +52 -15
  6. package/dist/src/SVGLoader.js +3 -2
  7. package/dist/src/components/AbstractComponent.d.ts +1 -0
  8. package/dist/src/components/AbstractComponent.js +15 -6
  9. package/dist/src/components/ImageComponent.d.ts +3 -0
  10. package/dist/src/components/ImageComponent.js +12 -1
  11. package/dist/src/localizations/es.js +1 -1
  12. package/dist/src/rendering/renderers/SVGRenderer.js +9 -5
  13. package/dist/src/toolbar/HTMLToolbar.js +2 -1
  14. package/dist/src/toolbar/IconProvider.d.ts +1 -0
  15. package/dist/src/toolbar/IconProvider.js +7 -0
  16. package/dist/src/toolbar/localization.d.ts +8 -0
  17. package/dist/src/toolbar/localization.js +8 -0
  18. package/dist/src/toolbar/widgets/InsertImageWidget.d.ts +19 -0
  19. package/dist/src/toolbar/widgets/InsertImageWidget.js +169 -0
  20. package/dist/src/toolbar/widgets/lib.d.ts +1 -0
  21. package/dist/src/toolbar/widgets/lib.js +1 -0
  22. package/dist/src/tools/PanZoom.d.ts +2 -1
  23. package/dist/src/tools/PanZoom.js +43 -17
  24. package/dist/src/tools/PasteHandler.js +1 -39
  25. package/dist/src/util/fileToBase64.d.ts +3 -0
  26. package/dist/src/util/fileToBase64.js +13 -0
  27. package/dist/src/util/waitForTimeout.d.ts +2 -0
  28. package/dist/src/util/waitForTimeout.js +7 -0
  29. package/package.json +11 -11
  30. package/src/Editor.ts +66 -16
  31. package/src/SVGLoader.ts +1 -0
  32. package/src/components/AbstractComponent.ts +18 -4
  33. package/src/components/ImageComponent.ts +15 -0
  34. package/src/localizations/es.ts +3 -0
  35. package/src/rendering/renderers/SVGRenderer.ts +6 -1
  36. package/src/toolbar/HTMLToolbar.ts +3 -1
  37. package/src/toolbar/IconProvider.ts +8 -0
  38. package/src/toolbar/localization.ts +19 -1
  39. package/src/toolbar/toolbar.css +2 -0
  40. package/src/toolbar/widgets/InsertImageWidget.css +44 -0
  41. package/src/toolbar/widgets/InsertImageWidget.ts +222 -0
  42. package/src/toolbar/widgets/lib.ts +2 -0
  43. package/src/tools/PanZoom.test.ts +65 -0
  44. package/src/tools/PanZoom.ts +46 -14
  45. package/src/tools/PasteHandler.ts +2 -51
  46. package/src/util/fileToBase64.ts +18 -0
  47. package/src/util/waitForTimeout.ts +9 -0
@@ -61,6 +61,46 @@ body:
61
61
  placeholder: "Zoom"
62
62
  validations:
63
63
  required: false
64
+ - type: input
65
+ id: translation-image
66
+ attributes:
67
+ label: "image"
68
+ description: "Translate `Image`."
69
+ placeholder: "Image"
70
+ validations:
71
+ required: false
72
+ - type: input
73
+ id: translation-inputAltText
74
+ attributes:
75
+ label: "inputAltText"
76
+ description: "Translate `Alt text: `."
77
+ placeholder: "Alt text: "
78
+ validations:
79
+ required: false
80
+ - type: input
81
+ id: translation-chooseFile
82
+ attributes:
83
+ label: "chooseFile"
84
+ description: "Translate `Choose file: `."
85
+ placeholder: "Choose file: "
86
+ validations:
87
+ required: false
88
+ - type: input
89
+ id: translation-submit
90
+ attributes:
91
+ label: "submit"
92
+ description: "Translate `Submit`."
93
+ placeholder: "Submit"
94
+ validations:
95
+ required: false
96
+ - type: input
97
+ id: translation-cancel
98
+ attributes:
99
+ label: "cancel"
100
+ description: "Translate `Cancel`."
101
+ placeholder: "Cancel"
102
+ validations:
103
+ required: false
64
104
  - type: input
65
105
  id: translation-resetView
66
106
  attributes:
@@ -237,6 +277,14 @@ body:
237
277
  placeholder: "Lock rotation"
238
278
  validations:
239
279
  required: false
280
+ - type: input
281
+ id: translation-paste
282
+ attributes:
283
+ label: "paste"
284
+ description: "Translate `Paste`."
285
+ placeholder: "Paste"
286
+ validations:
287
+ required: false
240
288
  - type: input
241
289
  id: translation-dropdownShown
242
290
  attributes:
@@ -269,6 +317,30 @@ body:
269
317
  placeholder: "(color) => `Color changed to ${color}`"
270
318
  validations:
271
319
  required: false
320
+ - type: input
321
+ id: translation-imageSize
322
+ attributes:
323
+ label: "imageSize"
324
+ description: "Translate ``(size, units) => `Image size: ${size} ${units}` ``."
325
+ placeholder: "(size, units) => `Image size: ${size} ${units}`"
326
+ validations:
327
+ required: false
328
+ - type: input
329
+ id: translation-errorImageHasZeroSize
330
+ attributes:
331
+ label: "errorImageHasZeroSize"
332
+ description: "Translate `Error: Image has zero size`."
333
+ placeholder: "Error: Image has zero size"
334
+ validations:
335
+ required: false
336
+ - type: input
337
+ id: translation-imageLoadError
338
+ attributes:
339
+ label: "imageLoadError"
340
+ description: "Translate ``(message) => `Error loading image: ${message}` ``."
341
+ placeholder: "(message) => `Error loading image: ${message}`"
342
+ validations:
343
+ required: false
272
344
  - type: input
273
345
  id: translation-penTool
274
346
  attributes:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 0.11.0
2
+ * Added a dialog for inserting images and changing existing image alt text.
3
+ * Inertial scrolling: Workaround issue on some devices on touch gesture cancel.
4
+
5
+ # 0.10.3
6
+ * Inertial scrolling: Don't start inertial scroll if a gesture was, in total, shorter than roughly 30 ms. Such gestures can be caused accidentally. For example, by resting/lifting a hand from a device screen.
7
+
1
8
  # 0.10.2
2
9
  * Performance improvements
3
10