@emailmaker/filemanager 1.1.69 → 1.1.70

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/notification.d.ts CHANGED
@@ -143,7 +143,7 @@ export interface FilesQueryParams {
143
143
  sortBy?: 'name' | 'size' | 'date' | 'type';
144
144
  sortOrder?: 'asc' | 'desc';
145
145
  itemType?: 'file' | 'folder' | 'all';
146
- /** Человекочитаемое имя папки для UI (не отправляется на API). */
146
+ /** Human-readable folder name for the UI (never sent to the API). */
147
147
  folderName?: string;
148
148
  }
149
149
 
@@ -358,7 +358,7 @@ export namespace Notify {
358
358
  */
359
359
  export interface FetchFilesErrorPayload {
360
360
  params?: FilesQueryParams;
361
- /** Отображаемое имя папки списка (после resolve getItem / path / кэша). */
361
+ /** Display name of the listed folder (after resolving getItem / path / cache). */
362
362
  folderName?: string | null;
363
363
  }
364
364
 
@@ -419,8 +419,8 @@ export namespace Notify {
419
419
  */
420
420
  level?: 'item' | 'batch';
421
421
  /**
422
- * Если true — применять TTL-дедупликацию одинаковых уведомлений (после interceptors).
423
- * Для upload/мутаций обычно не задаётся или false.
422
+ * When true, identical notifications are deduplicated by TTL (after interceptors).
423
+ * For uploads and mutations it is usually omitted or set to false.
424
424
  */
425
425
  notificationDedupe?: boolean;
426
426
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "1.1.69",
3
+ "version": "1.1.70",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,38 @@
1
+ import type { Config } from '../types';
2
+ /**
3
+ * Options of the standalone Pixie editor that become the `Config` its provider serves.
4
+ * Split out of `InitPixieEditorOptions` so the mapping below can be covered by tests.
5
+ */
6
+ export interface PixieEditorConfigOptions {
7
+ theme?: Config['theme'];
8
+ locale?: string;
9
+ baseUrl?: string;
10
+ assetsUrl?: string;
11
+ compressMaxSize?: Config['compressMaxSize'];
12
+ compressMaxWidthOrHeight?: Config['compressMaxWidthOrHeight'];
13
+ compessorUrl?: string;
14
+ compressorUrl?: string;
15
+ showNotifications?: boolean;
16
+ fetchWithProxy?: Config['fetchWithProxy'];
17
+ handleFileProxy?: Config['handleFileProxy'];
18
+ /** As in `Config.handleProxyUrl` — resolves a proxied URL when an image is opened for editing by link. */
19
+ handleProxyUrl?: Config['handleProxyUrl'];
20
+ /** As in `Config`: list pagination (requests/UI), not to be confused with `dedupeUploadNamesOnClient`. */
21
+ hasPagination?: boolean;
22
+ disablePagination?: boolean;
23
+ paginationAvailable?: boolean;
24
+ /** As in `Config.dedupeUploadNamesOnClient` — unique names when saving a copy, nothing else. */
25
+ dedupeUploadNamesOnClient?: boolean;
26
+ /** As in `Config.saveCopyToCurrentFolder` — save the copy into the current folder instead of `noFolder`. */
27
+ saveCopyToCurrentFolder?: boolean;
28
+ /** As in `Config.notificationDedupeTtlMs` — TTL (ms) for suppressing repeated identical notifications. */
29
+ notificationDedupeTtlMs?: number;
30
+ /** As in `Config.features.enableUpdateFile` — whether an already stored file may be overwritten. Defaults to true. */
31
+ enableUpdateFile?: boolean;
32
+ }
33
+ /**
34
+ * buildPixieEditorConfig maps standalone editor options onto the `Config` its provider serves.
35
+ * The standalone editor has no `FileManagerApp` to assemble that config, so an option missed
36
+ * here is dropped silently — the editor simply falls back to defaults.
37
+ */
38
+ export declare function buildPixieEditorConfig(options: PixieEditorConfigOptions): Config;
@@ -0,0 +1 @@
1
+ export {};
@@ -3,6 +3,15 @@
3
3
  * Убирает hash, трекинговые query-параметры, нормализует host и сортирует query.
4
4
  */
5
5
  export declare function normalizeExternalFileUrl(url: string): string;
6
+ /** Нормализация для сравнения: невалидный URL сравниваем как есть. */
7
+ export declare function safeNormalizeExternalFileUrl(url: string): string;
8
+ /** Один ли это источник: URL сравниваются после нормализации, а не побайтово. */
9
+ export declare function isSameExternalFileUrl(a: string | null | undefined, b: string | null | undefined): boolean;
10
+ /**
11
+ * Имя файла из URL: сегмент пути, а если расширения там нет — значение
12
+ * query-параметра (CDN вида `/image/<id>?p=Catalog/file.jpg`).
13
+ */
14
+ export declare function extractFileNameFromUrl(url: string): string | undefined;
6
15
  /**
7
16
  * Совпадает ли origin URL с текущей страницей (protocol + host + port).
8
17
  * Для same-origin прокси не используем — загрузка напрямую.
@@ -0,0 +1 @@
1
+ export {};