@stndrds/constants 1.0.0-alpha.76 → 1.0.0-alpha.78
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 +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +211 -173
- package/dist/index.mjs +204 -173
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Chat constants shared between frontend and backend.
|
|
3
|
+
*
|
|
4
|
+
* These define the allowed file types, size limits, and count limits
|
|
5
|
+
* for AI chat attachments. Both the UI and the backend validate against
|
|
6
|
+
* these values to ensure consistency.
|
|
7
|
+
*/
|
|
8
|
+
/** Image MIME types supported by AI chat (subset of all image types) */
|
|
9
|
+
declare const AI_CHAT_SUPPORTED_IMAGES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif"];
|
|
10
|
+
/** Document MIME types supported by AI chat */
|
|
11
|
+
declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "text/plain", "text/markdown", "text/csv"];
|
|
12
|
+
/** 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"];
|
|
14
|
+
/** Comma-separated accept string for file inputs */
|
|
15
|
+
declare const AI_CHAT_ACCEPTED_TYPES: string;
|
|
16
|
+
/** Maximum file size for AI chat attachments (50 MB) */
|
|
17
|
+
declare const AI_CHAT_MAX_FILE_SIZE: number;
|
|
18
|
+
/** Maximum number of file attachments per message */
|
|
19
|
+
declare const AI_CHAT_MAX_FILES = 5;
|
|
20
|
+
/** Check if a MIME type is supported for AI chat */
|
|
21
|
+
declare function isAIChatSupportedMimeType(mimeType: string): boolean;
|
|
22
|
+
|
|
1
23
|
declare const ICONS: readonly ["a-arrow-down", "a-arrow-up", "academic-hat", "accessibility", "activity-square", "activity", "add-queue", "aeroplane", "air-conditioner", "airplay", "airpods", "alarm-check", "alarm-minus", "alarm-plus", "alarm-smoke", "alarm-snooze", "alarm-x", "alarm", "album", "align-bottom", "align-horizontal", "align-left", "align-right", "align-top", "align-vertical", "alt", "ambulance", "ampersand-square", "ampersand", "ampersands", "anchor", "angry-circle", "angry-ghost", "angry-square", "annoyed-circle", "annoyed-ghost", "annoyed-square", "aperture", "api", "ar", "archive", "arrow-diagonal-one", "arrow-diagonal-two", "arrow-down-circle", "arrow-down-left-circle", "arrow-down-left-square", "arrow-down-left-waves", "arrow-down-left", "arrow-down-right-circle", "arrow-down-right-square", "arrow-down-right-waves", "arrow-down-right", "arrow-down-square", "arrow-down-waves", "arrow-down", "arrow-left-circle", "arrow-left-right", "arrow-left-square", "arrow-left-waves", "arrow-left", "arrow-long-down-left", "arrow-long-down-right", "arrow-long-down", "arrow-long-left", "arrow-long-right", "arrow-long-up-left", "arrow-long-up-right", "arrow-long-up", "arrow-right-circle", "arrow-right-square", "arrow-right-waves", "arrow-right", "arrow-up-circle", "arrow-up-down", "arrow-up-left-circle", "arrow-up-left-square", "arrow-up-left-waves", "arrow-up-left", "arrow-up-right-circle", "arrow-up-right-square", "arrow-up-right-waves", "arrow-up-right", "arrow-up-square", "arrow-up-waves", "arrow-up", "asterisk-circle", "asterisk-diamond", "asterisk-hexagon", "asterisk-octagon", "asterisk-square", "asterisk-waves", "at", "atom", "baby", "backpack", "badge", "baggage-claim", "ban", "bank", "baseball", "bath", "battery-charging-four", "battery-charging-one", "battery-charging-three", "battery-charging-two", "battery-charging", "battery-check", "battery-empty", "battery-full", "battery-minus", "battery-plus", "battery-x", "bell-check", "bell-home", "bell-minus", "bell-on", "bell-plus", "bell-slash", "bell-snooze", "bell-user", "bell-x", "bell", "binoculars", "bitcoin-circle", "bitcoin-diamond", "bitcoin-hexagon", "bitcoin-octagon", "bitcoin-square", "bitcoin-waves", "bitcoin", "bluetooth", "boat", "book-check", "book-dot", "book-home", "book-image", "book-minus", "book-open", "book-plus", "book-slash", "book-snooze", "book-user", "book-x", "book", "bookmark-check", "bookmark-dot", "bookmark-home", "bookmark-minus", "bookmark-plus", "bookmark-slash", "bookmark-snooze", "bookmark-user", "bookmark-x", "bookmark", "bounding-box", "bowl", "box", "brand-chrome", "brand-codepen", "brand-codesandbox", "brand-dribbble", "brand-facebook", "brand-figma", "brand-framer", "brand-github", "brand-gitlab", "brand-google", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-pocket", "brand-slack", "brand-spotify", "brand-telegram", "brand-threads", "brand-trello", "brand-twitch", "brand-twitter", "brand-x", "brand-youtube", "briefcase-conveyor-belt", "briefcase", "brightness-high", "brightness-low", "bubbles", "building-one", "building", "cable-car", "cake", "calendar-check", "calendar-down", "calendar-minus", "calendar-plus", "calendar-slash", "calendar-up", "calendar-x", "calendar", "camera-slash", "camera", "campfire", "cannabis", "caravan", "cart-check", "cart-minus", "cart-plus", "cart-x", "cart", "cast-screen", "center-focus", "chart-area", "chart-bar-big", "chart-bar-decreasing", "chart-bar-increasing", "chart-bar-one", "chart-bar-stacked", "chart-bar", "chart-bubble", "chart-candlestick", "chart-column-big", "chart-column-decreasing", "chart-column-increasing", "chart-column-stacked", "chart-column", "chart-gantt", "chart-graph", "chart-line", "chart-network", "chart-no-axes-column-decreasing", "chart-no-axes-column-increasing", "chart-no-axes-column", "chart-no-axes-combined", "chart-no-axes-gantt", "chart-pie-one", "chart-pie-two", "chart-pie", "chart-scatter", "chart-spline", "chat-check", "chat-dots", "chat-messages", "chat-minus", "chat-plus", "chat-x", "chat", "check-circle-one", "check-circle", "check-diamond", "check-hexagon", "check-octagon", "check-square-one", "check-square", "check-waves", "check", "chevron-double-down-left", "chevron-double-down-right", "chevron-double-down", "chevron-double-left", "chevron-double-right", "chevron-double-up-left", "chevron-double-up-right", "chevron-double-up", "chevron-down-circle", "chevron-down-left-circle", "chevron-down-left-square", "chevron-down-left-waves", "chevron-down-left", "chevron-down-right-circle", "chevron-down-right-square", "chevron-down-right-waves", "chevron-down-right", "chevron-down-square", "chevron-down-waves", "chevron-down", "chevron-left-circle", "chevron-left-square", "chevron-left-waves", "chevron-left", "chevron-right-circle", "chevron-right-square", "chevron-right-waves", "chevron-right", "chevron-up-circle", "chevron-up-down", "chevron-up-left-circle", "chevron-up-left-square", "chevron-up-left-waves", "chevron-up-left", "chevron-up-right-circle", "chevron-up-right-square", "chevron-up-right-waves", "chevron-up-right", "chevron-up-square", "chevron-up-waves", "chevron-up", "chip", "cigarette-off", "cigarette", "circle-dashed", "circle-half-circle", "circle-half", "circle-notch", "circle", "click", "clipboard", "clock-circle", "clock-diamond", "clock-eight", "clock-eleven", "clock-five", "clock-four", "clock-hand", "clock-hexagon", "clock-nine", "clock-octagon", "clock-one", "clock-seven", "clock-six", "clock-square", "clock-ten", "clock-three", "clock-twelve", "clock-two", "clock-waves", "cloud-download", "cloud-drizzle", "cloud-fog", "cloud-hail", "cloud-lightning", "cloud-moon-rain", "cloud-moon", "cloud-off", "cloud-rain-wind", "cloud-rain", "cloud-snow", "cloud-sun-rain", "cloud-sun", "cloud-upload", "cloud", "cloudy", "cocktail", "code-circle", "code-diamond", "code-hexagon", "code-octagon", "code-square", "code-waves", "code", "coffee", "cog-four", "cog-one", "cog-three", "cog-two", "cog", "columns", "command", "compass", "components", "confetti", "config-vertical", "config", "contactless-circle", "contactless", "controller", "cookie", "copy", "copyleft", "copyright-slash", "copyright", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "credit-card-check", "credit-card-minus", "credit-card-plus", "credit-card-x", "credit-card", "croissant", "crop", "crosshair", "cupcake", "danger-circle", "danger-diamond", "danger-hexagon", "danger-octagon", "danger-square", "danger-triangle", "danger-waves", "danger", "database", "daze-circle", "daze-ghost", "daze-square", "delete", "desktop", "diamond", "dice-five", "dice-four", "dice-one", "dice-six", "dice-three", "dice-two", "dislike", "divide", "dollar-circle", "dollar-diamond", "dollar-hexagon", "dollar-octagon", "dollar-square", "dollar-waves", "dollar", "door-closed-locked", "door-closed", "door-open", "dots-circle", "dots-diamond", "dots-hexagon", "dots-octagon", "dots-square", "dots-vertical-circle", "dots-vertical-diamond", "dots-vertical-hexagon", "dots-vertical-octagon", "dots-vertical-square", "dots-vertical-waves", "dots-vertical", "dots-waves", "dots", "download", "drop", "droplet-off", "droplet", "droplets", "ear-slash", "ear", "earth", "eclipse", "edit-one", "edit", "egg", "eight-circle", "eight-diamond", "eight-hexagon", "eight-octagon", "eight-square", "eight-waves", "eight", "elevator", "envelope-open", "envelope", "euro-circle", "euro-diamond", "euro-hexagon", "euro-octagon", "euro-square", "euro-waves", "euro", "exclude", "external-link", "eye-slash", "eye", "face-id", "fat-arrow-down-left", "fat-arrow-down-right", "fat-arrow-down", "fat-arrow-left", "fat-arrow-right", "fat-arrow-up-left", "fat-arrow-up-right", "fat-arrow-up", "fat-corner-down-left", "fat-corner-down-right", "fat-corner-left-down", "fat-corner-left-up", "fat-corner-right-down", "fat-corner-right-up", "fat-corner-up-left", "fat-corner-up-right", "female", "file-check", "file-minus", "file-plus", "file-text", "file-x", "file", "film", "filter-one", "filter", "fine-tune", "fire", "five-circle", "five-diamond", "five-hexagon", "five-octagon", "five-square", "five-waves", "five", "flag-one", "flag", "flame-kindling", "flame", "flask", "flower-2", "flower", "folder-check", "folder-heart", "folder-kanban", "folder-minus", "folder-one", "folder-plus", "folder-slash", "folder-two", "folder-x", "folder", "forward-circle", "forward-diamond", "forward-hexagon", "forward-octagon", "forward-square", "forward-waves", "forward", "four-circle", "four-diamond", "four-hexagon", "four-octagon", "four-square", "four-waves", "four", "frame", "funny-circle", "funny-ghost", "funny-square", "gift", "git-branch", "git-circle", "git-commit", "git-diamond", "git-diff", "git-hexagon", "git-merge", "git-octagon", "git-pull-request", "git-square", "git-waves", "glasses", "globe", "grid-one", "grid", "hand", "hard-drive", "hash-circle", "hash-diamond", "hash-hexagon", "hash-octagon", "hash-square", "hash-waves", "hash", "haze", "heading-five", "heading-four", "heading-one", "heading-six", "heading-three", "heading-two", "heading", "headphones", "heart-broken", "heart-check", "heart-circle", "heart-diamond", "heart-dot", "heart-hexagon", "heart-home", "heart-minus", "heart-octagon", "heart-plus", "heart-slash", "heart-snooze", "heart-square", "heart-user", "heart-waves", "heart-x", "heart", "hexagon", "home-check", "home-minus", "home-plus", "home-smile", "home-x", "home", "image-circle", "image-rectangle", "image", "inbox-archive", "inbox-check", "inbox-down", "inbox-minus", "inbox-plus", "inbox-up", "inbox-x", "inbox", "incognito", "indifferent-circle", "indifferent-ghost", "indifferent-square", "infinity", "info-circle", "info-diamond", "info-hexagon", "info-octagon", "info-square", "info-triangle", "info-waves", "info", "intersect", "kanban", "key", "keyboard-brightness-high", "keyboard-brightness-low", "keyboard", "label", "lamp", "layers-one", "layers-three", "layers-two", "layout", "leaf", "leaves", "letter-a-circle", "letter-a-diamond", "letter-a-hexagon", "letter-a-octagon", "letter-a-square", "letter-a-waves", "letter-a", "letter-b-circle", "letter-b-diamond", "letter-b-hexagon", "letter-b-octagon", "letter-b-square", "letter-b-waves", "letter-b", "letter-c-circle", "letter-c-diamond", "letter-c-hexagon", "letter-c-octagon", "letter-c-square", "letter-c-waves", "letter-c", "letter-d-circle", "letter-d-diamond", "letter-d-hexagon", "letter-d-octagon", "letter-d-square", "letter-d-waves", "letter-d", "letter-e-circle", "letter-e-diamond", "letter-e-hexagon", "letter-e-octagon", "letter-e-square", "letter-e-waves", "letter-e", "letter-f-circle", "letter-f-diamond", "letter-f-hexagon", "letter-f-octagon", "letter-f-square", "letter-f-waves", "letter-f", "letter-g-circle", "letter-g-diamond", "letter-g-hexagon", "letter-g-octagon", "letter-g-square", "letter-g-waves", "letter-g", "letter-h-circle", "letter-h-diamond", "letter-h-hexagon", "letter-h-octagon", "letter-h-square", "letter-h-waves", "letter-h", "letter-i-circle", "letter-i-diamond", "letter-i-hexagon", "letter-i-octagon", "letter-i-square", "letter-i-waves", "letter-i", "letter-j-circle", "letter-j-diamond", "letter-j-hexagon", "letter-j-octagon", "letter-j-square", "letter-j-waves", "letter-j", "letter-k-circle", "letter-k-diamond", "letter-k-hexagon", "letter-k-octagon", "letter-k-square", "letter-k-waves", "letter-k", "letter-l-circle", "letter-l-diamond", "letter-l-hexagon", "letter-l-octagon", "letter-l-square", "letter-l-waves", "letter-l", "letter-m-circle", "letter-m-diamond", "letter-m-hexagon", "letter-m-octagon", "letter-m-square", "letter-m-waves", "letter-m", "letter-n-circle", "letter-n-diamond", "letter-n-hexagon", "letter-n-octagon", "letter-n-square", "letter-n-waves", "letter-n", "letter-o-circle", "letter-o-diamond", "letter-o-hexagon", "letter-o-octagon", "letter-o-square", "letter-o-waves", "letter-o", "letter-p-circle", "letter-p-diamond", "letter-p-hexagon", "letter-p-octagon", "letter-p-square", "letter-p-waves", "letter-p", "letter-q-circle", "letter-q-diamond", "letter-q-hexagon", "letter-q-octagon", "letter-q-square", "letter-q-waves", "letter-q", "letter-r-circle", "letter-r-diamond", "letter-r-hexagon", "letter-r-octagon", "letter-r-square", "letter-r-waves", "letter-r", "letter-s-circle", "letter-s-diamond", "letter-s-hexagon", "letter-s-octagon", "letter-s-square", "letter-s-waves", "letter-s", "letter-t-circle", "letter-t-diamond", "letter-t-hexagon", "letter-t-octagon", "letter-t-square", "letter-t-waves", "letter-t", "letter-u-circle", "letter-u-diamond", "letter-u-hexagon", "letter-u-octagon", "letter-u-square", "letter-u-waves", "letter-u", "letter-v-circle", "letter-v-diamond", "letter-v-hexagon", "letter-v-octagon", "letter-v-square", "letter-v-waves", "letter-v", "letter-w-circle", "letter-w-diamond", "letter-w-hexagon", "letter-w-octagon", "letter-w-square", "letter-w-waves", "letter-w", "letter-x-circle", "letter-x-diamond", "letter-x-hexagon", "letter-x-octagon", "letter-x-square", "letter-x-waves", "letter-x", "letter-y-circle", "letter-y-diamond", "letter-y-hexagon", "letter-y-octagon", "letter-y-square", "letter-y-waves", "letter-y", "letter-z-circle", "letter-z-diamond", "letter-z-hexagon", "letter-z-octagon", "letter-z-square", "letter-z-waves", "letter-z", "lightning-off", "lightning", "like", "line-chart-circle", "line-chart-diamond", "line-chart-hexagon", "line-chart-octagon", "line-chart-square", "line-chart-waves", "link-one", "link-two", "link", "list-check", "list-number", "list", "location-check", "location-home", "location-minus", "location-plus", "location-selected", "location-slash", "location-snooze", "location-user", "location-x", "location", "lock-circle", "lock-diamond", "lock-hexagon", "lock-keyhole", "lock-octagon", "lock-open-keyhole", "lock-open-password", "lock-open", "lock-password", "lock-square", "lock-waves", "lock", "login", "logout", "magnet", "male", "map", "mask", "math-square", "math", "maximize-one", "maximize", "menu", "message-check", "message-dots", "message-minus", "message-plus", "message-reply", "message-x", "message", "microphone-slash", "microphone", "minimize-one", "minimize", "minus-circle", "minus-diamond", "minus-hexagon", "minus-octagon", "minus-square", "minus-waves", "minus", "mobile-signal-five", "mobile-signal-four", "mobile-signal-one", "mobile-signal-three", "mobile-signal-two", "mobile", "moon-star", "moon", "mountain-snow", "mountain", "mouse-pointer", "move-diagonal-one", "move-diagonal", "move-horizontal", "move-vertical", "move", "music-circle", "music-diamond", "music-hexagon", "music-octagon", "music-square", "music-waves", "music", "myna", "navigation-one", "navigation", "nine-circle", "nine-diamond", "nine-hexagon", "nine-octagon", "nine-square", "nine-waves", "nine", "notification", "octagon", "one-circle", "one-diamond", "one-hexagon", "one-octagon", "one-square", "one-waves", "one", "option", "package", "paint", "panel-bottom-close", "panel-bottom-inactive", "panel-bottom-open", "panel-bottom", "panel-left-close", "panel-left-inactive", "panel-left-open", "panel-left", "panel-right-close", "panel-right-inactive", "panel-right-open", "panel-right", "panel-top-close", "panel-top-inactive", "panel-top-open", "panel-top", "paperclip", "parking", "password", "path", "pause-circle", "pause-diamond", "pause-hexagon", "pause-octagon", "pause-square", "pause-waves", "pause", "pen", "pencil", "percentage-circle", "percentage-diamond", "percentage-hexagon", "percentage-octagon", "percentage-square", "percentage-waves", "percentage", "pin", "pizza", "planet", "play-circle", "play-diamond", "play-hexagon", "play-octagon", "play-square", "play-waves", "play", "plus-circle", "plus-diamond", "plus-hexagon", "plus-octagon", "plus-square", "plus-waves", "plus", "pokeball", "power", "presentation", "printer", "puzzle", "question-circle", "question-diamond", "question-hexagon", "question-octagon", "question-square", "question-waves", "question", "radio", "rainbow", "reception-bell", "record", "rectangle-vertical", "rectangle", "redo", "refresh-alt", "refresh", "repeat", "rewind-circle", "rewind-diamond", "rewind-hexagon", "rewind-octagon", "rewind-square", "rewind-waves", "rewind", "rhombus", "ribbon", "rocket", "room-service", "rows", "rss", "ruler", "rupee-circle", "rupee-diamond", "rupee-hexagon", "rupee-octagon", "rupee-square", "rupee-waves", "rupee", "sad-circle", "sad-ghost", "sad-square", "save", "scan", "scissors", "sea-waves", "search-check", "search-circle", "search-diamond", "search-dot", "search-hexagon", "search-home", "search-minus", "search-octagon", "search-plus", "search-slash", "search-snooze", "search-square", "search-user", "search-waves", "search-x", "search", "select-multiple", "send", "servers", "seven-circle", "seven-diamond", "seven-hexagon", "seven-octagon", "seven-square", "seven-waves", "seven", "share", "shell", "shield-check", "shield-crossed", "shield-minus", "shield-one", "shield-plus", "shield-slash", "shield-two", "shield-x", "shield", "shooting-star", "shopping-bag", "shovel", "shrub", "shuffle-alt", "shuffle", "sidebar-alt", "sidebar", "signal-circle", "signal-diamond", "signal-hexagon", "signal-octagon", "signal-square", "signal-waves", "signal", "six-circle", "six-diamond", "six-hexagon", "six-octagon", "six-square", "six-waves", "six", "skip-back", "skip-forward", "slash-circle", "slash-diamond", "slash-hexagon", "slash-octagon", "slash-square", "slash-waves", "smile-circle", "smile-ghost", "smile-square", "snow", "snowflake", "sofa", "sort", "sparkles", "speaker", "spinner-one", "spinner", "sprout", "square-chart-gantt", "square-dashed-kanban", "square-dashed", "square-half", "square-kanban", "square", "star", "stop-circle", "stop-diamond", "stop-hexagon", "stop-octagon", "stop-square", "stop-waves", "stop", "store", "subtract", "sun-dim", "sun-medium", "sun-snow", "sun", "sunrise", "sunset", "support", "swatches", "table", "tablet", "tag-plus", "tag", "tally-five", "tally-four", "tally-one", "tally-three", "tally-two", "target", "telephone-call", "telephone-forward", "telephone-in", "telephone-missed", "telephone-out", "telephone-slash", "telephone", "tent-tree", "tent", "terminal", "text-align-center", "text-align-left", "text-align-right", "text-justify", "thermometer-snowflake", "thermometer-sun", "thermometer", "three-circle", "three-diamond", "three-hexagon", "three-octagon", "three-square", "three-waves", "three", "ticket-slash", "ticket", "toggle-left", "toggle-right", "tool", "tornado", "train", "trash-one", "trash-two", "trash", "tree-deciduous", "tree-palm", "tree-pine", "tree", "trees", "trending-down", "trending-up-down", "trending-up", "triangle", "truck", "tv", "two-circle", "two-diamond", "two-hexagon", "two-octagon", "two-square", "two-waves", "two", "type-bold", "type-italic", "type-text", "type-underline", "umbrella-off", "umbrella", "undo", "union", "unlink", "upload", "user-check", "user-circle", "user-diamond", "user-hexagon", "user-minus", "user-octagon", "user-plus", "user-settings", "user-square", "user-waves", "user-x", "user", "users-group", "users", "video-slash", "video", "volume-check", "volume-high", "volume-low", "volume-minus", "volume-none", "volume-plus", "volume-slash", "volume-x", "watch", "waves", "webcam", "wheel", "wheelchair", "wifi-check", "wifi-low", "wifi-medium", "wifi-minus", "wifi-plus", "wifi-slash", "wifi-x", "wifi", "wind-arrow-down", "wind", "winds", "wine", "wink-circle", "wink-ghost", "wink-square", "wrench", "x-circle", "x-diamond", "x-hexagon", "x-octagon", "x-square", "x-triangle", "x-waves", "x", "yen-circle", "yen-diamond", "yen-hexagon", "yen-octagon", "yen-square", "yen-waves", "yen", "zap-off", "zap", "zero-circle", "zero-diamond", "zero-hexagon", "zero-octagon", "zero-square", "zero-waves", "zero"];
|
|
2
24
|
type IconName = (typeof ICONS)[number];
|
|
3
25
|
|
|
@@ -1780,4 +1802,4 @@ declare const isCodeMimeType: (mimeType: string) => boolean;
|
|
|
1780
1802
|
*/
|
|
1781
1803
|
declare const getExtensionFromMimeType: (mimeType: string) => string | null;
|
|
1782
1804
|
|
|
1783
|
-
export { 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, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
|
|
1805
|
+
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, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Chat constants shared between frontend and backend.
|
|
3
|
+
*
|
|
4
|
+
* These define the allowed file types, size limits, and count limits
|
|
5
|
+
* for AI chat attachments. Both the UI and the backend validate against
|
|
6
|
+
* these values to ensure consistency.
|
|
7
|
+
*/
|
|
8
|
+
/** Image MIME types supported by AI chat (subset of all image types) */
|
|
9
|
+
declare const AI_CHAT_SUPPORTED_IMAGES: readonly ["image/jpeg", "image/png", "image/webp", "image/gif"];
|
|
10
|
+
/** Document MIME types supported by AI chat */
|
|
11
|
+
declare const AI_CHAT_SUPPORTED_DOCUMENTS: readonly ["application/pdf", "text/plain", "text/markdown", "text/csv"];
|
|
12
|
+
/** 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"];
|
|
14
|
+
/** Comma-separated accept string for file inputs */
|
|
15
|
+
declare const AI_CHAT_ACCEPTED_TYPES: string;
|
|
16
|
+
/** Maximum file size for AI chat attachments (50 MB) */
|
|
17
|
+
declare const AI_CHAT_MAX_FILE_SIZE: number;
|
|
18
|
+
/** Maximum number of file attachments per message */
|
|
19
|
+
declare const AI_CHAT_MAX_FILES = 5;
|
|
20
|
+
/** Check if a MIME type is supported for AI chat */
|
|
21
|
+
declare function isAIChatSupportedMimeType(mimeType: string): boolean;
|
|
22
|
+
|
|
1
23
|
declare const ICONS: readonly ["a-arrow-down", "a-arrow-up", "academic-hat", "accessibility", "activity-square", "activity", "add-queue", "aeroplane", "air-conditioner", "airplay", "airpods", "alarm-check", "alarm-minus", "alarm-plus", "alarm-smoke", "alarm-snooze", "alarm-x", "alarm", "album", "align-bottom", "align-horizontal", "align-left", "align-right", "align-top", "align-vertical", "alt", "ambulance", "ampersand-square", "ampersand", "ampersands", "anchor", "angry-circle", "angry-ghost", "angry-square", "annoyed-circle", "annoyed-ghost", "annoyed-square", "aperture", "api", "ar", "archive", "arrow-diagonal-one", "arrow-diagonal-two", "arrow-down-circle", "arrow-down-left-circle", "arrow-down-left-square", "arrow-down-left-waves", "arrow-down-left", "arrow-down-right-circle", "arrow-down-right-square", "arrow-down-right-waves", "arrow-down-right", "arrow-down-square", "arrow-down-waves", "arrow-down", "arrow-left-circle", "arrow-left-right", "arrow-left-square", "arrow-left-waves", "arrow-left", "arrow-long-down-left", "arrow-long-down-right", "arrow-long-down", "arrow-long-left", "arrow-long-right", "arrow-long-up-left", "arrow-long-up-right", "arrow-long-up", "arrow-right-circle", "arrow-right-square", "arrow-right-waves", "arrow-right", "arrow-up-circle", "arrow-up-down", "arrow-up-left-circle", "arrow-up-left-square", "arrow-up-left-waves", "arrow-up-left", "arrow-up-right-circle", "arrow-up-right-square", "arrow-up-right-waves", "arrow-up-right", "arrow-up-square", "arrow-up-waves", "arrow-up", "asterisk-circle", "asterisk-diamond", "asterisk-hexagon", "asterisk-octagon", "asterisk-square", "asterisk-waves", "at", "atom", "baby", "backpack", "badge", "baggage-claim", "ban", "bank", "baseball", "bath", "battery-charging-four", "battery-charging-one", "battery-charging-three", "battery-charging-two", "battery-charging", "battery-check", "battery-empty", "battery-full", "battery-minus", "battery-plus", "battery-x", "bell-check", "bell-home", "bell-minus", "bell-on", "bell-plus", "bell-slash", "bell-snooze", "bell-user", "bell-x", "bell", "binoculars", "bitcoin-circle", "bitcoin-diamond", "bitcoin-hexagon", "bitcoin-octagon", "bitcoin-square", "bitcoin-waves", "bitcoin", "bluetooth", "boat", "book-check", "book-dot", "book-home", "book-image", "book-minus", "book-open", "book-plus", "book-slash", "book-snooze", "book-user", "book-x", "book", "bookmark-check", "bookmark-dot", "bookmark-home", "bookmark-minus", "bookmark-plus", "bookmark-slash", "bookmark-snooze", "bookmark-user", "bookmark-x", "bookmark", "bounding-box", "bowl", "box", "brand-chrome", "brand-codepen", "brand-codesandbox", "brand-dribbble", "brand-facebook", "brand-figma", "brand-framer", "brand-github", "brand-gitlab", "brand-google", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-pocket", "brand-slack", "brand-spotify", "brand-telegram", "brand-threads", "brand-trello", "brand-twitch", "brand-twitter", "brand-x", "brand-youtube", "briefcase-conveyor-belt", "briefcase", "brightness-high", "brightness-low", "bubbles", "building-one", "building", "cable-car", "cake", "calendar-check", "calendar-down", "calendar-minus", "calendar-plus", "calendar-slash", "calendar-up", "calendar-x", "calendar", "camera-slash", "camera", "campfire", "cannabis", "caravan", "cart-check", "cart-minus", "cart-plus", "cart-x", "cart", "cast-screen", "center-focus", "chart-area", "chart-bar-big", "chart-bar-decreasing", "chart-bar-increasing", "chart-bar-one", "chart-bar-stacked", "chart-bar", "chart-bubble", "chart-candlestick", "chart-column-big", "chart-column-decreasing", "chart-column-increasing", "chart-column-stacked", "chart-column", "chart-gantt", "chart-graph", "chart-line", "chart-network", "chart-no-axes-column-decreasing", "chart-no-axes-column-increasing", "chart-no-axes-column", "chart-no-axes-combined", "chart-no-axes-gantt", "chart-pie-one", "chart-pie-two", "chart-pie", "chart-scatter", "chart-spline", "chat-check", "chat-dots", "chat-messages", "chat-minus", "chat-plus", "chat-x", "chat", "check-circle-one", "check-circle", "check-diamond", "check-hexagon", "check-octagon", "check-square-one", "check-square", "check-waves", "check", "chevron-double-down-left", "chevron-double-down-right", "chevron-double-down", "chevron-double-left", "chevron-double-right", "chevron-double-up-left", "chevron-double-up-right", "chevron-double-up", "chevron-down-circle", "chevron-down-left-circle", "chevron-down-left-square", "chevron-down-left-waves", "chevron-down-left", "chevron-down-right-circle", "chevron-down-right-square", "chevron-down-right-waves", "chevron-down-right", "chevron-down-square", "chevron-down-waves", "chevron-down", "chevron-left-circle", "chevron-left-square", "chevron-left-waves", "chevron-left", "chevron-right-circle", "chevron-right-square", "chevron-right-waves", "chevron-right", "chevron-up-circle", "chevron-up-down", "chevron-up-left-circle", "chevron-up-left-square", "chevron-up-left-waves", "chevron-up-left", "chevron-up-right-circle", "chevron-up-right-square", "chevron-up-right-waves", "chevron-up-right", "chevron-up-square", "chevron-up-waves", "chevron-up", "chip", "cigarette-off", "cigarette", "circle-dashed", "circle-half-circle", "circle-half", "circle-notch", "circle", "click", "clipboard", "clock-circle", "clock-diamond", "clock-eight", "clock-eleven", "clock-five", "clock-four", "clock-hand", "clock-hexagon", "clock-nine", "clock-octagon", "clock-one", "clock-seven", "clock-six", "clock-square", "clock-ten", "clock-three", "clock-twelve", "clock-two", "clock-waves", "cloud-download", "cloud-drizzle", "cloud-fog", "cloud-hail", "cloud-lightning", "cloud-moon-rain", "cloud-moon", "cloud-off", "cloud-rain-wind", "cloud-rain", "cloud-snow", "cloud-sun-rain", "cloud-sun", "cloud-upload", "cloud", "cloudy", "cocktail", "code-circle", "code-diamond", "code-hexagon", "code-octagon", "code-square", "code-waves", "code", "coffee", "cog-four", "cog-one", "cog-three", "cog-two", "cog", "columns", "command", "compass", "components", "confetti", "config-vertical", "config", "contactless-circle", "contactless", "controller", "cookie", "copy", "copyleft", "copyright-slash", "copyright", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "credit-card-check", "credit-card-minus", "credit-card-plus", "credit-card-x", "credit-card", "croissant", "crop", "crosshair", "cupcake", "danger-circle", "danger-diamond", "danger-hexagon", "danger-octagon", "danger-square", "danger-triangle", "danger-waves", "danger", "database", "daze-circle", "daze-ghost", "daze-square", "delete", "desktop", "diamond", "dice-five", "dice-four", "dice-one", "dice-six", "dice-three", "dice-two", "dislike", "divide", "dollar-circle", "dollar-diamond", "dollar-hexagon", "dollar-octagon", "dollar-square", "dollar-waves", "dollar", "door-closed-locked", "door-closed", "door-open", "dots-circle", "dots-diamond", "dots-hexagon", "dots-octagon", "dots-square", "dots-vertical-circle", "dots-vertical-diamond", "dots-vertical-hexagon", "dots-vertical-octagon", "dots-vertical-square", "dots-vertical-waves", "dots-vertical", "dots-waves", "dots", "download", "drop", "droplet-off", "droplet", "droplets", "ear-slash", "ear", "earth", "eclipse", "edit-one", "edit", "egg", "eight-circle", "eight-diamond", "eight-hexagon", "eight-octagon", "eight-square", "eight-waves", "eight", "elevator", "envelope-open", "envelope", "euro-circle", "euro-diamond", "euro-hexagon", "euro-octagon", "euro-square", "euro-waves", "euro", "exclude", "external-link", "eye-slash", "eye", "face-id", "fat-arrow-down-left", "fat-arrow-down-right", "fat-arrow-down", "fat-arrow-left", "fat-arrow-right", "fat-arrow-up-left", "fat-arrow-up-right", "fat-arrow-up", "fat-corner-down-left", "fat-corner-down-right", "fat-corner-left-down", "fat-corner-left-up", "fat-corner-right-down", "fat-corner-right-up", "fat-corner-up-left", "fat-corner-up-right", "female", "file-check", "file-minus", "file-plus", "file-text", "file-x", "file", "film", "filter-one", "filter", "fine-tune", "fire", "five-circle", "five-diamond", "five-hexagon", "five-octagon", "five-square", "five-waves", "five", "flag-one", "flag", "flame-kindling", "flame", "flask", "flower-2", "flower", "folder-check", "folder-heart", "folder-kanban", "folder-minus", "folder-one", "folder-plus", "folder-slash", "folder-two", "folder-x", "folder", "forward-circle", "forward-diamond", "forward-hexagon", "forward-octagon", "forward-square", "forward-waves", "forward", "four-circle", "four-diamond", "four-hexagon", "four-octagon", "four-square", "four-waves", "four", "frame", "funny-circle", "funny-ghost", "funny-square", "gift", "git-branch", "git-circle", "git-commit", "git-diamond", "git-diff", "git-hexagon", "git-merge", "git-octagon", "git-pull-request", "git-square", "git-waves", "glasses", "globe", "grid-one", "grid", "hand", "hard-drive", "hash-circle", "hash-diamond", "hash-hexagon", "hash-octagon", "hash-square", "hash-waves", "hash", "haze", "heading-five", "heading-four", "heading-one", "heading-six", "heading-three", "heading-two", "heading", "headphones", "heart-broken", "heart-check", "heart-circle", "heart-diamond", "heart-dot", "heart-hexagon", "heart-home", "heart-minus", "heart-octagon", "heart-plus", "heart-slash", "heart-snooze", "heart-square", "heart-user", "heart-waves", "heart-x", "heart", "hexagon", "home-check", "home-minus", "home-plus", "home-smile", "home-x", "home", "image-circle", "image-rectangle", "image", "inbox-archive", "inbox-check", "inbox-down", "inbox-minus", "inbox-plus", "inbox-up", "inbox-x", "inbox", "incognito", "indifferent-circle", "indifferent-ghost", "indifferent-square", "infinity", "info-circle", "info-diamond", "info-hexagon", "info-octagon", "info-square", "info-triangle", "info-waves", "info", "intersect", "kanban", "key", "keyboard-brightness-high", "keyboard-brightness-low", "keyboard", "label", "lamp", "layers-one", "layers-three", "layers-two", "layout", "leaf", "leaves", "letter-a-circle", "letter-a-diamond", "letter-a-hexagon", "letter-a-octagon", "letter-a-square", "letter-a-waves", "letter-a", "letter-b-circle", "letter-b-diamond", "letter-b-hexagon", "letter-b-octagon", "letter-b-square", "letter-b-waves", "letter-b", "letter-c-circle", "letter-c-diamond", "letter-c-hexagon", "letter-c-octagon", "letter-c-square", "letter-c-waves", "letter-c", "letter-d-circle", "letter-d-diamond", "letter-d-hexagon", "letter-d-octagon", "letter-d-square", "letter-d-waves", "letter-d", "letter-e-circle", "letter-e-diamond", "letter-e-hexagon", "letter-e-octagon", "letter-e-square", "letter-e-waves", "letter-e", "letter-f-circle", "letter-f-diamond", "letter-f-hexagon", "letter-f-octagon", "letter-f-square", "letter-f-waves", "letter-f", "letter-g-circle", "letter-g-diamond", "letter-g-hexagon", "letter-g-octagon", "letter-g-square", "letter-g-waves", "letter-g", "letter-h-circle", "letter-h-diamond", "letter-h-hexagon", "letter-h-octagon", "letter-h-square", "letter-h-waves", "letter-h", "letter-i-circle", "letter-i-diamond", "letter-i-hexagon", "letter-i-octagon", "letter-i-square", "letter-i-waves", "letter-i", "letter-j-circle", "letter-j-diamond", "letter-j-hexagon", "letter-j-octagon", "letter-j-square", "letter-j-waves", "letter-j", "letter-k-circle", "letter-k-diamond", "letter-k-hexagon", "letter-k-octagon", "letter-k-square", "letter-k-waves", "letter-k", "letter-l-circle", "letter-l-diamond", "letter-l-hexagon", "letter-l-octagon", "letter-l-square", "letter-l-waves", "letter-l", "letter-m-circle", "letter-m-diamond", "letter-m-hexagon", "letter-m-octagon", "letter-m-square", "letter-m-waves", "letter-m", "letter-n-circle", "letter-n-diamond", "letter-n-hexagon", "letter-n-octagon", "letter-n-square", "letter-n-waves", "letter-n", "letter-o-circle", "letter-o-diamond", "letter-o-hexagon", "letter-o-octagon", "letter-o-square", "letter-o-waves", "letter-o", "letter-p-circle", "letter-p-diamond", "letter-p-hexagon", "letter-p-octagon", "letter-p-square", "letter-p-waves", "letter-p", "letter-q-circle", "letter-q-diamond", "letter-q-hexagon", "letter-q-octagon", "letter-q-square", "letter-q-waves", "letter-q", "letter-r-circle", "letter-r-diamond", "letter-r-hexagon", "letter-r-octagon", "letter-r-square", "letter-r-waves", "letter-r", "letter-s-circle", "letter-s-diamond", "letter-s-hexagon", "letter-s-octagon", "letter-s-square", "letter-s-waves", "letter-s", "letter-t-circle", "letter-t-diamond", "letter-t-hexagon", "letter-t-octagon", "letter-t-square", "letter-t-waves", "letter-t", "letter-u-circle", "letter-u-diamond", "letter-u-hexagon", "letter-u-octagon", "letter-u-square", "letter-u-waves", "letter-u", "letter-v-circle", "letter-v-diamond", "letter-v-hexagon", "letter-v-octagon", "letter-v-square", "letter-v-waves", "letter-v", "letter-w-circle", "letter-w-diamond", "letter-w-hexagon", "letter-w-octagon", "letter-w-square", "letter-w-waves", "letter-w", "letter-x-circle", "letter-x-diamond", "letter-x-hexagon", "letter-x-octagon", "letter-x-square", "letter-x-waves", "letter-x", "letter-y-circle", "letter-y-diamond", "letter-y-hexagon", "letter-y-octagon", "letter-y-square", "letter-y-waves", "letter-y", "letter-z-circle", "letter-z-diamond", "letter-z-hexagon", "letter-z-octagon", "letter-z-square", "letter-z-waves", "letter-z", "lightning-off", "lightning", "like", "line-chart-circle", "line-chart-diamond", "line-chart-hexagon", "line-chart-octagon", "line-chart-square", "line-chart-waves", "link-one", "link-two", "link", "list-check", "list-number", "list", "location-check", "location-home", "location-minus", "location-plus", "location-selected", "location-slash", "location-snooze", "location-user", "location-x", "location", "lock-circle", "lock-diamond", "lock-hexagon", "lock-keyhole", "lock-octagon", "lock-open-keyhole", "lock-open-password", "lock-open", "lock-password", "lock-square", "lock-waves", "lock", "login", "logout", "magnet", "male", "map", "mask", "math-square", "math", "maximize-one", "maximize", "menu", "message-check", "message-dots", "message-minus", "message-plus", "message-reply", "message-x", "message", "microphone-slash", "microphone", "minimize-one", "minimize", "minus-circle", "minus-diamond", "minus-hexagon", "minus-octagon", "minus-square", "minus-waves", "minus", "mobile-signal-five", "mobile-signal-four", "mobile-signal-one", "mobile-signal-three", "mobile-signal-two", "mobile", "moon-star", "moon", "mountain-snow", "mountain", "mouse-pointer", "move-diagonal-one", "move-diagonal", "move-horizontal", "move-vertical", "move", "music-circle", "music-diamond", "music-hexagon", "music-octagon", "music-square", "music-waves", "music", "myna", "navigation-one", "navigation", "nine-circle", "nine-diamond", "nine-hexagon", "nine-octagon", "nine-square", "nine-waves", "nine", "notification", "octagon", "one-circle", "one-diamond", "one-hexagon", "one-octagon", "one-square", "one-waves", "one", "option", "package", "paint", "panel-bottom-close", "panel-bottom-inactive", "panel-bottom-open", "panel-bottom", "panel-left-close", "panel-left-inactive", "panel-left-open", "panel-left", "panel-right-close", "panel-right-inactive", "panel-right-open", "panel-right", "panel-top-close", "panel-top-inactive", "panel-top-open", "panel-top", "paperclip", "parking", "password", "path", "pause-circle", "pause-diamond", "pause-hexagon", "pause-octagon", "pause-square", "pause-waves", "pause", "pen", "pencil", "percentage-circle", "percentage-diamond", "percentage-hexagon", "percentage-octagon", "percentage-square", "percentage-waves", "percentage", "pin", "pizza", "planet", "play-circle", "play-diamond", "play-hexagon", "play-octagon", "play-square", "play-waves", "play", "plus-circle", "plus-diamond", "plus-hexagon", "plus-octagon", "plus-square", "plus-waves", "plus", "pokeball", "power", "presentation", "printer", "puzzle", "question-circle", "question-diamond", "question-hexagon", "question-octagon", "question-square", "question-waves", "question", "radio", "rainbow", "reception-bell", "record", "rectangle-vertical", "rectangle", "redo", "refresh-alt", "refresh", "repeat", "rewind-circle", "rewind-diamond", "rewind-hexagon", "rewind-octagon", "rewind-square", "rewind-waves", "rewind", "rhombus", "ribbon", "rocket", "room-service", "rows", "rss", "ruler", "rupee-circle", "rupee-diamond", "rupee-hexagon", "rupee-octagon", "rupee-square", "rupee-waves", "rupee", "sad-circle", "sad-ghost", "sad-square", "save", "scan", "scissors", "sea-waves", "search-check", "search-circle", "search-diamond", "search-dot", "search-hexagon", "search-home", "search-minus", "search-octagon", "search-plus", "search-slash", "search-snooze", "search-square", "search-user", "search-waves", "search-x", "search", "select-multiple", "send", "servers", "seven-circle", "seven-diamond", "seven-hexagon", "seven-octagon", "seven-square", "seven-waves", "seven", "share", "shell", "shield-check", "shield-crossed", "shield-minus", "shield-one", "shield-plus", "shield-slash", "shield-two", "shield-x", "shield", "shooting-star", "shopping-bag", "shovel", "shrub", "shuffle-alt", "shuffle", "sidebar-alt", "sidebar", "signal-circle", "signal-diamond", "signal-hexagon", "signal-octagon", "signal-square", "signal-waves", "signal", "six-circle", "six-diamond", "six-hexagon", "six-octagon", "six-square", "six-waves", "six", "skip-back", "skip-forward", "slash-circle", "slash-diamond", "slash-hexagon", "slash-octagon", "slash-square", "slash-waves", "smile-circle", "smile-ghost", "smile-square", "snow", "snowflake", "sofa", "sort", "sparkles", "speaker", "spinner-one", "spinner", "sprout", "square-chart-gantt", "square-dashed-kanban", "square-dashed", "square-half", "square-kanban", "square", "star", "stop-circle", "stop-diamond", "stop-hexagon", "stop-octagon", "stop-square", "stop-waves", "stop", "store", "subtract", "sun-dim", "sun-medium", "sun-snow", "sun", "sunrise", "sunset", "support", "swatches", "table", "tablet", "tag-plus", "tag", "tally-five", "tally-four", "tally-one", "tally-three", "tally-two", "target", "telephone-call", "telephone-forward", "telephone-in", "telephone-missed", "telephone-out", "telephone-slash", "telephone", "tent-tree", "tent", "terminal", "text-align-center", "text-align-left", "text-align-right", "text-justify", "thermometer-snowflake", "thermometer-sun", "thermometer", "three-circle", "three-diamond", "three-hexagon", "three-octagon", "three-square", "three-waves", "three", "ticket-slash", "ticket", "toggle-left", "toggle-right", "tool", "tornado", "train", "trash-one", "trash-two", "trash", "tree-deciduous", "tree-palm", "tree-pine", "tree", "trees", "trending-down", "trending-up-down", "trending-up", "triangle", "truck", "tv", "two-circle", "two-diamond", "two-hexagon", "two-octagon", "two-square", "two-waves", "two", "type-bold", "type-italic", "type-text", "type-underline", "umbrella-off", "umbrella", "undo", "union", "unlink", "upload", "user-check", "user-circle", "user-diamond", "user-hexagon", "user-minus", "user-octagon", "user-plus", "user-settings", "user-square", "user-waves", "user-x", "user", "users-group", "users", "video-slash", "video", "volume-check", "volume-high", "volume-low", "volume-minus", "volume-none", "volume-plus", "volume-slash", "volume-x", "watch", "waves", "webcam", "wheel", "wheelchair", "wifi-check", "wifi-low", "wifi-medium", "wifi-minus", "wifi-plus", "wifi-slash", "wifi-x", "wifi", "wind-arrow-down", "wind", "winds", "wine", "wink-circle", "wink-ghost", "wink-square", "wrench", "x-circle", "x-diamond", "x-hexagon", "x-octagon", "x-square", "x-triangle", "x-waves", "x", "yen-circle", "yen-diamond", "yen-hexagon", "yen-octagon", "yen-square", "yen-waves", "yen", "zap-off", "zap", "zero-circle", "zero-diamond", "zero-hexagon", "zero-octagon", "zero-square", "zero-waves", "zero"];
|
|
2
24
|
type IconName = (typeof ICONS)[number];
|
|
3
25
|
|
|
@@ -1780,4 +1802,4 @@ declare const isCodeMimeType: (mimeType: string) => boolean;
|
|
|
1780
1802
|
*/
|
|
1781
1803
|
declare const getExtensionFromMimeType: (mimeType: string) => string | null;
|
|
1782
1804
|
|
|
1783
|
-
export { 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, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
|
|
1805
|
+
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, getCountryPhoneCode, getCurrency, getCurrencySymbol, getDefaultAttributeIcon, getExtensionFromMimeType, getPhoneMaxDigits, getPhoneTrunkPrefix, isAIChatSupportedMimeType, isArchiveMimeType, isAudioMimeType, isCodeMimeType, isDocumentMimeType, isImageMimeType, isValidColorId, isValidCurrencyCode, isValidIso2, isValidIso3, isVideoMimeType, isWithinSizeLimit, mbToBytes, stripTrunkPrefix };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AI_CHAT_ACCEPTED_TYPES: () => AI_CHAT_ACCEPTED_TYPES,
|
|
24
|
+
AI_CHAT_MAX_FILES: () => AI_CHAT_MAX_FILES,
|
|
25
|
+
AI_CHAT_MAX_FILE_SIZE: () => AI_CHAT_MAX_FILE_SIZE,
|
|
26
|
+
AI_CHAT_SUPPORTED_DOCUMENTS: () => AI_CHAT_SUPPORTED_DOCUMENTS,
|
|
27
|
+
AI_CHAT_SUPPORTED_IMAGES: () => AI_CHAT_SUPPORTED_IMAGES,
|
|
28
|
+
AI_CHAT_SUPPORTED_MIME_TYPES: () => AI_CHAT_SUPPORTED_MIME_TYPES,
|
|
23
29
|
ALL_MIME_TYPES: () => ALL_MIME_TYPES,
|
|
24
30
|
ARCHIVES: () => ARCHIVES,
|
|
25
31
|
ARCHIVE_MIME_TYPES: () => ARCHIVE_MIME_TYPES,
|
|
@@ -78,6 +84,7 @@ __export(index_exports, {
|
|
|
78
84
|
getExtensionFromMimeType: () => getExtensionFromMimeType,
|
|
79
85
|
getPhoneMaxDigits: () => getPhoneMaxDigits,
|
|
80
86
|
getPhoneTrunkPrefix: () => getPhoneTrunkPrefix,
|
|
87
|
+
isAIChatSupportedMimeType: () => isAIChatSupportedMimeType,
|
|
81
88
|
isArchiveMimeType: () => isArchiveMimeType,
|
|
82
89
|
isAudioMimeType: () => isAudioMimeType,
|
|
83
90
|
isCodeMimeType: () => isCodeMimeType,
|
|
@@ -94,6 +101,203 @@ __export(index_exports, {
|
|
|
94
101
|
});
|
|
95
102
|
module.exports = __toCommonJS(index_exports);
|
|
96
103
|
|
|
104
|
+
// src/mimeTypes.ts
|
|
105
|
+
var IMAGE_MIME_TYPES = {
|
|
106
|
+
JPEG: "image/jpeg",
|
|
107
|
+
PNG: "image/png",
|
|
108
|
+
GIF: "image/gif",
|
|
109
|
+
WEBP: "image/webp",
|
|
110
|
+
SVG: "image/svg+xml",
|
|
111
|
+
BMP: "image/bmp",
|
|
112
|
+
TIFF: "image/tiff",
|
|
113
|
+
ICO: "image/x-icon",
|
|
114
|
+
HEIC: "image/heic",
|
|
115
|
+
HEIF: "image/heif"
|
|
116
|
+
};
|
|
117
|
+
var IMAGE_MIME_TYPES_ARRAY = Object.values(IMAGE_MIME_TYPES);
|
|
118
|
+
var DOCUMENT_MIME_TYPES = {
|
|
119
|
+
PDF: "application/pdf",
|
|
120
|
+
DOC: "application/msword",
|
|
121
|
+
DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
122
|
+
XLS: "application/vnd.ms-excel",
|
|
123
|
+
XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
124
|
+
PPT: "application/vnd.ms-powerpoint",
|
|
125
|
+
PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
126
|
+
ODT: "application/vnd.oasis.opendocument.text",
|
|
127
|
+
ODS: "application/vnd.oasis.opendocument.spreadsheet",
|
|
128
|
+
ODP: "application/vnd.oasis.opendocument.presentation",
|
|
129
|
+
RTF: "application/rtf",
|
|
130
|
+
TXT: "text/plain",
|
|
131
|
+
CSV: "text/csv",
|
|
132
|
+
MARKDOWN: "text/markdown"
|
|
133
|
+
};
|
|
134
|
+
var DOCUMENT_MIME_TYPES_ARRAY = Object.values(DOCUMENT_MIME_TYPES);
|
|
135
|
+
var ARCHIVE_MIME_TYPES = {
|
|
136
|
+
ZIP: "application/zip",
|
|
137
|
+
RAR: "application/vnd.rar",
|
|
138
|
+
TAR: "application/x-tar",
|
|
139
|
+
GZIP: "application/gzip",
|
|
140
|
+
"7Z": "application/x-7z-compressed",
|
|
141
|
+
BZ2: "application/x-bzip2"
|
|
142
|
+
};
|
|
143
|
+
var ARCHIVE_MIME_TYPES_ARRAY = Object.values(ARCHIVE_MIME_TYPES);
|
|
144
|
+
var AUDIO_MIME_TYPES = {
|
|
145
|
+
MP3: "audio/mpeg",
|
|
146
|
+
WAV: "audio/wav",
|
|
147
|
+
OGG: "audio/ogg",
|
|
148
|
+
AAC: "audio/aac",
|
|
149
|
+
FLAC: "audio/flac",
|
|
150
|
+
M4A: "audio/mp4",
|
|
151
|
+
WEBM: "audio/webm"
|
|
152
|
+
};
|
|
153
|
+
var AUDIO_MIME_TYPES_ARRAY = Object.values(AUDIO_MIME_TYPES);
|
|
154
|
+
var VIDEO_MIME_TYPES = {
|
|
155
|
+
MP4: "video/mp4",
|
|
156
|
+
WEBM: "video/webm",
|
|
157
|
+
OGG: "video/ogg",
|
|
158
|
+
AVI: "video/x-msvideo",
|
|
159
|
+
MOV: "video/quicktime",
|
|
160
|
+
MKV: "video/x-matroska",
|
|
161
|
+
FLV: "video/x-flv",
|
|
162
|
+
WMV: "video/x-ms-wmv",
|
|
163
|
+
MPEG: "video/mpeg"
|
|
164
|
+
};
|
|
165
|
+
var VIDEO_MIME_TYPES_ARRAY = Object.values(VIDEO_MIME_TYPES);
|
|
166
|
+
var CODE_MIME_TYPES = {
|
|
167
|
+
JAVASCRIPT: "text/javascript",
|
|
168
|
+
TYPESCRIPT: "text/typescript",
|
|
169
|
+
JSON: "application/json",
|
|
170
|
+
XML: "application/xml",
|
|
171
|
+
HTML: "text/html",
|
|
172
|
+
CSS: "text/css",
|
|
173
|
+
PYTHON: "text/x-python",
|
|
174
|
+
JAVA: "text/x-java-source",
|
|
175
|
+
C: "text/x-c",
|
|
176
|
+
CPP: "text/x-c++",
|
|
177
|
+
YAML: "application/x-yaml",
|
|
178
|
+
SQL: "application/sql"
|
|
179
|
+
};
|
|
180
|
+
var CODE_MIME_TYPES_ARRAY = Object.values(CODE_MIME_TYPES);
|
|
181
|
+
var FONT_MIME_TYPES = {
|
|
182
|
+
TTF: "font/ttf",
|
|
183
|
+
OTF: "font/otf",
|
|
184
|
+
WOFF: "font/woff",
|
|
185
|
+
WOFF2: "font/woff2",
|
|
186
|
+
EOT: "application/vnd.ms-fontobject"
|
|
187
|
+
};
|
|
188
|
+
var FONT_MIME_TYPES_ARRAY = Object.values(FONT_MIME_TYPES);
|
|
189
|
+
var OTHER_MIME_TYPES = {
|
|
190
|
+
BINARY: "application/octet-stream",
|
|
191
|
+
FORM_DATA: "multipart/form-data",
|
|
192
|
+
JSON_LD: "application/ld+json",
|
|
193
|
+
XHTML: "application/xhtml+xml"
|
|
194
|
+
};
|
|
195
|
+
var IMAGES = IMAGE_MIME_TYPES_ARRAY;
|
|
196
|
+
var DOCUMENTS = DOCUMENT_MIME_TYPES_ARRAY;
|
|
197
|
+
var ARCHIVES = ARCHIVE_MIME_TYPES_ARRAY;
|
|
198
|
+
var AUDIO = AUDIO_MIME_TYPES_ARRAY;
|
|
199
|
+
var VIDEO = VIDEO_MIME_TYPES_ARRAY;
|
|
200
|
+
var CODE = CODE_MIME_TYPES_ARRAY;
|
|
201
|
+
var FONTS = FONT_MIME_TYPES_ARRAY;
|
|
202
|
+
var WEB_IMAGES = [
|
|
203
|
+
IMAGE_MIME_TYPES.JPEG,
|
|
204
|
+
IMAGE_MIME_TYPES.PNG,
|
|
205
|
+
IMAGE_MIME_TYPES.GIF,
|
|
206
|
+
IMAGE_MIME_TYPES.WEBP
|
|
207
|
+
];
|
|
208
|
+
var OFFICE_DOCUMENTS = [
|
|
209
|
+
DOCUMENT_MIME_TYPES.PDF,
|
|
210
|
+
DOCUMENT_MIME_TYPES.DOC,
|
|
211
|
+
DOCUMENT_MIME_TYPES.DOCX,
|
|
212
|
+
DOCUMENT_MIME_TYPES.XLS,
|
|
213
|
+
DOCUMENT_MIME_TYPES.XLSX,
|
|
214
|
+
DOCUMENT_MIME_TYPES.PPT,
|
|
215
|
+
DOCUMENT_MIME_TYPES.PPTX
|
|
216
|
+
];
|
|
217
|
+
var MEDIA = [...IMAGES, ...AUDIO, ...VIDEO];
|
|
218
|
+
var ALL_MIME_TYPES = [
|
|
219
|
+
...IMAGES,
|
|
220
|
+
...DOCUMENTS,
|
|
221
|
+
...ARCHIVES,
|
|
222
|
+
...AUDIO,
|
|
223
|
+
...VIDEO,
|
|
224
|
+
...CODE,
|
|
225
|
+
...FONTS,
|
|
226
|
+
...Object.values(OTHER_MIME_TYPES)
|
|
227
|
+
];
|
|
228
|
+
var isImageMimeType = (mimeType) => {
|
|
229
|
+
return IMAGES.includes(mimeType);
|
|
230
|
+
};
|
|
231
|
+
var isDocumentMimeType = (mimeType) => {
|
|
232
|
+
return DOCUMENTS.includes(mimeType);
|
|
233
|
+
};
|
|
234
|
+
var isArchiveMimeType = (mimeType) => {
|
|
235
|
+
return ARCHIVES.includes(mimeType);
|
|
236
|
+
};
|
|
237
|
+
var isAudioMimeType = (mimeType) => {
|
|
238
|
+
return AUDIO.includes(mimeType);
|
|
239
|
+
};
|
|
240
|
+
var isVideoMimeType = (mimeType) => {
|
|
241
|
+
return VIDEO.includes(mimeType);
|
|
242
|
+
};
|
|
243
|
+
var isCodeMimeType = (mimeType) => {
|
|
244
|
+
return CODE.includes(mimeType);
|
|
245
|
+
};
|
|
246
|
+
var getExtensionFromMimeType = (mimeType) => {
|
|
247
|
+
const mimeToExt = {
|
|
248
|
+
// Images
|
|
249
|
+
"image/jpeg": "jpg",
|
|
250
|
+
"image/png": "png",
|
|
251
|
+
"image/gif": "gif",
|
|
252
|
+
"image/webp": "webp",
|
|
253
|
+
"image/svg+xml": "svg",
|
|
254
|
+
// Documents
|
|
255
|
+
"application/pdf": "pdf",
|
|
256
|
+
"application/msword": "doc",
|
|
257
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
258
|
+
"application/vnd.ms-excel": "xls",
|
|
259
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
260
|
+
// Archives
|
|
261
|
+
"application/zip": "zip",
|
|
262
|
+
"application/vnd.rar": "rar",
|
|
263
|
+
// Audio
|
|
264
|
+
"audio/mpeg": "mp3",
|
|
265
|
+
"audio/wav": "wav",
|
|
266
|
+
// Video
|
|
267
|
+
"video/mp4": "mp4",
|
|
268
|
+
"video/webm": "webm",
|
|
269
|
+
// Text
|
|
270
|
+
"text/plain": "txt",
|
|
271
|
+
"text/csv": "csv",
|
|
272
|
+
"application/json": "json"
|
|
273
|
+
};
|
|
274
|
+
return mimeToExt[mimeType] || null;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// src/aiChat.ts
|
|
278
|
+
var AI_CHAT_SUPPORTED_IMAGES = [
|
|
279
|
+
IMAGE_MIME_TYPES.JPEG,
|
|
280
|
+
IMAGE_MIME_TYPES.PNG,
|
|
281
|
+
IMAGE_MIME_TYPES.WEBP,
|
|
282
|
+
IMAGE_MIME_TYPES.GIF
|
|
283
|
+
];
|
|
284
|
+
var AI_CHAT_SUPPORTED_DOCUMENTS = [
|
|
285
|
+
DOCUMENT_MIME_TYPES.PDF,
|
|
286
|
+
DOCUMENT_MIME_TYPES.TXT,
|
|
287
|
+
DOCUMENT_MIME_TYPES.MARKDOWN,
|
|
288
|
+
DOCUMENT_MIME_TYPES.CSV
|
|
289
|
+
];
|
|
290
|
+
var AI_CHAT_SUPPORTED_MIME_TYPES = [
|
|
291
|
+
...AI_CHAT_SUPPORTED_IMAGES,
|
|
292
|
+
...AI_CHAT_SUPPORTED_DOCUMENTS
|
|
293
|
+
];
|
|
294
|
+
var AI_CHAT_ACCEPTED_TYPES = AI_CHAT_SUPPORTED_MIME_TYPES.join(",");
|
|
295
|
+
var AI_CHAT_MAX_FILE_SIZE = 50 * 1024 * 1024;
|
|
296
|
+
var AI_CHAT_MAX_FILES = 5;
|
|
297
|
+
function isAIChatSupportedMimeType(mimeType) {
|
|
298
|
+
return AI_CHAT_SUPPORTED_MIME_TYPES.includes(mimeType);
|
|
299
|
+
}
|
|
300
|
+
|
|
97
301
|
// src/attribute-icons.ts
|
|
98
302
|
var DEFAULT_ATTRIBUTE_ICONS = {
|
|
99
303
|
text: "text-align-left",
|
|
@@ -2539,181 +2743,14 @@ var ICONS = [
|
|
|
2539
2743
|
"zero-waves",
|
|
2540
2744
|
"zero"
|
|
2541
2745
|
];
|
|
2542
|
-
|
|
2543
|
-
// src/mimeTypes.ts
|
|
2544
|
-
var IMAGE_MIME_TYPES = {
|
|
2545
|
-
JPEG: "image/jpeg",
|
|
2546
|
-
PNG: "image/png",
|
|
2547
|
-
GIF: "image/gif",
|
|
2548
|
-
WEBP: "image/webp",
|
|
2549
|
-
SVG: "image/svg+xml",
|
|
2550
|
-
BMP: "image/bmp",
|
|
2551
|
-
TIFF: "image/tiff",
|
|
2552
|
-
ICO: "image/x-icon",
|
|
2553
|
-
HEIC: "image/heic",
|
|
2554
|
-
HEIF: "image/heif"
|
|
2555
|
-
};
|
|
2556
|
-
var IMAGE_MIME_TYPES_ARRAY = Object.values(IMAGE_MIME_TYPES);
|
|
2557
|
-
var DOCUMENT_MIME_TYPES = {
|
|
2558
|
-
PDF: "application/pdf",
|
|
2559
|
-
DOC: "application/msword",
|
|
2560
|
-
DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2561
|
-
XLS: "application/vnd.ms-excel",
|
|
2562
|
-
XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2563
|
-
PPT: "application/vnd.ms-powerpoint",
|
|
2564
|
-
PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2565
|
-
ODT: "application/vnd.oasis.opendocument.text",
|
|
2566
|
-
ODS: "application/vnd.oasis.opendocument.spreadsheet",
|
|
2567
|
-
ODP: "application/vnd.oasis.opendocument.presentation",
|
|
2568
|
-
RTF: "application/rtf",
|
|
2569
|
-
TXT: "text/plain",
|
|
2570
|
-
CSV: "text/csv",
|
|
2571
|
-
MARKDOWN: "text/markdown"
|
|
2572
|
-
};
|
|
2573
|
-
var DOCUMENT_MIME_TYPES_ARRAY = Object.values(DOCUMENT_MIME_TYPES);
|
|
2574
|
-
var ARCHIVE_MIME_TYPES = {
|
|
2575
|
-
ZIP: "application/zip",
|
|
2576
|
-
RAR: "application/vnd.rar",
|
|
2577
|
-
TAR: "application/x-tar",
|
|
2578
|
-
GZIP: "application/gzip",
|
|
2579
|
-
"7Z": "application/x-7z-compressed",
|
|
2580
|
-
BZ2: "application/x-bzip2"
|
|
2581
|
-
};
|
|
2582
|
-
var ARCHIVE_MIME_TYPES_ARRAY = Object.values(ARCHIVE_MIME_TYPES);
|
|
2583
|
-
var AUDIO_MIME_TYPES = {
|
|
2584
|
-
MP3: "audio/mpeg",
|
|
2585
|
-
WAV: "audio/wav",
|
|
2586
|
-
OGG: "audio/ogg",
|
|
2587
|
-
AAC: "audio/aac",
|
|
2588
|
-
FLAC: "audio/flac",
|
|
2589
|
-
M4A: "audio/mp4",
|
|
2590
|
-
WEBM: "audio/webm"
|
|
2591
|
-
};
|
|
2592
|
-
var AUDIO_MIME_TYPES_ARRAY = Object.values(AUDIO_MIME_TYPES);
|
|
2593
|
-
var VIDEO_MIME_TYPES = {
|
|
2594
|
-
MP4: "video/mp4",
|
|
2595
|
-
WEBM: "video/webm",
|
|
2596
|
-
OGG: "video/ogg",
|
|
2597
|
-
AVI: "video/x-msvideo",
|
|
2598
|
-
MOV: "video/quicktime",
|
|
2599
|
-
MKV: "video/x-matroska",
|
|
2600
|
-
FLV: "video/x-flv",
|
|
2601
|
-
WMV: "video/x-ms-wmv",
|
|
2602
|
-
MPEG: "video/mpeg"
|
|
2603
|
-
};
|
|
2604
|
-
var VIDEO_MIME_TYPES_ARRAY = Object.values(VIDEO_MIME_TYPES);
|
|
2605
|
-
var CODE_MIME_TYPES = {
|
|
2606
|
-
JAVASCRIPT: "text/javascript",
|
|
2607
|
-
TYPESCRIPT: "text/typescript",
|
|
2608
|
-
JSON: "application/json",
|
|
2609
|
-
XML: "application/xml",
|
|
2610
|
-
HTML: "text/html",
|
|
2611
|
-
CSS: "text/css",
|
|
2612
|
-
PYTHON: "text/x-python",
|
|
2613
|
-
JAVA: "text/x-java-source",
|
|
2614
|
-
C: "text/x-c",
|
|
2615
|
-
CPP: "text/x-c++",
|
|
2616
|
-
YAML: "application/x-yaml",
|
|
2617
|
-
SQL: "application/sql"
|
|
2618
|
-
};
|
|
2619
|
-
var CODE_MIME_TYPES_ARRAY = Object.values(CODE_MIME_TYPES);
|
|
2620
|
-
var FONT_MIME_TYPES = {
|
|
2621
|
-
TTF: "font/ttf",
|
|
2622
|
-
OTF: "font/otf",
|
|
2623
|
-
WOFF: "font/woff",
|
|
2624
|
-
WOFF2: "font/woff2",
|
|
2625
|
-
EOT: "application/vnd.ms-fontobject"
|
|
2626
|
-
};
|
|
2627
|
-
var FONT_MIME_TYPES_ARRAY = Object.values(FONT_MIME_TYPES);
|
|
2628
|
-
var OTHER_MIME_TYPES = {
|
|
2629
|
-
BINARY: "application/octet-stream",
|
|
2630
|
-
FORM_DATA: "multipart/form-data",
|
|
2631
|
-
JSON_LD: "application/ld+json",
|
|
2632
|
-
XHTML: "application/xhtml+xml"
|
|
2633
|
-
};
|
|
2634
|
-
var IMAGES = IMAGE_MIME_TYPES_ARRAY;
|
|
2635
|
-
var DOCUMENTS = DOCUMENT_MIME_TYPES_ARRAY;
|
|
2636
|
-
var ARCHIVES = ARCHIVE_MIME_TYPES_ARRAY;
|
|
2637
|
-
var AUDIO = AUDIO_MIME_TYPES_ARRAY;
|
|
2638
|
-
var VIDEO = VIDEO_MIME_TYPES_ARRAY;
|
|
2639
|
-
var CODE = CODE_MIME_TYPES_ARRAY;
|
|
2640
|
-
var FONTS = FONT_MIME_TYPES_ARRAY;
|
|
2641
|
-
var WEB_IMAGES = [
|
|
2642
|
-
IMAGE_MIME_TYPES.JPEG,
|
|
2643
|
-
IMAGE_MIME_TYPES.PNG,
|
|
2644
|
-
IMAGE_MIME_TYPES.GIF,
|
|
2645
|
-
IMAGE_MIME_TYPES.WEBP
|
|
2646
|
-
];
|
|
2647
|
-
var OFFICE_DOCUMENTS = [
|
|
2648
|
-
DOCUMENT_MIME_TYPES.PDF,
|
|
2649
|
-
DOCUMENT_MIME_TYPES.DOC,
|
|
2650
|
-
DOCUMENT_MIME_TYPES.DOCX,
|
|
2651
|
-
DOCUMENT_MIME_TYPES.XLS,
|
|
2652
|
-
DOCUMENT_MIME_TYPES.XLSX,
|
|
2653
|
-
DOCUMENT_MIME_TYPES.PPT,
|
|
2654
|
-
DOCUMENT_MIME_TYPES.PPTX
|
|
2655
|
-
];
|
|
2656
|
-
var MEDIA = [...IMAGES, ...AUDIO, ...VIDEO];
|
|
2657
|
-
var ALL_MIME_TYPES = [
|
|
2658
|
-
...IMAGES,
|
|
2659
|
-
...DOCUMENTS,
|
|
2660
|
-
...ARCHIVES,
|
|
2661
|
-
...AUDIO,
|
|
2662
|
-
...VIDEO,
|
|
2663
|
-
...CODE,
|
|
2664
|
-
...FONTS,
|
|
2665
|
-
...Object.values(OTHER_MIME_TYPES)
|
|
2666
|
-
];
|
|
2667
|
-
var isImageMimeType = (mimeType) => {
|
|
2668
|
-
return IMAGES.includes(mimeType);
|
|
2669
|
-
};
|
|
2670
|
-
var isDocumentMimeType = (mimeType) => {
|
|
2671
|
-
return DOCUMENTS.includes(mimeType);
|
|
2672
|
-
};
|
|
2673
|
-
var isArchiveMimeType = (mimeType) => {
|
|
2674
|
-
return ARCHIVES.includes(mimeType);
|
|
2675
|
-
};
|
|
2676
|
-
var isAudioMimeType = (mimeType) => {
|
|
2677
|
-
return AUDIO.includes(mimeType);
|
|
2678
|
-
};
|
|
2679
|
-
var isVideoMimeType = (mimeType) => {
|
|
2680
|
-
return VIDEO.includes(mimeType);
|
|
2681
|
-
};
|
|
2682
|
-
var isCodeMimeType = (mimeType) => {
|
|
2683
|
-
return CODE.includes(mimeType);
|
|
2684
|
-
};
|
|
2685
|
-
var getExtensionFromMimeType = (mimeType) => {
|
|
2686
|
-
const mimeToExt = {
|
|
2687
|
-
// Images
|
|
2688
|
-
"image/jpeg": "jpg",
|
|
2689
|
-
"image/png": "png",
|
|
2690
|
-
"image/gif": "gif",
|
|
2691
|
-
"image/webp": "webp",
|
|
2692
|
-
"image/svg+xml": "svg",
|
|
2693
|
-
// Documents
|
|
2694
|
-
"application/pdf": "pdf",
|
|
2695
|
-
"application/msword": "doc",
|
|
2696
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
2697
|
-
"application/vnd.ms-excel": "xls",
|
|
2698
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
2699
|
-
// Archives
|
|
2700
|
-
"application/zip": "zip",
|
|
2701
|
-
"application/vnd.rar": "rar",
|
|
2702
|
-
// Audio
|
|
2703
|
-
"audio/mpeg": "mp3",
|
|
2704
|
-
"audio/wav": "wav",
|
|
2705
|
-
// Video
|
|
2706
|
-
"video/mp4": "mp4",
|
|
2707
|
-
"video/webm": "webm",
|
|
2708
|
-
// Text
|
|
2709
|
-
"text/plain": "txt",
|
|
2710
|
-
"text/csv": "csv",
|
|
2711
|
-
"application/json": "json"
|
|
2712
|
-
};
|
|
2713
|
-
return mimeToExt[mimeType] || null;
|
|
2714
|
-
};
|
|
2715
2746
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2716
2747
|
0 && (module.exports = {
|
|
2748
|
+
AI_CHAT_ACCEPTED_TYPES,
|
|
2749
|
+
AI_CHAT_MAX_FILES,
|
|
2750
|
+
AI_CHAT_MAX_FILE_SIZE,
|
|
2751
|
+
AI_CHAT_SUPPORTED_DOCUMENTS,
|
|
2752
|
+
AI_CHAT_SUPPORTED_IMAGES,
|
|
2753
|
+
AI_CHAT_SUPPORTED_MIME_TYPES,
|
|
2717
2754
|
ALL_MIME_TYPES,
|
|
2718
2755
|
ARCHIVES,
|
|
2719
2756
|
ARCHIVE_MIME_TYPES,
|
|
@@ -2772,6 +2809,7 @@ var getExtensionFromMimeType = (mimeType) => {
|
|
|
2772
2809
|
getExtensionFromMimeType,
|
|
2773
2810
|
getPhoneMaxDigits,
|
|
2774
2811
|
getPhoneTrunkPrefix,
|
|
2812
|
+
isAIChatSupportedMimeType,
|
|
2775
2813
|
isArchiveMimeType,
|
|
2776
2814
|
isAudioMimeType,
|
|
2777
2815
|
isCodeMimeType,
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,200 @@
|
|
|
1
|
+
// src/mimeTypes.ts
|
|
2
|
+
var IMAGE_MIME_TYPES = {
|
|
3
|
+
JPEG: "image/jpeg",
|
|
4
|
+
PNG: "image/png",
|
|
5
|
+
GIF: "image/gif",
|
|
6
|
+
WEBP: "image/webp",
|
|
7
|
+
SVG: "image/svg+xml",
|
|
8
|
+
BMP: "image/bmp",
|
|
9
|
+
TIFF: "image/tiff",
|
|
10
|
+
ICO: "image/x-icon",
|
|
11
|
+
HEIC: "image/heic",
|
|
12
|
+
HEIF: "image/heif"
|
|
13
|
+
};
|
|
14
|
+
var IMAGE_MIME_TYPES_ARRAY = Object.values(IMAGE_MIME_TYPES);
|
|
15
|
+
var DOCUMENT_MIME_TYPES = {
|
|
16
|
+
PDF: "application/pdf",
|
|
17
|
+
DOC: "application/msword",
|
|
18
|
+
DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19
|
+
XLS: "application/vnd.ms-excel",
|
|
20
|
+
XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
21
|
+
PPT: "application/vnd.ms-powerpoint",
|
|
22
|
+
PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
23
|
+
ODT: "application/vnd.oasis.opendocument.text",
|
|
24
|
+
ODS: "application/vnd.oasis.opendocument.spreadsheet",
|
|
25
|
+
ODP: "application/vnd.oasis.opendocument.presentation",
|
|
26
|
+
RTF: "application/rtf",
|
|
27
|
+
TXT: "text/plain",
|
|
28
|
+
CSV: "text/csv",
|
|
29
|
+
MARKDOWN: "text/markdown"
|
|
30
|
+
};
|
|
31
|
+
var DOCUMENT_MIME_TYPES_ARRAY = Object.values(DOCUMENT_MIME_TYPES);
|
|
32
|
+
var ARCHIVE_MIME_TYPES = {
|
|
33
|
+
ZIP: "application/zip",
|
|
34
|
+
RAR: "application/vnd.rar",
|
|
35
|
+
TAR: "application/x-tar",
|
|
36
|
+
GZIP: "application/gzip",
|
|
37
|
+
"7Z": "application/x-7z-compressed",
|
|
38
|
+
BZ2: "application/x-bzip2"
|
|
39
|
+
};
|
|
40
|
+
var ARCHIVE_MIME_TYPES_ARRAY = Object.values(ARCHIVE_MIME_TYPES);
|
|
41
|
+
var AUDIO_MIME_TYPES = {
|
|
42
|
+
MP3: "audio/mpeg",
|
|
43
|
+
WAV: "audio/wav",
|
|
44
|
+
OGG: "audio/ogg",
|
|
45
|
+
AAC: "audio/aac",
|
|
46
|
+
FLAC: "audio/flac",
|
|
47
|
+
M4A: "audio/mp4",
|
|
48
|
+
WEBM: "audio/webm"
|
|
49
|
+
};
|
|
50
|
+
var AUDIO_MIME_TYPES_ARRAY = Object.values(AUDIO_MIME_TYPES);
|
|
51
|
+
var VIDEO_MIME_TYPES = {
|
|
52
|
+
MP4: "video/mp4",
|
|
53
|
+
WEBM: "video/webm",
|
|
54
|
+
OGG: "video/ogg",
|
|
55
|
+
AVI: "video/x-msvideo",
|
|
56
|
+
MOV: "video/quicktime",
|
|
57
|
+
MKV: "video/x-matroska",
|
|
58
|
+
FLV: "video/x-flv",
|
|
59
|
+
WMV: "video/x-ms-wmv",
|
|
60
|
+
MPEG: "video/mpeg"
|
|
61
|
+
};
|
|
62
|
+
var VIDEO_MIME_TYPES_ARRAY = Object.values(VIDEO_MIME_TYPES);
|
|
63
|
+
var CODE_MIME_TYPES = {
|
|
64
|
+
JAVASCRIPT: "text/javascript",
|
|
65
|
+
TYPESCRIPT: "text/typescript",
|
|
66
|
+
JSON: "application/json",
|
|
67
|
+
XML: "application/xml",
|
|
68
|
+
HTML: "text/html",
|
|
69
|
+
CSS: "text/css",
|
|
70
|
+
PYTHON: "text/x-python",
|
|
71
|
+
JAVA: "text/x-java-source",
|
|
72
|
+
C: "text/x-c",
|
|
73
|
+
CPP: "text/x-c++",
|
|
74
|
+
YAML: "application/x-yaml",
|
|
75
|
+
SQL: "application/sql"
|
|
76
|
+
};
|
|
77
|
+
var CODE_MIME_TYPES_ARRAY = Object.values(CODE_MIME_TYPES);
|
|
78
|
+
var FONT_MIME_TYPES = {
|
|
79
|
+
TTF: "font/ttf",
|
|
80
|
+
OTF: "font/otf",
|
|
81
|
+
WOFF: "font/woff",
|
|
82
|
+
WOFF2: "font/woff2",
|
|
83
|
+
EOT: "application/vnd.ms-fontobject"
|
|
84
|
+
};
|
|
85
|
+
var FONT_MIME_TYPES_ARRAY = Object.values(FONT_MIME_TYPES);
|
|
86
|
+
var OTHER_MIME_TYPES = {
|
|
87
|
+
BINARY: "application/octet-stream",
|
|
88
|
+
FORM_DATA: "multipart/form-data",
|
|
89
|
+
JSON_LD: "application/ld+json",
|
|
90
|
+
XHTML: "application/xhtml+xml"
|
|
91
|
+
};
|
|
92
|
+
var IMAGES = IMAGE_MIME_TYPES_ARRAY;
|
|
93
|
+
var DOCUMENTS = DOCUMENT_MIME_TYPES_ARRAY;
|
|
94
|
+
var ARCHIVES = ARCHIVE_MIME_TYPES_ARRAY;
|
|
95
|
+
var AUDIO = AUDIO_MIME_TYPES_ARRAY;
|
|
96
|
+
var VIDEO = VIDEO_MIME_TYPES_ARRAY;
|
|
97
|
+
var CODE = CODE_MIME_TYPES_ARRAY;
|
|
98
|
+
var FONTS = FONT_MIME_TYPES_ARRAY;
|
|
99
|
+
var WEB_IMAGES = [
|
|
100
|
+
IMAGE_MIME_TYPES.JPEG,
|
|
101
|
+
IMAGE_MIME_TYPES.PNG,
|
|
102
|
+
IMAGE_MIME_TYPES.GIF,
|
|
103
|
+
IMAGE_MIME_TYPES.WEBP
|
|
104
|
+
];
|
|
105
|
+
var OFFICE_DOCUMENTS = [
|
|
106
|
+
DOCUMENT_MIME_TYPES.PDF,
|
|
107
|
+
DOCUMENT_MIME_TYPES.DOC,
|
|
108
|
+
DOCUMENT_MIME_TYPES.DOCX,
|
|
109
|
+
DOCUMENT_MIME_TYPES.XLS,
|
|
110
|
+
DOCUMENT_MIME_TYPES.XLSX,
|
|
111
|
+
DOCUMENT_MIME_TYPES.PPT,
|
|
112
|
+
DOCUMENT_MIME_TYPES.PPTX
|
|
113
|
+
];
|
|
114
|
+
var MEDIA = [...IMAGES, ...AUDIO, ...VIDEO];
|
|
115
|
+
var ALL_MIME_TYPES = [
|
|
116
|
+
...IMAGES,
|
|
117
|
+
...DOCUMENTS,
|
|
118
|
+
...ARCHIVES,
|
|
119
|
+
...AUDIO,
|
|
120
|
+
...VIDEO,
|
|
121
|
+
...CODE,
|
|
122
|
+
...FONTS,
|
|
123
|
+
...Object.values(OTHER_MIME_TYPES)
|
|
124
|
+
];
|
|
125
|
+
var isImageMimeType = (mimeType) => {
|
|
126
|
+
return IMAGES.includes(mimeType);
|
|
127
|
+
};
|
|
128
|
+
var isDocumentMimeType = (mimeType) => {
|
|
129
|
+
return DOCUMENTS.includes(mimeType);
|
|
130
|
+
};
|
|
131
|
+
var isArchiveMimeType = (mimeType) => {
|
|
132
|
+
return ARCHIVES.includes(mimeType);
|
|
133
|
+
};
|
|
134
|
+
var isAudioMimeType = (mimeType) => {
|
|
135
|
+
return AUDIO.includes(mimeType);
|
|
136
|
+
};
|
|
137
|
+
var isVideoMimeType = (mimeType) => {
|
|
138
|
+
return VIDEO.includes(mimeType);
|
|
139
|
+
};
|
|
140
|
+
var isCodeMimeType = (mimeType) => {
|
|
141
|
+
return CODE.includes(mimeType);
|
|
142
|
+
};
|
|
143
|
+
var getExtensionFromMimeType = (mimeType) => {
|
|
144
|
+
const mimeToExt = {
|
|
145
|
+
// Images
|
|
146
|
+
"image/jpeg": "jpg",
|
|
147
|
+
"image/png": "png",
|
|
148
|
+
"image/gif": "gif",
|
|
149
|
+
"image/webp": "webp",
|
|
150
|
+
"image/svg+xml": "svg",
|
|
151
|
+
// Documents
|
|
152
|
+
"application/pdf": "pdf",
|
|
153
|
+
"application/msword": "doc",
|
|
154
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
155
|
+
"application/vnd.ms-excel": "xls",
|
|
156
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
157
|
+
// Archives
|
|
158
|
+
"application/zip": "zip",
|
|
159
|
+
"application/vnd.rar": "rar",
|
|
160
|
+
// Audio
|
|
161
|
+
"audio/mpeg": "mp3",
|
|
162
|
+
"audio/wav": "wav",
|
|
163
|
+
// Video
|
|
164
|
+
"video/mp4": "mp4",
|
|
165
|
+
"video/webm": "webm",
|
|
166
|
+
// Text
|
|
167
|
+
"text/plain": "txt",
|
|
168
|
+
"text/csv": "csv",
|
|
169
|
+
"application/json": "json"
|
|
170
|
+
};
|
|
171
|
+
return mimeToExt[mimeType] || null;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// src/aiChat.ts
|
|
175
|
+
var AI_CHAT_SUPPORTED_IMAGES = [
|
|
176
|
+
IMAGE_MIME_TYPES.JPEG,
|
|
177
|
+
IMAGE_MIME_TYPES.PNG,
|
|
178
|
+
IMAGE_MIME_TYPES.WEBP,
|
|
179
|
+
IMAGE_MIME_TYPES.GIF
|
|
180
|
+
];
|
|
181
|
+
var AI_CHAT_SUPPORTED_DOCUMENTS = [
|
|
182
|
+
DOCUMENT_MIME_TYPES.PDF,
|
|
183
|
+
DOCUMENT_MIME_TYPES.TXT,
|
|
184
|
+
DOCUMENT_MIME_TYPES.MARKDOWN,
|
|
185
|
+
DOCUMENT_MIME_TYPES.CSV
|
|
186
|
+
];
|
|
187
|
+
var AI_CHAT_SUPPORTED_MIME_TYPES = [
|
|
188
|
+
...AI_CHAT_SUPPORTED_IMAGES,
|
|
189
|
+
...AI_CHAT_SUPPORTED_DOCUMENTS
|
|
190
|
+
];
|
|
191
|
+
var AI_CHAT_ACCEPTED_TYPES = AI_CHAT_SUPPORTED_MIME_TYPES.join(",");
|
|
192
|
+
var AI_CHAT_MAX_FILE_SIZE = 50 * 1024 * 1024;
|
|
193
|
+
var AI_CHAT_MAX_FILES = 5;
|
|
194
|
+
function isAIChatSupportedMimeType(mimeType) {
|
|
195
|
+
return AI_CHAT_SUPPORTED_MIME_TYPES.includes(mimeType);
|
|
196
|
+
}
|
|
197
|
+
|
|
1
198
|
// src/attribute-icons.ts
|
|
2
199
|
var DEFAULT_ATTRIBUTE_ICONS = {
|
|
3
200
|
text: "text-align-left",
|
|
@@ -2443,180 +2640,13 @@ var ICONS = [
|
|
|
2443
2640
|
"zero-waves",
|
|
2444
2641
|
"zero"
|
|
2445
2642
|
];
|
|
2446
|
-
|
|
2447
|
-
// src/mimeTypes.ts
|
|
2448
|
-
var IMAGE_MIME_TYPES = {
|
|
2449
|
-
JPEG: "image/jpeg",
|
|
2450
|
-
PNG: "image/png",
|
|
2451
|
-
GIF: "image/gif",
|
|
2452
|
-
WEBP: "image/webp",
|
|
2453
|
-
SVG: "image/svg+xml",
|
|
2454
|
-
BMP: "image/bmp",
|
|
2455
|
-
TIFF: "image/tiff",
|
|
2456
|
-
ICO: "image/x-icon",
|
|
2457
|
-
HEIC: "image/heic",
|
|
2458
|
-
HEIF: "image/heif"
|
|
2459
|
-
};
|
|
2460
|
-
var IMAGE_MIME_TYPES_ARRAY = Object.values(IMAGE_MIME_TYPES);
|
|
2461
|
-
var DOCUMENT_MIME_TYPES = {
|
|
2462
|
-
PDF: "application/pdf",
|
|
2463
|
-
DOC: "application/msword",
|
|
2464
|
-
DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2465
|
-
XLS: "application/vnd.ms-excel",
|
|
2466
|
-
XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2467
|
-
PPT: "application/vnd.ms-powerpoint",
|
|
2468
|
-
PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2469
|
-
ODT: "application/vnd.oasis.opendocument.text",
|
|
2470
|
-
ODS: "application/vnd.oasis.opendocument.spreadsheet",
|
|
2471
|
-
ODP: "application/vnd.oasis.opendocument.presentation",
|
|
2472
|
-
RTF: "application/rtf",
|
|
2473
|
-
TXT: "text/plain",
|
|
2474
|
-
CSV: "text/csv",
|
|
2475
|
-
MARKDOWN: "text/markdown"
|
|
2476
|
-
};
|
|
2477
|
-
var DOCUMENT_MIME_TYPES_ARRAY = Object.values(DOCUMENT_MIME_TYPES);
|
|
2478
|
-
var ARCHIVE_MIME_TYPES = {
|
|
2479
|
-
ZIP: "application/zip",
|
|
2480
|
-
RAR: "application/vnd.rar",
|
|
2481
|
-
TAR: "application/x-tar",
|
|
2482
|
-
GZIP: "application/gzip",
|
|
2483
|
-
"7Z": "application/x-7z-compressed",
|
|
2484
|
-
BZ2: "application/x-bzip2"
|
|
2485
|
-
};
|
|
2486
|
-
var ARCHIVE_MIME_TYPES_ARRAY = Object.values(ARCHIVE_MIME_TYPES);
|
|
2487
|
-
var AUDIO_MIME_TYPES = {
|
|
2488
|
-
MP3: "audio/mpeg",
|
|
2489
|
-
WAV: "audio/wav",
|
|
2490
|
-
OGG: "audio/ogg",
|
|
2491
|
-
AAC: "audio/aac",
|
|
2492
|
-
FLAC: "audio/flac",
|
|
2493
|
-
M4A: "audio/mp4",
|
|
2494
|
-
WEBM: "audio/webm"
|
|
2495
|
-
};
|
|
2496
|
-
var AUDIO_MIME_TYPES_ARRAY = Object.values(AUDIO_MIME_TYPES);
|
|
2497
|
-
var VIDEO_MIME_TYPES = {
|
|
2498
|
-
MP4: "video/mp4",
|
|
2499
|
-
WEBM: "video/webm",
|
|
2500
|
-
OGG: "video/ogg",
|
|
2501
|
-
AVI: "video/x-msvideo",
|
|
2502
|
-
MOV: "video/quicktime",
|
|
2503
|
-
MKV: "video/x-matroska",
|
|
2504
|
-
FLV: "video/x-flv",
|
|
2505
|
-
WMV: "video/x-ms-wmv",
|
|
2506
|
-
MPEG: "video/mpeg"
|
|
2507
|
-
};
|
|
2508
|
-
var VIDEO_MIME_TYPES_ARRAY = Object.values(VIDEO_MIME_TYPES);
|
|
2509
|
-
var CODE_MIME_TYPES = {
|
|
2510
|
-
JAVASCRIPT: "text/javascript",
|
|
2511
|
-
TYPESCRIPT: "text/typescript",
|
|
2512
|
-
JSON: "application/json",
|
|
2513
|
-
XML: "application/xml",
|
|
2514
|
-
HTML: "text/html",
|
|
2515
|
-
CSS: "text/css",
|
|
2516
|
-
PYTHON: "text/x-python",
|
|
2517
|
-
JAVA: "text/x-java-source",
|
|
2518
|
-
C: "text/x-c",
|
|
2519
|
-
CPP: "text/x-c++",
|
|
2520
|
-
YAML: "application/x-yaml",
|
|
2521
|
-
SQL: "application/sql"
|
|
2522
|
-
};
|
|
2523
|
-
var CODE_MIME_TYPES_ARRAY = Object.values(CODE_MIME_TYPES);
|
|
2524
|
-
var FONT_MIME_TYPES = {
|
|
2525
|
-
TTF: "font/ttf",
|
|
2526
|
-
OTF: "font/otf",
|
|
2527
|
-
WOFF: "font/woff",
|
|
2528
|
-
WOFF2: "font/woff2",
|
|
2529
|
-
EOT: "application/vnd.ms-fontobject"
|
|
2530
|
-
};
|
|
2531
|
-
var FONT_MIME_TYPES_ARRAY = Object.values(FONT_MIME_TYPES);
|
|
2532
|
-
var OTHER_MIME_TYPES = {
|
|
2533
|
-
BINARY: "application/octet-stream",
|
|
2534
|
-
FORM_DATA: "multipart/form-data",
|
|
2535
|
-
JSON_LD: "application/ld+json",
|
|
2536
|
-
XHTML: "application/xhtml+xml"
|
|
2537
|
-
};
|
|
2538
|
-
var IMAGES = IMAGE_MIME_TYPES_ARRAY;
|
|
2539
|
-
var DOCUMENTS = DOCUMENT_MIME_TYPES_ARRAY;
|
|
2540
|
-
var ARCHIVES = ARCHIVE_MIME_TYPES_ARRAY;
|
|
2541
|
-
var AUDIO = AUDIO_MIME_TYPES_ARRAY;
|
|
2542
|
-
var VIDEO = VIDEO_MIME_TYPES_ARRAY;
|
|
2543
|
-
var CODE = CODE_MIME_TYPES_ARRAY;
|
|
2544
|
-
var FONTS = FONT_MIME_TYPES_ARRAY;
|
|
2545
|
-
var WEB_IMAGES = [
|
|
2546
|
-
IMAGE_MIME_TYPES.JPEG,
|
|
2547
|
-
IMAGE_MIME_TYPES.PNG,
|
|
2548
|
-
IMAGE_MIME_TYPES.GIF,
|
|
2549
|
-
IMAGE_MIME_TYPES.WEBP
|
|
2550
|
-
];
|
|
2551
|
-
var OFFICE_DOCUMENTS = [
|
|
2552
|
-
DOCUMENT_MIME_TYPES.PDF,
|
|
2553
|
-
DOCUMENT_MIME_TYPES.DOC,
|
|
2554
|
-
DOCUMENT_MIME_TYPES.DOCX,
|
|
2555
|
-
DOCUMENT_MIME_TYPES.XLS,
|
|
2556
|
-
DOCUMENT_MIME_TYPES.XLSX,
|
|
2557
|
-
DOCUMENT_MIME_TYPES.PPT,
|
|
2558
|
-
DOCUMENT_MIME_TYPES.PPTX
|
|
2559
|
-
];
|
|
2560
|
-
var MEDIA = [...IMAGES, ...AUDIO, ...VIDEO];
|
|
2561
|
-
var ALL_MIME_TYPES = [
|
|
2562
|
-
...IMAGES,
|
|
2563
|
-
...DOCUMENTS,
|
|
2564
|
-
...ARCHIVES,
|
|
2565
|
-
...AUDIO,
|
|
2566
|
-
...VIDEO,
|
|
2567
|
-
...CODE,
|
|
2568
|
-
...FONTS,
|
|
2569
|
-
...Object.values(OTHER_MIME_TYPES)
|
|
2570
|
-
];
|
|
2571
|
-
var isImageMimeType = (mimeType) => {
|
|
2572
|
-
return IMAGES.includes(mimeType);
|
|
2573
|
-
};
|
|
2574
|
-
var isDocumentMimeType = (mimeType) => {
|
|
2575
|
-
return DOCUMENTS.includes(mimeType);
|
|
2576
|
-
};
|
|
2577
|
-
var isArchiveMimeType = (mimeType) => {
|
|
2578
|
-
return ARCHIVES.includes(mimeType);
|
|
2579
|
-
};
|
|
2580
|
-
var isAudioMimeType = (mimeType) => {
|
|
2581
|
-
return AUDIO.includes(mimeType);
|
|
2582
|
-
};
|
|
2583
|
-
var isVideoMimeType = (mimeType) => {
|
|
2584
|
-
return VIDEO.includes(mimeType);
|
|
2585
|
-
};
|
|
2586
|
-
var isCodeMimeType = (mimeType) => {
|
|
2587
|
-
return CODE.includes(mimeType);
|
|
2588
|
-
};
|
|
2589
|
-
var getExtensionFromMimeType = (mimeType) => {
|
|
2590
|
-
const mimeToExt = {
|
|
2591
|
-
// Images
|
|
2592
|
-
"image/jpeg": "jpg",
|
|
2593
|
-
"image/png": "png",
|
|
2594
|
-
"image/gif": "gif",
|
|
2595
|
-
"image/webp": "webp",
|
|
2596
|
-
"image/svg+xml": "svg",
|
|
2597
|
-
// Documents
|
|
2598
|
-
"application/pdf": "pdf",
|
|
2599
|
-
"application/msword": "doc",
|
|
2600
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
2601
|
-
"application/vnd.ms-excel": "xls",
|
|
2602
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
2603
|
-
// Archives
|
|
2604
|
-
"application/zip": "zip",
|
|
2605
|
-
"application/vnd.rar": "rar",
|
|
2606
|
-
// Audio
|
|
2607
|
-
"audio/mpeg": "mp3",
|
|
2608
|
-
"audio/wav": "wav",
|
|
2609
|
-
// Video
|
|
2610
|
-
"video/mp4": "mp4",
|
|
2611
|
-
"video/webm": "webm",
|
|
2612
|
-
// Text
|
|
2613
|
-
"text/plain": "txt",
|
|
2614
|
-
"text/csv": "csv",
|
|
2615
|
-
"application/json": "json"
|
|
2616
|
-
};
|
|
2617
|
-
return mimeToExt[mimeType] || null;
|
|
2618
|
-
};
|
|
2619
2643
|
export {
|
|
2644
|
+
AI_CHAT_ACCEPTED_TYPES,
|
|
2645
|
+
AI_CHAT_MAX_FILES,
|
|
2646
|
+
AI_CHAT_MAX_FILE_SIZE,
|
|
2647
|
+
AI_CHAT_SUPPORTED_DOCUMENTS,
|
|
2648
|
+
AI_CHAT_SUPPORTED_IMAGES,
|
|
2649
|
+
AI_CHAT_SUPPORTED_MIME_TYPES,
|
|
2620
2650
|
ALL_MIME_TYPES,
|
|
2621
2651
|
ARCHIVES,
|
|
2622
2652
|
ARCHIVE_MIME_TYPES,
|
|
@@ -2675,6 +2705,7 @@ export {
|
|
|
2675
2705
|
getExtensionFromMimeType,
|
|
2676
2706
|
getPhoneMaxDigits,
|
|
2677
2707
|
getPhoneTrunkPrefix,
|
|
2708
|
+
isAIChatSupportedMimeType,
|
|
2678
2709
|
isArchiveMimeType,
|
|
2679
2710
|
isAudioMimeType,
|
|
2680
2711
|
isCodeMimeType,
|