@pqina/pintura 8.82.13 → 8.82.15

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 (78) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/locale/de_DE/core/de_DE.js +12 -22
  3. package/locale/de_DE/crop/de_DE.js +11 -23
  4. package/locale/de_DE/index.js +0 -1
  5. package/locale/de_DE/resize/de_DE.js +1 -4
  6. package/locale/de_DE/trim/de_DE.js +11 -25
  7. package/locale/en_GB/core/en_GB.js +12 -21
  8. package/locale/en_GB/crop/en_GB.js +11 -23
  9. package/locale/en_GB/index.js +0 -1
  10. package/locale/en_GB/resize/en_GB.js +1 -4
  11. package/locale/en_GB/trim/en_GB.js +12 -26
  12. package/locale/es_ES/core/es_ES.js +12 -21
  13. package/locale/es_ES/crop/es_ES.js +11 -23
  14. package/locale/es_ES/index.js +0 -1
  15. package/locale/es_ES/resize/es_ES.js +1 -4
  16. package/locale/es_ES/trim/es_ES.js +12 -31
  17. package/locale/fr_FR/core/fr_FR.js +12 -21
  18. package/locale/fr_FR/crop/fr_FR.js +11 -23
  19. package/locale/fr_FR/index.js +0 -1
  20. package/locale/fr_FR/resize/fr_FR.js +1 -4
  21. package/locale/fr_FR/trim/fr_FR.js +12 -27
  22. package/locale/hi_IN/core/hi_IN.js +12 -21
  23. package/locale/hi_IN/crop/hi_IN.js +11 -23
  24. package/locale/hi_IN/index.js +0 -1
  25. package/locale/hi_IN/resize/hi_IN.js +1 -4
  26. package/locale/hi_IN/trim/hi_IN.js +11 -25
  27. package/locale/it_IT/core/it_IT.js +12 -20
  28. package/locale/it_IT/crop/it_IT.js +11 -23
  29. package/locale/it_IT/index.js +0 -1
  30. package/locale/it_IT/resize/it_IT.js +1 -4
  31. package/locale/it_IT/trim/it_IT.js +12 -26
  32. package/locale/ja_JP/core/ja_JP.js +12 -22
  33. package/locale/ja_JP/crop/ja_JP.js +11 -23
  34. package/locale/ja_JP/index.js +0 -1
  35. package/locale/ja_JP/resize/ja_JP.js +1 -4
  36. package/locale/ja_JP/trim/ja_JP.js +11 -26
  37. package/locale/ko_KR/core/ko_KR.js +13 -1
  38. package/locale/ko_KR/crop/ko_KR.js +11 -23
  39. package/locale/ko_KR/index.js +0 -1
  40. package/locale/ko_KR/resize/ko_KR.js +1 -4
  41. package/locale/ko_KR/trim/ko_KR.js +11 -26
  42. package/locale/nb_NO/core/nb_NO.js +12 -19
  43. package/locale/nb_NO/crop/nb_NO.js +11 -23
  44. package/locale/nb_NO/index.js +0 -1
  45. package/locale/nb_NO/resize/nb_NO.js +1 -4
  46. package/locale/nb_NO/trim/nb_NO.js +12 -26
  47. package/locale/nl_NL/core/nl_NL.js +12 -21
  48. package/locale/nl_NL/crop/nl_NL.js +11 -23
  49. package/locale/nl_NL/index.js +0 -1
  50. package/locale/nl_NL/resize/nl_NL.js +1 -4
  51. package/locale/nl_NL/trim/nl_NL.js +12 -27
  52. package/locale/pt_PT/core/pt_PT.js +11 -21
  53. package/locale/pt_PT/crop/pt_PT.js +11 -23
  54. package/locale/pt_PT/index.js +0 -1
  55. package/locale/pt_PT/resize/pt_PT.js +1 -4
  56. package/locale/pt_PT/trim/pt_PT.js +12 -26
  57. package/locale/ru_RU/core/ru_RU.js +12 -21
  58. package/locale/ru_RU/crop/ru_RU.js +11 -23
  59. package/locale/ru_RU/index.js +0 -1
  60. package/locale/ru_RU/resize/ru_RU.js +1 -4
  61. package/locale/ru_RU/trim/ru_RU.js +12 -26
  62. package/locale/sv_SE/core/sv_SE.js +12 -21
  63. package/locale/sv_SE/crop/sv_SE.js +11 -23
  64. package/locale/sv_SE/index.js +0 -1
  65. package/locale/sv_SE/resize/sv_SE.js +1 -4
  66. package/locale/sv_SE/trim/sv_SE.js +12 -26
  67. package/locale/zh_CN/core/zh_CN.js +12 -21
  68. package/locale/zh_CN/crop/zh_CN.js +11 -23
  69. package/locale/zh_CN/index.js +0 -1
  70. package/locale/zh_CN/resize/zh_CN.js +1 -4
  71. package/locale/zh_CN/trim/zh_CN.js +11 -25
  72. package/package.json +1 -1
  73. package/pintura-iife.js +2 -2
  74. package/pintura-umd.js +2 -2
  75. package/pintura.css +2 -2
  76. package/pintura.d.ts +36 -0
  77. package/pintura.js +2 -2
  78. package/pintura.module.css +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.82.15 | 2024-07-23
