@standards/constants 1.0.0-alpha.415 → 1.0.0-alpha.416

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/README.md CHANGED
@@ -21,7 +21,7 @@ pnpm add @standards/constants
21
21
  ### Countries
22
22
 
23
23
  ```typescript
24
- import { COUNTRIES, getCountryByIso2, isValidIso2 } from "@standards/constants";
24
+ import { COUNTRIES, getCountryByIso2 } from "@standards/constants";
25
25
 
26
26
  // Get country by ISO2 code
27
27
  const france = COUNTRIES.FR;
@@ -30,7 +30,6 @@ console.log(france.phoneCode); // "+33"
30
30
 
31
31
  // Lookup functions
32
32
  const country = getCountryByIso2("FR");
33
- const isValid = isValidIso2("FR"); // true
34
33
 
35
34
  // Type-safe ISO codes
36
35
  import type { CountryIso2, CountryIso3 } from "@standards/constants";
@@ -40,7 +39,7 @@ const code: CountryIso2 = "FR"; // Type-safe
40
39
  ### Currencies
41
40
 
42
41
  ```typescript
43
- import { CURRENCIES, getCurrency, getCurrencySymbol } from "@standards/constants";
42
+ import { CURRENCIES, isValidCurrencyCode } from "@standards/constants";
44
43
 
45
44
  // Get currency
46
45
  const euro = CURRENCIES.EUR;
@@ -48,9 +47,8 @@ console.log(euro.name); // "Euro"
48
47
  console.log(euro.symbol); // "€"
49
48
  console.log(euro.decimals); // 2
50
49
 
51
- // Helper functions
52
- const symbol = getCurrencySymbol("EUR"); // "€"
53
- const currency = getCurrency("USD");
50
+ // Type guard
51
+ const isValid = isValidCurrencyCode("usd"); // true
54
52
 
55
53
  // Type-safe currency codes
56
54
  import type { CurrencyCode } from "@standards/constants";
@@ -60,71 +58,36 @@ const code: CurrencyCode = "EUR"; // Type-safe
60
58
  ### File Sizes
61
59
 
62
60
  ```typescript
63
- import { FILE_SIZE, RECOMMENDED_MAX_SIZES, mbToBytes } from "@standards/constants";
61
+ import { FILE_SIZE } from "@standards/constants";
64
62
 
65
63
  // Intuitive constants
66
64
  const avatarMaxSize = FILE_SIZE.MB_2; // 2,097,152 bytes
67
65
  const documentMaxSize = FILE_SIZE.MB_10; // 10,485,760 bytes
68
66
  const videoMaxSize = FILE_SIZE.MB_500; // 524,288,000 bytes
69
-
70
- // Recommended sizes by use case
71
- const maxSize = RECOMMENDED_MAX_SIZES.AVATAR; // 2 MB
72
- const maxSize = RECOMMENDED_MAX_SIZES.DOCUMENT; // 10 MB
73
- const maxSize = RECOMMENDED_MAX_SIZES.VIDEO; // 500 MB
74
-
75
- // Conversion utilities
76
- const bytes = mbToBytes(5); // 5,242,880
77
-
78
- // Validation
79
- import { isWithinSizeLimit } from "@standards/constants";
80
- const isValid = isWithinSizeLimit(1048576, FILE_SIZE.MB_5); // true
81
67
  ```
82
68
 
83
69
  ### MIME Types
84
70
 
