useblocks 1.1.65 → 1.1.71

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 (195) hide show
  1. package/README.md +2 -0
  2. package/assets/images/project-settings-inbox-envelope.png +0 -0
  3. package/assets/images/project-settings-plugin-support-avatar.png +0 -0
  4. package/fileManager.d.ts +519 -0
  5. package/iframe/css/sandbox-dark.css +1 -1
  6. package/iframe/css/sandbox-darktheme.css +1 -1
  7. package/iframe/css/sandbox-light.css +1 -1
  8. package/iframe/css/sandbox.css +112 -89
  9. package/iframe/js/amp.DllX-Im0.js +1 -0
  10. package/iframe/js/iframe-eblock.js +1 -1
  11. package/iframe/js/iframe.js +1 -1
  12. package/iframe/js/rules.4N5s3OV-.js +1 -1
  13. package/npm-publish.manifest.json +7 -7
  14. package/package.json +4 -1
  15. package/runtime/THIRD_PARTY_LICENSES.txt +1 -1
  16. package/static/core/{d2f93451.js → 0e53b7b5.js} +3 -3
  17. package/static/core/0fe242f22.js +3251 -0
  18. package/static/core/{e9ff66762.js → 10f0dad9.js} +3 -3
  19. package/static/core/{a79573972.js → 115218a42.js} +3 -3
  20. package/static/core/{d6b377d3.js → 1202bfdd.js} +3 -3
  21. package/static/core/{8d4aa933.js → 16c2d0e42.js} +6 -6
  22. package/static/core/{8aa09f022.js → 1ae75b972.js} +3 -3
  23. package/static/core/{e7c982c02.js → 2011fc95.js} +3 -3
  24. package/static/core/{925a1cfd2.js → 211482892.js} +3 -3
  25. package/static/core/222d29d9.js +468 -0
  26. package/static/core/{f8c9371e.js → 23546a64.js} +238 -257
  27. package/static/core/{6e177eb6.js → 26a1af95.js} +3 -3
  28. package/static/core/{9d8297c7.js → 27f62a39.js} +3 -3
  29. package/static/core/{fb834fb22.js → 288ca9522.js} +6 -6
  30. package/static/core/{45da436c.js → 28e9d3ff.js} +3 -3
  31. package/static/core/{1c82c2d52.js → 2bd2da322.js} +3 -3
  32. package/static/core/{712b11ba.js → 2c65c059.js} +3 -3
  33. package/static/core/{1d2a32d02.js → 2f216fd4.js} +4 -4
  34. package/static/core/{45fcca4f2.js → 2fd502bd2.js} +3 -3
  35. package/static/core/{b303b2a4.js → 34e0b0dc.js} +3 -3
  36. package/static/core/{b22e5dd5.js → 35ad3ae5.js} +173 -173
  37. package/static/core/{8e6e6aaa2.js → 35e0d55e.js} +3 -3
  38. package/static/core/36bf6931.js +2119 -0
  39. package/static/core/{a953bf24.js → 375e98282.js} +3 -3
  40. package/static/core/{40d6d494.js → 38302247.js} +3 -3
  41. package/static/core/{99fd0b342.js → 38e879e9.js} +3 -3
  42. package/static/core/{b283b340.js → 39a68c91.js} +3 -3
  43. package/static/core/{68edd344.js → 3bbe4800.js} +3 -3
  44. package/static/core/{43108a122.js → 3bda5ccf2.js} +4 -4
  45. package/static/core/{220b2c2a.js → 3c1ef117.js} +7 -7
  46. package/static/core/{9982be76.js → 3f22a9d32.js} +2018 -1808
  47. package/static/core/{8b8811812.js → 412f0d1c.js} +3 -3
  48. package/static/core/{601b4e7b.js → 46959096.js} +3 -3
  49. package/static/core/{9d1a7a182.js → 46abec11.js} +3 -3
  50. package/static/core/{292fe55d2.js → 4740c91e2.js} +3 -3
  51. package/static/core/{c7588e5f.js → 48560c89.js} +387 -385
  52. package/static/core/{1d173e97.js → 48d0a8bd2.js} +3 -3
  53. package/static/core/{af691d1f.js → 490f59592.js} +21 -21
  54. package/static/core/{205266672.js → 4953bced.js} +3 -3
  55. package/static/core/{668ae858.js → 4b59ab9f.js} +3 -3
  56. package/static/core/{664c38f8.js → 4bc74a4f.js} +3 -3
  57. package/static/core/{8b28b024.js → 508bcaba.js} +5 -5
  58. package/static/core/513594a8.js +583 -0
  59. package/static/core/54eadcf42.js +39 -0
  60. package/static/core/{da4b0874.js → 578fcc88.js} +3 -3
  61. package/static/core/{43764f5b.js → 585259872.js} +189 -181
  62. package/static/core/{cee370ea.js → 5b64d3ce2.js} +8 -8
  63. package/static/core/{b450a16a.js → 5e082e16.js} +59 -59
  64. package/static/core/{bc1a9cb2.js → 5e7c6c9c.js} +4 -4
  65. package/static/core/{bc557d9c.js → 60dcae06.js} +6 -6
  66. package/static/core/{fa23ae7b.js → 616e99a4.js} +3 -3
  67. package/static/core/{66f4dea3.js → 62c13c96.js} +3 -3
  68. package/static/core/{d892d2c82.js → 62f33dda.js} +3 -3
  69. package/static/core/{9c236031.js → 62fd385b.js} +3 -3
  70. package/static/core/{958e85b5.js → 6313868b.js} +3 -3
  71. package/static/core/63206e112.js +8956 -0
  72. package/static/core/{67e3306c.js → 68ec11c8.js} +640 -638
  73. package/static/core/{951b9e3d.js → 6ca6133e.js} +9 -9
  74. package/static/core/6e2a0152.js +61 -0
  75. package/static/core/{656a0edc2.js → 6ee1838f2.js} +3 -3
  76. package/static/core/{b09300472.js → 7527fdc92.js} +3 -3
  77. package/static/core/{d8df6d5a.js → 75c2f232.js} +8 -8
  78. package/static/core/{49a037b02.js → 76c0586a2.js} +3 -3
  79. package/static/core/{2d8a7133.js → 76ea88d3.js} +5 -5
  80. package/static/core/{42e9eb802.js → 77c2efbb.js} +3 -3
  81. package/static/core/{5d0c727e.js → 7d07bfac.js} +3 -3
  82. package/static/core/{d46cb9672.js → 7d19dd28.js} +4 -4
  83. package/static/core/{2d13936a.js → 7ec8e1fc.js} +3 -3
  84. package/static/core/{9954153b2.js → 84326fa6.js} +3 -3
  85. package/static/core/{c52e08d6.js → 86515d932.js} +4 -4
  86. package/static/core/{a97bdbc8.js → 879bd3b1.js} +3 -3
  87. package/static/core/{e47711662.js → 8a061db42.js} +5 -5
  88. package/static/core/{4b0f73af.js → 8ed78147.js} +3 -3
  89. package/static/core/{1cbab2af2.js → 8ef06b232.js} +10 -10
  90. package/static/core/{75e8d4672.js → 8fafd12f2.js} +3 -3
  91. package/static/core/{a898230f.js → 8fbde229.js} +3 -3
  92. package/static/core/{f61e3e55.js → 92871f5a2.js} +7 -7
  93. package/static/core/{a83b01cb2.js → 92d1a0c9.js} +519 -523
  94. package/static/core/9355751a.js +126 -0
  95. package/static/core/{95d1d1aa2.js → 93b3c668.js} +3 -3
  96. package/static/core/{873142eb.js → 9933d0ff2.js} +3 -3
  97. package/static/core/{96417e98.js → 9a0c05f1.js} +4 -4
  98. package/static/core/9ab1c444.js +11452 -0
  99. package/static/core/{c8cb5d88.js → 9c09ec92.js} +7 -7
  100. package/static/core/{31ba662c2.js → 9df9c5262.js} +5 -5
  101. package/static/core/{85ea16112.js → a061a37c2.js} +3 -3
  102. package/static/core/{fff1a8622.js → a64e6cce2.js} +3 -3
  103. package/static/core/{f5d4906d2.js → a6d92d0b2.js} +5 -5
  104. package/static/core/{2e9906f7.js → a7518d2c.js} +3 -3
  105. package/static/core/{3c6f1d122.js → a8bed12d2.js} +3 -3
  106. package/static/core/{72e2612a2.js → a8f08cb22.js} +3 -3
  107. package/static/core/{6eb316fe2.js → ac70dfae2.js} +6 -6
  108. package/static/core/{89e7cc57.js → b8cecec8.js} +17 -17
  109. package/static/core/{a35fd8d22.js → b8ed4fd62.js} +13 -13
  110. package/static/core/{474c47d5.js → b9b92e01.js} +15 -15
  111. package/static/core/{b57c9e1f.js → bc703487.js} +3 -3
  112. package/static/core/{b165c6f6.js → bc9faec1.js} +134 -134
  113. package/static/core/{54e7728d.js → bf3a9be2.js} +5 -5
  114. package/static/core/c370a46c.js +683 -0
  115. package/static/core/{cf21862f.js → c3b45fb6.js} +1846 -1847
  116. package/static/core/{d54353e72.js → c56eaffd.js} +3 -3
  117. package/static/core/{f562fb51.js → c5cf470c.js} +3 -3
  118. package/static/core/{ceffb8322.js → c8a41267.js} +3 -3
  119. package/static/core/{19572306.js → cc251d11.js} +3 -3
  120. package/static/core/{84df1edd2.js → cce631ad.js} +3 -3
  121. package/static/core/{a88996b3.js → ce9be2ec2.js} +4965 -4753
  122. package/static/core/cf655a1a.js +33627 -0
  123. package/static/core/{ab86b06a.js → d3bbb05e.js} +3 -3
  124. package/static/core/{4a9bd173.js → d43babb9.js} +3 -3
  125. package/static/core/{1a415abd2.js → d46d10f12.js} +12 -12
  126. package/static/core/{7ad0031e2.js → d684b4ef2.js} +38 -38
  127. package/static/core/{affffdf2.js → d8835f5f.js} +7 -7
  128. package/static/core/{b04145ff2.js → db5fa769.js} +10 -10
  129. package/static/core/{d32841a32.js → dbc6f1e52.js} +3 -3
  130. package/static/core/{db4e60fa2.js → dc256ccd2.js} +3 -3
  131. package/static/core/{eaa635532.js → dc6fa7c1.js} +3 -3
  132. package/static/core/{4b9709dc.js → dcc518ef2.js} +3 -3
  133. package/static/core/df237243.js +56 -0
  134. package/static/core/{5ea0fc40.js → e02024fb2.js} +97 -97
  135. package/static/core/e199fd0a.js +49 -0
  136. package/static/core/{678594cd.js → e3a541ab.js} +3 -3
  137. package/static/core/{6f0d961a2.js → e4c6d91e2.js} +7 -7
  138. package/static/core/{c2a2dc79.js → e4d01015.js} +40775 -44576
  139. package/static/core/e57e8a80.js +22 -0
  140. package/static/core/{d7a9fd822.js → e6ac2e652.js} +3 -3
  141. package/static/core/{de2e2a02.js → e6c7e14f.js} +3 -3
  142. package/static/core/{81a5ffb92.js → e83c0b482.js} +3 -3
  143. package/static/core/{2515c6a52.js → e923d1aa2.js} +3 -3
  144. package/static/core/{b78a67b9.js → ea6c5c93.js} +3237 -3101
  145. package/static/core/{d85e34c42.js → ebd51d83.js} +3 -3
  146. package/static/core/{b54ad117.js → ec4f2d562.js} +3 -3
  147. package/static/core/{da25e8fc.js → f0364bbd2.js} +4 -4
  148. package/static/core/{b1b3186f.js → f51ccb57.js} +7 -7
  149. package/static/core/{7fd85aa0.js → f73bbe35.js} +5 -5
  150. package/static/core/{211ca90b.js → f85b09cb.js} +3 -3
  151. package/static/core/{3ab5d1a4.js → f9aaa4b7.js} +7 -7
  152. package/static/core/{4c5c889d.js → fc962c9a2.js} +5 -5
  153. package/static/core/{fd9034a2.js → fd7386aa2.js} +37 -37
  154. package/static/core/{62dd04ca2.js → fe4feb362.js} +3 -3
  155. package/static/core/{f3b4a3102.js → ffcf92522.js} +3 -3
  156. package/static/media/image-editor/fonts/Rubik-Black.woff2 +0 -0
  157. package/static/media/image-editor/fonts/Rubik-Bold.woff2 +0 -0
  158. package/static/media/image-editor/fonts/Rubik-Light.woff2 +0 -0
  159. package/static/media/image-editor/fonts/Rubik-Regular.woff2 +0 -0
  160. package/static/media/image-editor/fonts/caveat-v23-cyrillic_latin-regular.woff2 +0 -0
  161. package/static/media/image-editor/fonts/commissioner-v24-cyrillic_latin-regular.woff2 +0 -0
  162. package/static/media/image-editor/fonts/inter-v20-cyrillic_latin-regular.woff2 +0 -0
  163. package/static/media/image-editor/fonts/oswald-v57-cyrillic_latin-regular.woff2 +0 -0
  164. package/static/media/image-editor/fonts/pacifico-v23-cyrillic_latin-regular.woff2 +0 -0
  165. package/static/media/image-editor/fonts/playfair-display-v40-cyrillic_latin-regular.woff2 +0 -0
  166. package/static/umd-runtime/ui-kit.js +1638 -1416
  167. package/test-font.otf +0 -0
  168. package/test-font.ttf +0 -0
  169. package/test-font.woff2 +0 -0
  170. package/two_step_headless_plugin.html +1 -1
  171. package/ui-kit/index.js +1317 -1104
  172. package/{useblocks-core.bfe3fe29.js → useblocks-core.77131b3d.js} +8 -8
  173. package/useblocks-esm.js +6 -3
  174. package/useblocks-po.77131b3d.js +5945 -0
  175. package/useblocks.d.ts +36 -525
  176. package/useblocks.js +3 -3
  177. package/vite/index.cjs +4 -4
  178. package/vite/index.d.ts +4 -4
  179. package/vite/index.js +4 -4
  180. package/vite/pluginDev/index.cjs +2 -2
  181. package/vite/pluginDev/index.d.ts +12 -12
  182. package/vite/pluginDev/index.js +2 -2
  183. package/webpack/pluginDev/index.d.ts +12 -12
  184. package/iframe/js/amp.BP7EklKo.js +0 -1
  185. package/static/core/2047d7f8.js +0 -12294
  186. package/static/core/63b7b25e.js +0 -68
  187. package/static/core/6dbdca2f.js +0 -2089
  188. package/static/core/8460710a.js +0 -27
  189. package/static/core/86577bae.js +0 -666
  190. package/static/core/97aafd5d.js +0 -43109
  191. package/static/core/aa783b9b.js +0 -124
  192. package/static/core/db999761.js +0 -465
  193. package/static/core/dc19c4fa.js +0 -93052
  194. /package/iframe/{iframe-eblock.bfe3fe29.html → iframe-eblock.77131b3d.html} +0 -0
  195. /package/iframe/{iframe.bfe3fe29.html → iframe.77131b3d.html} +0 -0
