@stndrds/constants 1.0.0-alpha.96 → 1.0.0-alpha.98

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/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
1
3
  /**
2
4
  * AI Chat constants shared between frontend and backend.
3
5
  *
@@ -8,9 +10,9 @@
8
10
  /** Image MIME types supported by AI chat (subset of all image types) */
9
11
  declare const AI_CHAT_SUPPORTED_IMAGES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif"];
10
12
  /** Document MIME types supported by AI chat */
11
- declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "text/plain", "text/markdown", "text/csv"];
13
+ declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "text/markdown", "text/csv"];
12
14
  /** All MIME types supported by AI chat */
13
- declare const AI_CHAT_SUPPORTED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "text/plain", "text/markdown", "text/csv"];
15
+ declare const AI_CHAT_SUPPORTED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "text/markdown", "text/csv"];
14
16
  /** Comma-separated accept string for file inputs */
15
17
  declare const AI_CHAT_ACCEPTED_TYPES: string;
16
18
  /** Maximum file size for AI chat attachments (50 MB) */
@@ -34,6 +36,12 @@ declare const DEFAULT_ATTRIBUTE_ICONS: Record<string, IconName>;
34
36
  */
35
37
  declare function getDefaultAttributeIcon(type: string): IconName;
36
38
 
39
+ /**
40
+ * Merge class names with Tailwind CSS classes.
41
+ * Uses clsx for conditional classes and tailwind-merge to handle conflicts.
42
+ */
43
+ declare function cn(...inputs: ClassValue[]): string;
44
+
37
45
  interface Color {
38
46
  /** Background color - works on both light and dark mode */
39
47
  background: string;
@@ -1827,4 +1835,4 @@ declare const isCodeMimeType: (mimeType: string) => boolean;
1827
1835
  */
1828
1836
  declare const getExtensionFromMimeType: (mimeType: string) => string | null;
1829
1837
 
1830
- export { AI_CHAT_ACCEPTED_TYPES, AI_CHAT_MAX_FILES, AI_CHAT_MAX_FILE_SIZE, AI_CHAT_SUPPORTED_DOCUMENTS, AI_CHAT_SUPPORTED_IMAGES, AI_CHAT_SUPPORTED_MIME_TYPES, ALL_MIME_TYPES, ARCHIVES, ARCHIVE_MIME_TYPES, ARCHIVE_MIME_TYPES_ARRAY, AUDIO, AUDIO_MIME_TYPES, AUDIO_MIME_TYPES_ARRAY, type ArchiveMimeType, type AudioMimeType, BYTES, CODE, CODE_MIME_TYPES, CODE_MIME_TYPES_ARRAY, COLORS, COLOR_GROUPS, COUNTRIES, CURRENCIES, type CodeMimeType, type Color, type ColorBackground, type ColorBorder, type ColorGroup, type ColorGroupColors, type ColorIcon, type ColorId, type ColorText, type Country, type CountryIso2, type CountryIso3, type CountryName, type CountryNumericCode, type CountryPhoneCode, type Currency, type CurrencyCode, type CurrencyName, type CurrencySymbol, DEFAULT_ATTRIBUTE_ICONS, DOCUMENTS, DOCUMENT_MIME_TYPES, DOCUMENT_MIME_TYPES_ARRAY, type DocumentMimeType, FILE_SIZE, FONTS, FONT_MIME_TYPES, FONT_MIME_TYPES_ARRAY, type FontMimeType, GIGABYTES, ICONS, IMAGES, IMAGE_MIME_TYPES, IMAGE_MIME_TYPES_ARRAY, type IconName, type ImageMimeType, KILOBYTES, MEDIA, MEGABYTES, type MimeType, OFFICE_DOCUMENTS, OTHER_MIME_TYPES, RECOMMENDED_MAX_SIZES, STATUS_COLORS, type StatusColorGroup, VIDEO, VIDEO_MIME_TYPES, VIDEO_MIME_TYPES_ARRAY, type VideoMimeType, WEB_IMAGES, bytesToGb, bytesToMb, formatBytes, gbToBytes, getAllColors, getAllCountries, getAllCurrencies, getColor, getColorIds, getColorsByGroup, getCountryByIso2, getCountryByIso3, getCountryDisplayName, getCountryDisplayNameByIso3, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, getSortedCountries, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
1838
+ export { AI_CHAT_ACCEPTED_TYPES, AI_CHAT_MAX_FILES, AI_CHAT_MAX_FILE_SIZE, AI_CHAT_SUPPORTED_DOCUMENTS, AI_CHAT_SUPPORTED_IMAGES, AI_CHAT_SUPPORTED_MIME_TYPES, ALL_MIME_TYPES, ARCHIVES, ARCHIVE_MIME_TYPES, ARCHIVE_MIME_TYPES_ARRAY, AUDIO, AUDIO_MIME_TYPES, AUDIO_MIME_TYPES_ARRAY, type ArchiveMimeType, type AudioMimeType, BYTES, CODE, CODE_MIME_TYPES, CODE_MIME_TYPES_ARRAY, COLORS, COLOR_GROUPS, COUNTRIES, CURRENCIES, type CodeMimeType, type Color, type ColorBackground, type ColorBorder, type ColorGroup, type ColorGroupColors, type ColorIcon, type ColorId, type ColorText, type Country, type CountryIso2, type CountryIso3, type CountryName, type CountryNumericCode, type CountryPhoneCode, type Currency, type CurrencyCode, type CurrencyName, type CurrencySymbol, DEFAULT_ATTRIBUTE_ICONS, DOCUMENTS, DOCUMENT_MIME_TYPES, DOCUMENT_MIME_TYPES_ARRAY, type DocumentMimeType, FILE_SIZE, FONTS, FONT_MIME_TYPES, FONT_MIME_TYPES_ARRAY, type FontMimeType, GIGABYTES, ICONS, IMAGES, IMAGE_MIME_TYPES, IMAGE_MIME_TYPES_ARRAY, type IconName, type ImageMimeType, KILOBYTES, MEDIA, MEGABYTES, type MimeType, OFFICE_DOCUMENTS, OTHER_MIME_TYPES, RECOMMENDED_MAX_SIZES, STATUS_COLORS, type StatusColorGroup, VIDEO, VIDEO_MIME_TYPES, VIDEO_MIME_TYPES_ARRAY, type VideoMimeType, WEB_IMAGES, bytesToGb, bytesToMb, cn, formatBytes, gbToBytes, getAllColors, getAllCountries, getAllCurrencies, getColor, getColorIds, getColorsByGroup, getCountryByIso2, getCountryByIso3, getCountryDisplayName, getCountryDisplayNameByIso3, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, getSortedCountries, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
1
3
  /**
2
4
  * AI Chat constants shared between frontend and backend.
3
5
  *
@@ -8,9 +10,9 @@
8
10
  /** Image MIME types supported by AI chat (subset of all image types) */
9
11
  declare const AI_CHAT_SUPPORTED_IMAGES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif"];
10
12
  /** Document MIME types supported by AI chat */
11
- declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "text/plain", "text/markdown", "text/csv"];
13
+ declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "text/markdown", "text/csv"];
12
14
  /** All MIME types supported by AI chat */
13
- declare const AI_CHAT_SUPPORTED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "text/plain", "text/markdown", "text/csv"];
15
+ declare const AI_CHAT_SUPPORTED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain", "text/markdown", "text/csv"];
14
16
  /** Comma-separated accept string for file inputs */
