@athenaintel/react 0.59.0 → 0.60.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/README.md +124 -20
  2. package/dist/agent-runtime/src/client-tool-bridge.cjs +20 -2
  3. package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
  4. package/dist/agent-runtime/src/client-tool-bridge.d.ts +9 -4
  5. package/dist/agent-runtime/src/client-tool-bridge.js +20 -2
  6. package/dist/agent-runtime/src/client-tool-bridge.js.map +1 -1
  7. package/dist/agent-runtime/src/client-tools.cjs.map +1 -1
  8. package/dist/agent-runtime/src/client-tools.d.ts +9 -0
  9. package/dist/agent-runtime/src/client-tools.js.map +1 -1
  10. package/dist/agent-runtime/src/composer-markdown.cjs +0 -16
  11. package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
  12. package/dist/agent-runtime/src/composer-markdown.js +1 -17
  13. package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
  14. package/dist/agent-runtime/src/named-agents.js +1 -1
  15. package/dist/agent-runtime/src/offline-status.cjs.map +1 -1
  16. package/dist/agent-runtime/src/offline-status.d.ts +27 -0
  17. package/dist/agent-runtime/src/offline-status.js.map +1 -1
  18. package/dist/agent-runtime/src/tool-metadata.cjs +7 -0
  19. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  20. package/dist/agent-runtime/src/tool-metadata.js +7 -0
  21. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  22. package/dist/chat/AthenaChat.cjs +17 -5
  23. package/dist/chat/AthenaChat.cjs.map +1 -1
  24. package/dist/chat/AthenaChat.js +18 -6
  25. package/dist/chat/AthenaChat.js.map +1 -1
  26. package/dist/chat/StatewireClientToolBridge.cjs +69 -1
  27. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  28. package/dist/chat/StatewireClientToolBridge.d.ts +14 -1
  29. package/dist/chat/StatewireClientToolBridge.js +70 -2
  30. package/dist/chat/StatewireClientToolBridge.js.map +1 -1
  31. package/dist/chat/StatewireClientToolConsentCard.cjs +65 -0
  32. package/dist/chat/StatewireClientToolConsentCard.cjs.map +1 -0
  33. package/dist/chat/StatewireClientToolConsentCard.d.ts +24 -0
  34. package/dist/chat/StatewireClientToolConsentCard.js +65 -0
  35. package/dist/chat/StatewireClientToolConsentCard.js.map +1 -0
  36. package/dist/chat/client-tool-write-consent.cjs +111 -0
  37. package/dist/chat/client-tool-write-consent.cjs.map +1 -0
  38. package/dist/chat/client-tool-write-consent.d.ts +71 -0
  39. package/dist/chat/client-tool-write-consent.js +111 -0
  40. package/dist/chat/client-tool-write-consent.js.map +1 -0
  41. package/dist/chat/statewire-client-tools.cjs +30 -5
  42. package/dist/chat/statewire-client-tools.cjs.map +1 -1
  43. package/dist/chat/statewire-client-tools.d.ts +34 -2
  44. package/dist/chat/statewire-client-tools.js +30 -5
  45. package/dist/chat/statewire-client-tools.js.map +1 -1
  46. package/dist/chat-ui/index.cjs +2 -0
  47. package/dist/chat-ui/index.cjs.map +1 -1
  48. package/dist/chat-ui/index.d.ts +1 -0
  49. package/dist/chat-ui/index.js +2 -0
  50. package/dist/chat-ui/index.js.map +1 -1
  51. package/dist/chat-ui/mentions/mention-chip.cjs +9 -3
  52. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  53. package/dist/chat-ui/mentions/mention-chip.js +9 -3
  54. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  55. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs +18 -2
  56. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -1
  57. package/dist/chat-ui/mentions/suggestions/components/mention-icon.d.ts +10 -1
  58. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +19 -3
  59. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js.map +1 -1
  60. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +9 -0
  61. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  62. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +6 -0
  63. package/dist/chat-ui/mentions/suggestions/data/api-client.js +9 -0
  64. package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
  65. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.cjs +89 -0
  66. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.cjs.map +1 -0
  67. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.d.ts +8 -0
  68. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.js +89 -0
  69. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.js.map +1 -0
  70. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +153 -116
  71. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -1
  72. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.d.ts +58 -12
  73. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +154 -117
  74. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -1
  75. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +38 -6
  76. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
  77. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +40 -8
  78. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
  79. package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs +13 -0
  80. package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs.map +1 -0
  81. package/dist/chat-ui/mentions/use-asset-icon-app-url.d.ts +9 -0
  82. package/dist/chat-ui/mentions/use-asset-icon-app-url.js +13 -0
  83. package/dist/chat-ui/mentions/use-asset-icon-app-url.js.map +1 -0
  84. package/dist/chat-ui/statewire.cjs +4 -0
  85. package/dist/chat-ui/statewire.cjs.map +1 -1
  86. package/dist/chat-ui/statewire.d.ts +2 -0
  87. package/dist/chat-ui/statewire.js +4 -0
  88. package/dist/chat-ui/statewire.js.map +1 -1
  89. package/dist/collab/client.cjs +24 -1
  90. package/dist/collab/client.cjs.map +1 -1
  91. package/dist/collab/client.d.ts +16 -0
  92. package/dist/collab/client.js +24 -1
  93. package/dist/collab/client.js.map +1 -1
  94. package/dist/composer/attached-references.js +1 -1
  95. package/dist/composer/staged-message-metadata.cjs +12 -0
  96. package/dist/composer/staged-message-metadata.cjs.map +1 -0
  97. package/dist/composer/staged-message-metadata.d.ts +15 -0
  98. package/dist/composer/staged-message-metadata.js +12 -0
  99. package/dist/composer/staged-message-metadata.js.map +1 -0
  100. package/dist/data/athena-request.cjs +2 -0
  101. package/dist/data/athena-request.cjs.map +1 -1
  102. package/dist/data/athena-request.js +2 -0
  103. package/dist/data/athena-request.js.map +1 -1
  104. package/dist/index.cjs +5 -0
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.d.ts +6 -2
  107. package/dist/index.js +6 -1
  108. package/dist/index.js.map +1 -1
  109. package/dist/provider/AthenaProvider.cjs +26 -6
  110. package/dist/provider/AthenaProvider.cjs.map +1 -1
  111. package/dist/provider/AthenaProvider.d.ts +8 -1
  112. package/dist/provider/AthenaProvider.js +27 -7
  113. package/dist/provider/AthenaProvider.js.map +1 -1
  114. package/dist/react/package.json.cjs +1 -1
  115. package/dist/react/package.json.js +1 -1
  116. package/dist/references/src/anchors/parse.cjs +11 -1
  117. package/dist/references/src/anchors/parse.cjs.map +1 -1
  118. package/dist/references/src/anchors/parse.js +11 -1
  119. package/dist/references/src/anchors/parse.js.map +1 -1
  120. package/dist/references/src/anchors/schemas.d.ts +1 -0
  121. package/dist/references/src/anchors/serialize.cjs +1 -0
  122. package/dist/references/src/anchors/serialize.cjs.map +1 -1
  123. package/dist/references/src/anchors/serialize.js +1 -0
  124. package/dist/references/src/anchors/serialize.js.map +1 -1
  125. package/dist/references/src/anchors/types.cjs.map +1 -1
  126. package/dist/references/src/anchors/types.d.ts +9 -0
  127. package/dist/references/src/anchors/types.js.map +1 -1
  128. package/dist/references/src/schemas.d.ts +2 -0
  129. package/dist/runtime/useAthenaStatewireRuntime.cjs +6 -8
  130. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  131. package/dist/runtime/useAthenaStatewireRuntime.js +6 -8
  132. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  133. package/dist/threads/statewire-thread-list.cjs +14 -2
  134. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  135. package/dist/threads/statewire-thread-list.d.ts +11 -2
  136. package/dist/threads/statewire-thread-list.js +14 -2
  137. package/dist/threads/statewire-thread-list.js.map +1 -1
  138. package/dist/tools/drive-tool-uis.cjs +8 -4
  139. package/dist/tools/drive-tool-uis.cjs.map +1 -1
  140. package/dist/tools/drive-tool-uis.d.ts +5 -4
  141. package/dist/tools/drive-tool-uis.js +9 -5
  142. package/dist/tools/drive-tool-uis.js.map +1 -1
  143. package/dist/version.cjs +4 -0
  144. package/dist/version.cjs.map +1 -1
  145. package/dist/version.d.ts +9 -0
  146. package/dist/version.js +4 -0
  147. package/dist/version.js.map +1 -1
  148. package/dist/workbench/live-desktop-api.cjs +2 -1
  149. package/dist/workbench/live-desktop-api.cjs.map +1 -1
  150. package/dist/workbench/live-desktop-api.js +2 -1
  151. package/dist/workbench/live-desktop-api.js.map +1 -1
  152. package/dist/workbench/session-workspace-api.cjs +7 -2
  153. package/dist/workbench/session-workspace-api.cjs.map +1 -1
  154. package/dist/workbench/session-workspace-api.d.ts +10 -0
  155. package/dist/workbench/session-workspace-api.js +7 -2
  156. package/dist/workbench/session-workspace-api.js.map +1 -1
  157. package/package.json +1 -1
