@mintlify/common 1.0.636 → 1.0.638
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.
|
@@ -7,14 +7,14 @@ export declare const PAGE_VIEW_EVENT = "docs.content.view";
|
|
|
7
7
|
* - **noun**: The component or feature being interacted with (e.g., 'expandable', 'search')
|
|
8
8
|
* - **action**: The specific action taken (e.g., 'open', 'click', 'copy')
|
|
9
9
|
*/
|
|
10
|
-
export declare const ANALYTICS_EVENTS: readonly ["docs.content.view", "docs.expandable.open", "docs.expandable.close", "docs.accordion.open", "docs.accordion.close", "docs.navitem.click", "docs.navitem.cta_click", "docs.search.close", "docs.api_playground.request", "docs.search.result_click", "docs.code_block.copy", "docs.code_block.ask_ai", "docs.feedback.thumbs_up", "docs.feedback.thumbs_down", "docs.footer.powered_by_mintlify_click", "docs.assistant.enter", "docs.assistant.completed", "docs.assistant.shared", "docs.assistant.source_click", "docs.assistant.web_search_click", "docs.assistant.thumbs_up", "docs.assistant.thumbs_down", "docs.assistant.suggestion_click", "docs.assistant.starter_question_clicked", "docs.assistant.maximize_click", "docs.assistant.minimize_click", "docs.assistant.copy_response", "docs.assistant.ask_ai_on_text_selection", "docs.context_menu.copy_page", "docs.context_menu.copy_mcp_link", "docs.context_menu.ai_provider_click", "docs.context_menu.install_mcp_server"];
|
|
10
|
+
export declare const ANALYTICS_EVENTS: readonly ["docs.content.view", "docs.expandable.open", "docs.expandable.close", "docs.accordion.open", "docs.accordion.close", "docs.navitem.click", "docs.navitem.cta_click", "docs.search.close", "docs.api_playground.request", "docs.search.result_click", "docs.code_block.copy", "docs.code_block.ask_ai", "docs.feedback.thumbs_up", "docs.feedback.thumbs_down", "docs.footer.powered_by_mintlify_click", "docs.assistant.enter", "docs.assistant.completed", "docs.assistant.shared", "docs.assistant.source_click", "docs.assistant.web_search_click", "docs.assistant.thumbs_up", "docs.assistant.thumbs_down", "docs.assistant.suggestion_click", "docs.assistant.starter_question_clicked", "docs.assistant.maximize_click", "docs.assistant.minimize_click", "docs.assistant.copy_response", "docs.assistant.ask_ai_on_text_selection", "docs.assistant.spam_detected", "docs.context_menu.copy_page", "docs.context_menu.copy_mcp_link", "docs.context_menu.ai_provider_click", "docs.context_menu.install_mcp_server", "docs.autopilot.suggestion.created"];
|
|
11
11
|
export type AnalyticsEvent = (typeof ANALYTICS_EVENTS)[number];
|
|
12
12
|
export declare function isAnalyticsEvent(value: string): value is AnalyticsEvent;
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use the new format instead
|
|
15
15
|
* @Date 2025-06-16 (remove this in two months)
|
|
16
16
|
*/
|
|
17
|
-
export declare const DEPRECATED_ANALYTICS_EVENTS: readonly ["expandable_open", "expandable_close", "accordion_open", "accordion_close", "header_nav_item_click", "cta_click", "scroll_to_bottom", "search_close", "api_playground_call", "search_result_click", "chat_enter", "chat_followup", "chat_completed", "code_block_copy", "chat_shared", "thumb_vote", "powered_by_mintlify_click", "ai_chat_citation_click", "ai_chat_feedback_positive_click", "ai_chat_feedback_negative_click", "ask_ai_code_block"];
|
|
17
|
+
export declare const DEPRECATED_ANALYTICS_EVENTS: readonly ["expandable_open", "expandable_close", "accordion_open", "accordion_close", "header_nav_item_click", "cta_click", "scroll_to_bottom", "search_close", "api_playground_call", "search_result_click", "chat_enter", "chat_followup", "chat_completed", "code_block_copy", "chat_shared", "thumb_vote", "powered_by_mintlify_click", "ai_chat_citation_click", "ai_chat_feedback_positive_click", "ai_chat_feedback_negative_click", "ask_ai_code_block", "assistant.spam_detected"];
|
|
18
18
|
/** @deprecated Use AnalyticsEvent instead */
|
|
19
19
|
export type DeprecatedAnalyticsEvent = (typeof DEPRECATED_ANALYTICS_EVENTS)[number];
|
|
20
20
|
/** @deprecated Use isAnalyticsEvent instead */
|
|
@@ -36,10 +36,12 @@ export const ANALYTICS_EVENTS = [
|
|
|
36
36
|
'docs.assistant.minimize_click',
|
|
37
37
|
'docs.assistant.copy_response',
|
|
38
38
|
'docs.assistant.ask_ai_on_text_selection',
|
|
39
|
+
'docs.assistant.spam_detected',
|
|
39
40
|
'docs.context_menu.copy_page',
|
|
40
41
|
'docs.context_menu.copy_mcp_link',
|
|
41
42
|
'docs.context_menu.ai_provider_click',
|
|
42
43
|
'docs.context_menu.install_mcp_server',
|
|
44
|
+
'docs.autopilot.suggestion.created',
|
|
43
45
|
];
|
|
44
46
|
export function isAnalyticsEvent(value) {
|
|
45
47
|
return ANALYTICS_EVENTS.includes(value);
|
|
@@ -70,6 +72,7 @@ export const DEPRECATED_ANALYTICS_EVENTS = [
|
|
|
70
72
|
'ai_chat_feedback_positive_click',
|
|
71
73
|
'ai_chat_feedback_negative_click',
|
|
72
74
|
'ask_ai_code_block',
|
|
75
|
+
'assistant.spam_detected',
|
|
73
76
|
];
|
|
74
77
|
/** @deprecated Use isAnalyticsEvent instead */
|
|
75
78
|
export function isDeprecatedAnalyticsEvent(value) {
|
|
@@ -98,4 +101,5 @@ export const analyticsEventMapping = {
|
|
|
98
101
|
'docs.assistant.source_click': 'ai_chat_citation_click',
|
|
99
102
|
'docs.assistant.thumbs_up': 'ai_chat_feedback_positive_click',
|
|
100
103
|
'docs.assistant.thumbs_down': 'ai_chat_feedback_negative_click',
|
|
104
|
+
'docs.assistant.spam_detected': 'assistant.spam_detected',
|
|
101
105
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.638",
|
|
4
4
|
"description": "Commonly shared code within Mintlify",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@asyncapi/parser": "3.4.0",
|
|
50
50
|
"@mintlify/mdx": "^3.0.4",
|
|
51
|
-
"@mintlify/models": "0.0.
|
|
51
|
+
"@mintlify/models": "0.0.247",
|
|
52
52
|
"@mintlify/openapi-parser": "^0.0.8",
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
53
|
+
"@mintlify/validation": "0.1.540",
|
|
54
54
|
"@sindresorhus/slugify": "2.2.0",
|
|
55
55
|
"acorn": "8.11.2",
|
|
56
56
|
"acorn-jsx": "5.3.2",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"typescript": "5.5.3",
|
|
109
109
|
"vitest": "2.0.4"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "d9681f3dcbd44a8cdd2bee41fce8a3f2210d6bc3"
|
|
112
112
|
}
|