package/useblocks.d.ts CHANGED
@@ -1,521 +1,4 @@
1
- interface FileManageErrorInfo$1 {
2
- message?: string;
3
- code?: FileManagerErrorCode;
4
- status?: number;
5
- raw?: any;
6
- stack?: string;
7
- }
8
- /**
9
- * Error codes for FileManager API operations.
10
- */
11
- type FileManagerErrorCode =
12
- // --- Files ---
13
- 'FileNotFound' | 'FileAlreadyExists' | 'FileInvalidName' | 'FileAccessDenied' | 'FileReadError' | 'FileWriteError' | 'FileTooLarge' | 'FileTypeNotAllowed' | 'FileCorrupted' | 'FileChecksumMismatch' | 'FileStorageQuotaExceeded' | 'FileLocked' | 'FileVersionConflict' |
14
- // --- Folders / directories ---
15
- 'FolderNotFound' | 'FolderAlreadyExists' | 'FolderInvalidName' | 'FolderAccessDenied' | 'FolderReadError' | 'FolderWriteError' | 'FolderQuotaExceeded' | 'FolderNotEmpty' | 'FolderBackendError' | 'FolderTimeout' |
16
- // --- Operational restrictions ---
17
- 'RenameNotAllowed' | 'MoveNotAllowed' | 'CopyNotAllowed' | 'DeleteNotAllowed' | 'MoveIntoSelf' | 'MoveIntoDescendant' | 'CopyIntoSelf' | 'UnsupportedOperation' | 'ConfigError' |
18
- // --- File upload ---
19
- 'FileUploadQuotaExceeded' | 'FileUploadNetworkError' | 'FileUploadTimeout' | 'FileUploadBackendError' |
20
- // --- URL upload ---
21
- 'UploadUrlInvalid' | 'UploadUrlNotReachable' | 'UploadUrlContentTypeNotAllowed' | 'UploadUrlDownloadFailed' | 'FileLookupFailed' | 'FileProxyFailed' | 'FileProxyNotConfigured' |
22
- // --- File download ---
23
- 'FileDownloadNetworkError' | 'FileDownloadTimeout' | 'FileDownloadBackendError' |
24
- // --- Batch operations ---
25
- 'BatchPartialFailure' | 'BatchAllFailed' | 'BatchConflict' | 'BatchValidationFailed' | 'BatchItemLimitExceeded' |
26
- // --- Validation / data ---
27
- 'ValidationError' | 'PayloadTooLarge' | 'UnsupportedMediaType' |
28
- // --- Network / server / infrastructure ---
29
- 'NetworkError' | 'BackendError' | 'Timeout' | 'AuthenticationFailed' | 'AuthorizationFailed' | 'RateLimitExceeded' | 'ServiceUnavailable' |
30
- // --- AI / integrations ---
31
- 'AIResponseInvalid' | 'AIImageGenerationFailed' | 'AIImageGenerationLimitExceeded' | 'IntegrationError' | 'ThirdPartyError' |
32
- // --- General / fallback ---
33
- 'UnknownError';
34
- /**
35
- * Error interface for FileManager API.
36
- * Implemented by FileManagerApiError class which is also exported.
37
- *
38
- * @example
39
- * ```typescript
40
- * // Using the class
41
- * throw new FileManagerApiError(
42
- * 'File not found',
43
- * 'FileNotFound',
44
- * 404
45
- * );
46
- *
47
- * // Or creating a custom class
48
- * class MyFileManagerError extends Error implements IFileManagerApiError {
49
- * constructor(
50
- * message: string,
51
- * public code: FileManagerErrorCode,
52
- * public status?: number,
53
- * public details?: unknown
54
- * ) {
55
- * super(message);
56
- * this.name = 'MyFileManagerError';
57
- * }
58
- * }
59
- * ```
60
- */
61
- interface IFileManagerApiError extends Error {
62
- code: FileManagerErrorCode;
63
- status?: number;
64
- details?: unknown;
65
- }
66
- /**
67
- * Parameters for file query operations.
68
- */
69
- interface FilesQueryParams {
70
- folderId?: string;
71
- search?: string;
72
- page?: number;
73
- limit?: number;
74
- sortBy?: 'name' | 'size' | 'date' | 'type';
75
- sortOrder?: 'asc' | 'desc';
76
- itemType?: 'file' | 'folder' | 'all';
77
- /** Человекочитаемое имя папки для UI (не отправляется на API). */
78
- folderName?: string;
79
- }
80
- /**
81
- * Context payload for operations involving items (files/folders).
82
- */
83
- interface ItemContextPayload$1 {
84
- itemIds?: string[];
85
- itemNames?: string[];
86
- folderId?: string | null;
87
- folderName?: string | null;
88
- }
89
- /**
90
- * Placement options for notification display.
91
- */
92
- type NotifyPlacement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
93
- type Notify$1 = {
94
- type: 'success' | 'info' | 'error' | 'warning';
95
- /** @deprecated Use `title` instead (antd v6+) */
96
- message?: HTMLElement | string;
97
- title?: HTMLElement | string;
98
- description?: HTMLElement | string;
99
- /** @deprecated Use `actions` instead (antd v6+) */
100
- btn?: HTMLElement | string;
101
- actions?: HTMLElement | string;
102
- onClose?: () => void;
103
- duration?: number | null;
104
- icon?: HTMLElement | string;
105
- placement?: NotifyPlacement;
106
- style?: any;
107
- className?: string;
108
- onClick?: () => void;
109
- closeIcon?: HTMLElement | string;
110
- props?: any;
111
- role?: 'alert' | 'status';
112
- };
113
- declare namespace Notify$1 {
114
- /**
115
- * Payload for successful batch operations.
116
- */
117
- export interface OperationSuccessPayload extends ItemContextPayload$1 {
118
- successCount: number;
119
- totalCount: number;
120
- eventSource?: UploadEventSource;
121
- }
122
- /**
123
- * Details of an error for a single item in a batch operation.
124
- */
125
- export interface OperationErrorDetail {
126
- itemId?: string;
127
- itemName?: string;
128
- error: FileManageErrorInfo$1;
129
- }
130
- /**
131
- * Payload for batch operation errors.
132
- * Extends ItemContextPayload with error-specific fields.
133
- */
134
- export interface OperationErrorPayload extends ItemContextPayload$1 {
135
- failCount: number;
136
- totalCount: number;
137
- errors?: OperationErrorDetail[];
138
- /**
139
- * Flag indicating if this is a move-to-trash operation (true) or permanent delete (false).
140
- * Used to differentiate between soft delete (trash) and hard delete operations.
141
- */
142
- isTrashMove?: boolean;
143
- eventSource?: UploadEventSource;
144
- }
145
- /**
146
- * Details of a single item in batch operation results.
147
- * Used in the `detailed` array for batch operations (deleteItems, moveItems, copyItems, uploadFiles).
148
- *
149
- * @template T - Type of successful operation result data
150
- */
151
- export interface BatchOperationDetail<T = unknown> {
152
- /** Correlation identifier for the request item (preferred) */
153
- requestId?: string;
154
- /** Item identifier (for backward compatibility) */
155
- id?: string;
156
- /** Success flag for the operation */
157
- success: boolean;
158
- /** Successful operation result data */
159
- data?: T;
160
- /** Error for failed operation */
161
- error?: FileManageErrorInfo$1;
162
- }
163
- /**
164
- * Result of a batch operation with support for detailed results.
165
- * Unified type for all batch operations in the file manager.
166
- *
167
- * @template T - Type of successful operation result data
168
- */
169
- export interface BatchOperationResult<T = unknown> {
170
- /** Overall success flag (true if all items succeeded) */
171
- success: boolean;
172
- /** Overall operation error (if the entire operation failed) */
173
- error?: string | unknown;
174
- /** Detailed results for each item */
175
- detailed?: BatchOperationDetail<T>[];
176
- }
177
- /**
178
- * Summary of batch operation results for notifications.
179
- * Used for aggregated error and success notifications.
180
- */
181
- export interface BatchOperationSummary {
182
- /** Number of successfully processed items */
183
- successCount: number;
184
- /** Number of items with errors */
185
- failCount: number;
186
- /** Total number of items */
187
- totalCount: number;
188
- /** Error details for each item */
189
- errors: OperationErrorDetail[];
190
- }
191
- /**
192
- * Payload for operations involving a single item (file or folder).
193
- */
194
- export interface SingleItemPayload {
195
- itemId?: string;
196
- itemName?: string;
197
- folderId?: string | null;
198
- folderName?: string | null;
199
- }
200
- /**
201
- * Payload for rename operation errors.
202
- */
203
- export interface RenameErrorPayload extends SingleItemPayload {
204
- error: FileManageErrorInfo$1;
205
- }
206
- /**
207
- * Source of the upload event: 'upload' for file picker/drag-drop, 'uploadByUrl' for URL upload.
208
- */
209
- export type UploadEventSource = 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif';
210
- /**
211
- * Payload for file upload operations.
212
- */
213
- export interface FileUploadPayload extends SingleItemPayload {
214
- uploadId?: string;
215
- eventSource?: UploadEventSource;
216
- }
217
- /**
218
- * Payload for file upload errors.
219
- */
220
- export interface FileUploadErrorPayload extends FileUploadPayload {
221
- error?: FileManageErrorInfo$1;
222
- }
223
- /**
224
- * Payload for unsupported file type errors.
225
- */
226
- export interface UnsupportedFileTypePayload extends FileUploadErrorPayload {
227
- fileType: string;
228
- }
229
- /**
230
- * Payload for folder operation errors and successes.
231
- */
232
- export interface FolderOperationPayload extends ItemContextPayload$1 {
233
- folderId?: string | null;
234
- folderName?: string;
235
- reason?: string;
236
- is_force_create?: boolean;
237
- }
238
- /**
239
- * Payload for file URL validation errors.
240
- */
241
- export interface FileUrlValidationErrorPayload {
242
- url?: string | null;
243
- error: FileManageErrorInfo$1;
244
- }
245
- /**
246
- * Payload for image file operations.
247
- */
248
- export interface ImageFilePayload extends SingleItemPayload {
249
- thumbnail?: string | null;
250
- }
251
- /**
252
- * Payload for URL upload operations.
253
- */
254
- export interface UrlUploadPayload {
255
- url?: string | null;
256
- folderId?: string | null;
257
- folderName?: string | null;
258
- eventSource?: UploadEventSource;
259
- }
260
- /**
261
- * Payload for URL upload errors.
262
- */
263
- export interface UrlUploadErrorPayload extends UrlUploadPayload {
264
- error: FileManageErrorInfo$1;
265
- }
266
- /**
267
- * Payload for file fetch errors.
268
- */
269
- export interface FetchFilesErrorPayload {
270
- params?: FilesQueryParams;
271
- /** Отображаемое имя папки списка (после resolve getItem / path / кэша). */
272
- folderName?: string | null;
273
- }
274
- /**
275
- * Base payload for AI image generation operations.
276
- */
277
- interface AIImageGenerationBasePayload {
278
- request: string;
279
- taskId?: string | null;
280
- }
281
- /**
282
- * Payload for AI image generation started event.
283
- */
284
- export interface AIImageGenerationStartedPayload extends AIImageGenerationBasePayload {
285
- response?: unknown;
286
- }
287
- /**
288
- * Payload for successful AI image generation.
289
- */
290
- export interface AIImageGenerationSuccessPayload extends AIImageGenerationBasePayload {
291
- images: string[];
292
- }
293
- /**
294
- * Payload for failed AI image generation.
295
- */
296
- export interface AIImageGenerationFailedPayload extends AIImageGenerationBasePayload {
297
- response?: unknown;
298
- error?: FileManageErrorInfo$1;
299
- }
300
- /**
301
- * Base type for error notification events.
302
- * Includes innerException field for error details.
303
- *
304
- * @template TId - Notification event ID type
305
- * @template TData - Payload data type
306
- */
307
- export type ErrorEventBase<TId extends string, TData> = {
308
- id: TId;
309
- data?: TData;
310
- innerException?: unknown;
311
- message: string;
312
- title?: string;
313
- placement?: NotifyPlacement;
314
- description?: string;
315
- /**
316
- * Visibility flag for the notification.
317
- * If true, notification will be shown; if false, it will be silent.
318
- * Derived from the `silent` parameter (visibility = !silent).
319
- * Can be modified by event interceptors.
320
- */
321
- visibility?: boolean;
322
- /**
323
- * Level of the operation: 'item' for single item operations, 'batch' for batch operations.
324
- */
325
- level?: 'item' | 'batch';
326
- /**
327
- * Если true — применять TTL-дедупликацию одинаковых уведомлений (после interceptors).
328
- * Для upload/мутаций обычно не задаётся или false.
329
- */
330
- notificationDedupe?: boolean;
331
- };
332
- /**
333
- * Base type for success, warning, and info notification events.
334
- * Does not include innerException field.
335
- *
336
- * @template TId - Notification event ID type
337
- * @template TData - Payload data type
338
- */
339
- export type NotificationEventBase<TId extends string, TData> = {
340
- id: TId;
341
- data?: TData;
342
- message: string;
343
- title?: string;
344
- placement?: NotifyPlacement;
345
- description?: string;
346
- /**
347
- * Visibility flag for the notification.
348
- * If true, notification will be shown; if false, it will be silent.
349
- * Derived from the `silent` parameter (visibility = !silent).
350
- * Can be modified by event interceptors.
351
- */
352
- visibility?: boolean;
353
- /**
354
- * Level of the operation: 'item' for single item operations, 'batch' for batch operations.
355
- */
356
- level?: 'item' | 'batch';
357
- };
358
- /**
359
- * Map of error notification IDs to their payload types for single item operations.
360
- * All item operation errors extend OperationErrorPayload with failCount: 1 and totalCount: 1.
361
- */
362
- export interface ItemErrorMap {
363
- FILE_DELETE_ERROR: OperationErrorPayload;
364
- FILE_MOVE_ERROR: OperationErrorPayload;
365
- FILE_COPY_ERROR: OperationErrorPayload;
366
- }
367
- /**
368
- * Map of error notification IDs to their payload types for batch operations.
369
- * All batch operation errors extend OperationErrorPayload.
370
- */
371
- export interface BatchErrorMap {
372
- FILES_DELETE_ERROR: OperationErrorPayload;
373
- FOLDER_DELETE_ERROR: OperationErrorPayload;
374
- FILES_UPLOAD_BATCH_FAILED: OperationErrorPayload;
375
- FILES_MOVE_ERROR: OperationErrorPayload;
376
- FILES_COPY_ERROR: OperationErrorPayload;
377
- }
378
- /**
379
- * Map of success notification IDs to their payload types for single item operations.
380
- * All item operation successes extend OperationSuccessPayload with successCount: 1 and totalCount: 1.
381
- */
382
- export interface ItemSuccessMap {
383
- FILE_DELETE_SUCCESS: OperationSuccessPayload;
384
- FILE_MOVE_SUCCESS: OperationSuccessPayload;
385
- FILE_COPY_SUCCESS: OperationSuccessPayload;
386
- }
387
- /**
388
- * Map of success notification IDs to their payload types for batch operations.
389
- * All batch operation successes extend OperationSuccessPayload.
390
- */
391
- export interface BatchSuccessMap {
392
- FILES_DELETE_SUCCESS: OperationSuccessPayload;
393
- FILES_MOVE_SUCCESS: OperationSuccessPayload;
394
- FILES_COPY_SUCCESS: OperationSuccessPayload;
395
- FOLDER_DELETE_SUCCESS: OperationSuccessPayload;
396
- FILES_UPLOAD_BATCH_SUCCESS: OperationSuccessPayload;
397
- }
398
- /**
399
- * Map of all error notification IDs to their payload types.
400
- * Extends ItemErrorMap for single item operations and BatchErrorMap for batch operations.
401
- */
402
- export interface ErrorMap extends ItemErrorMap, BatchErrorMap {
403
- FILE_DOWNLOAD_FAILED: ImageFilePayload;
404
- IMAGE_DOWNLOAD_FAILED: ImageFilePayload;
405
- IMAGE_SAVE_FAILED: ImageFilePayload;
406
- IMAGE_SAVE_COPY_FAILED: ImageFilePayload;
407
- EDITOR_INIT_FAILED: never;
408
- EDITOR_FIND_FILE_BY_URL_FAILED: UrlUploadErrorPayload;
409
- EDITOR_PROXY_FILE_FAILED: UrlUploadErrorPayload;
410
- AI_RESPONSE_INVALID: unknown;
411
- AI_IMAGE_GENERATION_FAILED: AIImageGenerationFailedPayload;
412
- AI_IMAGE_GENERATION_LIMIT_EXCEEDED: never;
413
- FILES_FETCH_FAILED: FetchFilesErrorPayload;
414
- FILE_RENAME_DISABLED_BY_CONFIG: SingleItemPayload;
415
- FILE_RENAME_FAILED: RenameErrorPayload;
416
- FOLDER_RENAME_DISABLED_BY_CONFIG: SingleItemPayload;
417
- FOLDER_RENAME_FAILED: RenameErrorPayload;
418
- ITEM_RENAME_FAILED: RenameErrorPayload;
419
- FILE_UPLOAD_ITEM_FAILED: FileUploadErrorPayload;
420
- FILES_UPLOAD_URL_VALIDATION_FAILED: UrlUploadPayload;
421
- FILES_UPLOAD_URL_NOT_SUPPORTED: UrlUploadPayload;
422
- FILES_UPLOAD_BY_URL_FAILED: UrlUploadErrorPayload;
423
- FILES_UPLOAD_PROVIDER_NOT_CONFIGURED: never;
424
- FILES_MOVE_DIRECTORY_NOT_SELECTED: never;
425
- FILES_COPY_DIRECTORY_NOT_SELECTED: never;
426
- FOLDERS_FETCH_FAILED: FolderOperationPayload;
427
- FOLDER_ALREADY_EXISTS: FolderOperationPayload;
428
- FOLDER_ALREADY_EXISTS_COPY: FolderOperationPayload & {
429
- targetFolderId?: string;
430
- };
431
- FOLDER_ALREADY_EXISTS_MOVE: FolderOperationPayload & {
432
- targetFolderId?: string;
433
- };
434
- FOLDER_CREATE_PROVIDER_NOT_CONFIGURED: FolderOperationPayload;
435
- FOLDER_CREATE_FAILED: FolderOperationPayload;
436
- FOLDER_CHILDREN_COUNT_FAILED: FolderOperationPayload;
437
- FOLDER_CHILDREN_FETCH_FAILED: FolderOperationPayload;
438
- FILE_URL_VALIDATION_FAILED: FileUrlValidationErrorPayload;
439
- TRASH_CLEAR_FAILED: OperationErrorPayload;
440
- TRASH_CLEAR_ERROR: never;
441
- }
442
- /**
443
- * Union type of all error events.
444
- */
445
- export type Error = { [K in keyof ErrorMap]: ErrorEventBase<K, ErrorMap[K]>; }[keyof ErrorMap];
446
- /**
447
- * Error notification event type.
448
- */
449
- export type ErrorEvent = {
450
- type: 'error';
451
- } & Error;
452
- /**
453
- * Map of all success notification IDs to their payload types.
454
- * Extends ItemSuccessMap for single item operations and BatchSuccessMap for batch operations.
455
- */
456
- export interface SuccessMap extends ItemSuccessMap, BatchSuccessMap {
457
- AI_IMAGE_GENERATION_STARTED: AIImageGenerationStartedPayload;
458
- AI_IMAGE_GENERERATION_SUCCESS: AIImageGenerationSuccessPayload;
459
- // EDITOR_IMAGE_DOWNLOAD_SUCCESS: ImageFilePayload;
460
- IMAGE_UPDATE_SUCCESS: ImageFilePayload;
461
- IMAGE_SAVE_COPY_SUCCESS: ImageFilePayload;
462
- FILE_RENAME_SUCCESS: SingleItemPayload;
463
- FOLDER_RENAME_SUCCESS: SingleItemPayload;
464
- FOLDER_CREATE_SUCCESS: FolderOperationPayload;
465
- FILE_UPLOAD_ITEM_SUCCESS: FileUploadPayload;
466
- TRASH_CLEARED_SUCCESS: never;
467
- FOLDER_NOT_FOUND_NAVIGATE: never;
468
- }
469
- /**
470
- * Union type of all success events.
471
- */
472
- export type Success = { [K in keyof SuccessMap]: NotificationEventBase<K, SuccessMap[K]>; }[keyof SuccessMap];
473
- /**
474
- * Success notification event type.
475
- */
476
- export type SuccessEvent = {
477
- type: 'success';
478
- } & Success;
479
- /**
480
- * Map of warning notification IDs to their payload types.
481
- */
482
- export interface WarningMap {
483
- FILES_UPLOAD_UNSUPPORTED_TYPE: UnsupportedFileTypePayload;
484
- FOLDER_OPERATION_VALIDATION_FAILED: FolderOperationPayload;
485
- TRASH_CLEARED_PARTIAL: OperationErrorPayload;
486
- }
487
- /**
488
- * Union type of all warning events.
489
- */
490
- export type Warning = { [K in keyof WarningMap]: NotificationEventBase<K, WarningMap[K]>; }[keyof WarningMap];
491
- /**
492
- * Warning notification event type.
493
- */
494
- export type WarningEvent = {
495
- type: 'warning';
496
- } & Warning;
497
- /**
498
- * Map of info notification IDs to their payload types.
499
- */
500
- export interface InfoMap {}
501
- /**
502
- * Union type of all info events.
503
- */
504
- export type Info = { [K in keyof InfoMap]: NotificationEventBase<K, InfoMap[K]>; }[keyof InfoMap];
505
- /**
506
- * Info notification event type.
507
- */
508
- export type InfoEvent = {
509
- type: 'info';
510
- } & Info;
511
- }
512
- /**
513
- * Union type of all notification events (error, success, warning, info).
514
- */
515
- type NotifyEvent$1 = Notify$1.SuccessEvent | Notify$1.ErrorEvent | Notify$1.WarningEvent | Notify$1.InfoEvent;
516
- declare namespace fileManager_d_exports {
517
- export { FileManageErrorInfo$1 as FileManageErrorInfo, FileManagerErrorCode, FilesQueryParams, IFileManagerApiError, ItemContextPayload$1 as ItemContextPayload, Notify$1 as Notify, NotifyEvent$1 as NotifyEvent, NotifyPlacement };
518
- }
1
+ import { FileManager as notification_d_exports, FileManagerErrorCode, IFileManagerApiError, Notify as Notify$1 } from "./fileManager";
519
2
  interface IDisposable {
520
3
  dispose(): void;
521
4
  }