@@ -1,133 +1,170 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- let iconBasePath = null;
3
+ const athenaUrls = require("../../../../../lib/athena-urls.cjs");
4
+ const assetTypeIconNames_generated = require("./asset-type-icon-names.generated.cjs");
5
+ let hostIconBasePath = null;
4
6
  function configureAssetIconBasePath({
5
7
  basePath
6
8
  }) {
7
- iconBasePath = basePath ? basePath.replace(/\/*$/, "/") : basePath;
9
+ hostIconBasePath = basePath ? basePath.replace(/\/*$/, "/") : null;
10
+ }
11
+ function currentPageOrigin() {
12
+ return typeof window === "undefined" ? null : window.location.origin;
13
+ }
14
+ function assetIconAppUrl({
15
+ appUrl,
16
+ backendUrl,
17
+ pageOrigin = currentPageOrigin()
18
+ }) {
19
+ if (!appUrl) return null;
20
+ return athenaUrls.athenaLinkAppUrl({ appUrl, backendUrl: backendUrl ?? "", pageOrigin });
21
+ }
22
+ function athenaAppAssetIconBasePath({
23
+ appUrl
24
+ }) {
25
+ if (!(appUrl == null ? void 0 : appUrl.trim())) return null;
26
+ try {
27
+ const base = new URL("/assets/icons/files/", appUrl);
28
+ return base.protocol === "https:" || base.protocol === "http:" ? base.toString() : null;
29
+ } catch {
30
+ return null;
31
+ }
32
+ }
33
+ const FILES_DIR = "files/";
34
+ function iconUrl({
35
+ icon,
36
+ appUrl
37
+ }) {
38
+ const appBasePath = athenaAppAssetIconBasePath({ appUrl });
39
+ if (/^ic[-_]/.test(icon)) {
40
+ const basePath = hostIconBasePath ?? appBasePath;
41
+ return basePath ? `${basePath}${icon}.svg` : void 0;
42
+ }
43
+ const filesBasePath = appBasePath ?? hostIconBasePath;
44
+ if (!filesBasePath) return void 0;
45
+ return filesBasePath.endsWith(`/${FILES_DIR}`) ? `${filesBasePath.slice(0, -FILES_DIR.length)}apps/${icon}.svg` : `${filesBasePath}${icon}.svg`;
46
+ }
47
+ function assetTypeIconName(assetType) {
48
+ const key = assetType == null ? void 0 : assetType.toLowerCase();
49
+ return key && Object.hasOwn(assetTypeIconNames_generated.ASSET_TYPE_ICON_NAMES, key) ? assetTypeIconNames_generated.ASSET_TYPE_ICON_NAMES[key] ?? assetTypeIconNames_generated.DEFAULT_ASSET_TYPE_ICON : assetTypeIconNames_generated.DEFAULT_ASSET_TYPE_ICON;
50
+ }
51
+ function assetTypeToThumb(assetType, { appUrl } = {}) {
52
+ return iconUrl({ icon: assetTypeIconName(assetType), appUrl });
53
+ }
54
+ const EMAIL_ASSET_TYPES = /* @__PURE__ */ new Set([
55
+ "email",
56
+ "email_draft",
57
+ "email_message",
58
+ "live_email_thread"
59
+ ]);
60
+ function isEmailAssetType(assetType) {
61
+ return !!assetType && EMAIL_ASSET_TYPES.has(assetType.toLowerCase());
62
+ }
63
+ function recordOf(value) {
64
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
65
+ }
66
+ const LANE_PREFIX = /^paragon_/;
67
+ const LANE_SUFFIX = /_(direct(_v\d+)?|paragon|live)$/;
68
+ function mailboxLogo(metadata) {
69
+ var _a, _b, _c;
70
+ const record = recordOf(metadata);
71
+ if (!record) return null;
72
+ const provider = ((_a = recordOf(record.liveAsset)) == null ? void 0 : _a.provider) ?? ((_b = recordOf(record.email)) == null ? void 0 : _b.provider) ?? ((_c = recordOf(record.email_draft)) == null ? void 0 : _c.provider);
73
+ if (typeof provider !== "string") return null;
74
+ const name = provider.trim().toLowerCase().replace(LANE_PREFIX, "").replace(LANE_SUFFIX, "");
75
+ if (name === "gmail" || name === "google") return "gmail";
76
+ if (name === "outlook" || name === "microsoft_graph") return "outlook";
77
+ return null;
78
+ }
79
+ function emailProviderThumb({
80
+ assetType,
81
+ metadata,
82
+ appUrl
83
+ }) {
84
+ if (!isEmailAssetType(assetType)) return void 0;
85
+ const logo = mailboxLogo(metadata);
86
+ return logo ? iconUrl({ icon: logo, appUrl }) : void 0;
8
87
  }
9
- const ASSET_TYPE_ICON_FILE = {
10
- // Documents
11
- folder: "ic-folder",
12
- txt: "ic-txt",
13
- document: "ic-word",
14
- word_document: "ic-word",
15
- markdown: "ic-md",
16
- pdf: "ic-pdf",
17
- html: "ic-html",
18
- web_page: "ic-html",
19
- yaml: "ic-yaml",
20
- json: "ic-json",
21
- // Spreadsheets
22
- spreadsheet: "ic-excel",
23
- table: "ic-table",
24
- // Media
25
- image: "ic-img",
26
- audio: "ic-audio",
27
- video: "ic-video",
28
- voice_memo: "ic-voice_memo",
29
- // Presentations: the deck under its canonical `presentation` type, its
30
- // pre-2026-09-21 spelling (still on the wire and in persisted references)
31
- // and the pre-split label; plus the raw upload.
32
- powerpoint_deck: "ic-power_point",
33
- presentation: "ic-power_point",
34
- presentation_pptx_studio: "ic-power_point",
35
- pptx: "ic-power_point",
36
- // Email & Calendar
37
- email: "ic-mail",
38
- email_message: "ic-mail",
39
- live_email_thread: "ic-mail",
40
- live_calendar_event: "ic-mail",
41
- // Code
42
- python: "ic-py",
43
- javascript: "ic-js",
44
- typescript: "ic-code",
45
- jsx: "ic-code",
46
- tsx: "ic-code",
47
- css: "ic-code",
48
- java: "ic-code",
49
- c: "ic-code",
50
- cpp: "ic-code",
51
- csharp: "ic-code",
52
- ruby: "ic-code",
53
- go: "ic-code",
54
- swift: "ic-code",
55
- php: "ic-code",
56
- rust: "ic-code",
57
- vue: "ic-code",
58
- // Structured data
59
- database: "ic-snippet",
60
- schema: "ic-schema",
61
- catalog: "ic-db",
62
- drive: "ic-db",
63
- query_snippet: "ic-snippet",
64
- semantic_model: "ic-db",
65
- dataset: "ic-db",
66
- // Meetings & Calls
67
- meeting: "ic-meeting",
68
- video_session: "ic-meeting",
69
- phone_call: "ic-phonecall",
70
- // Sessions & Devices
71
- session: "ic-session",
72
- browse_session: "ic-html",
73
- computer: "ic-computer",
74
- desktop_session: "ic-desktop_session",
75
- mobile_session: "ic-mobile_session",
76
- // Projects & Profiles
77
- project: "ic-project",
78
- browse_profile: "ic-profile",
79
- // Workflows & Automation
80
- aop: "ic-flow",
81
- playbook: "ic-playbook",
82
- policy: "ic-policy",
83
- transform_project: "ic-transform_project",
84
- // Collections & Notebooks
85
- collection: "ic-collection",
86
- notebook: "ic-notebook",
87
- // UI & Apps
88
- user_interface: "ic-app",
89
- application: "ic-application",
90
- canvas: "ic-canvas",
91
- dashboard: "ic-dashboard",
92
- figure: "ic_figure",
93
- // People & Companies
94
- person: "ic-person",
95
- company: "ic-company",
96
- // Misc
97
- prompt: "ic-ai",
98
- skill: "ic-skill",
99
- spaces: "ic-spaces",
100
- secret: "ic-secret",
101
- photoshop: "ic-pts",
102
- illustrator: "ic-ai",
103
- // Google Drive / SharePoint / Salesforce
104
- gdrive_folder: "ic-folder",
105
- gdrive_file: "ic-file",
106
- salesforce_record: "ic-db",
107
- salesforce_file: "ic-db"
108
- };
109
88
  const ASSET_TYPE_LUCIDE_FALLBACK = {
110
- folder: "folder",
111
- spreadsheet: "sheet",
112
- image: "image",
113
- video: "video",
89
+ aop: "workflow",
90
+ application: "layout-grid",
114
91
  audio: "headphones",
115
- email: "mail",
92
+ automation: "zap",
93
+ browse_profile: "globe",
94
+ browse_session: "globe",
95
+ canvas: "palette",
96
+ catalog: "database",
97
+ collab_agent: "bot",
98
+ collab_source: "database",
99
+ collab_toolkit: "package",
100
+ collection: "library",
101
+ computer: "monitor",
102
+ dashboard: "layout-dashboard",
116
103
  database: "database",
117
- project: "folder-kanban",
104
+ design_system: "palette",
105
+ desktop_session: "monitor",
106
+ device: "smartphone",
107
+ document: "file-text",
108
+ drive: "hard-drive",
109
+ email: "mail",
110
+ email_draft: "mail",
111
+ email_message: "mail",
112
+ environment: "server",
113
+ figure: "chart-bar",
114
+ folder: "folder",
115
+ gdrive_folder: "folder",
116
+ generic_doc: "file-text",
117
+ image: "image",
118
+ json: "file-code",
119
+ lakehouse_namespace: "database",
120
+ lakehouse_sync: "workflow",
121
+ lakehouse_table: "table",
122
+ live_calendar_event: "calendar",
123
+ live_email_thread: "mail",
124
+ markdown: "file-text",
118
125
  meeting: "video",
119
- user_interface: "layout"
126
+ mobile_session: "smartphone",
127
+ notebook: "book-open",
128
+ olympus_drive: "hard-drive",
129
+ pdf: "file-text",
130
+ person: "user",
131
+ phone_call: "phone",
132
+ playbook: "book-open",
133
+ policy: "check-square",
134
+ powerpoint_deck: "presentation",
135
+ pptx: "presentation",
136
+ presentation: "presentation",
137
+ presentation_pptx_studio: "presentation",
138
+ project: "folder-kanban",
139
+ python: "file-code",
140
+ query_snippet: "database",
141
+ script: "file-code",
142
+ secret: "key",
143
+ semantic_model: "database",
144
+ session: "message-square",
145
+ skill: "sparkles",
146
+ spreadsheet: "sheet",
147
+ table: "table",
148
+ transform_project: "workflow",
149
+ txt: "file-text",
150
+ user_interface: "layout",
151
+ video: "video",
152
+ video_session: "video",
153
+ voice_memo: "mic",
154
+ web_page: "globe",
155
+ word_document: "file-text",
156
+ yaml: "file-code"
120
157
  };
121
- function assetTypeToThumb(assetType) {
122
- if (!iconBasePath) return void 0;
123
- const name = (assetType ? ASSET_TYPE_ICON_FILE[assetType.toLowerCase()] : void 0) ?? "ic-file";
124
- return `${iconBasePath}${name}.svg`;
125
- }
126
158
  function assetTypeToIcon(assetType) {
127
- if (!assetType) return "file";
128
- return ASSET_TYPE_LUCIDE_FALLBACK[assetType.toLowerCase()] ?? "file";
159
+ const key = assetType == null ? void 0 : assetType.toLowerCase();
160
+ if (!key || !Object.hasOwn(ASSET_TYPE_LUCIDE_FALLBACK, key)) return "file";
161
+ return ASSET_TYPE_LUCIDE_FALLBACK[key] ?? "file";
129
162
  }
163
+ exports.assetIconAppUrl = assetIconAppUrl;
130
164
  exports.assetTypeToIcon = assetTypeToIcon;
131
165
  exports.assetTypeToThumb = assetTypeToThumb;
166
+ exports.athenaAppAssetIconBasePath = athenaAppAssetIconBasePath;
132
167
  exports.configureAssetIconBasePath = configureAssetIconBasePath;
168
+ exports.emailProviderThumb = emailProviderThumb;
169
+ exports.isEmailAssetType = isEmailAssetType;
133
170
  //# sourceMappingURL=asset-type-icons.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"asset-type-icons.cjs","sources":["../../../../../../src/chat-ui/mentions/suggestions/data/sources/asset-type-icons.ts"],"sourcesContent":["/**\n * Maps Athena asset types to SVG icon file names.\n *\n * The SVG files are bundled by the host app, which declares where they are\n * served from via `configureAssetIconBasePath`. Hosts that don't bundle them\n * fall back to the Lucide icons carried on every menu item.\n */\n\nlet iconBasePath: string | null = null;\n\n/**\n * Point the mention UI at the host's copy of the asset-type SVGs.\n * `basePath` is resolved against the host document; a trailing \"/\" is added\n * when the caller omits it.\n */\nexport function configureAssetIconBasePath({\n basePath,\n}: {\n basePath: string | null;\n}): void {\n iconBasePath = basePath ? basePath.replace(/\\/*$/, \"/\") : basePath;\n}\n\nconst ASSET_TYPE_ICON_FILE: Record<string, string> = {\n // Documents\n folder: \"ic-folder\",\n txt: \"ic-txt\",\n document: \"ic-word\",\n word_document: \"ic-word\",\n markdown: \"ic-md\",\n pdf: \"ic-pdf\",\n html: \"ic-html\",\n web_page: \"ic-html\",\n yaml: \"ic-yaml\",\n json: \"ic-json\",\n\n // Spreadsheets\n spreadsheet: \"ic-excel\",\n table: \"ic-table\",\n\n // Media\n image: \"ic-img\",\n audio: \"ic-audio\",\n video: \"ic-video\",\n voice_memo: \"ic-voice_memo\",\n\n // Presentations: the deck under its canonical `presentation` type, its\n // pre-2026-09-21 spelling (still on the wire and in persisted references)\n // and the pre-split label; plus the raw upload.\n powerpoint_deck: \"ic-power_point\",\n presentation: \"ic-power_point\",\n presentation_pptx_studio: \"ic-power_point\",\n pptx: \"ic-power_point\",\n\n // Email & Calendar\n email: \"ic-mail\",\n email_message: \"ic-mail\",\n live_email_thread: \"ic-mail\",\n live_calendar_event: \"ic-mail\",\n\n // Code\n python: \"ic-py\",\n javascript: \"ic-js\",\n typescript: \"ic-code\",\n jsx: \"ic-code\",\n tsx: \"ic-code\",\n css: \"ic-code\",\n java: \"ic-code\",\n c: \"ic-code\",\n cpp: \"ic-code\",\n csharp: \"ic-code\",\n ruby: \"ic-code\",\n go: \"ic-code\",\n swift: \"ic-code\",\n php: \"ic-code\",\n rust: \"ic-code\",\n vue: \"ic-code\",\n\n // Structured data\n database: \"ic-snippet\",\n schema: \"ic-schema\",\n catalog: \"ic-db\",\n drive: \"ic-db\",\n query_snippet: \"ic-snippet\",\n semantic_model: \"ic-db\",\n dataset: \"ic-db\",\n\n // Meetings & Calls\n meeting: \"ic-meeting\",\n video_session: \"ic-meeting\",\n phone_call: \"ic-phonecall\",\n\n // Sessions & Devices\n session: \"ic-session\",\n browse_session: \"ic-html\",\n computer: \"ic-computer\",\n desktop_session: \"ic-desktop_session\",\n mobile_session: \"ic-mobile_session\",\n\n // Projects & Profiles\n project: \"ic-project\",\n browse_profile: \"ic-profile\",\n\n // Workflows & Automation\n aop: \"ic-flow\",\n playbook: \"ic-playbook\",\n policy: \"ic-policy\",\n transform_project: \"ic-transform_project\",\n\n // Collections & Notebooks\n collection: \"ic-collection\",\n notebook: \"ic-notebook\",\n\n // UI & Apps\n user_interface: \"ic-app\",\n application: \"ic-application\",\n canvas: \"ic-canvas\",\n dashboard: \"ic-dashboard\",\n figure: \"ic_figure\",\n\n // People & Companies\n person: \"ic-person\",\n company: \"ic-company\",\n\n // Misc\n prompt: \"ic-ai\",\n skill: \"ic-skill\",\n spaces: \"ic-spaces\",\n secret: \"ic-secret\",\n photoshop: \"ic-pts\",\n illustrator: \"ic-ai\",\n\n // Google Drive / SharePoint / Salesforce\n gdrive_folder: \"ic-folder\",\n gdrive_file: \"ic-file\",\n salesforce_record: \"ic-db\",\n salesforce_file: \"ic-db\",\n};\n\nconst ASSET_TYPE_LUCIDE_FALLBACK: Record<string, string> = {\n folder: \"folder\",\n spreadsheet: \"sheet\",\n image: \"image\",\n video: \"video\",\n audio: \"headphones\",\n email: \"mail\",\n database: \"database\",\n project: \"folder-kanban\",\n meeting: \"video\",\n user_interface: \"layout\",\n};\n\n/**\n * Get the SVG thumbnail URL for an Athena asset type, or undefined when the\n * host app does not bundle the icon files.\n */\nexport function assetTypeToThumb(\n assetType: string | null | undefined,\n): string | undefined {\n if (!iconBasePath) return undefined;\n const name: string =\n (assetType ? ASSET_TYPE_ICON_FILE[assetType.toLowerCase()] : undefined) ??\n \"ic-file\";\n return `${iconBasePath}${name}.svg`;\n}\n\n/**\n * Get Lucide icon name fallback for an asset type.\n * Used when thumbnailUrl can't load.\n */\nexport function assetTypeToIcon(assetType: string | null | undefined): string {\n if (!assetType) return \"file\";\n return ASSET_TYPE_LUCIDE_FALLBACK[assetType.toLowerCase()] ?? \"file\";\n}\n"],"names":[],"mappings":";;AAQA,IAAI,eAA8B;AAO3B,SAAS,2BAA2B;AAAA,EACzC;AACF,GAES;AACP,iBAAe,WAAW,SAAS,QAAQ,QAAQ,GAAG,IAAI;AAC5D;AAEA,MAAM,uBAA+C;AAAA;AAAA,EAEnD,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,UAAU;AAAA,EACV,eAAe;AAAA,EACf,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAGN,aAAa;AAAA,EACb,OAAO;AAAA;AAAA,EAGP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA;AAAA;AAAA;AAAA,EAKZ,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,0BAA0B;AAAA,EAC1B,MAAM;AAAA;AAAA,EAGN,OAAO;AAAA,EACP,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,qBAAqB;AAAA;AAAA,EAGrB,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,GAAG;AAAA,EACH,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA;AAAA,EAGL,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,SAAS;AAAA;AAAA,EAGT,SAAS;AAAA,EACT,eAAe;AAAA,EACf,YAAY;AAAA;AAAA,EAGZ,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,gBAAgB;AAAA;AAAA,EAGhB,SAAS;AAAA,EACT,gBAAgB;AAAA;AAAA,EAGhB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,mBAAmB;AAAA;AAAA,EAGnB,YAAY;AAAA,EACZ,UAAU;AAAA;AAAA,EAGV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA;AAAA,EAGR,QAAQ;AAAA,EACR,SAAS;AAAA;AAAA,EAGT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,aAAa;AAAA;AAAA,EAGb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,iBAAiB;AACnB;AAEA,MAAM,6BAAqD;AAAA,EACzD,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAClB;AAMO,SAAS,iBACd,WACoB;AACpB,MAAI,CAAC,aAAc,QAAO;AAC1B,QAAM,QACH,YAAY,qBAAqB,UAAU,YAAA,CAAa,IAAI,WAC7D;AACF,SAAO,GAAG,YAAY,GAAG,IAAI;AAC/B;AAMO,SAAS,gBAAgB,WAA8C;AAC5E,MAAI,CAAC,UAAW,QAAO;AACvB,SAAO,2BAA2B,UAAU,YAAA,CAAa,KAAK;AAChE;;;;"}
1
+ {"version":3,"file":"asset-type-icons.cjs","sources":["../../../../../../src/chat-ui/mentions/suggestions/data/sources/asset-type-icons.ts"],"sourcesContent":["/**\n * Athena's asset-type icons: the SVG Olympus draws for each asset type.\n *\n * The type → icon table is Olympus's own: `ASSET_TYPE_ICON_NAMES`\n * (`asset-type-icon-names.generated.ts`), generated from its\n * `AthenaTypeToThumb` by Olympus's parity test, which writes the same table\n * into `@athenaintel/sheets` and fails when either drifts. So the `@` menu, the\n * mention chips and the drive cards draw the icon Olympus draws for every type.\n *\n * Where the SVGs load from:\n * - type glyphs (`ic-…`): a host's own copy when it names one with\n * `configureAssetIconBasePath` (the Chrome extension), else the Athena web\n * app the chat talks to (`appUrl`, the provider's: `useAssetIconAppUrl`),\n * which serves the public files Olympus draws at `<appUrl>/assets/icons/files/`;\n * - brand logos (Power BI, Slack, Gmail, Outlook) sit in `apps/` beside them:\n * from that app when the chat names one (a host's copy may carry only the\n * glyphs), else beside the host's copy.\n *\n * With neither there is no SVG, and callers draw the type's Lucide icon\n * (`assetTypeToIcon`). `MentionIcon`, the chips and the drive cards also fall\n * back to it when an SVG cannot load (a strict CSP, offline).\n */\n\nimport { athenaLinkAppUrl } from \"../../../../../lib/athena-urls\";\nimport {\n ASSET_TYPE_ICON_NAMES,\n DEFAULT_ASSET_TYPE_ICON,\n} from \"./asset-type-icon-names.generated\";\n\nlet hostIconBasePath: string | null = null;\n\n/**\n * Point the asset-type icons at the host's own copy of Olympus's\n * `assets/icons/files/` SVGs. `basePath` is resolved against the host\n * document; a trailing \"/\" is added when the caller omits it. `null` drops the\n * host copy: the icons then load from the Athena web app the chat talks to.\n */\nexport function configureAssetIconBasePath({\n basePath,\n}: {\n basePath: string | null;\n}): void {\n hostIconBasePath = basePath ? basePath.replace(/\\/*$/, \"/\") : null;\n}\n\nfunction currentPageOrigin(): string | null {\n return typeof window === \"undefined\" ? null : window.location.origin;\n}\n\n/**\n * The Athena web app whose icons a chat draws: the provider's `appUrl`,\n * except in an app a computer serves, where Marathon's `/_athena/auth` mints\n * `appUrl` as the app's own origin (which serves no Athena icons) and the\n * deployment's frontend serves them, as for \"Open in Athena\" links\n * (`athenaLinkAppUrl`). Null without an `appUrl`.\n */\nexport function assetIconAppUrl({\n appUrl,\n backendUrl,\n pageOrigin = currentPageOrigin(),\n}: {\n appUrl: string | null | undefined;\n backendUrl: string | null | undefined;\n pageOrigin?: string | null;\n}): string | null {\n if (!appUrl) return null;\n return athenaLinkAppUrl({ appUrl, backendUrl: backendUrl ?? \"\", pageOrigin });\n}\n\n/** Where the Athena web app at `appUrl` serves the asset-type SVGs; null for an unusable URL. */\nexport function athenaAppAssetIconBasePath({\n appUrl,\n}: {\n appUrl: string | null | undefined;\n}): string | null {\n if (!appUrl?.trim()) return null;\n try {\n const base = new URL(\"/assets/icons/files/\", appUrl);\n return base.protocol === \"https:\" || base.protocol === \"http:\"\n ? base.toString()\n : null;\n } catch {\n return null;\n }\n}\n\nconst FILES_DIR = \"files/\";\n\n/** An icon's URL, from the host's copy or the chat's Athena web app (see the module doc). */\nfunction iconUrl({\n icon,\n appUrl,\n}: {\n icon: string;\n appUrl: string | null | undefined;\n}): string | undefined {\n const appBasePath = athenaAppAssetIconBasePath({ appUrl });\n if (/^ic[-_]/.test(icon)) {\n const basePath = hostIconBasePath ?? appBasePath;\n return basePath ? `${basePath}${icon}.svg` : undefined;\n }\n const filesBasePath = appBasePath ?? hostIconBasePath;\n if (!filesBasePath) return undefined;\n return filesBasePath.endsWith(`/${FILES_DIR}`)\n ? `${filesBasePath.slice(0, -FILES_DIR.length)}apps/${icon}.svg`\n : `${filesBasePath}${icon}.svg`;\n}\n\nfunction assetTypeIconName(assetType: string | null | undefined): string {\n const key = assetType?.toLowerCase();\n return key && Object.hasOwn(ASSET_TYPE_ICON_NAMES, key)\n ? (ASSET_TYPE_ICON_NAMES[key] ?? DEFAULT_ASSET_TYPE_ICON)\n : DEFAULT_ASSET_TYPE_ICON;\n}\n\n/**\n * The SVG URL of an asset type's icon, the one Olympus draws. `appUrl` is the\n * Athena web app the chat talks to (`useAssetIconAppUrl`); undefined when\n * neither it nor a host copy (`configureAssetIconBasePath`) is available.\n */\nexport function assetTypeToThumb(\n assetType: string | null | undefined,\n { appUrl }: { appUrl?: string | null } = {},\n): string | undefined {\n return iconUrl({ icon: assetTypeIconName(assetType), appUrl });\n}\n\nconst EMAIL_ASSET_TYPES: ReadonlySet<string> = new Set([\n \"email\",\n \"email_draft\",\n \"email_message\",\n \"live_email_thread\",\n]);\n\n/** Whether rows of this type can draw their mailbox's logo (`emailProviderThumb`). */\nexport function isEmailAssetType(assetType: string | null | undefined): boolean {\n return !!assetType && EMAIL_ASSET_TYPES.has(assetType.toLowerCase());\n}\n\nfunction recordOf(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nconst LANE_PREFIX = /^paragon_/;\nconst LANE_SUFFIX = /_(direct(_v\\d+)?|paragon|live)$/;\n\n/** Gmail or Outlook, from the provider an email asset records; null for any other or none. */\nfunction mailboxLogo(metadata: unknown): \"gmail\" | \"outlook\" | null {\n const record = recordOf(metadata);\n if (!record) return null;\n const provider: unknown =\n recordOf(record.liveAsset)?.provider ??\n recordOf(record.email)?.provider ??\n recordOf(record.email_draft)?.provider;\n if (typeof provider !== \"string\") return null;\n const name = provider.trim().toLowerCase().replace(LANE_PREFIX, \"\").replace(LANE_SUFFIX, \"\");\n if (name === \"gmail\" || name === \"google\") return \"gmail\";\n if (name === \"outlook\" || name === \"microsoft_graph\") return \"outlook\";\n return null;\n}\n\n/**\n * The Gmail or Outlook logo for an email asset whose mailbox provider its\n * metadata records (`liveAsset.provider`, the `email` block agora writes\n * beside it, or a draft's `email_draft` block), as Olympus draws it;\n * undefined otherwise, for the type's mail icon.\n */\nexport function emailProviderThumb({\n assetType,\n metadata,\n appUrl,\n}: {\n assetType: string | null | undefined;\n metadata: unknown;\n /** The Athena web app the chat talks to (`useAssetIconAppUrl`). */\n appUrl?: string | null;\n}): string | undefined {\n if (!isEmailAssetType(assetType)) return undefined;\n const logo = mailboxLogo(metadata);\n return logo ? iconUrl({ icon: logo, appUrl }) : undefined;\n}\n\n/**\n * The Lucide icon (a `MentionIcon` name) drawn for an asset type when its SVG\n * is not available: no icon source, or the SVG failed to load.\n */\nconst ASSET_TYPE_LUCIDE_FALLBACK: Record<string, string> = {\n aop: \"workflow\",\n application: \"layout-grid\",\n audio: \"headphones\",\n automation: \"zap\",\n browse_profile: \"globe\",\n browse_session: \"globe\",\n canvas: \"palette\",\n catalog: \"database\",\n collab_agent: \"bot\",\n collab_source: \"database\",\n collab_toolkit: \"package\",\n collection: \"library\",\n computer: \"monitor\",\n dashboard: \"layout-dashboard\",\n database: \"database\",\n design_system: \"palette\",\n desktop_session: \"monitor\",\n device: \"smartphone\",\n document: \"file-text\",\n drive: \"hard-drive\",\n email: \"mail\",\n email_draft: \"mail\",\n email_message: \"mail\",\n environment: \"server\",\n figure: \"chart-bar\",\n folder: \"folder\",\n gdrive_folder: \"folder\",\n generic_doc: \"file-text\",\n image: \"image\",\n json: \"file-code\",\n lakehouse_namespace: \"database\",\n lakehouse_sync: \"workflow\",\n lakehouse_table: \"table\",\n live_calendar_event: \"calendar\",\n live_email_thread: \"mail\",\n markdown: \"file-text\",\n meeting: \"video\",\n mobile_session: \"smartphone\",\n notebook: \"book-open\",\n olympus_drive: \"hard-drive\",\n pdf: \"file-text\",\n person: \"user\",\n phone_call: \"phone\",\n playbook: \"book-open\",\n policy: \"check-square\",\n powerpoint_deck: \"presentation\",\n pptx: \"presentation\",\n presentation: \"presentation\",\n presentation_pptx_studio: \"presentation\",\n project: \"folder-kanban\",\n python: \"file-code\",\n query_snippet: \"database\",\n script: \"file-code\",\n secret: \"key\",\n semantic_model: \"database\",\n session: \"message-square\",\n skill: \"sparkles\",\n spreadsheet: \"sheet\",\n table: \"table\",\n transform_project: \"workflow\",\n txt: \"file-text\",\n user_interface: \"layout\",\n video: \"video\",\n video_session: \"video\",\n voice_memo: \"mic\",\n web_page: \"globe\",\n word_document: \"file-text\",\n yaml: \"file-code\",\n};\n\n/** The Lucide icon name for an asset type, drawn when its SVG is not available. */\nexport function assetTypeToIcon(assetType: string | null | undefined): string {\n const key = assetType?.toLowerCase();\n if (!key || !Object.hasOwn(ASSET_TYPE_LUCIDE_FALLBACK, key)) return \"file\";\n return ASSET_TYPE_LUCIDE_FALLBACK[key] ?? \"file\";\n}\n\n"],"names":["athenaLinkAppUrl","ASSET_TYPE_ICON_NAMES","DEFAULT_ASSET_TYPE_ICON"],"mappings":"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"}
@@ -1,25 +1,71 @@
1
1
  /**
2
- * Maps Athena asset types to SVG icon file names.
2
+ * Athena's asset-type icons: the SVG Olympus draws for each asset type.
3
3
  *
4
- * The SVG files are bundled by the host app, which declares where they are
5
- * served from via `configureAssetIconBasePath`. Hosts that don't bundle them
6
- * fall back to the Lucide icons carried on every menu item.
4
+ * The type → icon table is Olympus's own: `ASSET_TYPE_ICON_NAMES`
5
+ * (`asset-type-icon-names.generated.ts`), generated from its
6
+ * `AthenaTypeToThumb` by Olympus's parity test, which writes the same table
7
+ * into `@athenaintel/sheets` and fails when either drifts. So the `@` menu, the
8
+ * mention chips and the drive cards draw the icon Olympus draws for every type.
9
+ *
10
+ * Where the SVGs load from:
11
+ * - type glyphs (`ic-…`): a host's own copy when it names one with
12
+ * `configureAssetIconBasePath` (the Chrome extension), else the Athena web
13
+ * app the chat talks to (`appUrl`, the provider's: `useAssetIconAppUrl`),
14
+ * which serves the public files Olympus draws at `<appUrl>/assets/icons/files/`;
15
+ * - brand logos (Power BI, Slack, Gmail, Outlook) sit in `apps/` beside them:
16
+ * from that app when the chat names one (a host's copy may carry only the
17
+ * glyphs), else beside the host's copy.
18
+ *
19
+ * With neither there is no SVG, and callers draw the type's Lucide icon
20
+ * (`assetTypeToIcon`). `MentionIcon`, the chips and the drive cards also fall
21
+ * back to it when an SVG cannot load (a strict CSP, offline).
7
22
  */
8
23
  /**
9
- * Point the mention UI at the host's copy of the asset-type SVGs.
10
- * `basePath` is resolved against the host document; a trailing "/" is added
11
- * when the caller omits it.
24
+ * Point the asset-type icons at the host's own copy of Olympus's
25
+ * `assets/icons/files/` SVGs. `basePath` is resolved against the host
26
+ * document; a trailing "/" is added when the caller omits it. `null` drops the
27
+ * host copy: the icons then load from the Athena web app the chat talks to.
12
28
  */
13
29
  export declare function configureAssetIconBasePath({ basePath, }: {
14
30
  basePath: string | null;
15
31
  }): void;
16
32
  /**
17
- * Get the SVG thumbnail URL for an Athena asset type, or undefined when the
18
- * host app does not bundle the icon files.
33
+ * The Athena web app whose icons a chat draws: the provider's `appUrl`,
34
+ * except in an app a computer serves, where Marathon's `/_athena/auth` mints
35
+ * `appUrl` as the app's own origin (which serves no Athena icons) and the
36
+ * deployment's frontend serves them, as for "Open in Athena" links
37
+ * (`athenaLinkAppUrl`). Null without an `appUrl`.
38
+ */
39
+ export declare function assetIconAppUrl({ appUrl, backendUrl, pageOrigin, }: {
40
+ appUrl: string | null | undefined;
41
+ backendUrl: string | null | undefined;
42
+ pageOrigin?: string | null;
43
+ }): string | null;
44
+ /** Where the Athena web app at `appUrl` serves the asset-type SVGs; null for an unusable URL. */
45
+ export declare function athenaAppAssetIconBasePath({ appUrl, }: {
46
+ appUrl: string | null | undefined;
47
+ }): string | null;
48
+ /**
49
+ * The SVG URL of an asset type's icon, the one Olympus draws. `appUrl` is the
50
+ * Athena web app the chat talks to (`useAssetIconAppUrl`); undefined when
51
+ * neither it nor a host copy (`configureAssetIconBasePath`) is available.
19
52
  */
20
- export declare function assetTypeToThumb(assetType: string | null | undefined): string | undefined;
53
+ export declare function assetTypeToThumb(assetType: string | null | undefined, { appUrl }?: {
54
+ appUrl?: string | null;
55
+ }): string | undefined;
56
+ /** Whether rows of this type can draw their mailbox's logo (`emailProviderThumb`). */
57
+ export declare function isEmailAssetType(assetType: string | null | undefined): boolean;
21
58
  /**
22
- * Get Lucide icon name fallback for an asset type.
23
- * Used when thumbnailUrl can't load.
59
+ * The Gmail or Outlook logo for an email asset whose mailbox provider its
60
+ * metadata records (`liveAsset.provider`, the `email` block agora writes
61
+ * beside it, or a draft's `email_draft` block), as Olympus draws it;
62
+ * undefined otherwise, for the type's mail icon.
24
63
  */
64
+ export declare function emailProviderThumb({ assetType, metadata, appUrl, }: {
65
+ assetType: string | null | undefined;
66
+ metadata: unknown;
67
+ /** The Athena web app the chat talks to (`useAssetIconAppUrl`). */
68
+ appUrl?: string | null;
69
+ }): string | undefined;
70
+ /** The Lucide icon name for an asset type, drawn when its SVG is not available. */
25
71
  export declare function assetTypeToIcon(assetType: string | null | undefined): string;