85
71
  ```typescript
86
- import {
87
- IMAGE_MIME_TYPES,
88
- DOCUMENT_MIME_TYPES,
89
- VIDEO_MIME_TYPES,
90
- WEB_IMAGES,
91
- OFFICE_DOCUMENTS,
92
- isImageMimeType,
93
- } from "@standards/constants";
72
+ import { DOCUMENT_MIME_TYPES, IMAGE_MIME_TYPES, INLINE_IMAGE_ACCEPT } from "@standards/constants";
94
73
 
95
- // Individual MIME types
96
74
  const jpeg = IMAGE_MIME_TYPES.JPEG; // "image/jpeg"
97
75
  const pdf = DOCUMENT_MIME_TYPES.PDF; // "application/pdf"
98
- const mp4 = VIDEO_MIME_TYPES.MP4; // "video/mp4"
99
76
 
100
- // Grouped collections
101
- const webImages = WEB_IMAGES; // ["image/jpeg", "image/png", "image/gif", "image/webp"]
102
- const officeFiles = OFFICE_DOCUMENTS; // [PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX]
103
-
104
- // Type checking
105
- const isImage = isImageMimeType("image/jpeg"); // true
106
- const isDoc = isDocumentMimeType("application/pdf"); // true
107
-
108
- // Type-safe MIME types
109
- import type { MimeType, ImageMimeType } from "@standards/constants";
110
- const type: MimeType = "image/jpeg"; // Type-safe
77
+ // The raster images a browser may paint inline, as a file input's `accept`
78
+ const accept = INLINE_IMAGE_ACCEPT; // "image/png,image/jpeg,image/gif,image/webp,image/avif"
111
79
  ```
112
80
 
113
81
  ### Integration with @standards/schema
114
82
 
115
83
  ```typescript
116
84
  import { currency, document, location, phone } from "@standards/schema";
117
- import {
118
- FILE_SIZE,
119
- WEB_IMAGES,
120
- DOCUMENT_MIME_TYPES,
121
- RECOMMENDED_MAX_SIZES,
122
- } from "@standards/constants";
85
+ import { DOCUMENT_MIME_TYPES, FILE_SIZE, IMAGE_MIME_TYPES } from "@standards/constants";
123
86
 
124
87
  // File attribute with MIME type validation
125
88
  const avatar = document("avatar", "Avatar")
126
- .maxFileSize(RECOMMENDED_MAX_SIZES.AVATAR)
127
- .accepts([...WEB_IMAGES])
89
+ .maxFileSize(FILE_SIZE.MB_2)
90
+ .accepts([IMAGE_MIME_TYPES.JPEG, IMAGE_MIME_TYPES.PNG, IMAGE_MIME_TYPES.WEBP])
128
91
  .build();
129
92
 
130
93
  // Document upload
@@ -167,13 +130,11 @@ const mobile = phone("phone", "Phone")
167
130
  - Gigabytes: GB_1, GB_2, GB_5, GB_10
168
131
 
169
132
  ### MIME Types
170
- - Images: JPEG, PNG, GIF, WebP, SVG, BMP, TIFF, HEIC, HEIF
171
- - Documents: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, ODT, TXT, CSV, Markdown
172
- - Archives: ZIP, RAR, TAR, GZIP, 7Z, BZ2
173
- - Audio: MP3, WAV, OGG, AAC, FLAC, M4A
174
- - Video: MP4, WebM, OGG, AVI, MOV, MKV
175
- - Code: JavaScript, TypeScript, JSON, XML, HTML, CSS, Python, Java
176
- - Fonts: TTF, OTF, WOFF, WOFF2
133
+ - Images (`IMAGE_MIME_TYPES`): JPEG, PNG, GIF, WebP, SVG, BMP, TIFF, HEIC, HEIF
134
+ - Documents (`DOCUMENT_MIME_TYPES`): PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, ODT, TXT, CSV, Markdown
135
+ - Audio (`AUDIO_MIME_TYPES`): MP3, WAV, OGG, AAC, FLAC, M4A
136
+ - Code (`CODE_MIME_TYPES`): JavaScript, TypeScript, JSON, XML, HTML, CSS, Python, Java
137
+ - Email (`EMAIL_MIME_TYPES`): EML, Outlook MSG
177
138
 
178
139
  ## Testing
179
140
 
@@ -194,9 +155,6 @@ import type {
194
155
  CountryIso2,
195
156
  CountryIso3,
196
157
  CurrencyCode,
197
- MimeType,
198
- ImageMimeType,
199
- DocumentMimeType,
200
158
  } from "@standards/constants";
201
159
  ```
202
160
 
