@stndrds/constants 1.0.0-alpha.97 → 1.0.0-alpha.99
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -0
- package/dist/index.mjs +8 -0
- package/package.json +5 -1
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
|
*
|
|
@@ -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
|
*
|
|
@@ -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,
|
|
@@ -328,6 +329,13 @@ function getDefaultAttributeIcon(type) {
|
|
|
328
329
|
return DEFAULT_ATTRIBUTE_ICONS[type] ?? "circle";
|
|
329
330
|
}
|
|
330
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
|
+
|
|
331
339
|
// src/colors.ts
|
|
332
340
|
var COLORS = {
|
|
333
341
|
// Neutral & Gray tones
|
|
@@ -2837,6 +2845,7 @@ var ICONS = [
|
|
|
2837
2845
|
WEB_IMAGES,
|
|
2838
2846
|
bytesToGb,
|
|
2839
2847
|
bytesToMb,
|
|
2848
|
+
cn,
|
|
2840
2849
|
formatBytes,
|
|
2841
2850
|
gbToBytes,
|
|
2842
2851
|
getAllColors,
|
package/dist/index.mjs
CHANGED
|
@@ -222,6 +222,13 @@ function getDefaultAttributeIcon(type) {
|
|
|
222
222
|
return DEFAULT_ATTRIBUTE_ICONS[type] ?? "circle";
|
|
223
223
|
}
|
|
224
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
|
+
|
|
225
232
|
// src/colors.ts
|
|
226
233
|
var COLORS = {
|
|
227
234
|
// Neutral & Gray tones
|
|
@@ -2730,6 +2737,7 @@ export {
|
|
|
2730
2737
|
WEB_IMAGES,
|
|
2731
2738
|
bytesToGb,
|
|
2732
2739
|
bytesToMb,
|
|
2740
|
+
cn,
|
|
2733
2741
|
formatBytes,
|
|
2734
2742
|
gbToBytes,
|
|
2735
2743
|
getAllColors,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/constants",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.99",
|
|
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",
|