15
17
  declare const AI_CHAT_ACCEPTED_TYPES: string;
16
18
  /** Maximum file size for AI chat attachments (50 MB) */
@@ -34,6 +36,12 @@ declare const DEFAULT_ATTRIBUTE_ICONS: Record<string, IconName>;
34
36
  */
35
37
  declare function getDefaultAttributeIcon(type: string): IconName;
36
38
 
39
+ /**
40
+ * Merge class names with Tailwind CSS classes.
41
+ * Uses clsx for conditional classes and tailwind-merge to handle conflicts.
42
+ */
43
+ declare function cn(...inputs: ClassValue[]): string;
44
+
37
45
  interface Color {
38
46
  /** Background color - works on both light and dark mode */
39
47
  background: string;
@@ -1827,4 +1835,4 @@ declare const isCodeMimeType: (mimeType: string) => boolean;
1827
1835
  */
1828
1836
  declare const getExtensionFromMimeType: (mimeType: string) => string | null;
1829
1837
 
1830
- export { AI_CHAT_ACCEPTED_TYPES, AI_CHAT_MAX_FILES, AI_CHAT_MAX_FILE_SIZE, AI_CHAT_SUPPORTED_DOCUMENTS, AI_CHAT_SUPPORTED_IMAGES, AI_CHAT_SUPPORTED_MIME_TYPES, ALL_MIME_TYPES, ARCHIVES, ARCHIVE_MIME_TYPES, ARCHIVE_MIME_TYPES_ARRAY, AUDIO, AUDIO_MIME_TYPES, AUDIO_MIME_TYPES_ARRAY, type ArchiveMimeType, type AudioMimeType, BYTES, CODE, CODE_MIME_TYPES, CODE_MIME_TYPES_ARRAY, COLORS, COLOR_GROUPS, COUNTRIES, CURRENCIES, type CodeMimeType, type Color, type ColorBackground, type ColorBorder, type ColorGroup, type ColorGroupColors, type ColorIcon, type ColorId, type ColorText, type Country, type CountryIso2, type CountryIso3, type CountryName, type CountryNumericCode, type CountryPhoneCode, type Currency, type CurrencyCode, type CurrencyName, type CurrencySymbol, DEFAULT_ATTRIBUTE_ICONS, DOCUMENTS, DOCUMENT_MIME_TYPES, DOCUMENT_MIME_TYPES_ARRAY, type DocumentMimeType, FILE_SIZE, FONTS, FONT_MIME_TYPES, FONT_MIME_TYPES_ARRAY, type FontMimeType, GIGABYTES, ICONS, IMAGES, IMAGE_MIME_TYPES, IMAGE_MIME_TYPES_ARRAY, type IconName, type ImageMimeType, KILOBYTES, MEDIA, MEGABYTES, type MimeType, OFFICE_DOCUMENTS, OTHER_MIME_TYPES, RECOMMENDED_MAX_SIZES, STATUS_COLORS, type StatusColorGroup, VIDEO, VIDEO_MIME_TYPES, VIDEO_MIME_TYPES_ARRAY, type VideoMimeType, WEB_IMAGES, bytesToGb, bytesToMb, formatBytes, gbToBytes, getAllColors, getAllCountries, getAllCurrencies, getColor, getColorIds, getColorsByGroup, getCountryByIso2, getCountryByIso3, getCountryDisplayName, getCountryDisplayNameByIso3, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, getSortedCountries, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
1838
+ export { AI_CHAT_ACCEPTED_TYPES, AI_CHAT_MAX_FILES, AI_CHAT_MAX_FILE_SIZE, AI_CHAT_SUPPORTED_DOCUMENTS, AI_CHAT_SUPPORTED_IMAGES, AI_CHAT_SUPPORTED_MIME_TYPES, ALL_MIME_TYPES, ARCHIVES, ARCHIVE_MIME_TYPES, ARCHIVE_MIME_TYPES_ARRAY, AUDIO, AUDIO_MIME_TYPES, AUDIO_MIME_TYPES_ARRAY, type ArchiveMimeType, type AudioMimeType, BYTES, CODE, CODE_MIME_TYPES, CODE_MIME_TYPES_ARRAY, COLORS, COLOR_GROUPS, COUNTRIES, CURRENCIES, type CodeMimeType, type Color, type ColorBackground, type ColorBorder, type ColorGroup, type ColorGroupColors, type ColorIcon, type ColorId, type ColorText, type Country, type CountryIso2, type CountryIso3, type CountryName, type CountryNumericCode, type CountryPhoneCode, type Currency, type CurrencyCode, type CurrencyName, type CurrencySymbol, DEFAULT_ATTRIBUTE_ICONS, DOCUMENTS, DOCUMENT_MIME_TYPES, DOCUMENT_MIME_TYPES_ARRAY, type DocumentMimeType, FILE_SIZE, FONTS, FONT_MIME_TYPES, FONT_MIME_TYPES_ARRAY, type FontMimeType, GIGABYTES, ICONS, IMAGES, IMAGE_MIME_TYPES, IMAGE_MIME_TYPES_ARRAY, type IconName, type ImageMimeType, KILOBYTES, MEDIA, MEGABYTES, type MimeType, OFFICE_DOCUMENTS, OTHER_MIME_TYPES, RECOMMENDED_MAX_SIZES, STATUS_COLORS, type StatusColorGroup, VIDEO, VIDEO_MIME_TYPES, VIDEO_MIME_TYPES_ARRAY, type VideoMimeType, WEB_IMAGES, bytesToGb, bytesToMb, cn, formatBytes, gbToBytes, getAllColors, getAllCountries, getAllCurrencies, getColor, getColorIds, getColorsByGroup, getCountryByIso2, getCountryByIso3, getCountryDisplayName, getCountryDisplayNameByIso3, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, getSortedCountries, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
package/dist/index.js CHANGED
@@ -67,6 +67,7 @@ __export(index_exports, {
67
67
  WEB_IMAGES: () => WEB_IMAGES,
68
68
  bytesToGb: () => bytesToGb,
69
69
  bytesToMb: () => bytesToMb,
70
+ cn: () => cn,
70
71
  formatBytes: () => formatBytes,
71
72
  gbToBytes: () => gbToBytes,
72
73
  getAllColors: () => getAllColors,
@@ -286,6 +287,8 @@ var AI_CHAT_SUPPORTED_IMAGES = [
286
287
  ];
287
288
  var AI_CHAT_SUPPORTED_DOCUMENTS = [
288
289
  DOCUMENT_MIME_TYPES.PDF,
290
+ DOCUMENT_MIME_TYPES.DOC,
291
+ DOCUMENT_MIME_TYPES.DOCX,
289
292
  DOCUMENT_MIME_TYPES.TXT,
290
293
  DOCUMENT_MIME_TYPES.MARKDOWN,
291
294
  DOCUMENT_MIME_TYPES.CSV
@@ -326,6 +329,13 @@ function getDefaultAttributeIcon(type) {
326
329
  return DEFAULT_ATTRIBUTE_ICONS[type] ?? "circle";
327
330
  }
328
331
 
332
+ // src/cn.ts
333
+ var import_clsx = require("clsx");
334
+ var import_tailwind_merge = require("tailwind-merge");
335
+ function cn(...inputs) {
336
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
337
+ }
338
+
329
339
  // src/colors.ts
330
340
  var COLORS = {
331
341
  // Neutral & Gray tones
@@ -2835,6 +2845,7 @@ var ICONS = [
2835
2845
  WEB_IMAGES,
2836
2846
  bytesToGb,
2837
2847
  bytesToMb,
2848
+ cn,
2838
2849
  formatBytes,
2839
2850
  gbToBytes,
2840
2851
  getAllColors,
package/dist/index.mjs CHANGED
@@ -180,6 +180,8 @@ var AI_CHAT_SUPPORTED_IMAGES = [
180
180
  ];
181
181
  var AI_CHAT_SUPPORTED_DOCUMENTS = [
182
182
  DOCUMENT_MIME_TYPES.PDF,
183
+ DOCUMENT_MIME_TYPES.DOC,
184
+ DOCUMENT_MIME_TYPES.DOCX,
183
185
  DOCUMENT_MIME_TYPES.TXT,
184
186
  DOCUMENT_MIME_TYPES.MARKDOWN,
185
187
  DOCUMENT_MIME_TYPES.CSV
@@ -220,6 +222,13 @@ function getDefaultAttributeIcon(type) {
220
222
  return DEFAULT_ATTRIBUTE_ICONS[type] ?? "circle";
221
223
  }
222
224
 
225
+ // src/cn.ts
226
+ import { clsx } from "clsx";
227
+ import { twMerge } from "tailwind-merge";
228
+ function cn(...inputs) {
229
+ return twMerge(clsx(inputs));
230
+ }
231
+
223
232
  // src/colors.ts
224
233
  var COLORS = {
225
234
  // Neutral & Gray tones
@@ -2728,6 +2737,7 @@ export {
2728
2737
  WEB_IMAGES,
2729
2738
  bytesToGb,
2730
2739
  bytesToMb,
2740
+ cn,
2731
2741
  formatBytes,
2732
2742
  gbToBytes,
2733
2743
  getAllColors,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stndrds/constants",
3
- "version": "1.0.0-alpha.96",
3
+ "version": "1.0.0-alpha.98",
4
4
  "description": "Currency and country data with ISO codes",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -15,6 +15,10 @@
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
+ "dependencies": {
19
+ "clsx": "^2.1.1",
20
+ "tailwind-merge": "^2.6.0"
21
+ },
18
22
  "devDependencies": {
19
23
  "@vitest/coverage-v8": "^2.1.9",
20
24
  "@vitest/ui": "^2.1.9",