package/dist/index.d.mts CHANGED
@@ -20,15 +20,6 @@ export declare const AI_CHAT_SUPPORTED_IMAGES: readonly ["image/jpeg", "image/pn
20
20
  * never served as a live page, and its preview runs no script.
21
21
  */
22
22
  export declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/plain", "text/markdown", "text/csv", "text/javascript", "application/javascript", "text/html", "application/xhtml+xml"];
23
- /**
24
- * Audio MIME types supported by AI chat: a voice memo attaches like any file
25
- * (#5804) and reaches every model as its transcript, so none needs to hear it.
26
- * Every audio type the transcription reads — all but raw AAC — and
27
- * `audio/x-m4a`, how Safari and macOS report an M4A.
28
- */
29
- export declare const AI_CHAT_SUPPORTED_AUDIO: readonly [...("audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/flac" | "audio/mp4" | "audio/webm")[], "audio/x-m4a"];
30
- /** All MIME types supported by AI chat */
31
- export declare const AI_CHAT_SUPPORTED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "image/svg+xml", "image/heic", "image/heif", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/plain", "text/markdown", "text/csv", "text/javascript", "application/javascript", "text/html", "application/xhtml+xml", ...("audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/flac" | "audio/mp4" | "audio/webm")[], "audio/x-m4a"];
32
23
  /**
33
24
  * What the composer takes: the MIME types, and the extensions of files the OS
34
25
  * maps to no type — the file picker offers them, and the composer's own check
@@ -170,23 +161,10 @@ export declare const COLORS: {
170
161
  peony: Color;
171
162
  };
172
163
  export type ColorId = keyof typeof COLORS;
173
- /** OKLCH hue (degrees) of each non-neutral colour, for nearest-free-hue picks. */
174
- export declare const PALETTE_HUES: Record<Exclude<ColorId, "stone">, number>;
175
- /** Get color configuration by ID */
176
- export declare const getColor: (id: string) => Color | undefined;
177
164
  /** Get all color IDs */
178
165
  export declare const getColorIds: () => ColorId[];
179
166
  /** Whether a value is a palette id. Own keys only: `"constructor" in COLORS` is true. */
180
167
  export declare const isValidColorId: (id: unknown) => id is ColorId;
181
- /** Color groups for semantic usage */
182
- export declare const COLOR_GROUPS: {
183
- readonly neutral: readonly ["stone"];
184
- readonly warm: readonly ["clay", "brick", "terra", "ochre"];
185
- readonly green: readonly ["moss", "sage", "lagoon"];
186
- readonly cool: readonly ["ink", "iris", "peony"];
187
- };
188
- export type ColorGroup = keyof typeof COLOR_GROUPS;
189
- export type ColorGroupColors<T extends ColorGroup> = (typeof COLOR_GROUPS)[T][number];
190
168
  /**
191
169
  * The colours an agent avatar may take: every hue, never the neutral (a grey
192
170
  * agent reads as disabled). Non-empty by construction (10 hues), which is what
@@ -2085,10 +2063,6 @@ export declare const getCountryByIso3: (iso3: string) => Country | undefined;
2085
2063
  export declare const getAllCountries: () => Country[];
2086
2064
  export declare const getPhoneMaxDigits: (iso2: string) => number;
2087
2065
  export declare const getPhoneTrunkPrefix: (iso2: string) => string;
2088
- /**
2089
- * Type guard to check if a string is a valid ISO2 country code
2090
- */
2091
- export declare const isValidIso2: (code: string) => code is CountryIso2;
2092
2066
  /**
2093
2067
  * Type guard to check if a string is a valid ISO3 country code
2094
2068
  */
@@ -2505,11 +2479,7 @@ export declare const CURRENCIES: {
2505
2479
  };
2506
2480
  };
2507
2481
  export type CurrencyCode = keyof typeof CURRENCIES;
2508
- export type CurrencySymbol = (typeof CURRENCIES)[CurrencyCode]["symbol"];
2509
- export type CurrencyName = (typeof CURRENCIES)[CurrencyCode]["name"];
2510
- export declare const getCurrency: (code: string) => Currency | undefined;
2511
2482
  export declare const getAllCurrencies: () => Currency[];
2512
- export declare const getCurrencySymbol: (code: string) => string;
2513
2483
  /**
2514
2484
  * Type guard to check if a string is a valid currency code
2515
2485
  */
