@courseecho/ai-core-sdk 1.0.21 → 1.0.23

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.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Shared SVG icons for AI Widget — single source of truth.
3
+ *
4
+ * Usage in React (JSX):
5
+ * <div className="aiwg-avatar" dangerouslySetInnerHTML={{ __html: ICONS.BOT }} />
6
+ *
7
+ * Usage in jQuery / plain HTML template literals:
8
+ * `<div class="aiwg-avatar">${ICONS.BOT}</div>`
9
+ */
10
+ export declare const ICONS: {
11
+ readonly BOT: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"22\" height=\"22\" fill=\"currentColor\" aria-hidden=\"true\">\n <!-- head -->\n <rect x=\"5\" y=\"8\" width=\"14\" height=\"11\" rx=\"2.5\"/>\n <!-- eyes -->\n <rect x=\"8.5\" y=\"11.5\" width=\"2\" height=\"2.5\" rx=\"1\" fill=\"white\"/>\n <rect x=\"13.5\" y=\"11.5\" width=\"2\" height=\"2.5\" rx=\"1\" fill=\"white\"/>\n <!-- mouth -->\n <rect x=\"9\" y=\"15\" width=\"6\" height=\"1.2\" rx=\"0.6\" fill=\"white\" opacity=\"0.85\"/>\n <!-- antenna stem -->\n <rect x=\"11.25\" y=\"4.5\" width=\"1.5\" height=\"3.5\" rx=\"0.75\"/>\n <!-- antenna ball -->\n <circle cx=\"12\" cy=\"4\" r=\"1.5\"/>\n <!-- left arm -->\n <rect x=\"2.5\" y=\"11\" width=\"2.5\" height=\"5\" rx=\"1.25\"/>\n <!-- right arm -->\n <rect x=\"19\" y=\"11\" width=\"2.5\" height=\"5\" rx=\"1.25\"/>\n</svg>";
12
+ readonly USER: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"22\" height=\"22\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"8\" r=\"4\"/>\n <path d=\"M4 20c0-4.418 3.582-7 8-7s8 2.582 8 7\" fill=\"currentColor\"/>\n</svg>";
13
+ readonly WAVE: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"32\" height=\"32\" fill=\"currentColor\" aria-hidden=\"true\">\n <!-- palm -->\n <path d=\"M11 4.5a1 1 0 0 1 2 0v6.5a1 1 0 0 0 2 0V6a1 1 0 0 1 2 0v5a1 1 0 0 0 2 0V9a1 1 0 0 1 2 0v5c0 4-3 7-7 7H12c-3.86 0-7-3.14-7-7V9.97c0-.52.42-.97.93-1 .56-.02 1.07.44 1.07 1V12a1 1 0 0 0 2 0V4.5z\"/>\n</svg>";
14
+ readonly SEND: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"13\"/>\n <polygon points=\"22 2 15 22 11 13 2 9 22 2\"/>\n</svg>";
15
+ readonly CLOSE: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n</svg>";
16
+ };
17
+ /** 🎓 */ export declare const EMOJI_GRADUATION = "\uD83C\uDF93";
18
+ /** 📋 */ export declare const EMOJI_CLIPBOARD = "\uD83D\uDCCB";
19
+ /** 🏆 */ export declare const EMOJI_TROPHY = "\uD83C\uDFC6";
20
+ /** ⬇️ */ export declare const EMOJI_DOWN_ARROW = "\u2B07\uFE0F";
21
+ /** 📈 */ export declare const EMOJI_CHART_UP = "\uD83D\uDCC8";
22
+ /** 🙋 */ export declare const EMOJI_HAND_RAISE = "\uD83D\uDE4B";
23
+ /** 💡 */ export declare const EMOJI_BULB = "\uD83D\uDCA1";
24
+ /** 📝 */ export declare const EMOJI_MEMO = "\uD83D\uDCDD";
25
+ /** ➡️ */ export declare const EMOJI_RIGHT_ARROW = "\u27A1\uFE0F";
26
+ /** 🆘 */ export declare const EMOJI_SOS = "\uD83C\uDD98";
27
+ /** 🏋️ */ export declare const EMOJI_LIFT = "\uD83C\uDFCB\uFE0F";
28
+ /** 🔍 */ export declare const EMOJI_SEARCH = "\uD83D\uDD0D";
29
+ /** 📚 */ export declare const EMOJI_BOOKS = "\uD83D\uDCDA";
30
+ /** 📦 */ export declare const EMOJI_PACKAGE = "\uD83D\uDCE6";
31
+ /** 💳 */ export declare const EMOJI_CARD = "\uD83D\uDCB3";
32
+ /** 🛒 */ export declare const EMOJI_CART = "\uD83D\uDED2";
33
+ /** 🆓 */ export declare const EMOJI_FREE = "\uD83C\uDD93";
34
+ /** 💰 */ export declare const EMOJI_MONEY = "\uD83D\uDCB0";
35
+ /** 🔒 */ export declare const EMOJI_LOCK = "\uD83D\uDD12";
36
+ /** 🎟️ */ export declare const EMOJI_TICKET = "\uD83C\uDF9F\uFE0F";
37
+ /** 👤 */ export declare const EMOJI_USER = "\uD83D\uDC64";
38
+ /** 💻 */ export declare const EMOJI_LAPTOP = "\uD83D\uDCBB";
39
+ /** 🐛 */ export declare const EMOJI_BUG = "\uD83D\uDC1B";
40
+ /** 🔧 */ export declare const EMOJI_WRENCH = "\uD83D\uDD27";
41
+ /** 💬 */ export declare const EMOJI_CHAT = "\uD83D\uDCAC";
42
+ /** 🚀 */ export declare const EMOJI_ROCKET = "\uD83D\uDE80";
43
+ /** 📖 */ export declare const EMOJI_BOOK = "\uD83D\uDCD6";
44
+ /** 🛠️ */ export declare const EMOJI_TOOLS = "\uD83D\uDEE0\uFE0F";
45
+ /** ⚠️ */ export declare const EMOJI_WARNING = "\u26A0\uFE0F";
package/dist/icons.js ADDED
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Shared SVG icons for AI Widget — single source of truth.
3
+ *
4
+ * Usage in React (JSX):
5
+ * <div className="aiwg-avatar" dangerouslySetInnerHTML={{ __html: ICONS.BOT }} />
6
+ *
7
+ * Usage in jQuery / plain HTML template literals:
8
+ * `<div class="aiwg-avatar">${ICONS.BOT}</div>`
9
+ */
10
+ /** Bot / AI assistant avatar */
11
+ const BOT = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">
12
+ <!-- head -->
13
+ <rect x="5" y="8" width="14" height="11" rx="2.5"/>
14
+ <!-- eyes -->
15
+ <rect x="8.5" y="11.5" width="2" height="2.5" rx="1" fill="white"/>
16
+ <rect x="13.5" y="11.5" width="2" height="2.5" rx="1" fill="white"/>
17
+ <!-- mouth -->
18
+ <rect x="9" y="15" width="6" height="1.2" rx="0.6" fill="white" opacity="0.85"/>
19
+ <!-- antenna stem -->
20
+ <rect x="11.25" y="4.5" width="1.5" height="3.5" rx="0.75"/>
21
+ <!-- antenna ball -->
22
+ <circle cx="12" cy="4" r="1.5"/>
23
+ <!-- left arm -->
24
+ <rect x="2.5" y="11" width="2.5" height="5" rx="1.25"/>
25
+ <!-- right arm -->
26
+ <rect x="19" y="11" width="2.5" height="5" rx="1.25"/>
27
+ </svg>`;
28
+ /** Human / user avatar */
29
+ const USER = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">
30
+ <circle cx="12" cy="8" r="4"/>
31
+ <path d="M4 20c0-4.418 3.582-7 8-7s8 2.582 8 7" fill="currentColor"/>
32
+ </svg>`;
33
+ /** Waving hand — welcome screen */
34
+ const WAVE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" fill="currentColor" aria-hidden="true">
35
+ <!-- palm -->
36
+ <path d="M11 4.5a1 1 0 0 1 2 0v6.5a1 1 0 0 0 2 0V6a1 1 0 0 1 2 0v5a1 1 0 0 0 2 0V9a1 1 0 0 1 2 0v5c0 4-3 7-7 7H12c-3.86 0-7-3.14-7-7V9.97c0-.52.42-.97.93-1 .56-.02 1.07.44 1.07 1V12a1 1 0 0 0 2 0V4.5z"/>
37
+ </svg>`;
38
+ /** Paper-plane send button */
39
+ const SEND = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
40
+ <line x1="22" y1="2" x2="11" y2="13"/>
41
+ <polygon points="22 2 15 22 11 13 2 9 22 2"/>
42
+ </svg>`;
43
+ /** Close / minimise (×) */
44
+ const CLOSE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true">
45
+ <line x1="18" y1="6" x2="6" y2="18"/>
46
+ <line x1="6" y1="6" x2="18" y2="18"/>
47
+ </svg>`;
48
+ export const ICONS = { BOT, USER, WAVE, SEND, CLOSE };
49
+ // ---------------------------------------------------------------------------
50
+ // Chip / suggestion template emoji strings
51
+ // Using Unicode escapes so this file is encoding-safe regardless of editor.
52
+ // ---------------------------------------------------------------------------
53
+ /** 🎓 */ export const EMOJI_GRADUATION = '\u{1F393}';
54
+ /** 📋 */ export const EMOJI_CLIPBOARD = '\u{1F4CB}';
55
+ /** 🏆 */ export const EMOJI_TROPHY = '\u{1F3C6}';
56
+ /** ⬇️ */ export const EMOJI_DOWN_ARROW = '\u2B07\uFE0F';
57
+ /** 📈 */ export const EMOJI_CHART_UP = '\u{1F4C8}';
58
+ /** 🙋 */ export const EMOJI_HAND_RAISE = '\u{1F64B}';
59
+ /** 💡 */ export const EMOJI_BULB = '\u{1F4A1}';
60
+ /** 📝 */ export const EMOJI_MEMO = '\u{1F4DD}';
61
+ /** ➡️ */ export const EMOJI_RIGHT_ARROW = '\u27A1\uFE0F';
62
+ /** 🆘 */ export const EMOJI_SOS = '\u{1F198}';
63
+ /** 🏋️ */ export const EMOJI_LIFT = '\u{1F3CB}\uFE0F';
64
+ /** 🔍 */ export const EMOJI_SEARCH = '\u{1F50D}';
65
+ /** 📚 */ export const EMOJI_BOOKS = '\u{1F4DA}';
66
+ /** 📦 */ export const EMOJI_PACKAGE = '\u{1F4E6}';
67
+ /** 💳 */ export const EMOJI_CARD = '\u{1F4B3}';
68
+ /** 🛒 */ export const EMOJI_CART = '\u{1F6D2}';
69
+ /** 🆓 */ export const EMOJI_FREE = '\u{1F193}';
70
+ /** 💰 */ export const EMOJI_MONEY = '\u{1F4B0}';
71
+ /** 🔒 */ export const EMOJI_LOCK = '\u{1F512}';
72
+ /** 🎟️ */ export const EMOJI_TICKET = '\u{1F39F}\uFE0F';
73
+ /** 👤 */ export const EMOJI_USER = '\u{1F464}';
74
+ /** 💻 */ export const EMOJI_LAPTOP = '\u{1F4BB}';
75
+ /** 🐛 */ export const EMOJI_BUG = '\u{1F41B}';
76
+ /** 🔧 */ export const EMOJI_WRENCH = '\u{1F527}';
77
+ /** 💬 */ export const EMOJI_CHAT = '\u{1F4AC}';
78
+ /** 🚀 */ export const EMOJI_ROCKET = '\u{1F680}';
79
+ /** 📖 */ export const EMOJI_BOOK = '\u{1F4D6}';
80
+ /** 🛠️ */ export const EMOJI_TOOLS = '\u{1F6E0}\uFE0F';
81
+ /** ⚠️ */ export const EMOJI_WARNING = '\u26A0\uFE0F';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@courseecho/ai-core-sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Framework-agnostic core AI chat SDK. Shared logic for all framework wrappers.",
5
5
  "license": "MIT",
6
6
  "author": "CourseEcho",