4
+
5
+ - Fix issue with locale file exports not being serializable.
6
+ - Fix the Trim util locale incorrectly being included in the core package combined locale export.
7
+
8
+ ## 8.82.14 | 2024-07-23
9
+
10
+ - Fix issue with text alignment while editing text.
11
+
3
12
  ## 8.82.13 | 2024-07-22
4
13
 
5
14
  - Improve compatibility with stricter Content Security Policies.
@@ -12,8 +12,7 @@ export default {
12
12
  labelNone: 'Keine',
13
13
  labelEdit: 'Bearbeiten',
14
14
  labelClose: 'Schließen',
15
- labelSupportError: (features) =>
16
- `${features.join(', ')} wird in diesem Browser nicht unterstützt`,
15
+ labelSupportError: `{features} wird in diesem Browser nicht unterstützt`,
17
16
 
18
17
  // defaults
19
18
  labelColor: 'Farbe',
@@ -63,26 +62,17 @@ export default {
63
62
  // status
64
63
  statusLabelButtonClose: 'Schließen',
65
64
  statusIconButtonClose: IconCross,
66
- statusLabelLoadImage: (state) => {
67
- if (!state || !state.task) return 'Warten auf Bild';
68
- if (state.error)
69
- return state.error.code === 'IMAGE_TOO_SMALL'
70
- ? 'Mindestgröße ist {minWidth} × {minHeight}'
71
- : 'Fehler beim Laden des Bilds';
72
- if (state.task === 'blob-to-bitmap') return 'Bild wird geladen…';
73
- return 'Vorschau wird erstellt…';
74
- },
75
-
76
- // processing status message
77
- statusLabelProcessImage: (state) => {
78
- if (!state || !state.task) return undefined;
79
- if (state.task === 'store') {
80
- if (state.error) return 'Fehler beim Hochladen des Bilds';
81
- return 'Bild wird hochgeladen…';
82
- }
83
- if (state.error) return 'Fehler bei Bildverarbeitung';
84
- return 'Bild wird verarbeitet…';
85
- },
65
+
66
+ // new status options
67
+ statusImageLoadNone: 'Warten auf Bild',
68
+ statusImageLoadMinSize: 'Mindestgröße ist {minWidth} × {minHeight}',
69
+ statusImageLoadError: 'Fehler beim Laden des Bilds',
70
+ statusImageLoadPrepare: 'Bild wird geladen…',
71
+ statusImageLoadBusy: 'Vorschau wird erstellt…',
72
+ statusImageUploadError: 'Fehler beim Hochladen des Bilds',
73
+ statusImageUploadBusy: 'Bild wird hochgeladen…',
74
+ statusImageProcessError: 'Fehler bei Bildverarbeitung',
75
+ statusImageProcessBusy: 'Bild wird verarbeitet…',
86
76
  };
87
77
 
88
78
  export const MarkupEditor = {
@@ -12,30 +12,18 @@ export default {
12
12
  cropIconButtonFlipHorizontal:
13
13
  '<g stroke="none" fill="currentColor"><path d="M11.93 7.007V20a1 1 0 0 1-1 1H5.78a1 1 0 0 1-.93-1.368l5.15-12.993a1 1 0 0 1 1.929.368z"/><path d="M14 7.007V20a1 1 0 0 0 1 1h5.149a1 1 0 0 0 .93-1.368l-5.15-12.993A1 1 0 0 0 14 7.007z" opacity=".6"/></g>',
14
14
 
15
- cropIconSelectPreset: (locale, aspectRatio) => {
16
- const [a, b, c] = !aspectRatio
17
- ? [0.2, 0.3, 0.4]
18
- : [
19
- aspectRatio < 1 ? 1 : 0.3,
20
- aspectRatio === 1 ? 0.85 : 0.5,
21
- aspectRatio > 1 ? 1 : 0.3,
22
- ];
23
- return `<g fill="currentColor">
24
- <rect opacity="${a}" x="2" y="4" width="10" height="18" rx="1"/>
25
- <rect opacity="${b}" x="4" y="8" width="14" height="14" rx="1"/>
26
- <rect opacity="${c}" x="6" y="12" width="17" height="10" rx="1"/>
27
- </g>`;
28
- },
15
+ cropIconSelectPreset: `<g fill="currentColor">
16
+ <rect opacity="{a}" x="2" y="4" width="10" height="18" rx="1"/>
17
+ <rect opacity="{b}" x="4" y="8" width="14" height="14" rx="1"/>
18
+ <rect opacity="{c}" x="6" y="12" width="17" height="10" rx="1"/>
19
+ </g>`,
29
20
 
30
- cropIconCropBoundary: (locale, isBoundToImage) => {
31
- const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1];
32
- return `<g fill="currentColor">
33
- <rect opacity="${a}" x="2" y="3" width="20" height="20" rx="1"/>
34
- <rect opacity="${b}" x="7" y="8" width="10" height="10" rx="1"/>
35
- <rect opacity="${c}" x="4" y="8" width="14" height="14" rx="1"/>
36
- <rect opacity="${d}" x="12" y="4" width="10" height="10" rx="1"/>
37
- </g>`;
38
- },
21
+ cropIconCropBoundary: `<g fill="currentColor">
22
+ <rect opacity="{a}" x="2" y="3" width="20" height="20" rx="1"/>
23
+ <rect opacity="{b}" x="7" y="8" width="10" height="10" rx="1"/>
24
+ <rect opacity="{c}" x="4" y="8" width="14" height="14" rx="1"/>
25
+ <rect opacity="{d}" x="12" y="4" width="10" height="10" rx="1"/>
26
+ </g>`,
39
27
 
40
28
  cropLabelButtonRecenter: 'Neu zentrieren',
41
29
  cropLabelButtonRotateLeft: 'Nach links drehen',
@@ -38,5 +38,4 @@ export default {
38
38
  ...Redact,
39
39
  ...Sticker,
40
40
  ...Fill,
41
- ...Trim,
42
41
  };
@@ -12,8 +12,5 @@ export default {
12
12
 
13
13
  resizeTitleButtonMaintainAspectRatio: 'Seitenverhältnis bewahren',
14
14
 
15
- resizeIconButtonMaintainAspectRatio: (active, activeFraction) =>
16
- `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24" ><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 ${
17
- (activeFraction - 1) * 3
18
- })" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
15
+ resizeIconButtonMaintainAspectRatio: `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24"><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 {activeFraction})" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
19
16
  };
@@ -30,31 +30,17 @@ export default {
30
30
  </g>`,
31
31
 
32
32
  // overrides
33
- statusLabelLoadImage: (state) => {
34
- if (!state || !state.task) return 'Warten auf Medium';
35
- if (state.error) {
36
- if (state.error.code === 'IMAGE_TOO_SMALL') {
37
- return 'Mindestgröße ist {minWidth} &times; {minHeight}';
38
- } else if (state.error.code === 'VIDEO_TOO_SHORT') {
39
- const unit = state.error.metadata.minDuration === 1 ? 'Sekunde' : 'Sekunden';
40
- return `Die Mindestvideodauer beträgt {minDuration} ${unit}`;
41
- } else {
42
- return 'Fehler beim Laden des Medium';
43
- }
44
- }
45
- if (state.task === 'blob-to-bitmap') return 'Medium wird geladen&hellip;';
46
- return 'Vorschau wird erstellt&hellip;';
47
- },
48
-
49
- statusLabelProcessImage: (state) => {
50
- if (!state || !state.task) return undefined;
51
- if (state.task === 'store') {
52
- if (state.error) return 'Fehler beim Hochladen des Medium';
53
- return 'Medium wird hochgeladen&hellip;';
54
- }
55
- if (state.error) return 'Fehler bei Medienverarbeitung';
56
- return 'Medium wird verarbeitet&hellip;';
57
- },
33
+ unitSeconds: ['Sekunde', 'Sekunden'],
34
+ statusImageLoadNone: 'Warten auf Medium',
35
+ statusImageLoadMinSize: 'Mindestgröße ist {minWidth} &times; {minHeight}',
36
+ statusImageLoadMinDuration: `Die Mindestvideodauer beträgt {minDuration} {seconds}`,
37
+ statusImageLoadError: 'Fehler beim Laden des Medium',
38
+ statusImageLoadPrepare: 'Medium wird geladen&hellip;',
39
+ statusImageLoadBusy: 'Vorschau wird erstellt&hellip;',
40
+ statusImageUploadError: 'Fehler beim Hochladen des Medium',
41
+ statusImageUploadBusy: 'Medium wird hochgeladen&hellip;',
42
+ statusImageProcessError: 'Fehler bei Medienverarbeitung',
43
+ statusImageProcessBusy: 'Medium wird verarbeitet&hellip;',
58
44
 
59
45
  cropLabelCropBoundaryEdge: 'Rand der Medium',
60
46
  };
@@ -12,7 +12,7 @@ export default {
12
12
  labelNone: 'None',
13
13
  labelEdit: 'Edit',
14
14
  labelClose: 'Close',
15
- labelSupportError: (features) => `${features.join(', ')} not supported on this browser`,
15
+ labelSupportError: `{features} not supported on this browser`,
16
16
 
17
17
  // defaults
18
18
  labelColor: 'Color',
@@ -63,26 +63,17 @@ export default {
63
63
  // status
64
64
  statusLabelButtonClose: 'Close',
65
65
  statusIconButtonClose: IconCross,
66
- statusLabelLoadImage: (state) => {
67
- if (!state || !state.task) return 'Waiting for image';
68
- if (state.error)
69
- return state.error.code === 'IMAGE_TOO_SMALL'
70
- ? 'Minimum image size is {minWidth} &times; {minHeight}'
71
- : 'Error loading image';
72
- if (state.task === 'blob-to-bitmap') return 'Preparing image&hellip;';
73
- return 'Loading image&hellip;';
74
- },
75
-
76
- // processing status message
77
- statusLabelProcessImage: (state) => {
78
- if (!state || !state.task) return undefined;
79
- if (state.task === 'store') {
80
- if (state.error) return 'Error uploading image';
81
- return 'Uploading image&hellip;';
82
- }
83
- if (state.error) return 'Error processing image';
84
- return 'Processing image&hellip;';
85
- },
66
+
67
+ // new status options
68
+ statusImageLoadNone: 'Waiting for image',
69
+ statusImageLoadMinSize: 'Minimum image size is {minWidth} &times; {minHeight}',
70
+ statusImageLoadPrepare: 'Preparing image&hellip;',
71
+ statusImageLoadBusy: 'Loading image&hellip;',
72
+ statusImageLoadError: 'Error loading image',
73
+ statusImageProcessBusy: 'Processing image&hellip;',
74
+ statusImageProcessError: 'Error processing image',
75
+ statusImageUploadBusy: 'Uploading image&hellip;',
76
+ statusImageUploadError: 'Error uploading image',
86
77
  };
87
78
 
88
79
  export const MarkupEditor = {
@@ -12,30 +12,18 @@ export default {
12
12
  cropIconButtonFlipHorizontal:
13
13
  '<g stroke="none" fill="currentColor"><path d="M11.93 7.007V20a1 1 0 0 1-1 1H5.78a1 1 0 0 1-.93-1.368l5.15-12.993a1 1 0 0 1 1.929.368z"/><path d="M14 7.007V20a1 1 0 0 0 1 1h5.149a1 1 0 0 0 .93-1.368l-5.15-12.993A1 1 0 0 0 14 7.007z" opacity=".6"/></g>',
14
14
 
15
- cropIconSelectPreset: (locale, aspectRatio) => {
16
- const [a, b, c] = !aspectRatio
17
- ? [0.2, 0.3, 0.4]
18
- : [
19
- aspectRatio < 1 ? 1 : 0.3,
20
- aspectRatio === 1 ? 0.85 : 0.5,
21
- aspectRatio > 1 ? 1 : 0.3,
22
- ];
23
- return `<g fill="currentColor">
24
- <rect opacity="${a}" x="2" y="4" width="10" height="18" rx="1"/>
25
- <rect opacity="${b}" x="4" y="8" width="14" height="14" rx="1"/>
26
- <rect opacity="${c}" x="6" y="12" width="17" height="10" rx="1"/>
27
- </g>`;
28
- },
15
+ cropIconSelectPreset: `<g fill="currentColor">
16
+ <rect opacity="{a}" x="2" y="4" width="10" height="18" rx="1"/>
17
+ <rect opacity="{b}" x="4" y="8" width="14" height="14" rx="1"/>
18
+ <rect opacity="{c}" x="6" y="12" width="17" height="10" rx="1"/>
19
+ </g>`,
29
20
 
30
- cropIconCropBoundary: (locale, isBoundToImage) => {
31
- const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1];
32
- return `<g fill="currentColor">
33
- <rect opacity="${a}" x="2" y="3" width="20" height="20" rx="1"/>
34
- <rect opacity="${b}" x="7" y="8" width="10" height="10" rx="1"/>
35
- <rect opacity="${c}" x="4" y="8" width="14" height="14" rx="1"/>
36
- <rect opacity="${d}" x="12" y="4" width="10" height="10" rx="1"/>
37
- </g>`;
38
- },
21
+ cropIconCropBoundary: `<g fill="currentColor">
22
+ <rect opacity="{a}" x="2" y="3" width="20" height="20" rx="1"/>
23
+ <rect opacity="{b}" x="7" y="8" width="10" height="10" rx="1"/>
24
+ <rect opacity="{c}" x="4" y="8" width="14" height="14" rx="1"/>
25
+ <rect opacity="{d}" x="12" y="4" width="10" height="10" rx="1"/>
26
+ </g>`,
39
27
 
40
28
  cropLabelButtonRecenter: 'Recenter',
41
29
  cropLabelButtonRotateLeft: 'Rotate left',
@@ -38,5 +38,4 @@ export default {
38
38
  ...Redact,
39
39
  ...Sticker,
40
40
  ...Fill,
41
- ...Trim,
42
41
  };
@@ -12,8 +12,5 @@ export default {
12
12
 
13
13
  resizeTitleButtonMaintainAspectRatio: 'Maintain aspectratio',
14
14
 
15
- resizeIconButtonMaintainAspectRatio: (active, activeFraction) =>
16
- `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24"><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 ${
17
- (activeFraction - 1) * 3
18
- })" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
15
+ resizeIconButtonMaintainAspectRatio: `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24"><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 {activeFraction})" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
19
16
  };
@@ -29,32 +29,18 @@ export default {
29
29
  <path fill="currentColor" d="M6 8 L10 12 L6 16 Z M18 8 L14 12 L18 16 Z"/>
30
30
  </g>`,
31
31
 
32
- // overrides, replace image with media
33
- statusLabelLoadImage: (state) => {
34
- if (!state || !state.task) return 'Waiting for media';
35
- if (state.error) {
36
- if (state.error.code === 'IMAGE_TOO_SMALL') {
37
- return 'Minimum media size is {minWidth} &times; {minHeight}';
38
- } else if (state.error.code === 'VIDEO_TOO_SHORT') {
39
- const unit = state.error.metadata.minDuration === 1 ? 'second' : 'seconds';
40
- return `Minimum video duration is {minDuration} ${unit}`;
41
- } else {
42
- return 'Error loading media';
43
- }
44
- }
45
- if (state.task === 'blob-to-bitmap') return 'Preparing media&hellip;';
46
- return 'Loading media&hellip;';
47
- },
48
-
49
- statusLabelProcessImage: (state) => {
50
- if (!state || !state.task) return undefined;
51
- if (state.task === 'store') {
52
- if (state.error) return 'Error uploading media';
53
- return 'Uploading media&hellip;';
54
- }
55
- if (state.error) return 'Error processing media';
56
- return 'Processing media&hellip;';
57
- },
32
+ // overrides
33
+ unitSeconds: ['second', 'seconds'],
34
+ statusImageLoadNone: 'Waiting for media',
35
+ statusImageLoadMinSize: 'Minimum media size is {minWidth} &times; {minHeight}',
36
+ statusImageLoadMinDuration: `Minimum video duration is {minDuration} {seconds}`,
37
+ statusImageLoadError: 'Error loading media',
38
+ statusImageLoadPrepare: 'Preparing media&hellip;',
39
+ statusImageLoadBusy: 'Loading media&hellip;',
40
+ statusImageUploadError: 'Error uploading media',
41
+ statusImageUploadBusy: 'Uploading media&hellip;',
42
+ statusImageProcessError: 'Error processing media',
43
+ statusImageProcessBusy: 'Processing media&hellip;',
58
44
 
59
45
  cropLabelCropBoundaryEdge: 'Edge of media',
60
46
  };