@@ -2582,12 +2552,10 @@ export declare function fileKindOf(file: {
2582
2552
  export declare function fileKindFromArtifactKind(kind: string): FileKind;
2583
2553
  //#endregion
2584
2554
  //#region src/hash.d.ts
2585
- /** The colour an avatar may take: one element of `AVATAR_COLOR_IDS`. */
2586
- export type AvatarColorId = (typeof AVATAR_COLOR_IDS)[number];
2587
2555
  /** FNV-1a (32-bit, unsigned): small, stable, well spread for short strings. */
2588
2556
  export declare function fnv1a32(value: string): number;
2589
2557
  /** A stable avatar hue (one of the 10 non-neutral colours) derived from a string, e.g. an object type slug. */
2590
- export declare function colorIdFromString(value: string): AvatarColorId;
2558
+ export declare function colorIdFromString(value: string): ColorId;
2591
2559
  //#endregion
2592
2560
  //#region src/fileSizes.d.ts
2593
2561
  /**
@@ -2628,38 +2596,6 @@ export declare const KILOBYTES: {
2628
2596
  /** 500 KB (512,000 bytes) */
2629
2597
  readonly KB_500: number;
2630
2598
  };
2631
- export declare const MEGABYTES: {
2632
- /** 1 MB (1,048,576 bytes) */
2633
- readonly MB_1: number;
2634
- /** 2 MB (2,097,152 bytes) */
2635
- readonly MB_2: number;
2636
- /** 5 MB (5,242,880 bytes) */
2637
- readonly MB_5: number;
2638
- /** 10 MB (10,485,760 bytes) */
2639
- readonly MB_10: number;
2640
- /** 20 MB (20,971,520 bytes) */
2641
- readonly MB_20: number;
2642
- /** 25 MB (26,214,400 bytes) */
2643
- readonly MB_25: number;
2644
- /** 50 MB (52,428,800 bytes) */
2645
- readonly MB_50: number;
2646
- /** 100 MB (104,857,600 bytes) */
2647
- readonly MB_100: number;
2648
- /** 200 MB (209,715,200 bytes) */
2649
- readonly MB_200: number;
2650
- /** 500 MB (524,288,000 bytes) */
2651
- readonly MB_500: number;
2652
- };
2653
- export declare const GIGABYTES: {
2654
- /** 1 GB (1,073,741,824 bytes) */
2655
- readonly GB_1: number;
2656
- /** 2 GB (2,147,483,648 bytes) */
2657
- readonly GB_2: number;
2658
- /** 5 GB (5,368,709,120 bytes) */
2659
- readonly GB_5: number;
2660
- /** 10 GB (10,737,418,240 bytes) */
2661
- readonly GB_10: number;
2662
- };
2663
2599
  /**
2664
2600
  * All file size constants
2665
2601
  *
@@ -2729,71 +2665,6 @@ export declare const FILE_SIZE: {
2729
2665
  /** 512 bytes */
2730
2666
  readonly B_512: 512;
2731
2667
  };
2732
- /**
2733
- * Recommended max sizes for common file types
2734
- */
2735
- export declare const RECOMMENDED_MAX_SIZES: {
2736
- /** Avatar/Profile pictures: 2 MB */
2737
- readonly AVATAR: number;
2738
- /** General images: 5 MB */
2739
- readonly IMAGE: number;
2740
- /** Documents (PDF, Word, etc.): 10 MB */
2741
- readonly DOCUMENT: number;
2742
- /** Presentations: 25 MB */
2743
- readonly PRESENTATION: number;
2744
- /** Audio files: 50 MB */
2745
- readonly AUDIO: number;
2746
- /** Video files: 500 MB */
2747
- readonly VIDEO: number;
2748
- /** Large archives: 1 GB */
2749
- readonly ARCHIVE: number;
2750
- };
2751
- /**
2752
- * Convert megabytes to bytes
2753
- *
2754
- * @example
2755
- * ```typescript
2756
- * mbToBytes(5) // 5242880 (5 MB in bytes)
2757
- * ```
2758
- */
2759
- export declare const mbToBytes: (mb: number) => number;
2760
- /**
2761
- * Convert gigabytes to bytes
2762
- *
2763
- * @example
2764
- * ```typescript
2765
- * gbToBytes(1) // 1073741824 (1 GB in bytes)
2766
- * ```
2767
- */
2768
- export declare const gbToBytes: (gb: number) => number;
2769
- /**
2770
- * Convert bytes to megabytes
2771
- *
2772
- * @example
2773
- * ```typescript
2774
- * bytesToMb(5242880) // 5
2775
- * ```
2776
- */
2777
- export declare const bytesToMb: (bytes: number) => number;
2778
- /**
2779
- * Convert bytes to gigabytes
2780
- *
2781
- * @example
2782
- * ```typescript
2783
- * bytesToGb(1073741824) // 1
2784
- * ```
2785
- */
2786
- export declare const bytesToGb: (bytes: number) => number;
2787
- /**
2788
- * Check if file size is within limit
2789
- *
2790
- * @example
2791
- * ```typescript
2792
- * isWithinSizeLimit(1048576, FILE_SIZE.MB_5) // true
2793
- * isWithinSizeLimit(6291456, FILE_SIZE.MB_5) // false
2794
- * ```
2795
- */
2796
- export declare const isWithinSizeLimit: (bytes: number, maxBytes: number) => boolean;
2797
2668
  //#endregion