@@ -1094,7 +577,7 @@ export declare namespace ExportedApi {
1094
577
  project?: string | number;
1095
578
  related_email?: string;
1096
579
  type?: string;
1097
- /** Глобальный блок (ACF): при сохранении в HTML добавляется em-block-id */
580
+ /** Global block (ACF): saving it to HTML adds an em-block-id */
1098
581
  global_block?: boolean;
1099
582
  }
1100
583
  }
@@ -1351,8 +834,16 @@ export declare namespace ExportedApi {
1351
834
  syntax: string[];
1352
835
  items: MergeTag[];
1353
836
  }
1354
- type LimitName = 'AiImgCount' | 'AiChatCount' | 'AiGeneratorCount' | 'OptimizationCount';
1355
- type LocaleListener = AppListener<string, string>;
837
+ type LimitName = 'AiImgCount' | 'AiChatCount' | 'AiGeneratorCount' |
838
+ /** @deprecated For plugin hosts: use per-type `LinkCheckCount` / `ImageCheckCount` / `SpamCheckCount` instead. */
839
+ 'OptimizationCount' | 'LinkCheckCount' | 'ImageCheckCount' | 'SpamCheckCount';
840
+ /** Jed-shaped catalog: the object `@wordpress/i18n` consumes, as served by `/translations/{locale}.json`. */
841
+ type LocaleData = Record<string, unknown>;
842
+ /**
843
+ * Supplies the interface catalog for a locale: a gettext `.po` text, a JSON string, or an
844
+ * already parsed {@link LocaleData}. Returning `.po` keeps working — the JSON forms are additions.
845
+ */
846
+ type LocaleListener = AppListener<string, string | LocaleData>;
1356
847
  type LimitListener = AppListener<{
1357
848
  name: LimitName;
1358
849
  count: number;
@@ -1368,8 +859,17 @@ export declare namespace ExportedApi {
1368
859
  }
1369
860
  /** Usage counters returned to the host for quota / billing UI (**`handleLimitUsage`**). */
1370
861
  interface Counters {
1371
- /** Optimization analyzer runs consumed in the current billing period. */
862
+ /**
863
+ * Optimization analyzer runs consumed in the current billing period (legacy aggregate).
864
+ * @deprecated For plugin integrations — use per-type counters instead.
865
+ */
1372
866
  optimization_counter: number;
867
+ /** Link validation runs consumed (per-type; optional until host/backend supports it). */
868
+ link_check_counter?: number;
869
+ /** Image validation runs consumed (per-type; optional until host/backend supports it). */
870
+ image_check_counter?: number;
871
+ /** SpamAssassin validation runs consumed (per-type; optional until host/backend supports it). */
872
+ spam_check_counter?: number;
1373
873
  /** AI chat / completion requests consumed. */
1374
874
  ai_counter: number;
1375
875
  /** AI image generations consumed. */
@@ -1379,8 +879,17 @@ export declare namespace ExportedApi {
1379
879
  }
1380
880
  /** Quota ceilings paired with **`counters`** for limit messaging. */
1381
881
  interface Limits {
1382
- /** Max optimization runs per period (`undefined`/`0` = unlimited). */
882
+ /**
883
+ * Max optimization runs per period (`undefined`/`0` = unlimited; legacy aggregate).
884
+ * @deprecated For plugin integrations — use per-type limits instead.
885
+ */
1383
886
  optimization_limit: number;
887
+ /** Link validation cap per period (per-type; optional until host/backend supports it). */
888
+ link_check_limit?: number;
889
+ /** Image validation cap per period (per-type; optional until host/backend supports it). */
890
+ image_check_limit?: number;
891
+ /** SpamAssassin validation cap per period (per-type; optional until host/backend supports it). */
892
+ spam_check_limit?: number;
1384
893
  /** AI chat / completion cap per period. */
1385
894
  ai_limit: number;
1386
895
  /** AI image generations cap per period. */
@@ -1646,8 +1155,10 @@ export declare namespace ExportedApi {
1646
1155
  commonStylesEnabled?: boolean;
1647
1156
  /** Responsive breakpoints / fluid layout controls inside the preview. */
1648
1157
  emailResponsiveControlEnabled?: boolean;
1649
- /** BeeFree/Stripo converter: detect & deterministically convert BeeFree-style markup into em-markup. Off by default. */
1158
+ /** BeeFree converter: detect & deterministically convert BeeFree markup into em-markup. Off by default. */
1650
1159
  beeFreeConverterEnabled?: boolean;
1160
+ /** Stripo converter: detect & deterministically convert Stripo markup into em-markup. Off by default. */
1161
+ stripoConverterEnabled?: boolean;
1651
1162
  /** AI layout converter: detect & convert other non-EmailMaker markup into em-markup via the neural jobs API. Off by default. */
1652
1163
  aiLayoutConverterEnabled?: boolean;
1653
1164
  /** show export to text */
@@ -3412,4 +2923,4 @@ export declare namespace helpers {
3412
2923
  */
3413
2924
  export function mapHttpStatusToErrorCode(status: number, defaultCode?: FileManagerErrorCode): FileManagerErrorCode;
3414
2925
  }
3415
- export { ApiPaginationResponse, AppEvent, AppListener, BatchResult, BlockDesc, COMMON_STYLES, CommonStyles, CommonStylesBlock, CommonStylesBorder, CommonStylesBorderRadius, CommonStylesBorderSide, CommonStylesButton, CommonStylesCard, CommonStylesHeading, CommonStylesLink, CommonStylesPadding, CommonStylesText, Config, CreateEvent, CreateEventPayload, CreateListener, EditStackData, EditStackSnapshot, EmailDesc, ExtractPluginOptions, fileManager_d_exports as FileManager, FileManagerApiErrorInfo, FileSystemItem, FileSystemItemUpdate, GetFileDataOptions, IFrameErrorInfo, IPlugin, IPluginConstructor, ISelection, ISingleModelEditStackData, IUndoRedoService, Instance, InstanceOfPluginType, MayBePromise, MergeTag, MergeTagGroup, MergeTagItem, ModulePluginDescriptor, NotifyEvent, OperationResult, Options, ParsedAMP, PluginClassConstructor, PluginDescriptor, PluginEntryItem, PluginFunctionConstructor, PluginLoader, PluginRegistry, PluginTypeMap, PreloadOptions, PromiseWrap, RecursivePartial, RegistryPluginDescriptor, RemoveEvent, RemoveEventPayload, RemoveListener, SaveEvent, SaveEventPayload, SaveListener, SortState, StorageProvider, StorageProviderController, UploadFileItemInput, UploadFilesRequest, WindowPluginDescriptor, init, parseAMP, pluginRegistry, preload, version };
2926
+ export { ApiPaginationResponse, AppEvent, AppListener, BatchResult, BlockDesc, COMMON_STYLES, CommonStyles, CommonStylesBlock, CommonStylesBorder, CommonStylesBorderRadius, CommonStylesBorderSide, CommonStylesButton, CommonStylesCard, CommonStylesHeading, CommonStylesLink, CommonStylesPadding, CommonStylesText, Config, CreateEvent, CreateEventPayload, CreateListener, EditStackData, EditStackSnapshot, EmailDesc, ExtractPluginOptions, notification_d_exports as FileManager, FileManagerApiErrorInfo, FileSystemItem, FileSystemItemUpdate, GetFileDataOptions, IFrameErrorInfo, IPlugin, IPluginConstructor, ISelection, ISingleModelEditStackData, IUndoRedoService, Instance, InstanceOfPluginType, MayBePromise, MergeTag, MergeTagGroup, MergeTagItem, ModulePluginDescriptor, NotifyEvent, OperationResult, Options, ParsedAMP, PluginClassConstructor, PluginDescriptor, PluginEntryItem, PluginFunctionConstructor, PluginLoader, PluginRegistry, PluginTypeMap, PreloadOptions, PromiseWrap, RecursivePartial, RegistryPluginDescriptor, RemoveEvent, RemoveEventPayload, RemoveListener, SaveEvent, SaveEventPayload, SaveListener, SortState, StorageProvider, StorageProviderController, UploadFileItemInput, UploadFilesRequest, WindowPluginDescriptor, init, parseAMP, pluginRegistry, preload, version };
package/useblocks.js CHANGED
@@ -689,7 +689,7 @@ var __amdEnv = window.__useblocks__ || (window.__useblocks__ = {});
689
689
 
690
690
 
691
691
  // Configure AMD loader
692
- __amdEnv.require.config({ baseUrl: "./", paths: {"core":"useblocks-core.bfe3fe29.js"} });
692
+ __amdEnv.require.config({ baseUrl: "./", paths: {"core":"useblocks-core.77131b3d.js","po":"useblocks-po.77131b3d.js"} });
693
693
 
694
694
  // PublicPath (script detection: entry script lookup → document.currentScript)
695
695
  if (!__useblocks__.publicPath) {
@@ -1037,7 +1037,7 @@ if (!ns.assetUrl) {
1037
1037
  }
1038
1038
 
1039
1039
  if (!ns.version) {
1040
- ns.version = "1.1.65";
1040
+ ns.version = "1.1.71";
1041
1041
  }
1042
1042
 
1043
1043
  var modules = ns.modules = Object.create(null);
@@ -2785,7 +2785,7 @@ __useblocks__.define("useblocks.js", [
2785
2785
  const r = S.get(e);
2786
2786
  t.some((n) => n !== void 0 && n === r) && S.delete(e);
2787
2787
  }
2788
- var rn = "1.1.65";
2788
+ var rn = "1.1.71";
2789
2789
  async function nn(e) {
2790
2790
  await _e(typeof __useblocks__ < "u" ? __useblocks__ : void 0);
2791
2791
  }
package/vite/index.cjs CHANGED
@@ -458,7 +458,7 @@ var BUNDLER_DEFAULT_APP_NAME = "useblocks";
458
458
  `${BUNDLER_DEFAULT_APP_NAME}`;
459
459
  //#endregion
460
460
  //#region src/vite/depsRuntimePaths.ts
461
- /** Для тестов и плагина: один RegExp на процесс, без пересборки в hot-path. */
461
+ /** For tests and the plugin: one RegExp per process, never rebuilt in the hot path. */
462
462
  function createAppCoreOptimizedDepRe(appName) {
463
463
  return new RegExp(`^${appName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}-core\\.[a-f0-9]+\\.js$`);
464
464
  }
@@ -468,7 +468,7 @@ function normalizeDepsPathname(value) {
468
468
  var STATIC_CORE_IN_DEPS_RE = /^static\/core\/[^/]+\.js$/;
469
469
  /**
470
470
  * Vite prebundles may rewrite runtime asset requests under `/.vite/deps/`.
471
- * Maps request pathname → абсолютный путь файла в корне runtime-пакета.
471
+ * Maps request pathname → absolute file path at the runtime package root.
472
472
  */
473
473
  function getDepsRuntimeFilePath(pathname, packageRoot, appCoreOptimizedDepRe) {
474
474
  const normalizedPathname = normalizeDepsPathname(pathname);
@@ -642,8 +642,8 @@ function renderDuplicateWarn(pluginName, mainPackage, duplicates) {
642
642
  //#endregion
643
643
  //#region src/vite/reactDuplicateRuntimeCheck.ts
644
644
  /**
645
- * Env-флаг `BUNDLER_RUNTIME_STRICT=1` переводит defensive детекторы в throw-режим.
646
- * CLI устанавливает его автоматически при локальной сборке плагина из нашего репо.
645
+ * The `BUNDLER_RUNTIME_STRICT=1` env flag switches the defensive detectors to throw mode.
646
+ * The CLI sets it automatically when a plugin is built locally from our repository.
647
647
  */
648
648
  var STRICT_ENV_FLAG = "BUNDLER_RUNTIME_STRICT";
649
649
  function isStrictMode(envSource = process.env) {