@emailmaker/filemanager 1.1.81 → 1.1.85-dev.1

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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Icon sets are fetched at runtime instead of being bundled.
3
+ *
4
+ * Importing `@iconify-json/*` as modules turns their JSON into string literals inside the bundle:
5
+ * lucide 581 kB and tabler 2.12 MB, 2.7 MB of data a bundler can neither split nor shake. Fetched
6
+ * as files they are cached by the browser, versioned on their own and cost nothing at build time.
7
+ *
8
+ * The tab that needs them is lazy, so the bytes reach the user at the same moment as before.
9
+ */
10
+ import type { IconifyJSON } from '@iconify/types';
11
+ export declare const ICON_SET_PREFIXES: readonly ['lucide', 'tabler'];
12
+ export type IconSetPrefix = (typeof ICON_SET_PREFIXES)[number];
13
+ /** Where the host publishes the sets. Matches the copy step of the build pipeline. */
14
+ export declare const ICON_SETS_ASSETS_PATH = "static/media/icon-sets";
15
+ export interface IconSetsSource {
16
+ /** Application base url, same one the image editor gets. */
17
+ baseUrl?: string;
18
+ /** Directory with the set files; defaults to `ICON_SETS_ASSETS_PATH`. */
19
+ path?: string;
20
+ }
21
+ /**
22
+ * Points the loader at the host assets. Changing the source drops what was already fetched:
23
+ * a different host means different files.
24
+ */
25
+ export declare function configureIconSets(next: IconSetsSource): void;
26
+ /** Loads one set once; repeated calls share the same request. */
27
+ export declare function loadIconSet(prefix: IconSetPrefix): Promise<IconifyJSON | null>;
28
+ /** Loads every set the stock search works with. Sets that failed to load are skipped. */
29
+ export declare function loadIconSets(): Promise<{
30
+ prefix: IconSetPrefix;
31
+ json: IconifyJSON;
32
+ }[]>;
33
+ /** Already loaded set, or `null`. For code paths that must not await. */
34
+ export declare function getLoadedIconSet(prefix: string): IconifyJSON | null;
35
+ /** Test helper: the caches are module-level, so cases would leak into one another. */
36
+ export declare function resetIconSets(): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,8 @@
1
1
  import type { StreamlineSearchItem } from '../../types';
2
+ /** Test helper: индекс модульный, иначе случаи протекали бы друг в друга. */
3
+ export declare function resetStockIconIndex(): void;
2
4
  /** Стабильный id вида `prefix:icon-name` для кэша и `StreamlineSearchItem.hash`. */
3
- export declare function listMatchingStockIconIds(query: string): string[];
5
+ export declare function listMatchingStockIconIds(query: string): Promise<string[]>;
4
6
  /** Сохраняет порядок `primary`, в конец добавляет id из `secondary`, которых ещё не было. */
5
7
  export declare function mergeStockIconIdsOrdered(primary: string[], secondary: string[]): string[];
6
8
  export declare function stockIconIdToItem(fullId: string): StreamlineSearchItem;