2798
2669
  //#region src/memories.d.ts
2799
2670
  /**
@@ -2831,7 +2702,6 @@ export declare const IMAGE_MIME_TYPES: {
2831
2702
  readonly HEIC: "image/heic";
2832
2703
  readonly HEIF: "image/heif";
2833
2704
  };
2834
- export declare const IMAGE_MIME_TYPES_ARRAY: ("image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "image/x-icon" | "image/heic" | "image/heif")[];
2835
2705
  /**
2836
2706
  * The images served INLINE to a browser, from a storage origin every tenant
2837
2707
  * shares: a profile avatar, a record's image, a meeting bot's picture. Raster
@@ -2861,16 +2731,6 @@ export declare const DOCUMENT_MIME_TYPES: {
2861
2731
  readonly CSV: "text/csv";
2862
2732
  readonly MARKDOWN: "text/markdown";
2863
2733
  };
2864
- export declare const DOCUMENT_MIME_TYPES_ARRAY: ("application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.oasis.opendocument.text" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.presentation" | "application/rtf" | "text/plain" | "text/csv" | "text/markdown")[];
2865
- export declare const ARCHIVE_MIME_TYPES: {
2866
- readonly ZIP: "application/zip";
2867
- readonly RAR: "application/vnd.rar";
2868
- readonly TAR: "application/x-tar";
2869
- readonly GZIP: "application/gzip";
2870
- readonly "7Z": "application/x-7z-compressed";
2871
- readonly BZ2: "application/x-bzip2";
2872
- };
2873
- export declare const ARCHIVE_MIME_TYPES_ARRAY: ("application/zip" | "application/vnd.rar" | "application/x-tar" | "application/gzip" | "application/x-7z-compressed" | "application/x-bzip2")[];
2874
2734
  export declare const AUDIO_MIME_TYPES: {
2875
2735
  readonly MP3: "audio/mpeg";
2876
2736
  readonly WAV: "audio/wav";
@@ -2880,19 +2740,6 @@ export declare const AUDIO_MIME_TYPES: {
2880
2740
  readonly M4A: "audio/mp4";
2881
2741
  readonly WEBM: "audio/webm";
2882
2742
  };
2883
- export declare const AUDIO_MIME_TYPES_ARRAY: ("audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/mp4" | "audio/webm")[];
2884
- export declare const VIDEO_MIME_TYPES: {
2885
- readonly MP4: "video/mp4";
2886
- readonly WEBM: "video/webm";
2887
- readonly OGG: "video/ogg";
2888
- readonly AVI: "video/x-msvideo";
2889
- readonly MOV: "video/quicktime";
2890
- readonly MKV: "video/x-matroska";
2891
- readonly FLV: "video/x-flv";
2892
- readonly WMV: "video/x-ms-wmv";
2893
- readonly MPEG: "video/mpeg";
2894
- };
2895
- export declare const VIDEO_MIME_TYPES_ARRAY: ("video/mp4" | "video/webm" | "video/ogg" | "video/x-msvideo" | "video/quicktime" | "video/x-matroska" | "video/x-flv" | "video/x-ms-wmv" | "video/mpeg")[];
2896
2743
  export declare const CODE_MIME_TYPES: {
2897
2744
  readonly JAVASCRIPT: "text/javascript";
2898
2745
  /**
@@ -2914,134 +2761,12 @@ export declare const CODE_MIME_TYPES: {
2914
2761
  readonly YAML: "application/x-yaml";
2915
2762
  readonly SQL: "application/sql";
2916
2763
  };
2917
- export declare const CODE_MIME_TYPES_ARRAY: ("text/javascript" | "application/javascript" | "text/typescript" | "application/json" | "application/xml" | "text/html" | "application/xhtml+xml" | "text/css" | "text/x-python" | "text/x-java-source" | "text/x-c" | "text/x-c++" | "application/x-yaml" | "application/sql")[];
2918
2764
  export declare const EMAIL_MIME_TYPES: {
2919
2765
  /** Outlook message (`.msg`), a Compound File Binary container. */