@@ -12,7 +12,7 @@ export default {
12
12
  labelNone: 'Ninguno',
13
13
  labelEdit: 'Editar',
14
14
  labelClose: 'Cerrar',
15
- labelSupportError: (features) => `Este navegador no soporta ${features.join(', ')}`,
15
+ labelSupportError: `Este navegador no soporta {features}`,
16
16
 
17
17
  // defaults
18
18
  labelColor: 'Color',
@@ -61,26 +61,17 @@ export default {
61
61
  // status
62
62
  statusLabelButtonClose: 'Cerrar',
63
63
  statusIconButtonClose: IconCross,
64
- statusLabelLoadImage: (state) => {
65
- if (!state || !state.task) return 'Esperando imagen';
66
- if (state.error)
67
- return state.error.code === 'IMAGE_TOO_SMALL'
68
- ? 'Tamaño mínmo de {minWidth} &times; {minHeight}'
69
- : 'Error de carga de la imagen';
70
- if (state.task === 'blob-to-bitmap') return 'Preparando imagen&hellip;';
71
- return 'Cargando imagen&hellip;';
72
- },
73
-
74
- // processing status message
75
- statusLabelProcessImage: (state) => {
76
- if (!state || !state.task) return undefined;
77
- if (state.task === 'store') {
78
- if (state.error) return 'Error de subida de imagen';
79
- return 'Subiendo imagen&hellip;';
80
- }
81
- if (state.error) return 'Error de proceso de imagen';
82
- return 'Procesando imagen&hellip;';
83
- },
64
+
65
+ // new status options
66
+ statusImageLoadNone: 'Esperando imagen',
67
+ statusImageLoadMinSize: 'Tamaño mínmo de {minWidth} &times; {minHeight}',
68
+ statusImageLoadError: 'Error de carga de la imagen',
69
+ statusImageLoadPrepare: 'Preparando imagen&hellip;',
70
+ statusImageLoadBusy: 'Cargando imagen&hellip;',
71
+ statusImageUploadError: 'Error de subida de imagen',
72
+ statusImageUploadBusy: 'Subiendo imagen&hellip;',
73
+ statusImageProcessError: 'Error de proceso de imagen',
74
+ statusImageProcessBusy: 'Procesando imagen&hellip;',
84
75
  };
85
76
 
86
77
  export const MarkupEditor = {
@@ -12,30 +12,18 @@ export default {
12
12
  cropIconButtonFlipHorizontal:
13
13
  '<g stroke="none" fill="currentColor"><path d="M11.93 7.007V20a1 1 0 0 1-1 1H5.78a1 1 0 0 1-.93-1.368l5.15-12.993a1 1 0 0 1 1.929.368z"/><path d="M14 7.007V20a1 1 0 0 0 1 1h5.149a1 1 0 0 0 .93-1.368l-5.15-12.993A1 1 0 0 0 14 7.007z" opacity=".6"/></g>',
14
14
 
15
- cropIconSelectPreset: (locale, aspectRatio) => {
16
- const [a, b, c] = !aspectRatio
17
- ? [0.2, 0.3, 0.4]
18
- : [
19
- aspectRatio < 1 ? 1 : 0.3,
20
- aspectRatio === 1 ? 0.85 : 0.5,
21
- aspectRatio > 1 ? 1 : 0.3,
22
- ];
23
- return `<g fill="currentColor">
24
- <rect opacity="${a}" x="2" y="4" width="10" height="18" rx="1"/>
25
- <rect opacity="${b}" x="4" y="8" width="14" height="14" rx="1"/>
26
- <rect opacity="${c}" x="6" y="12" width="17" height="10" rx="1"/>
27
- </g>`;
28
- },
15
+ cropIconSelectPreset: `<g fill="currentColor">
16
+ <rect opacity="{a}" x="2" y="4" width="10" height="18" rx="1"/>
17
+ <rect opacity="{b}" x="4" y="8" width="14" height="14" rx="1"/>
18
+ <rect opacity="{c}" x="6" y="12" width="17" height="10" rx="1"/>
19
+ </g>`,
29
20
 
30
- cropIconCropBoundary: (locale, isBoundToImage) => {
31
- const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1];
32
- return `<g fill="currentColor">
33
- <rect opacity="${a}" x="2" y="3" width="20" height="20" rx="1"/>
34
- <rect opacity="${b}" x="7" y="8" width="10" height="10" rx="1"/>
35
- <rect opacity="${c}" x="4" y="8" width="14" height="14" rx="1"/>
36
- <rect opacity="${d}" x="12" y="4" width="10" height="10" rx="1"/>
37
- </g>`;
38
- },
21
+ cropIconCropBoundary: `<g fill="currentColor">
22
+ <rect opacity="{a}" x="2" y="3" width="20" height="20" rx="1"/>
23
+ <rect opacity="{b}" x="7" y="8" width="10" height="10" rx="1"/>
24
+ <rect opacity="{c}" x="4" y="8" width="14" height="14" rx="1"/>
25
+ <rect opacity="{d}" x="12" y="4" width="10" height="10" rx="1"/>
26
+ </g>`,
39
27
 
40
28
  cropLabelButtonRecenter: 'Recentrar',
41
29
  cropLabelButtonRotateLeft: 'Rotar a la izquierda',
@@ -38,5 +38,4 @@ export default {
38
38
  ...Redact,
39
39
  ...Sticker,
40
40
  ...Fill,
41
- ...Trim,
42
41
  };
@@ -12,8 +12,5 @@ export default {
12
12
 
13
13
  resizeTitleButtonMaintainAspectRatio: 'Mantener relacion de aspecto',
14
14
 
15
- resizeIconButtonMaintainAspectRatio: (active, activeFraction) =>
16
- `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24" ><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 ${
17
- (activeFraction - 1) * 3
18
- })" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
15
+ resizeIconButtonMaintainAspectRatio: `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24"><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 {activeFraction})" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
19
16
  };
@@ -29,37 +29,18 @@ export default {
29
29
  <path fill="currentColor" d="M6 8 L10 12 L6 16 Z M18 8 L14 12 L18 16 Z"/>
30
30
  </g>`,
31
31
 
32
- // overrides, replace image with media
33
- statusLabelLoadImage: (state) => {
34
- if (!state || !state.task) return 'Esperando media';
35
- if (state.error) {
36
- if (state.error.code === 'IMAGE_TOO_SMALL') {
37
- return 'Tamaño mínmo de {minWidth} &times; {minHeight}';
38
- } else if (state.error.code === 'VIDEO_TOO_SHORT') {
39
- const unit = state.error.metadata.minDuration === 1 ? 'segundo' : 'segundos';
40
- return `La duración mínima del video es de {minDuration} ${unit}`;
41
- } else {
42
- return 'Error al cargar media';
43
- }
44
- }
45
- if (state.error)
46
- return state.error.code === 'IMAGE_TOO_SMALL'
47
- ? 'Tamaño mínmo de {minWidth} &times; {minHeight}'
48
- : 'Error al cargar media';
49
- if (state.task === 'blob-to-bitmap') return 'Preparando media&hellip;';
50
- return 'Cargando media&hellip;';
51
- },
52
-
53
- // processing status message
54
- statusLabelProcessImage: (state) => {
55
- if (!state || !state.task) return undefined;
56
- if (state.task === 'store') {
57
- if (state.error) return 'Error de subida media';
58
- return 'Subiendo media&hellip;';
59
- }
60
- if (state.error) return 'Error de proceso media';
61
- return 'Procesando media&hellip;';
62
- },
32
+ // overrides
33
+ unitSeconds: ['segundo', 'segundos'],
34
+ statusImageLoadNone: 'Esperando media',
35
+ statusImageLoadMinSize: 'Tamaño mínmo de {minWidth} &times; {minHeight}',
36
+ statusImageLoadMinDuration: `La duración mínima del video es de {minDuration} {seconds}`,
37
+ statusImageLoadError: 'Error al cargar media',
38
+ statusImageLoadPrepare: 'Preparando media&hellip;',
39
+ statusImageLoadBusy: 'Cargando media&hellip;',
40
+ statusImageUploadError: 'Error de subida media',
41
+ statusImageUploadBusy: 'Subiendo media&hellip;',
42
+ statusImageProcessError: 'Error de proceso media',
43
+ statusImageProcessBusy: 'Procesando media&hellip;',
63
44
 
64
45
  cropLabelCropBoundaryEdge: 'Borde de media',
65
46
  };
@@ -12,7 +12,7 @@ export default {
12
12
  labelNone: 'Aucun',
13
13
  labelEdit: 'Modifier',
14
14
  labelClose: 'Fermer',
15
- labelSupportError: (features) => `${features.join(', ')} non pris en charge dans ce navigateur`,
15
+ labelSupportError: `{features} non pris en charge dans ce navigateur`,
16
16
 
17
17
  // defaults
18
18
  labelColor: 'Couleur',
@@ -61,26 +61,17 @@ export default {
61
61
  // status
62
62
  statusLabelButtonClose: 'Fermer',
63
63
  statusIconButtonClose: IconCross,
64
- statusLabelLoadImage: (state) => {
65
- if (!state || !state.task) return `Attente de l'image`;
66
- if (state.error)
67
- return state.error.code === 'IMAGE_TOO_SMALL'
68
- ? 'La taille minimale est de {minWidth} &times; {minHeight}'
69
- : `Erreur de chargement de l'image`;
70
- if (state.task === 'blob-to-bitmap') return `Préparer l'image&hellip;`;
71
- return `Chargement de l'image&hellip;`;
72
- },
73
-
74
- // processing status message
75
- statusLabelProcessImage: (state) => {
76
- if (!state || !state.task) return undefined;
77
- if (state.task === 'store') {
78
- if (state.error) return `Erreur de transfert de l'image`;
79
- return `Transfert de l'image&hellip;`;
80
- }
81
- if (state.error) return `Erreur de traitement de l'image`;
82
- return `Traitement de l'image&hellip;`;
83
- },
64
+
65
+ // new status options
66
+ statusImageLoadNone: `Attente de l'image`,
67
+ statusImageLoadMinSize: 'La taille minimale est de {minWidth} &times; {minHeight}',
68
+ statusImageLoadError: `Erreur de chargement de l'image`,
69
+ statusImageLoadPrepare: `Préparer l'image&hellip;`,
70
+ statusImageLoadBusy: `Chargement de l'image&hellip;`,
71
+ statusImageUploadError: `Erreur de transfert de l'image`,
72
+ statusImageUploadBusy: `Transfert de l'image&hellip;`,
73
+ statusImageProcessError: `Erreur de traitement de l'image`,
74
+ statusImageProcessBusy: `Traitement de l'image&hellip;`,
84
75
  };
85
76
 
86
77
  export const MarkupEditor = {
@@ -12,30 +12,18 @@ export default {
12
12
  cropIconButtonFlipHorizontal:
13
13
  '<g stroke="none" fill="currentColor"><path d="M11.93 7.007V20a1 1 0 0 1-1 1H5.78a1 1 0 0 1-.93-1.368l5.15-12.993a1 1 0 0 1 1.929.368z"/><path d="M14 7.007V20a1 1 0 0 0 1 1h5.149a1 1 0 0 0 .93-1.368l-5.15-12.993A1 1 0 0 0 14 7.007z" opacity=".6"/></g>',
14
14
 
15
- cropIconSelectPreset: (locale, aspectRatio) => {
16
- const [a, b, c] = !aspectRatio
17
- ? [0.2, 0.3, 0.4]
18
- : [
19
- aspectRatio < 1 ? 1 : 0.3,
20
- aspectRatio === 1 ? 0.85 : 0.5,
21
- aspectRatio > 1 ? 1 : 0.3,
22
- ];
23
- return `<g fill="currentColor">
24
- <rect opacity="${a}" x="2" y="4" width="10" height="18" rx="1"/>
25
- <rect opacity="${b}" x="4" y="8" width="14" height="14" rx="1"/>
26
- <rect opacity="${c}" x="6" y="12" width="17" height="10" rx="1"/>
27
- </g>`;
28
- },
15
+ cropIconSelectPreset: `<g fill="currentColor">
16
+ <rect opacity="{a}" x="2" y="4" width="10" height="18" rx="1"/>
17
+ <rect opacity="{b}" x="4" y="8" width="14" height="14" rx="1"/>
18
+ <rect opacity="{c}" x="6" y="12" width="17" height="10" rx="1"/>
19
+ </g>`,
29
20
 
30
- cropIconCropBoundary: (locale, isBoundToImage) => {
31
- const [a, b, c, d] = isBoundToImage ? [0.3, 1, 0, 0] : [0, 0, 0.3, 1];
32
- return `<g fill="currentColor">
33
- <rect opacity="${a}" x="2" y="3" width="20" height="20" rx="1"/>
34
- <rect opacity="${b}" x="7" y="8" width="10" height="10" rx="1"/>
35
- <rect opacity="${c}" x="4" y="8" width="14" height="14" rx="1"/>
36
- <rect opacity="${d}" x="12" y="4" width="10" height="10" rx="1"/>
37
- </g>`;
38
- },
21
+ cropIconCropBoundary: `<g fill="currentColor">
22
+ <rect opacity="{a}" x="2" y="3" width="20" height="20" rx="1"/>
23
+ <rect opacity="{b}" x="7" y="8" width="10" height="10" rx="1"/>
24
+ <rect opacity="{c}" x="4" y="8" width="14" height="14" rx="1"/>
25
+ <rect opacity="{d}" x="12" y="4" width="10" height="10" rx="1"/>
26
+ </g>`,
39
27
 
40
28
  cropLabelButtonRecenter: 'Recentrer',
41
29
  cropLabelButtonRotateLeft: 'Pivoter à gauche',
@@ -38,5 +38,4 @@ export default {
38
38
  ...Redact,
39
39
  ...Sticker,
40
40
  ...Fill,
41
- ...Trim,
42
41
  };
@@ -12,8 +12,5 @@ export default {
12
12
 
13
13
  resizeTitleButtonMaintainAspectRatio: `Maintenir le rapport d'apparence`,
14
14
 
15
- resizeIconButtonMaintainAspectRatio: (active, activeFraction) =>
16
- `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24" ><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 ${
17
- (activeFraction - 1) * 3
18
- })" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
15
+ resizeIconButtonMaintainAspectRatio: `<defs><mask id="mask1" x="-2" y="-2" width="24" height="24"><rect x="0" y="0" width="24" height="10" fill="#fff" stroke="none"/></mask></defs><g fill="none" fill-rule="evenodd"><g mask="url(#mask1)"><path transform="translate(0 {activeFraction})" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M9.401 10.205v-.804a2.599 2.599 0 0 1 5.198 0V17"/></g><rect fill="currentColor" x="7" y="10" width="10" height="7" rx="1.5"/></g>`,
19
16
  };