@farming-labs/nuxt-theme 0.0.2-beta.23 → 0.0.2-beta.24
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/package.json +2 -2
- package/src/components/FloatingAIChat.vue +20 -17
- package/styles/docs.css +57 -64
- package/styles/pixel-border.css +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/nuxt-theme",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.24",
|
|
4
4
|
"description": "Nuxt/Vue UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"sugar-high": "^0.9.5",
|
|
56
|
-
"@farming-labs/docs": "0.0.2-beta.
|
|
56
|
+
"@farming-labs/docs": "0.0.2-beta.24"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"nuxt": ">=3.0.0",
|
|
@@ -213,12 +213,15 @@ function handleFmKeyDown(e: KeyboardEvent) {
|
|
|
213
213
|
</div>
|
|
214
214
|
<div class="fd-ai-fm-msg-content">
|
|
215
215
|
<template v-if="msg.content">
|
|
216
|
-
<div v-html="renderMarkdown(msg.content)" />
|
|
216
|
+
<div :class="isStreaming && i === messages.length - 1 && msg.role === 'assistant' ? 'fd-ai-streaming' : ''" v-html="renderMarkdown(msg.content)" />
|
|
217
217
|
</template>
|
|
218
|
-
<div v-else class="fd-ai-
|
|
219
|
-
<span class="fd-ai-
|
|
220
|
-
<span class="fd-ai-
|
|
221
|
-
|
|
218
|
+
<div v-else class="fd-ai-loader">
|
|
219
|
+
<span class="fd-ai-loader-shimmer-text">Thinking</span>
|
|
220
|
+
<span class="fd-ai-loader-typing-dots">
|
|
221
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
222
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
223
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
224
|
+
</span>
|
|
222
225
|
</div>
|
|
223
226
|
</div>
|
|
224
227
|
</div>
|
|
@@ -286,10 +289,10 @@ function handleFmKeyDown(e: KeyboardEvent) {
|
|
|
286
289
|
aria-label="Stop"
|
|
287
290
|
@click="isStreaming = false"
|
|
288
291
|
>
|
|
289
|
-
<span class="fd-ai-
|
|
290
|
-
<span class="fd-ai-
|
|
291
|
-
<span class="fd-ai-
|
|
292
|
-
<span class="fd-ai-
|
|
292
|
+
<span class="fd-ai-loader-typing-dots" style="margin-left:0">
|
|
293
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
294
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
295
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
293
296
|
</span>
|
|
294
297
|
</button>
|
|
295
298
|
<button
|
|
@@ -427,16 +430,16 @@ function handleFmKeyDown(e: KeyboardEvent) {
|
|
|
427
430
|
<div v-if="msg.role === 'user'" class="fd-ai-bubble-user">{{ msg.content }}</div>
|
|
428
431
|
<div v-else class="fd-ai-bubble-ai">
|
|
429
432
|
<template v-if="msg.content">
|
|
430
|
-
<div v-html="renderMarkdown(msg.content)" />
|
|
433
|
+
<div :class="isStreaming && i === messages.length - 1 ? 'fd-ai-streaming' : ''" v-html="renderMarkdown(msg.content)" />
|
|
431
434
|
</template>
|
|
432
|
-
<
|
|
433
|
-
<span class="fd-ai-
|
|
434
|
-
<span class="fd-ai-
|
|
435
|
-
<span class="fd-ai-
|
|
436
|
-
<span class="fd-ai-
|
|
437
|
-
<span class="fd-ai-
|
|
435
|
+
<div v-else class="fd-ai-loader">
|
|
436
|
+
<span class="fd-ai-loader-shimmer-text">Thinking</span>
|
|
437
|
+
<span class="fd-ai-loader-typing-dots">
|
|
438
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
439
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
440
|
+
<span class="fd-ai-loader-typing-dot" />
|
|
438
441
|
</span>
|
|
439
|
-
</
|
|
442
|
+
</div>
|
|
440
443
|
</div>
|
|
441
444
|
</div>
|
|
442
445
|
</template>
|
package/styles/docs.css
CHANGED
|
@@ -1329,19 +1329,6 @@ html.dark pre.shiki {
|
|
|
1329
1329
|
* AI Chat & Search Dialog — base styles (fd-ai-*)
|
|
1330
1330
|
* ═══════════════════════════════════════════════════════════════════════ */
|
|
1331
1331
|
|
|
1332
|
-
@keyframes fd-ai-dot {
|
|
1333
|
-
0%,
|
|
1334
|
-
80%,
|
|
1335
|
-
100% {
|
|
1336
|
-
transform: scale(0);
|
|
1337
|
-
opacity: 0.5;
|
|
1338
|
-
}
|
|
1339
|
-
40% {
|
|
1340
|
-
transform: scale(1);
|
|
1341
|
-
opacity: 1;
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
1332
|
@keyframes fd-ai-fade-in {
|
|
1346
1333
|
from {
|
|
1347
1334
|
opacity: 0;
|
|
@@ -1693,6 +1680,12 @@ html.dark pre.shiki {
|
|
|
1693
1680
|
line-height: 1.6;
|
|
1694
1681
|
max-width: 95%;
|
|
1695
1682
|
word-break: break-word;
|
|
1683
|
+
animation: fd-ai-msg-in 300ms ease-out;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
@keyframes fd-ai-msg-in {
|
|
1687
|
+
from { opacity: 0; transform: translateY(6px); }
|
|
1688
|
+
to { opacity: 1; transform: translateY(0); }
|
|
1696
1689
|
}
|
|
1697
1690
|
|
|
1698
1691
|
.fd-ai-chat-footer {
|
|
@@ -1745,36 +1738,70 @@ html.dark pre.shiki {
|
|
|
1745
1738
|
color: var(--color-fd-primary-foreground);
|
|
1746
1739
|
}
|
|
1747
1740
|
|
|
1748
|
-
.fd-ai-
|
|
1741
|
+
.fd-ai-loader {
|
|
1749
1742
|
display: inline-flex;
|
|
1750
|
-
gap: 6px;
|
|
1751
1743
|
align-items: center;
|
|
1744
|
+
gap: 6px;
|
|
1745
|
+
animation: fd-ai-loader-in 300ms ease-out;
|
|
1752
1746
|
}
|
|
1753
1747
|
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1748
|
+
@keyframes fd-ai-loader-in {
|
|
1749
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
1750
|
+
to { opacity: 1; transform: translateY(0); }
|
|
1757
1751
|
}
|
|
1758
1752
|
|
|
1759
|
-
.fd-ai-
|
|
1753
|
+
.fd-ai-loader-shimmer-text {
|
|
1754
|
+
font-size: 13px;
|
|
1755
|
+
font-weight: 500;
|
|
1756
|
+
background: linear-gradient(to right, var(--color-fd-muted-foreground, #888) 40%, var(--color-fd-foreground, #fff) 60%, var(--color-fd-muted-foreground, #888) 80%);
|
|
1757
|
+
background-size: 200% auto;
|
|
1758
|
+
background-clip: text;
|
|
1759
|
+
-webkit-background-clip: text;
|
|
1760
|
+
color: transparent;
|
|
1761
|
+
animation: fd-ai-shimmer-text 3s linear infinite;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
@keyframes fd-ai-shimmer-text {
|
|
1765
|
+
0% { background-position: 150% center; }
|
|
1766
|
+
100% { background-position: -150% center; }
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.fd-ai-loader-typing-dots {
|
|
1760
1770
|
display: inline-flex;
|
|
1761
|
-
gap: 3px;
|
|
1762
1771
|
align-items: center;
|
|
1772
|
+
gap: 2px;
|
|
1763
1773
|
}
|
|
1764
1774
|
|
|
1765
|
-
.fd-ai-
|
|
1766
|
-
width:
|
|
1767
|
-
height:
|
|
1775
|
+
.fd-ai-loader-typing-dot {
|
|
1776
|
+
width: 4px;
|
|
1777
|
+
height: 4px;
|
|
1768
1778
|
border-radius: 50%;
|
|
1769
|
-
background: var(--color-fd-
|
|
1770
|
-
animation: fd-ai-
|
|
1779
|
+
background: var(--color-fd-primary, #6366f1);
|
|
1780
|
+
animation: fd-ai-typing 1s infinite;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.fd-ai-loader-typing-dot:nth-child(2) { animation-delay: 250ms; }
|
|
1784
|
+
.fd-ai-loader-typing-dot:nth-child(3) { animation-delay: 500ms; }
|
|
1785
|
+
|
|
1786
|
+
@keyframes fd-ai-typing {
|
|
1787
|
+
0%, 100% { transform: translateY(0); opacity: 0.5; }
|
|
1788
|
+
50% { transform: translateY(-2px); opacity: 1; }
|
|
1771
1789
|
}
|
|
1772
1790
|
|
|
1773
|
-
.fd-ai-
|
|
1774
|
-
|
|
1791
|
+
.fd-ai-streaming::after {
|
|
1792
|
+
content: "";
|
|
1793
|
+
display: inline-block;
|
|
1794
|
+
width: 2px;
|
|
1795
|
+
height: 1em;
|
|
1796
|
+
background: var(--color-fd-primary, #6366f1);
|
|
1797
|
+
margin-left: 2px;
|
|
1798
|
+
vertical-align: text-bottom;
|
|
1799
|
+
animation: fd-ai-cursor-blink 0.8s step-end infinite;
|
|
1775
1800
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1801
|
+
|
|
1802
|
+
@keyframes fd-ai-cursor-blink {
|
|
1803
|
+
0%, 100% { opacity: 1; }
|
|
1804
|
+
50% { opacity: 0; }
|
|
1778
1805
|
}
|
|
1779
1806
|
|
|
1780
1807
|
/* ─── Markdown in AI responses ───────────────────────────────── */
|
|
@@ -2161,41 +2188,7 @@ html.dark pre.shiki {
|
|
|
2161
2188
|
font-size: 12px;
|
|
2162
2189
|
}
|
|
2163
2190
|
|
|
2164
|
-
/*
|
|
2165
|
-
|
|
2166
|
-
.fd-ai-fm-thinking {
|
|
2167
|
-
display: flex;
|
|
2168
|
-
gap: 4px;
|
|
2169
|
-
align-items: center;
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
.fd-ai-fm-thinking-dot {
|
|
2173
|
-
width: 6px;
|
|
2174
|
-
height: 6px;
|
|
2175
|
-
border-radius: 9999px;
|
|
2176
|
-
background: var(--color-fd-primary, #6366f1);
|
|
2177
|
-
animation: fd-ai-fm-bounce 1s infinite ease-in-out;
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
.fd-ai-fm-thinking-dot:nth-child(2) {
|
|
2181
|
-
animation-delay: 150ms;
|
|
2182
|
-
}
|
|
2183
|
-
.fd-ai-fm-thinking-dot:nth-child(3) {
|
|
2184
|
-
animation-delay: 300ms;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
@keyframes fd-ai-fm-bounce {
|
|
2188
|
-
0%,
|
|
2189
|
-
80%,
|
|
2190
|
-
100% {
|
|
2191
|
-
transform: scale(0.6);
|
|
2192
|
-
opacity: 0.4;
|
|
2193
|
-
}
|
|
2194
|
-
40% {
|
|
2195
|
-
transform: scale(1);
|
|
2196
|
-
opacity: 1;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2191
|
+
/* Full-modal now uses the shared .fd-ai-loader indicator */
|
|
2199
2192
|
|
|
2200
2193
|
/* ─── Bottom input bar ───────────────────────────────────────── */
|
|
2201
2194
|
|
package/styles/pixel-border.css
CHANGED
|
@@ -477,13 +477,13 @@
|
|
|
477
477
|
letter-spacing: 0.06em;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
.fd-ai-
|
|
480
|
+
.fd-ai-loader-shimmer-text {
|
|
481
481
|
text-transform: uppercase;
|
|
482
482
|
letter-spacing: 0.04em;
|
|
483
483
|
font-size: 11px;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
.fd-ai-
|
|
486
|
+
.fd-ai-loader-typing-dot {
|
|
487
487
|
border-radius: 0;
|
|
488
488
|
width: 4px;
|
|
489
489
|
height: 4px;
|
|
@@ -561,11 +561,7 @@
|
|
|
561
561
|
font-size: 11px;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
.fd-ai-
|
|
565
|
-
border-radius: 0;
|
|
566
|
-
width: 5px;
|
|
567
|
-
height: 5px;
|
|
568
|
-
}
|
|
564
|
+
/* Full-modal now uses .fd-ai-loader-typing-dot (see above) */
|
|
569
565
|
|
|
570
566
|
/* ─── Code blocks in AI chat (pixel-border) ──────────────────────── */
|
|
571
567
|
|