2920
2766
  readonly OUTLOOK: "application/vnd.ms-outlook";
2921
2767
  /** RFC 822 message (`.eml`). */
2922
2768
  readonly EML: "message/rfc822";
2923
2769
  };
2924
- export declare const EMAIL_MIME_TYPES_ARRAY: ("application/vnd.ms-outlook" | "message/rfc822")[];
2925
- export declare const FONT_MIME_TYPES: {
2926
- readonly TTF: "font/ttf";
2927
- readonly OTF: "font/otf";
2928
- readonly WOFF: "font/woff";
2929
- readonly WOFF2: "font/woff2";
2930
- readonly EOT: "application/vnd.ms-fontobject";
2931
- };
2932
- export declare const FONT_MIME_TYPES_ARRAY: ("font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "application/vnd.ms-fontobject")[];
2933
- /**
2934
- * All image MIME types
2935
- */
2936
- export declare const IMAGES: ("image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "image/x-icon" | "image/heic" | "image/heif")[];
2937
- /**
2938
- * All document MIME types
2939
- */
2940
- export declare const DOCUMENTS: ("application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.oasis.opendocument.text" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.presentation" | "application/rtf" | "text/plain" | "text/csv" | "text/markdown")[];
2941
- /**
2942
- * All archive MIME types
2943
- */
2944
- export declare const ARCHIVES: ("application/zip" | "application/vnd.rar" | "application/x-tar" | "application/gzip" | "application/x-7z-compressed" | "application/x-bzip2")[];
2945
- /**
2946
- * All audio MIME types
2947
- */
2948
- export declare const AUDIO: ("audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/mp4" | "audio/webm")[];
2949
- /**
2950
- * All video MIME types
2951
- */
2952
- export declare const VIDEO: ("video/mp4" | "video/webm" | "video/ogg" | "video/x-msvideo" | "video/quicktime" | "video/x-matroska" | "video/x-flv" | "video/x-ms-wmv" | "video/mpeg")[];
2953
- /**
2954
- * All code MIME types
2955
- */
2956
- export declare const CODE: ("text/javascript" | "application/javascript" | "text/typescript" | "application/json" | "application/xml" | "text/html" | "application/xhtml+xml" | "text/css" | "text/x-python" | "text/x-java-source" | "text/x-c" | "text/x-c++" | "application/x-yaml" | "application/sql")[];
2957
- /**
2958
- * All font MIME types
2959
- */
2960
- export declare const FONTS: ("font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "application/vnd.ms-fontobject")[];
2961
- /**
2962
- * All email message MIME types
2963
- */
2964
- export declare const EMAILS: ("application/vnd.ms-outlook" | "message/rfc822")[];
2965
- /**
2966
- * Common web-safe image formats (JPEG, PNG, GIF, WebP)
2967
- */
2968
- export declare const WEB_IMAGES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp"];
2969
- /**
2970
- * Common office document formats (PDF, Word, Excel, PowerPoint)
2971
- */
2972
- export declare const OFFICE_DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation"];
2973
- /**
2974
- * Media files (images, audio, video)
2975
- */
2976
- export declare const MEDIA: readonly ("image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "image/x-icon" | "image/heic" | "image/heif" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/mp4" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "video/x-msvideo" | "video/quicktime" | "video/x-matroska" | "video/x-flv" | "video/x-ms-wmv" | "video/mpeg")[];
2977
- /**
2978
- * All MIME types combined
2979
- */
2980
- export declare const ALL_MIME_TYPES: readonly ("image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/bmp" | "image/tiff" | "image/x-icon" | "image/heic" | "image/heif" | "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.oasis.opendocument.text" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.presentation" | "application/rtf" | "text/plain" | "text/csv" | "text/markdown" | "text/javascript" | "application/javascript" | "text/typescript" | "application/json" | "application/xml" | "text/html" | "application/xhtml+xml" | "text/css" | "text/x-python" | "text/x-java-source" | "text/x-c" | "text/x-c++" | "application/x-yaml" | "application/sql" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/mp4" | "audio/webm" | "application/zip" | "application/vnd.rar" | "application/x-tar" | "application/gzip" | "application/x-7z-compressed" | "application/x-bzip2" | "video/mp4" | "video/webm" | "video/ogg" | "video/x-msvideo" | "video/quicktime" | "video/x-matroska" | "video/x-flv" | "video/x-ms-wmv" | "video/mpeg" | "application/vnd.ms-outlook" | "message/rfc822" | "font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "application/vnd.ms-fontobject")[];
2981
- /**
2982
- * Union type of all valid MIME types
2983
- */
2984
- export type MimeType = (typeof ALL_MIME_TYPES)[number];
2985
- /**
2986
- * Union type of all image MIME types
2987
- */
2988
- export type ImageMimeType = (typeof IMAGE_MIME_TYPES_ARRAY)[number];
2989
- /**
2990
- * Union type of all document MIME types
2991
- */
2992
- export type DocumentMimeType = (typeof DOCUMENT_MIME_TYPES_ARRAY)[number];
2993
- /**
2994
- * Union type of all archive MIME types
2995
- */
2996
- export type ArchiveMimeType = (typeof ARCHIVE_MIME_TYPES_ARRAY)[number];
2997
- /**
2998
- * Union type of all audio MIME types
2999
- */
3000
- export type AudioMimeType = (typeof AUDIO_MIME_TYPES_ARRAY)[number];
3001
- /**
3002
- * Union type of all video MIME types
3003
- */
3004
- export type VideoMimeType = (typeof VIDEO_MIME_TYPES_ARRAY)[number];
3005
- /**
3006
- * Union type of all code MIME types
3007
- */
3008
- export type CodeMimeType = (typeof CODE_MIME_TYPES_ARRAY)[number];
3009
- /**
3010
- * Union type of all font MIME types
3011
- */
3012
- export type FontMimeType = (typeof FONT_MIME_TYPES_ARRAY)[number];
3013
- /**
3014
- * Union type of all email message MIME types
3015
- */
3016
- export type EmailMimeType = (typeof EMAIL_MIME_TYPES_ARRAY)[number];
3017
- /**
3018
- * Check if a MIME type is an image
3019
- */
3020
- export declare const isImageMimeType: (mimeType: string) => boolean;
3021
- /**
3022
- * Check if a MIME type is a document
3023
- */
3024
- export declare const isDocumentMimeType: (mimeType: string) => boolean;
3025
- /**
3026
- * Check if a MIME type is an archive
3027
- */
3028
- export declare const isArchiveMimeType: (mimeType: string) => boolean;
3029
- /**
3030
- * Check if a MIME type is audio
3031
- */
3032
- export declare const isAudioMimeType: (mimeType: string) => boolean;
3033
- /**
3034
- * Check if a MIME type is video
3035
- */
3036
- export declare const isVideoMimeType: (mimeType: string) => boolean;
3037
- /**
3038
- * Check if a MIME type is code
3039
- */
3040
- export declare const isCodeMimeType: (mimeType: string) => boolean;
3041
- /**
3042
- * Check if a MIME type is an email message
3043
- */
3044
- export declare const isEmailMimeType: (mimeType: string) => boolean;
3045
2770
  //#endregion
3046
2771
  //#region src/record-mentions.d.ts
3047
2772
  /**