@yuhuanowo/yunui 0.2.15 → 0.2.16
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/README.md +2 -0
- package/dist/adapters.js +1 -1
- package/dist/ai.js +13 -9
- package/dist/ai.js.map +1 -1
- package/dist/chat.d.ts +133 -0
- package/dist/chat.js +268 -0
- package/dist/chat.js.map +1 -0
- package/dist/{chunk-U2LNRVMI.js → chunk-3RT24MSH.js} +4 -3
- package/dist/chunk-3RT24MSH.js.map +1 -0
- package/dist/chunk-5E3O6ANF.js +1154 -0
- package/dist/chunk-5E3O6ANF.js.map +1 -0
- package/dist/{chunk-6MZN3GOP.js → chunk-5TOGZTAO.js} +218 -835
- package/dist/chunk-5TOGZTAO.js.map +1 -0
- package/dist/chunk-AV5TGEJS.js +54 -0
- package/dist/chunk-AV5TGEJS.js.map +1 -0
- package/dist/{chunk-LLNTUA5K.js → chunk-GSPJ5YI6.js} +15 -56
- package/dist/chunk-GSPJ5YI6.js.map +1 -0
- package/dist/chunk-QEIBYOG2.js +188 -0
- package/dist/chunk-QEIBYOG2.js.map +1 -0
- package/dist/{chunk-N53PNMPJ.js → chunk-UYYG4XDW.js} +3 -3
- package/dist/{chunk-N53PNMPJ.js.map → chunk-UYYG4XDW.js.map} +1 -1
- package/dist/content.d.ts +144 -0
- package/dist/content.js +890 -0
- package/dist/content.js.map +1 -0
- package/dist/index.d.ts +183 -5
- package/dist/index.js +5 -3
- package/dist/patterns.d.ts +87 -1
- package/dist/patterns.js +446 -8
- package/dist/patterns.js.map +1 -1
- package/package.json +77 -5
- package/styles/content.css +129 -0
- package/styles/yunui.css +24 -4
- package/dist/chunk-6MZN3GOP.js.map +0 -1
- package/dist/chunk-LLNTUA5K.js.map +0 -1
- package/dist/chunk-U2LNRVMI.js.map +0 -1
package/README.md
CHANGED
|
@@ -112,6 +112,8 @@ Without a provider, YunUI uses zero-dependency defaults (`<a>` / `<img>` / ident
|
|
|
112
112
|
| `@yuhuanowo/yunui/adapters` | `YunUIProvider` / `useYunUI` and the adapter interfaces |
|
|
113
113
|
| `@yuhuanowo/yunui/patterns` | Page-level components: FAQ, StatCard (`tone` / `inline` / `valueFirst` variants), BlogCard, CodeBlock, Sidebar, PageHeader, BackgroundEffects, and more |
|
|
114
114
|
| `@yuhuanowo/yunui/ai` | AI product-domain components (prop-driven, no direct API calls): ProviderIcon / ModelIcon / ModelTypeIcon, ModelCard, CapabilitySelector, Navbar, Footer, LanguageSwitcher, ThinkingBlock, IDBadge, … |
|
|
115
|
+
| `@yuhuanowo/yunui/content` | Content-rendering stack: `MarkdownRenderer` (GFM + KaTeX + Shiki + Mermaid + callouts + lazy zoomable images), `CodeBlock` / `InlineCode`, `CalloutBlock`, `MathRenderer`, `MermaidDiagram`, `ContentImage`, `ImageLightbox`. Heavy engines are **optional peer deps** (Shiki/Mermaid load on demand). Also import `@yuhuanowo/yunui/content.css` + `katex/dist/katex.min.css` |
|
|
116
|
+
| `@yuhuanowo/yunui/chat` | Slot-based chat UI blocks (presentational, no data types): `ChatMessage`, `ChatMessageList` (stick-to-bottom), `ChatComposer`, `ChatHeader`. Pairs with `@yuhuanowo/yunui/content` |
|
|
115
117
|
|
|
116
118
|
**Utilities / hooks** (exported from `@yuhuanowo/yunui`): `cn`, `toast` / `Toaster` (sonner-based), `MotionDiv` / `MotionSpan` / `fadeIn` / `staggerContainer` / `staggerItem`, `useEscapeKey` / `useBodyScrollLock` / `useModalBehavior`.
|
|
117
119
|
|
package/dist/adapters.js
CHANGED
package/dist/ai.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { copyToClipboard } from './chunk-
|
|
3
|
-
export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { copyToClipboard } from './chunk-UYYG4XDW.js';
|
|
3
|
+
export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-UYYG4XDW.js';
|
|
4
|
+
import { ThemeToggle } from './chunk-GSPJ5YI6.js';
|
|
5
|
+
import { cn, useAnchoredPosition } from './chunk-AV5TGEJS.js';
|
|
6
|
+
import { useYunUI } from './chunk-3RT24MSH.js';
|
|
6
7
|
import { memo, useState, useRef, useMemo, useEffect } from 'react';
|
|
7
8
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
8
9
|
import { Pin, MessageSquare, Waves, Code, Eye, Brain, Pencil, Ban, Fingerprint, Layers, SlidersHorizontal, Mic, Video, Music, Box, Radio, ChevronUp, ChevronDown, Check, Copy, Image, PauseCircle, Search, X, Sparkles, Bot, Globe, Menu, Shield, Shuffle, Volume2, Headphones, Palette, Hash, FileText } from 'lucide-react';
|
|
@@ -425,7 +426,7 @@ var ModelRow = memo(function ModelRow2({
|
|
|
425
426
|
"div",
|
|
426
427
|
{
|
|
427
428
|
className: cn(
|
|
428
|
-
"absolute left-
|
|
429
|
+
"absolute left-1.5 top-1/2 w-1 h-6 rounded-full bg-primary transition-all duration-150 -translate-y-1/2",
|
|
429
430
|
selected ? "opacity-100 translate-x-0" : "opacity-0 -translate-x-1.5 group-hover:opacity-50 group-hover:translate-x-0"
|
|
430
431
|
)
|
|
431
432
|
}
|
|
@@ -480,16 +481,19 @@ function ModelManagerCard({
|
|
|
480
481
|
className
|
|
481
482
|
),
|
|
482
483
|
children: [
|
|
483
|
-
|
|
484
|
+
selectSlot && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 -mt-2 mb-3 min-h-7", children: [
|
|
484
485
|
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: selectSlot }),
|
|
485
486
|
actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 -mr-1.5 text-muted-foreground", children: actions })
|
|
486
487
|
] }),
|
|
487
488
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
488
489
|
icon && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: icon }),
|
|
489
490
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
490
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
|
|
491
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
492
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2 gap-y-1 flex-wrap min-w-0", children: [
|
|
493
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold leading-tight min-w-0 break-words", children: name }),
|
|
494
|
+
nameBadges
|
|
495
|
+
] }),
|
|
496
|
+
!selectSlot && actions && /* @__PURE__ */ jsx("div", { className: "shrink-0 -mr-1.5 -mt-1 flex items-center gap-0.5 text-muted-foreground", children: actions })
|
|
493
497
|
] }),
|
|
494
498
|
ids && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1 mt-1.5", children: ids })
|
|
495
499
|
] })
|