@springbrand/message-panel 0.1.3-alpha.22 → 0.1.3-alpha.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.
@@ -14,6 +14,7 @@ import {
14
14
  export type CloudOsUrlResolver = (url: string) => string | null | undefined;
15
15
 
16
16
  const ALLOWED_PROTOCOLS = new Set(["http:", "https:", "mailto:"]);
17
+ const CJK_TEXT = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;
17
18
 
18
19
  export function safeExternalUrl(href: string | undefined): string | undefined {
19
20
  if (!href) return undefined;
@@ -109,6 +110,13 @@ export const MarkdownMessage = memo(function MarkdownMessage({
109
110
  );
110
111
  return (
111
112
  <Streamdown
113
+ animated={
114
+ streaming
115
+ ? CJK_TEXT.test(message)
116
+ ? { sep: "char", duration: 100, stagger: 5 }
117
+ : true
118
+ : false
119
+ }
112
120
  className="space-y-0"
113
121
  controls={false}
114
122
  mode={streaming ? "streaming" : "static"}
@@ -579,6 +579,10 @@
579
579
  }
580
580
 
581
581
  @media (prefers-reduced-motion: reduce) {
582
+ [data-sd-animate] {
583
+ animation: none !important;
584
+ }
585
+
582
586
  .cos-thinking-shimmer {
583
587
  animation: none;
584
588
  background: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/message-panel",
3
- "version": "0.1.3-alpha.22",
3
+ "version": "0.1.3-alpha.23",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",