@king-design/vue 3.8.0-beta.0 → 3.8.0-beta.1

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.
Files changed (54) hide show
  1. package/__tests__/__snapshots__/Vue Next Demos.md +74 -74
  2. package/components/bubble/bubble.d.ts +1 -0
  3. package/components/bubble/bubble.vdt.js +6 -2
  4. package/components/bubble/index.spec.js +58 -5
  5. package/components/bubble/styles.js +1 -1
  6. package/components/bubble/useBubbleDisplay.d.ts +1 -0
  7. package/components/bubble/useBubbleDisplay.js +8 -0
  8. package/components/bubbleList/bubbleList.vdt.js +3 -1
  9. package/components/bubbleList/index.spec.js +301 -237
  10. package/components/bubbleList/styles.js +2 -2
  11. package/components/bubbleList/useBubbleList.js +7 -0
  12. package/components/fileCard/fileCard.vdt.js +4 -4
  13. package/components/fileCard/index.spec.js +179 -107
  14. package/components/fileCard/list.d.ts +2 -1
  15. package/components/fileCard/list.vdt.js +7 -5
  16. package/components/fileCard/styles.js +10 -8
  17. package/components/fileCard/useFileCard.d.ts +1 -1
  18. package/components/fileCard/useFileCard.js +6 -35
  19. package/components/media/index.spec.js +774 -585
  20. package/components/media/media.vdt.js +17 -6
  21. package/components/media/mediaAssets.d.ts +2 -0
  22. package/components/media/mediaAssets.js +4 -0
  23. package/components/media/styles.js +5 -3
  24. package/components/media/useMedia.d.ts +6 -2
  25. package/components/media/useMedia.js +28 -6
  26. package/components/sender/index.spec.js +1039 -435
  27. package/components/sender/sender.d.ts +27 -4
  28. package/components/sender/sender.js +16 -5
  29. package/components/sender/sender.vdt.js +121 -49
  30. package/components/sender/styles.js +18 -9
  31. package/components/sender/useAutoResize.js +6 -6
  32. package/components/sender/useSenderDrag.js +12 -3
  33. package/components/sender/useSenderInput.d.ts +3 -0
  34. package/components/sender/useSenderInput.js +20 -3
  35. package/components/sender/useSenderPaste.js +1 -1
  36. package/components/sender/useSenderUpload.js +38 -29
  37. package/components/xmarkdown/index.spec.js +370 -239
  38. package/components/xmarkdown/markdown/streaming.js +41 -8
  39. package/components/xmarkdown/styles.js +2 -2
  40. package/components/xmarkdown/useXMarkdownDisplay.d.ts +1 -0
  41. package/components/xmarkdown/useXMarkdownDisplay.js +9 -1
  42. package/components/xmarkdown/xmarkdown.d.ts +1 -0
  43. package/components/xmarkdown/xmarkdown.vdt.js +6 -2
  44. package/dist/i18n/en-US.js +1 -0
  45. package/dist/i18n/en-US.js.map +1 -1
  46. package/dist/i18n/en-US.min.js +1 -1
  47. package/dist/index.js +400 -193
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.min.js +2 -2
  50. package/i18n/en-US.d.ts +1 -0
  51. package/i18n/en-US.js +1 -0
  52. package/index.d.ts +2 -2
  53. package/index.js +2 -2
  54. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -76332,7 +76332,7 @@ var bubble_styles_makeStyles = utils_cache(function makeStyles(k) {
76332
76332
  return (
76333
76333
  /*#__PURE__*/
76334
76334
  /*#__PURE__*/
76335
- css("display:flex;flex-direction:column;align-items:flex-start;width:100%;.", k, "-bubble-main{display:flex;flex-direction:column;gap:8px;min-width:0;align-items:flex-start;}.", k, "-bubble-meta{display:flex;align-items:center;gap:8px;min-width:0;}.", k, "-bubble-header{color:", bubble.roleNameColor, ";font-size:14px;font-weight:500;min-width:0;text-align:left;}.", k, "-bubble-content{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%;padding:", bubble.padding, ";box-sizing:border-box;line-height:1.6;word-break:break-word;overflow-wrap:anywhere;transition:background ", theme.transition.small, ",border-color ", theme.transition.small, ";}.", k, "-bubble-content>*{min-width:0;max-width:100%;}.", k, "-bubble-attachments{display:flex;flex-direction:column;gap:12px;min-width:0;max-width:100%;}.", k, "-bubble-before-content{min-width:0;width:100%;}.", k, "-bubble-text{white-space:pre-wrap;}.", k, "-bubble-loading{display:inline-flex;align-items:center;gap:8px;color:", bubble.loadingTextColor, ";min-height:20px;}.", k, "-bubble-loading-dot{width:", bubble.loadingDotSize, ";height:", bubble.loadingDotSize, ";border-radius:50%;background:", bubble.loadingDotColor, ";display:inline-block;animation:", k, "-bubble-loading-bounce 1s ease-in-out infinite;box-shadow:0 0 0 1px ", setAlpha(theme.color.primary, 0.04), ";}.", k, "-bubble-loading-dot:nth-of-type(2){animation-delay:0.14s;}.", k, "-bubble-loading-dot:nth-of-type(3){animation-delay:0.28s;}.", k, "-bubble-footer{display:flex;align-items:center;gap:4px;}.", k, "-bubble-extra{color:", bubble.extraColor, ";font-size:12px;line-height:1.5;}.", k, "-bubble-avatar{width:", bubble.avatarSize, ";height:", bubble.avatarSize, ";flex:0 0 ", bubble.avatarSize, ";border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:", bubble.avatarBg, ";color:", bubble.avatarColor, ";font-size:", bubble.avatarFontSize, ";font-weight:600;}.", k, "-bubble-avatar-image{width:100%;height:100%;object-fit:cover;display:block;}.", k, "-bubble-markdown{color:inherit;overflow-x:auto;}.", k, "-bubble-markdown>:first-child{margin-top:0;}.", k, "-bubble-markdown>:last-child{margin-bottom:0;}.", k, "-bubble-markdown [data-kpc-bubble-markdown-tail]{display:inline;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;}.", k, "-bubble-markdown p,.", k, "-bubble-markdown ul,.", k, "-bubble-markdown ol,.", k, "-bubble-markdown blockquote,.", k, "-bubble-markdown pre,.", k, "-bubble-markdown table,.", k, "-bubble-markdown hr,.", k, "-bubble-markdown h1,.", k, "-bubble-markdown h2,.", k, "-bubble-markdown h3,.", k, "-bubble-markdown h4,.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{margin:0 0 10px;}.", k, "-bubble-markdown ul,.", k, "-bubble-markdown ol{padding-left:20px;list-style-position:outside;}.", k, "-bubble-markdown ul{list-style-type:disc;}.", k, "-bubble-markdown ul ul{list-style-type:circle;}.", k, "-bubble-markdown ul ul ul{list-style-type:square;}.", k, "-bubble-markdown ol{list-style-type:decimal;}.", k, "-bubble-markdown ol ol{list-style-type:lower-alpha;}.", k, "-bubble-markdown li{margin:6px 0;}.", k, "-bubble-markdown li>p{margin:6px 0 0;}.", k, "-bubble-markdown h1,.", k, "-bubble-markdown h2,.", k, "-bubble-markdown h3,.", k, "-bubble-markdown h4,.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{color:", bubble.markdownHeadingColor, ";font-weight:600;line-height:1.35;}.", k, "-bubble-markdown h1{font-size:22px;}.", k, "-bubble-markdown h2{font-size:18px;}.", k, "-bubble-markdown h3{font-size:16px;}.", k, "-bubble-markdown h4{font-size:14px;}.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{font-size:13px;}.", k, "-bubble-markdown a{color:", bubble.markdownLinkColor, ";text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}.", k, "-bubble-markdown a:hover{opacity:0.88;}.", k, "-bubble-markdown code{display:inline-block;padding:0 6px;border-radius:4px;background:", bubble.markdownCodeBg, ";color:", bubble.markdownCodeColor, ";font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:12px;white-space:break-spaces;}.", k, "-bubble-markdown strong,.", k, "-bubble-markdown b{font-weight:600;}.", k, "-bubble-markdown img{display:block;max-width:100%;height:auto;margin:12px 0;border-radius:12px;}.", k, "-bubble-markdown hr{height:1px;border:0;background:", bubble.markdownBorderColor, ";}.", k, "-bubble-markdown pre{padding:0px;overflow:auto;background:", bubble.markdownPreBg, ";color:", bubble.markdownPreColor, ";border:1px solid ", setAlpha('#ffffff', 0.06), ";}.", k, "-bubble-markdown pre code{display:block;padding:4px;background:transparent;color:inherit;white-space:pre;word-break:normal;overflow-wrap:normal;}.", k, "-bubble-markdown .hljs{background:transparent;color:inherit;}.", k, "-bubble-markdown .hljs-comment,.", k, "-bubble-markdown .hljs-quote{color:#8fa1b3;}.", k, "-bubble-markdown .hljs-keyword,.", k, "-bubble-markdown .hljs-selector-tag,.", k, "-bubble-markdown .hljs-literal,.", k, "-bubble-markdown .hljs-section,.", k, "-bubble-markdown .hljs-link{color:#ffb86c;}.", k, "-bubble-markdown .hljs-string,.", k, "-bubble-markdown .hljs-title,.", k, "-bubble-markdown .hljs-name,.", k, "-bubble-markdown .hljs-type,.", k, "-bubble-markdown .hljs-attribute,.", k, "-bubble-markdown .hljs-symbol,.", k, "-bubble-markdown .hljs-bullet,.", k, "-bubble-markdown .hljs-addition{color:#7ee787;}.", k, "-bubble-markdown .hljs-number,.", k, "-bubble-markdown .hljs-built_in,.", k, "-bubble-markdown .hljs-builtin-name,.", k, "-bubble-markdown .hljs-variable,.", k, "-bubble-markdown .hljs-template-variable{color:#79c0ff;}.", k, "-bubble-markdown .hljs-deletion{color:#ff7b72;}.", k, "-bubble-markdown table{width:100%;border-collapse:collapse;border-spacing:0;border:1px solid ", bubble.markdownBorderColor, ";border-radius:10px;overflow:hidden;font-size:12px;background:transparent;}.", k, "-bubble-markdown th,.", k, "-bubble-markdown td{padding:8px 12px;border:1px solid ", bubble.markdownBorderColor, ";text-align:left;vertical-align:top;}.", k, "-bubble-markdown th{font-weight:600;background:", bubble.markdownTableHeadBg, ";}.", k, "-bubble-markdown blockquote{padding-left:12px;border-left:3px solid ", setAlpha(theme.color.text, 0.16), ";background:", bubble.markdownBlockquoteBg, ";border-radius:0 10px 10px 0;padding:8px 12px;opacity:0.96;}.", k, "-bubble-markdown blockquote>:last-child{margin-bottom:0;}&.", k, "-bubble-start{align-items:flex-start;}&.", k, "-bubble-start .", k, "-bubble-main{align-items:flex-start;}&.", k, "-bubble-end{align-items:flex-end;}&.", k, "-bubble-end .", k, "-bubble-main{align-items:flex-end;}&.", k, "-bubble-end .", k, "-bubble-meta{flex-direction:row-reverse;justify-content:flex-end;}&.", k, "-bubble-end .", k, "-bubble-header{text-align:right;}&.", k, "-bubble-middle{align-items:center;}&.", k, "-bubble-middle .", k, "-bubble-main{align-items:center;}&.", k, "-bubble-middle .", k, "-bubble-meta{justify-content:center;}&.", k, "-bubble-middle .", k, "-bubble-header{text-align:center;}&.", k, "-bubble-filled .", k, "-bubble-content{background:", bubble.filledBg, ";color:", bubble.filledColor, ";border:", bubble.filledBorder, ";}&.", k, "-bubble-outlined .", k, "-bubble-content{background:", bubble.outlinedBg, ";color:", bubble.outlinedColor, ";border:", bubble.outlinedBorder, ";}&.", k, "-bubble-plain .", k, "-bubble-content{background:", bubble.plainBg, ";color:", bubble.plainColor, ";border:", bubble.plainBorder, ";padding:0;}&.", k, "-bubble-round .", k, "-bubble-content{border-radius:", bubble.roundBorderRadius, ";}&.", k, "-bubble-corner.", k, "-bubble-start .", k, "-bubble-content{border-radius:", bubble.borderRadius, " ", bubble.borderRadius, " ", bubble.borderRadius, " 0;}&.", k, "-bubble-corner.", k, "-bubble-end .", k, "-bubble-content{border-radius:", bubble.borderRadius, " ", bubble.borderRadius, " 0 ", bubble.borderRadius, ";}&.", k, "-bubble-corner.", k, "-bubble-middle .", k, "-bubble-content{border-radius:", bubble.borderRadius, ";}&.", k, "-bubble-square .", k, "-bubble-content{border-radius:", bubble.borderRadius, ";}@keyframes ", k, "-bubble-loading-bounce{0%,80%,100%{transform:translateY(0) scale(0.9);opacity:0.45;}40%{transform:translateY(-5px) scale(1);opacity:1;}}")
76335
+ css("display:flex;flex-direction:column;align-items:flex-start;width:100%;.", k, "-bubble-main{display:flex;flex-direction:column;gap:8px;min-width:0;align-items:flex-start;}.", k, "-bubble-meta{display:flex;align-items:center;gap:8px;min-width:0;}.", k, "-bubble-header{color:", bubble.roleNameColor, ";font-size:14px;font-weight:500;min-width:0;text-align:left;}.", k, "-bubble-content{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%;padding:", bubble.padding, ";box-sizing:border-box;line-height:1.6;word-break:break-word;overflow-wrap:anywhere;transition:background ", theme.transition.small, ",border-color ", theme.transition.small, ";}.", k, "-bubble-content>*{min-width:0;max-width:100%;}.", k, "-bubble-attachments{display:flex;flex-direction:column;gap:12px;min-width:0;max-width:100%;}.", k, "-bubble-before-content{min-width:0;width:100%;}.", k, "-bubble-text{white-space:pre-wrap;}.", k, "-bubble-typing-suffix{display:inline-flex;align-items:center;gap:4px;width:26px;height:6px;line-height:0;}.", k, "-bubble-typing-suffix span{width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at center, #F8F9FA 0%, #D0D5D9 100%);animation:", k, "-bubble-typing-suffix-pulse 1.2s ease-in-out infinite;}.", k, "-bubble-typing-suffix span:nth-child(2){animation-delay:0.16s;}.", k, "-bubble-typing-suffix span:nth-child(3){animation-delay:0.32s;}.", k, "-bubble-loading{display:inline-flex;align-items:center;gap:8px;color:", bubble.loadingTextColor, ";min-height:20px;}.", k, "-bubble-loading-dot{width:", bubble.loadingDotSize, ";height:", bubble.loadingDotSize, ";border-radius:50%;background:", bubble.loadingDotColor, ";display:inline-block;animation:", k, "-bubble-loading-bounce 1s ease-in-out infinite;box-shadow:0 0 0 1px ", setAlpha(theme.color.primary, 0.04), ";}.", k, "-bubble-loading-dot:nth-of-type(2){animation-delay:0.14s;}.", k, "-bubble-loading-dot:nth-of-type(3){animation-delay:0.28s;}.", k, "-bubble-footer{display:flex;align-items:center;gap:4px;}.", k, "-bubble-extra{color:", bubble.extraColor, ";font-size:12px;line-height:1.5;}.", k, "-bubble-avatar{width:", bubble.avatarSize, ";height:", bubble.avatarSize, ";flex:0 0 ", bubble.avatarSize, ";border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:", bubble.avatarBg, ";color:", bubble.avatarColor, ";font-size:", bubble.avatarFontSize, ";font-weight:600;}.", k, "-bubble-avatar-image{width:100%;height:100%;object-fit:cover;display:block;}.", k, "-bubble-markdown{color:inherit;overflow-x:auto;}.", k, "-bubble-markdown>:first-child{margin-top:0;}.", k, "-bubble-markdown>:last-child{margin-bottom:0;}.", k, "-bubble-markdown [data-kpc-bubble-markdown-tail]{display:inline;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;}.", k, "-bubble-markdown p,.", k, "-bubble-markdown ul,.", k, "-bubble-markdown ol,.", k, "-bubble-markdown blockquote,.", k, "-bubble-markdown pre,.", k, "-bubble-markdown table,.", k, "-bubble-markdown hr,.", k, "-bubble-markdown h1,.", k, "-bubble-markdown h2,.", k, "-bubble-markdown h3,.", k, "-bubble-markdown h4,.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{margin:0 0 10px;}.", k, "-bubble-markdown ul,.", k, "-bubble-markdown ol{padding-left:20px;list-style-position:outside;}.", k, "-bubble-markdown ul{list-style-type:disc;}.", k, "-bubble-markdown ul ul{list-style-type:circle;}.", k, "-bubble-markdown ul ul ul{list-style-type:square;}.", k, "-bubble-markdown ol{list-style-type:decimal;}.", k, "-bubble-markdown ol ol{list-style-type:lower-alpha;}.", k, "-bubble-markdown li{margin:6px 0;}.", k, "-bubble-markdown li>p{margin:6px 0 0;}.", k, "-bubble-markdown h1,.", k, "-bubble-markdown h2,.", k, "-bubble-markdown h3,.", k, "-bubble-markdown h4,.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{color:", bubble.markdownHeadingColor, ";font-weight:600;line-height:1.35;}.", k, "-bubble-markdown h1{font-size:22px;}.", k, "-bubble-markdown h2{font-size:18px;}.", k, "-bubble-markdown h3{font-size:16px;}.", k, "-bubble-markdown h4{font-size:14px;}.", k, "-bubble-markdown h5,.", k, "-bubble-markdown h6{font-size:13px;}.", k, "-bubble-markdown a{color:", bubble.markdownLinkColor, ";text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}.", k, "-bubble-markdown a:hover{opacity:0.88;}.", k, "-bubble-markdown code{display:inline-block;padding:0 6px;border-radius:4px;background:", bubble.markdownCodeBg, ";color:", bubble.markdownCodeColor, ";font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:12px;white-space:break-spaces;}.", k, "-bubble-markdown strong,.", k, "-bubble-markdown b{font-weight:600;}.", k, "-bubble-markdown img{display:block;max-width:100%;height:auto;margin:12px 0;border-radius:12px;}.", k, "-bubble-markdown hr{height:1px;border:0;background:", bubble.markdownBorderColor, ";}.", k, "-bubble-markdown pre{padding:0px;overflow:auto;background:", bubble.markdownPreBg, ";color:", bubble.markdownPreColor, ";border:1px solid ", setAlpha('#ffffff', 0.06), ";}.", k, "-bubble-markdown pre code{display:block;padding:4px;background:transparent;color:inherit;white-space:pre;word-break:normal;overflow-wrap:normal;}.", k, "-bubble-markdown .hljs{background:transparent;color:inherit;}.", k, "-bubble-markdown .hljs-comment,.", k, "-bubble-markdown .hljs-quote{color:#8fa1b3;}.", k, "-bubble-markdown .hljs-keyword,.", k, "-bubble-markdown .hljs-selector-tag,.", k, "-bubble-markdown .hljs-literal,.", k, "-bubble-markdown .hljs-section,.", k, "-bubble-markdown .hljs-link{color:#ffb86c;}.", k, "-bubble-markdown .hljs-string,.", k, "-bubble-markdown .hljs-title,.", k, "-bubble-markdown .hljs-name,.", k, "-bubble-markdown .hljs-type,.", k, "-bubble-markdown .hljs-attribute,.", k, "-bubble-markdown .hljs-symbol,.", k, "-bubble-markdown .hljs-bullet,.", k, "-bubble-markdown .hljs-addition{color:#7ee787;}.", k, "-bubble-markdown .hljs-number,.", k, "-bubble-markdown .hljs-built_in,.", k, "-bubble-markdown .hljs-builtin-name,.", k, "-bubble-markdown .hljs-variable,.", k, "-bubble-markdown .hljs-template-variable{color:#79c0ff;}.", k, "-bubble-markdown .hljs-deletion{color:#ff7b72;}.", k, "-bubble-markdown table{width:100%;border-collapse:collapse;border-spacing:0;border:1px solid ", bubble.markdownBorderColor, ";border-radius:10px;overflow:hidden;font-size:12px;background:transparent;}.", k, "-bubble-markdown th,.", k, "-bubble-markdown td{padding:8px 12px;border:1px solid ", bubble.markdownBorderColor, ";text-align:left;vertical-align:top;}.", k, "-bubble-markdown th{font-weight:600;background:", bubble.markdownTableHeadBg, ";}.", k, "-bubble-markdown blockquote{padding-left:12px;border-left:3px solid ", setAlpha(theme.color.text, 0.16), ";background:", bubble.markdownBlockquoteBg, ";border-radius:0 10px 10px 0;padding:8px 12px;opacity:0.96;}.", k, "-bubble-markdown blockquote>:last-child{margin-bottom:0;}&.", k, "-bubble-start{align-items:flex-start;}&.", k, "-bubble-start .", k, "-bubble-main{align-items:flex-start;}&.", k, "-bubble-end{align-items:flex-end;}&.", k, "-bubble-end .", k, "-bubble-main{align-items:flex-end;}&.", k, "-bubble-end .", k, "-bubble-meta{flex-direction:row-reverse;justify-content:flex-end;}&.", k, "-bubble-end .", k, "-bubble-header{text-align:right;}&.", k, "-bubble-middle{align-items:center;}&.", k, "-bubble-middle .", k, "-bubble-main{align-items:center;}&.", k, "-bubble-middle .", k, "-bubble-meta{justify-content:center;}&.", k, "-bubble-middle .", k, "-bubble-header{text-align:center;}&.", k, "-bubble-filled .", k, "-bubble-content{background:", bubble.filledBg, ";color:", bubble.filledColor, ";border:", bubble.filledBorder, ";}&.", k, "-bubble-outlined .", k, "-bubble-content{background:", bubble.outlinedBg, ";color:", bubble.outlinedColor, ";border:", bubble.outlinedBorder, ";}&.", k, "-bubble-plain .", k, "-bubble-content{background:", bubble.plainBg, ";color:", bubble.plainColor, ";border:", bubble.plainBorder, ";padding:0;}&.", k, "-bubble-round .", k, "-bubble-content{border-radius:", bubble.roundBorderRadius, ";}&.", k, "-bubble-corner.", k, "-bubble-start .", k, "-bubble-content{border-radius:0 ", bubble.borderRadius, " ", bubble.borderRadius, " ", bubble.borderRadius, ";}&.", k, "-bubble-corner.", k, "-bubble-end .", k, "-bubble-content{border-radius:", bubble.borderRadius, " 0 ", bubble.borderRadius, " ", bubble.borderRadius, ";}&.", k, "-bubble-corner.", k, "-bubble-middle .", k, "-bubble-content{border-radius:0 0 ", bubble.borderRadius, " ", bubble.borderRadius, ";}&.", k, "-bubble-square .", k, "-bubble-content{border-radius:", bubble.borderRadius, ";}@keyframes ", k, "-bubble-loading-bounce{0%,80%,100%{transform:translateY(0) scale(0.9);opacity:0.45;}40%{transform:translateY(-5px) scale(1);opacity:1;}}@keyframes ", k, "-bubble-typing-suffix-pulse{0%,80%,100%{background:radial-gradient(circle at center, #F8F9FA 0%, #D0D5D9 100%);transform:translateY(0);}40%{background:radial-gradient(circle at center, ", setAlpha(theme.color.primary, 0.45), " 0%, ", theme.color.primary, " 100%);transform:translateY(-1px);}}")
76336
76336
  );
76337
76337
  });
76338
76338
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/bubble/bubble.vdt.js
@@ -76345,6 +76345,9 @@ var bubble_styles_makeStyles = utils_cache(function makeStyles(k) {
76345
76345
  var bubble_vdt_$tmp0 = {
76346
76346
  'className': 'ion-person'
76347
76347
  };
76348
+ var _$tmp1 = {
76349
+ 'aria-hidden': 'true'
76350
+ };
76348
76351
  /* harmony default export */ function bubble_vdt($props, $blocks, $__proto__) {
76349
76352
  var _classNameObj;
76350
76353
  $blocks || ($blocks = {});
@@ -76359,7 +76362,8 @@ var bubble_vdt_$tmp0 = {
76359
76362
  getRoleNameText = _this$display.getRoleNameText,
76360
76363
  getAvatarText = _this$display.getAvatarText,
76361
76364
  hasNonEmptyContentProp = _this$display.hasNonEmptyContentProp,
76362
- getDisplayedContent = _this$display.getDisplayedContent;
76365
+ getDisplayedContent = _this$display.getDisplayedContent,
76366
+ shouldShowTypingSuffix = _this$display.shouldShowTypingSuffix;
76363
76367
  var _this$get = this.get(),
76364
76368
  className = _this$get.className,
76365
76369
  placement = _this$get.placement,
@@ -76416,7 +76420,7 @@ var bubble_vdt_$tmp0 = {
76416
76420
  }, getRestProps(this)), createElementVNode(2, 'div', [showMeta ? createElementVNode(2, 'div', [showAvatar ? createElementVNode(2, 'div', hasAvatarSlot ? avatarSlot : typeof avatar === 'string' && avatar ? createElementVNode(2, 'img', null, 1, index_esm_className(k + "-bubble-avatar-image"), {
76417
76421
  'src': avatar,
76418
76422
  'alt': getRoleNameText() || 'avatar'
76419
- }) : getAvatarText() ? createElementVNode(2, 'span', getAvatarText(), 0) : createUnknownComponentVNode(Icon, bubble_vdt_$tmp0), 0, index_esm_className(k + "-bubble-avatar")) : undefined, showHeader ? createElementVNode(2, 'div', hasRoleNameSlot ? roleNameSlot : createElementVNode(2, 'span', getRoleNameText(), 0), 0, index_esm_className(k + "-bubble-header")) : undefined], 0, index_esm_className(k + "-bubble-meta")) : undefined, showBeforeContent ? createElementVNode(2, 'div', beforeContentSlot, 0, index_esm_className(k + "-bubble-before-content")) : undefined, showContent ? createElementVNode(2, 'div', [showAttachments ? createElementVNode(2, 'div', attachmentsSlot, 0, index_esm_className(k + "-bubble-attachments")) : undefined, showLoadingShell ? hasLoadingSlot ? loadingSlot : createElementVNode(2, 'div', [createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot")), createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot")), createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot"))], 4, index_esm_className(k + "-bubble-loading")) : hasContentSlot ? contentSlot : children ? children : hasNonEmptyContentProp() || getDisplayedContent() ? createElementVNode(2, 'div', getDisplayedContent(), 0, index_esm_className(k + "-bubble-text")) : undefined, hasBottomSlot ? createElementVNode(2, 'div', bottomSlot, 0, index_esm_className(k + "-bubble-bottom")) : undefined], 0, index_esm_className(k + "-bubble-content")) : undefined, showFooter ? createElementVNode(2, 'div', footerSlot, 0, index_esm_className(k + "-bubble-footer")) : undefined, hasExtraSlot ? createElementVNode(2, 'div', extraSlot, 0, index_esm_className(k + "-bubble-extra")) : undefined], 0, index_esm_className(k + "-bubble-main"), {
76423
+ }) : getAvatarText() ? createElementVNode(2, 'span', getAvatarText(), 0) : createUnknownComponentVNode(Icon, bubble_vdt_$tmp0), 0, index_esm_className(k + "-bubble-avatar")) : undefined, showHeader ? createElementVNode(2, 'div', hasRoleNameSlot ? roleNameSlot : createElementVNode(2, 'span', getRoleNameText(), 0), 0, index_esm_className(k + "-bubble-header")) : undefined], 0, index_esm_className(k + "-bubble-meta")) : undefined, showBeforeContent ? createElementVNode(2, 'div', beforeContentSlot, 0, index_esm_className(k + "-bubble-before-content")) : undefined, showContent ? createElementVNode(2, 'div', [showAttachments ? createElementVNode(2, 'div', attachmentsSlot, 0, index_esm_className(k + "-bubble-attachments")) : undefined, showLoadingShell ? hasLoadingSlot ? loadingSlot : createElementVNode(2, 'div', [createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot")), createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot")), createElementVNode(2, 'span', null, 1, index_esm_className(k + "-bubble-loading-dot"))], 4, index_esm_className(k + "-bubble-loading")) : hasContentSlot ? contentSlot : children ? children : hasNonEmptyContentProp() || getDisplayedContent() ? createElementVNode(2, 'div', getDisplayedContent(), 0, index_esm_className(k + "-bubble-text")) : undefined, shouldShowTypingSuffix() ? createElementVNode(2, 'div', [createElementVNode(2, 'span'), createElementVNode(2, 'span'), createElementVNode(2, 'span')], 4, index_esm_className(k + "-bubble-typing-suffix"), _$tmp1) : undefined, hasBottomSlot ? createElementVNode(2, 'div', bottomSlot, 0, index_esm_className(k + "-bubble-bottom")) : undefined], 0, index_esm_className(k + "-bubble-content")) : undefined, showFooter ? createElementVNode(2, 'div', footerSlot, 0, index_esm_className(k + "-bubble-footer")) : undefined, hasExtraSlot ? createElementVNode(2, 'div', extraSlot, 0, index_esm_className(k + "-bubble-extra")) : undefined], 0, index_esm_className(k + "-bubble-main"), {
76420
76424
  'style': getBubbleStyle()
76421
76425
  })) : undefined;
76422
76426
  }
@@ -76676,6 +76680,13 @@ function useBubbleDisplay() {
76676
76680
  function isTypingActive() {
76677
76681
  return !!instance.get('$typingActive');
76678
76682
  }
76683
+ function shouldShowTypingSuffix() {
76684
+ var typing = instance.get('typing');
76685
+ if (!typing) return false;
76686
+ if (typeof typing === 'boolean') return false;
76687
+ if (typing.suffix !== true) return false;
76688
+ return !instance.get('loading') && (isTypingActive() || !!instance.get('streaming'));
76689
+ }
76679
76690
  function getBubbleStyle() {
76680
76691
  var maxWidthString = instance.get('maxWidthString');
76681
76692
  if (!maxWidthString) return;
@@ -76714,6 +76725,7 @@ function useBubbleDisplay() {
76714
76725
  shouldShowContentBlock: shouldShowContentBlock,
76715
76726
  shouldShowLoadingShell: shouldShowLoadingShell,
76716
76727
  getDisplayedContent: getDisplayedContent,
76728
+ shouldShowTypingSuffix: shouldShowTypingSuffix,
76717
76729
  isTypingActive: isTypingActive,
76718
76730
  getBubbleStyle: getBubbleStyle,
76719
76731
  getRoleNameText: getRoleNameText,
@@ -76900,7 +76912,7 @@ MemoBlock.template = function () {
76900
76912
 
76901
76913
  var bubbleList_styles_defaults = {
76902
76914
  gap: '12px',
76903
- paddingInline: '8px',
76915
+ scrollbarGap: '6px',
76904
76916
  scrollToBottomBg: '#fff',
76905
76917
  scrollToBottomColor: '#97A3B6',
76906
76918
  scrollToBottomBorder: "1px solid " + setAlpha(theme.color.border, 0.72),
@@ -76927,7 +76939,7 @@ var bubbleList_styles_makeStyles = utils_cache(function makeStyles(k) {
76927
76939
  return (
76928
76940
  /*#__PURE__*/
76929
76941
  /*#__PURE__*/
76930
- css("position:relative;display:flex;flex-direction:column;gap:", bubbleList.gap, ";width:100%;min-height:0;.", k, "-bubble-list-scroll{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;width:100%;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:", bubbleList.scrollThumb, " ", bubbleList.scrollbarTrack, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar{width:10px;height:10px;}.", k, "-bubble-list-scroll::-webkit-scrollbar-track{background:", bubbleList.scrollbarTrack, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar-thumb{background:", bubbleList.scrollThumb, ";border-radius:999px;border:2px solid transparent;background-clip:content-box;transition:background ", theme.transition.small, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar-thumb:hover{background:", bubbleList.scrollThumbHover, ";background-clip:content-box;}.", k, "-bubble-list-scroll-content{min-height:100%;display:flex;flex-direction:column;box-sizing:border-box;padding-inline:", bubbleList.paddingInline, ";}.", k, "-bubble-list-history{display:flex;justify-content:center;color:", bubbleList.auxiliaryColor, ";font-size:12px;line-height:1.5;padding:4px 0 8px;flex:0 0 auto;}.", k, "-bubble-list-items{display:flex;flex-direction:column;gap:", bubbleList.gap, ";width:100%;}.", k, "-bubble-list-item{width:100%;min-width:0;}.", k, "-bubble-list-empty{min-height:100%;display:flex;align-items:center;justify-content:center;color:", bubbleList.auxiliaryColor, ";padding:24px 16px;text-align:center;box-sizing:border-box;}.", k, "-bubble-list-scroll-to-bottom{position:absolute;right:16px;bottom:16px;z-index:1;}.", k, "-bubble-list-scroll-to-bottom-button{border:", bubbleList.scrollToBottomBorder, ";background:", bubbleList.scrollToBottomBg, ";color:", bubbleList.scrollToBottomColor, ";border-radius:999px;box-shadow:", bubbleList.scrollToBottomShadow, ";width:", bubbleList.scrollToBottomSize, ";height:", bubbleList.scrollToBottomSize, ";display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:18px;line-height:1;cursor:pointer;transition:background ", theme.transition.small, ",border-color ", theme.transition.small, ",color ", theme.transition.small, ",transform ", theme.transition.small, ",box-shadow ", theme.transition.small, ";}.", k, "-bubble-list-scroll-to-bottom-button:hover{background:", bubbleList.scrollToBottomHoverBg, ";color:", bubbleList.scrollToBottomHoverColor, ";border:", bubbleList.scrollToBottomHoverBorder, ";transform:translateY(-1px);box-shadow:0 14px 30px ", setAlpha('#000', 0.16), ";}.", k, "-bubble-list-scroll-to-bottom-button:focus-visible{outline:0;color:", bubbleList.scrollToBottomHoverColor, ";border:", bubbleList.scrollToBottomHoverBorder, ";box-shadow:0 0 0 4px ", setAlpha(theme.color.primary, 0.14), ",0 10px 28px ", setAlpha('#000', 0.12), ";}.", k, "-bubble-list-scroll-to-bottom-icon{pointer-events:none;font-size:", bubbleList.scrollToBottomIconSize, ";}")
76942
+ css("position:relative;display:flex;flex-direction:column;gap:", bubbleList.gap, ";width:100%;min-height:0;.", k, "-bubble-list-scroll{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;width:100%;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:", bubbleList.scrollThumb, " ", bubbleList.scrollbarTrack, ";}.", k, "-bubble-list-scroll-has-scrollbar{padding-inline-end:", bubbleList.scrollbarGap, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar{width:10px;height:10px;}.", k, "-bubble-list-scroll::-webkit-scrollbar-track{background:", bubbleList.scrollbarTrack, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar-thumb{background:", bubbleList.scrollThumb, ";border-radius:999px;border:2px solid transparent;background-clip:content-box;transition:background ", theme.transition.small, ";}.", k, "-bubble-list-scroll::-webkit-scrollbar-thumb:hover{background:", bubbleList.scrollThumbHover, ";background-clip:content-box;}.", k, "-bubble-list-scroll-content{min-height:100%;display:flex;flex-direction:column;box-sizing:border-box;padding-inline:0;}.", k, "-bubble-list-history{display:flex;justify-content:center;color:", bubbleList.auxiliaryColor, ";font-size:12px;line-height:1.5;padding:4px 0 8px;flex:0 0 auto;}.", k, "-bubble-list-items{display:flex;flex-direction:column;gap:", bubbleList.gap, ";width:100%;}.", k, "-bubble-list-item{width:100%;min-width:0;}.", k, "-bubble-list-empty{min-height:100%;display:flex;align-items:center;justify-content:center;color:", bubbleList.auxiliaryColor, ";padding:24px 16px;text-align:center;box-sizing:border-box;}.", k, "-bubble-list-scroll-to-bottom{position:absolute;right:16px;bottom:16px;z-index:1;}.", k, "-bubble-list-scroll-to-bottom-button{border:", bubbleList.scrollToBottomBorder, ";background:", bubbleList.scrollToBottomBg, ";color:", bubbleList.scrollToBottomColor, ";border-radius:999px;box-shadow:", bubbleList.scrollToBottomShadow, ";width:", bubbleList.scrollToBottomSize, ";height:", bubbleList.scrollToBottomSize, ";display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:18px;line-height:1;cursor:pointer;transition:background ", theme.transition.small, ",border-color ", theme.transition.small, ",color ", theme.transition.small, ",transform ", theme.transition.small, ",box-shadow ", theme.transition.small, ";}.", k, "-bubble-list-scroll-to-bottom-button:hover{background:", bubbleList.scrollToBottomHoverBg, ";color:", bubbleList.scrollToBottomHoverColor, ";border:", bubbleList.scrollToBottomHoverBorder, ";transform:translateY(-1px);box-shadow:0 14px 30px ", setAlpha('#000', 0.16), ";}.", k, "-bubble-list-scroll-to-bottom-button:focus-visible{outline:0;color:", bubbleList.scrollToBottomHoverColor, ";border:", bubbleList.scrollToBottomHoverBorder, ";box-shadow:0 0 0 4px ", setAlpha(theme.color.primary, 0.14), ",0 10px 28px ", setAlpha('#000', 0.12), ";}.", k, "-bubble-list-scroll-to-bottom-icon{pointer-events:none;font-size:", bubbleList.scrollToBottomIconSize, ";}")
76931
76943
  );
76932
76944
  });
76933
76945
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/bubbleList/bubbleList.vdt.js
@@ -76941,6 +76953,7 @@ var bubbleList_styles_makeStyles = utils_cache(function makeStyles(k) {
76941
76953
 
76942
76954
  /* harmony default export */ function bubbleList_vdt($props, $blocks, $__proto__) {
76943
76955
  var _classNameObj,
76956
+ _$cn2,
76944
76957
  _this = this;
76945
76958
  $blocks || ($blocks = {});
76946
76959
  $props || ($props = {});
@@ -76960,6 +76973,7 @@ var bubbleList_styles_makeStyles = utils_cache(function makeStyles(k) {
76960
76973
  shouldShowScrollToBottom = _this$bubbleList.shouldShowScrollToBottom,
76961
76974
  getDefaultHistoryLoadingText = _this$bubbleList.getDefaultHistoryLoadingText,
76962
76975
  onScrollToBottomClick = _this$bubbleList.onScrollToBottomClick;
76976
+ var hasScrollbar = this.get('$hasScrollbar');
76963
76977
  var _this$get = this.get(),
76964
76978
  className = _this$get.className,
76965
76979
  style = _this$get.style,
@@ -77049,7 +77063,7 @@ var bubbleList_styles_makeStyles = utils_cache(function makeStyles(k) {
77049
77063
  'list': this,
77050
77064
  'slotRenderers': getSlotRenderers($value, $key)
77051
77065
  }), 2, null, null, getItemKey($value, $key), getItemRef($value, $key));
77052
- }, $this), 8, index_esm_className(k + "-bubble-list-items"))], 0, index_esm_className(k + "-bubble-list-scroll-content"), null, null, scrollContentRef), 2, index_esm_className(k + "-bubble-list-scroll"), {
77066
+ }, $this), 8, index_esm_className(k + "-bubble-list-items"))], 0, index_esm_className(k + "-bubble-list-scroll-content"), null, null, scrollContentRef), 2, index_esm_className((_$cn2 = {}, _$cn2[k + "-bubble-list-scroll"] = true, _$cn2[k + "-bubble-list-scroll-has-scrollbar"] = hasScrollbar, _$cn2)), {
77053
77067
  'ev-scroll': handleScroll
77054
77068
  }, null, scrollBoxRef), hasListFooterSlot ? createElementVNode(2, 'div', listFooterSlot, 0, index_esm_className(k + "-bubble-list-footer")) : undefined, shouldShowScrollToBottom() ? createElementVNode(2, 'div', $blocks.scrollToBottom ? (_$blocks['scrollToBottom'] = function ($super) {
77055
77069
  return null;
@@ -77156,6 +77170,11 @@ function useBubbleList() {
77156
77170
  if (instance.get(key) === value) return;
77157
77171
  instance.set(key, value);
77158
77172
  }
77173
+ function syncScrollbarState() {
77174
+ var scrollBox = getScrollBox();
77175
+ var hasScrollbar = !!scrollBox && scrollBox.scrollHeight - scrollBox.clientHeight > 1;
77176
+ setInternalState('$hasScrollbar', hasScrollbar);
77177
+ }
77159
77178
  function setIsAtBottom(value) {
77160
77179
  if (instance.get('$isAtBottom') === value) return;
77161
77180
  setInternalState('$isAtBottom', value);
@@ -77281,6 +77300,7 @@ function useBubbleList() {
77281
77300
  scrollBox.scrollTop += delta;
77282
77301
  }
77283
77302
  function syncScrollState() {
77303
+ syncScrollbarState();
77284
77304
  var atBottom = isAtBottom();
77285
77305
  setIsAtBottom(atBottom);
77286
77306
  setAutoScrollActive(atBottom);
@@ -77483,6 +77503,7 @@ function useBubbleList() {
77483
77503
  function onMountedCallback() {
77484
77504
  nextTick(function () {
77485
77505
  mountResizeObserver();
77506
+ syncScrollbarState();
77486
77507
  if (isAutoScrollEnabled()) {
77487
77508
  scrollToBottom('auto');
77488
77509
  requestAnimationFrame(function () {
@@ -93248,6 +93269,10 @@ __decorate([utils_bind], Editable.prototype, "setValue", null);
93248
93269
  // 资源内联,避免框架包构建时依赖额外图片文件复制。
93249
93270
  var mediaAudioCardSvg = ['<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">', '<g clip-path="url(#clip0_24923_23617)">', '<path d="M1.19995 2.4C1.19995 1.07452 2.27447 0 3.59995 0H14.4017L22.8 8.39355V21.6C22.8 22.9255 21.7254 24 20.4 24H3.59995C2.27447 24 1.19995 22.9255 1.19995 21.6V2.4Z" fill="url(#paint0_linear_24923_23617)"/>', '<path d="M15.7916 10.2829C15.1728 10.2829 14.5793 10.037 14.1417 9.59944C13.7041 9.16185 13.4583 8.56836 13.4583 7.94952H12.2916V13.6429C11.805 13.3177 11.2236 13.1645 10.64 13.2076C10.0563 13.2507 9.50381 13.4876 9.07021 13.8807C8.63661 14.2738 8.3468 14.8005 8.24683 15.3771C8.14687 15.9537 8.24247 16.5473 8.51845 17.0634C8.79444 17.5794 9.23497 17.9885 9.77007 18.2255C10.3052 18.4626 10.9041 18.514 11.4718 18.3716C12.0395 18.2293 12.5433 17.9013 12.9032 17.4398C13.2631 16.9783 13.4585 16.4098 13.4583 15.8245V10.5541C14.0993 11.1296 14.9301 11.4484 15.7916 11.4495V10.2829Z" fill="white"/>', '<g filter="url(#filter0_f_24923_23617)">', '<path d="M13.8 0L22.8 9H16.2C14.8746 9 13.8 7.92548 13.8 6.6V0Z" fill="#FA655E"/>', '</g>', '<path d="M14.3999 0L22.7999 8.4H16.7999C15.4744 8.4 14.3999 7.32548 14.3999 6V0Z" fill="#FEC6C2"/>', '</g>', '<defs>', '<filter id="filter0_f_24923_23617" x="10.8" y="-3" width="15" height="15" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">', '<feFlood flood-opacity="0" result="BackgroundImageFix"/>', '<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>', '<feGaussianBlur stdDeviation="1.5" result="effect1_foregroundBlur_24923_23617"/>', '</filter>', '<linearGradient id="paint0_linear_24923_23617" x1="1.19995" y1="0" x2="25.2" y2="24" gradientUnits="userSpaceOnUse">', '<stop stop-color="#FDA79C"/>', '<stop offset="1" stop-color="#FF8787"/>', '</linearGradient>', '<clipPath id="clip0_24923_23617">', '<rect width="24" height="24" fill="white"/>', '</clipPath>', '</defs>', '</svg>'].join('');
93250
93271
  var mediaAudioCardUrl = "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(mediaAudioCardSvg);
93272
+ var mediaImagePlaceholderSvg = ['<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">', '<path d="M4.5 7C5.32842 7 6 6.32842 6 5.5C6 4.67158 5.32842 4 4.5 4C3.67158 4 3 4.67158 3 5.5C3 6.32842 3.67158 7 4.5 7Z" fill="#C2C2CA"/>', '<path d="M8.90229 7.24208C9.17247 6.91269 9.7174 6.9208 9.9756 7.25809L12.8799 11.0521C13.1859 11.4518 12.8719 12 12.3369 12H5L8.90229 7.24208Z" fill="#C2C2CA" stroke="#C2C2CA" stroke-linecap="round" stroke-linejoin="round"/>', '<rect x="1" y="3" width="13" height="9" rx="1" stroke="#C2C2CA" stroke-linejoin="round"/>', '</svg>'].join('');
93273
+ var mediaImagePlaceholderUrl = "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(mediaImagePlaceholderSvg);
93274
+ var mediaVideoPlaceholderSvg = ['<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">', '<path d="M1.33282 4.4165C1.33282 3.86422 1.78054 3.4165 2.33282 3.4165H9.98913C10.5414 3.4165 10.9891 3.86422 10.9891 4.4165V11.5833C10.9891 12.1356 10.5414 12.5833 9.98913 12.5833H2.33282C1.78054 12.5833 1.33282 12.1356 1.33282 11.5833V4.4165Z" fill="#C2C2CA" stroke="#C2C2CA" stroke-linecap="square"/>', '<path d="M14 4.40059V11.5827C14 11.7506 13.8056 11.8438 13.6747 11.7386L11 9.58943V6.25554L13.6798 4.24073C13.8116 4.14163 14 4.23567 14 4.40059Z" fill="#C2C2CA" stroke="#C2C2CA" stroke-linecap="square"/>', '<path d="M8.8 5C8.91046 5 9 5.08954 9 5.2V5.8C9 5.91046 8.91046 6 8.8 6H5.2C5.08954 6 5 5.91046 5 5.8V5.2C5 5.08954 5.08954 5 5.2 5H8.8Z" fill="white"/>', '</svg>'].join('');
93275
+ var mediaVideoPlaceholderUrl = "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(mediaVideoPlaceholderSvg);
93251
93276
  var mediaImageCardErrorSvg = ['<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">', '<g clip-path="url(#clip0_25770_6783)">', '<path d="M1.6001 3.2C1.6001 1.43269 3.03279 0 4.8001 0H19.2024L30.4001 11.1914V28.8C30.4001 30.5673 28.9674 32 27.2001 32H4.8001C3.03279 32 1.6001 30.5673 1.6001 28.8V3.2Z" fill="url(#paint0_linear_25770_6783)"/>', '<path d="M8.24289 22.3474L11.1107 18.1323C11.1475 18.0783 11.1956 18.033 11.2518 17.9996C11.3079 17.9663 11.3707 17.9457 11.4357 17.9393C11.5007 17.9329 11.5664 17.9408 11.628 17.9626C11.6895 17.9844 11.7456 18.0194 11.7921 18.0652L13.6875 19.9222L17.8459 13.4042C17.8871 13.3395 17.9442 13.2865 18.0119 13.2504C18.0795 13.2142 18.1553 13.1961 18.232 13.1979C18.3086 13.1996 18.3835 13.2211 18.4495 13.2602C18.5154 13.2993 18.5701 13.3548 18.6084 13.4213L23.7752 22.3756C23.8144 22.4434 23.8351 22.5203 23.8351 22.5986C23.8352 22.6769 23.8146 22.7539 23.7754 22.8217C23.7362 22.8896 23.6799 22.9459 23.612 22.985C23.5441 23.0241 23.4672 23.0447 23.3888 23.0446H8.61173C8.53054 23.0447 8.45085 23.0227 8.38126 22.9809C8.31167 22.9391 8.25481 22.8791 8.21683 22.8074C8.17885 22.7356 8.16118 22.6548 8.16574 22.5738C8.1703 22.4927 8.19691 22.4145 8.2427 22.3474H8.24289Z" fill="white"/>', '<path d="M9.10168 12.8034C9.10168 13.3996 9.33855 13.9715 9.76017 14.3931C10.1818 14.8147 10.7536 15.0516 11.3499 15.0516C11.9462 15.0516 12.518 14.8147 12.9396 14.3931C13.3612 13.9715 13.5981 13.3996 13.5981 12.8034C13.5981 12.2071 13.3612 11.6353 12.9396 11.2137C12.518 10.792 11.9462 10.5552 11.3499 10.5552C10.7536 10.5552 10.1818 10.792 9.76017 11.2137C9.33855 11.6353 9.10168 12.2071 9.10168 12.8034Z" fill="white"/>', '<g filter="url(#filter0_f_25770_6783)">', '<path d="M18.4001 0L30.4001 12H21.6001C19.8328 12 18.4001 10.5673 18.4001 8.8V0Z" fill="#C9CAD6"/>', '</g>', '<path d="M19.2001 0L30.4001 11.2H22.4001C20.6328 11.2 19.2001 9.76731 19.2001 8V0Z" fill="#F2F2F3"/>', '</g>', '<defs>', '<filter id="filter0_f_25770_6783" x="14.4001" y="-4" width="20" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">', '<feFlood flood-opacity="0" result="BackgroundImageFix"/>', '<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>', '<feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_25770_6783"/>', '</filter>', '<linearGradient id="paint0_linear_25770_6783" x1="1.6001" y1="0" x2="33.6001" y2="32" gradientUnits="userSpaceOnUse">', '<stop stop-color="#ECECEC"/>', '<stop offset="1" stop-color="#D6DCE7"/>', '</linearGradient>', '<clipPath id="clip0_25770_6783">', '<rect width="32" height="32" fill="white"/>', '</clipPath>', '</defs>', '</svg>'].join('');
93252
93277
  var mediaImageCardErrorUrl = "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(mediaImageCardErrorSvg);
93253
93278
  var mediaVideoCardErrorSvg = ['<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">', '<g clip-path="url(#clip0_25770_6789)">', '<path d="M1.6001 3.2C1.6001 1.43269 3.03279 0 4.8001 0H19.2024L30.4001 11.1914V28.8C30.4001 30.5673 28.9674 32 27.2001 32H4.8001C3.03279 32 1.6001 30.5673 1.6001 28.8V3.2Z" fill="url(#paint0_linear_25770_6789)"/>', '<path d="M13.4815 12.9907C13.2152 12.8215 12.8669 13.0128 12.8669 13.3283V21.8719C12.8669 22.1874 13.2152 22.3787 13.4815 22.2095L20.2025 17.9377C20.4497 17.7805 20.4497 17.4197 20.2025 17.2625L13.4815 12.9907Z" fill="white"/>', '<g filter="url(#filter0_f_25770_6789)">', '<path d="M18.4001 0L30.4001 12H21.6001C19.8328 12 18.4001 10.5673 18.4001 8.8V0Z" fill="#C9CAD6"/>', '</g>', '<path d="M19.2001 0L30.4001 11.2H22.4001C20.6328 11.2 19.2001 9.76731 19.2001 8V0Z" fill="#F2F2F3"/>', '</g>', '<defs>', '<filter id="filter0_f_25770_6789" x="14.4001" y="-4" width="20" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">', '<feFlood flood-opacity="0" result="BackgroundImageFix"/>', '<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>', '<feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_25770_6789"/>', '</filter>', '<linearGradient id="paint0_linear_25770_6789" x1="1.6001" y1="0" x2="33.6001" y2="32" gradientUnits="userSpaceOnUse">', '<stop stop-color="#ECECEC"/>', '<stop offset="1" stop-color="#D6DCE7"/>', '</linearGradient>', '<clipPath id="clip0_25770_6789">', '<rect width="32" height="32" fill="white"/>', '</clipPath>', '</defs>', '</svg>'].join('');
@@ -93455,11 +93480,13 @@ var media_styles_defaults = {
93455
93480
  },
93456
93481
  placeholderBg: 'linear-gradient(180deg, #F5F7FA 0%, #ECEFF4 100%)',
93457
93482
  placeholderColor: '#98A0AF',
93458
- audioCardBg: '#F3F4F6',
93483
+ audioCardBg: '#F3F5F6',
93459
93484
  audioCardTextColor: '#3A3D52',
93460
93485
  overlayBg: 'rgba(15, 23, 42, 0.42)',
93461
93486
  errorTextColor: theme.color.danger,
93462
- loadingSpinnerColor: theme.color.primary,
93487
+ get loadingSpinnerColor() {
93488
+ return theme.color.primary;
93489
+ },
93463
93490
  loadingSkeletonBase: '#EEF1F5',
93464
93491
  loadingSkeletonTo: '#F7F9FC',
93465
93492
  groupGap: '12px',
@@ -93487,7 +93514,7 @@ var makeMediaStyles = utils_cache(function makeMediaStyles(k) {
93487
93514
  return (
93488
93515
  /*#__PURE__*/
93489
93516
  /*#__PURE__*/
93490
- css("&.", k, "-media{position:relative;display:inline-flex;flex:0 0 auto;width:", media.sizes.default, ";height:", media.sizes.default, ";vertical-align:top;box-sizing:border-box;}&.", k, "-media.", k, "-media-mini{width:", media.sizes.mini, ";height:", media.sizes.mini, ";}&.", k, "-media.", k, "-media-small{width:", media.sizes.small, ";height:", media.sizes.small, ";}&.", k, "-media.", k, "-media-large{width:", media.sizes.large, ";height:", media.sizes.large, ";}.", k, "-media-shell{position:relative;width:100%;height:100%;overflow:hidden;border-radius:", media.radius, ";background:", media.placeholderBg, ";box-shadow:inset 0 0 0 1px ", setAlpha('#111827', 0.08), ";}&.", k, "-media-loading .", k, "-media-shell{background:linear-gradient(\n 90deg,\n ", media.loadingSkeletonBase, " 25%,\n ", media.loadingSkeletonTo, " 37%,\n ", media.loadingSkeletonBase, " 63%\n );background-size:400% 100%;animation:", k, "-media-loading-wave 1.4s ease infinite;box-shadow:none;}&.", k, "-media-error .", k, "-media-shell,&.", k, "-media-custom-error .", k, "-media-shell{box-shadow:none;}&.", k, "-media-loading .", k, "-media-shell::before{content:none;}@keyframes ", k, "-media-loading-wave{0%{background-position:100% 50%;}100%{background-position:0 50%;}}.", k, "-media-image,.", k, "-media-video{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;background:#DCE1E9;}&.", k, "-media-loading .", k, "-media-image,&.", k, "-media-loading .", k, "-media-video{background:transparent;}.", k, "-media-audio-loader{display:none;}.", k, "-media-audio-card,.", k, "-media-error-card{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;background:", media.audioCardBg, ";box-sizing:border-box;}.", k, "-media-card-icon{display:block;width:32px;height:32px;flex:0 0 auto;}.", k, "-media-name-tooltip-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.", k, "-media-name-tooltip-trigger{position:absolute;inset:0;z-index:2;outline:none;}&.", k, "-media.", k, "-media-mini .", k, "-media-card-icon{width:24px;height:24px;}&.", k, "-media-loading .", k, "-media-audio-card,.", k, "-media-error-card{background:transparent;}.", k, "-media-placeholder{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;background:", media.placeholderBg, ";color:", media.placeholderColor, ";}.", k, "-media-placeholder .", k, "-icon{font-size:20px;}&.", k, "-media-loading .", k, "-media-placeholder{background:transparent;}&.", k, "-media-mini .", k, "-media-placeholder .", k, "-icon,&.", k, "-media-small .", k, "-media-placeholder .", k, "-icon{font-size:16px;}.", k, "-media-overlay{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:", media.overlayBg, ";opacity:0;pointer-events:none;transition:opacity ", theme.transition.middle, ";}.", k, "-media-preview-trigger,&.", k, "-media-custom-mask .", k, "-media-overlay{pointer-events:auto;}.", k, "-media-video-preview-trigger{position:absolute;inset:0;z-index:4;width:24px;height:24px;margin:auto;pointer-events:auto;}.", k, "-media-loading-indicator{position:absolute;top:3px;left:3px;z-index:3;display:flex;align-items:center;justify-content:center;width:14px;height:14px;pointer-events:none;}.", k, "-media-loading-spinner{width:12px;height:12px;border:1.5px solid ", setAlpha(media.loadingSpinnerColor, 0.22), ";border-top-color:", media.loadingSpinnerColor, ";border-radius:50%;box-sizing:border-box;animation:", k, "-media-loading-spinner 0.8s linear infinite;}@keyframes ", k, "-media-loading-spinner{100%{transform:rotate(360deg);}}.", k, "-media-state-layer{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;box-sizing:border-box;}.", k, "-media-preview-trigger{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;padding:0;border:none;border-radius:0;background:transparent;color:#FFFFFF;cursor:pointer;transition:opacity ", theme.transition.middle, ";}.", k, "-media-preview-trigger:focus{outline:none;}.", k, "-media-preview-trigger .", k, "-icon,.", k, "-media-preview-trigger.ion{font-size:18px;}&.", k, "-media-mini .", k, "-media-preview-trigger .", k, "-icon,&.", k, "-media-small .", k, "-media-preview-trigger .", k, "-icon,&.", k, "-media-mini .", k, "-media-preview-trigger.ion,&.", k, "-media-small .", k, "-media-preview-trigger.ion{font-size:14px;}&.", k, "-media-mini .", k, "-media-video-preview-trigger,&.", k, "-media-small .", k, "-media-video-preview-trigger{width:18px;height:18px;}.", k, "-media-preview-trigger:hover:not(:disabled){background:transparent;}.", k, "-media-preview-trigger:disabled{opacity:0.5;cursor:not-allowed;}&.", k, "-media-mini .", k, "-media-loading-spinner,&.", k, "-media-small .", k, "-media-loading-spinner{width:10px;height:10px;border-width:1px;}&.", k, "-media-mini .", k, "-media-loading-indicator,&.", k, "-media-small .", k, "-media-loading-indicator{top:4px;left:4px;width:10px;height:10px;}&.", k, "-media-previewable:hover .", k, "-media-overlay{opacity:1;}&.", k, "-media-custom-mask:hover .", k, "-media-overlay{opacity:1;}&.", k, "-media-video-play-visible:hover .", k, "-media-overlay{opacity:1;}.", k, "-media-preview-icon.", k, "-icon,.", k, "-media-preview-icon.ion{color:inherit;}")
93517
+ css("&.", k, "-media{position:relative;display:inline-flex;flex:0 0 auto;width:", media.sizes.default, ";height:", media.sizes.default, ";vertical-align:top;box-sizing:border-box;}&.", k, "-media.", k, "-media-mini{width:", media.sizes.mini, ";height:", media.sizes.mini, ";}&.", k, "-media.", k, "-media-small{width:", media.sizes.small, ";height:", media.sizes.small, ";}&.", k, "-media.", k, "-media-large{width:", media.sizes.large, ";height:", media.sizes.large, ";}.", k, "-media-shell{position:relative;width:100%;height:100%;overflow:hidden;border-radius:", media.radius, ";background:", media.placeholderBg, ";box-shadow:inset 0 0 0 1px ", setAlpha('#111827', 0.08), ";}&.", k, "-media-loading .", k, "-media-shell{background:linear-gradient(\n 90deg,\n ", media.loadingSkeletonBase, " 25%,\n ", media.loadingSkeletonTo, " 37%,\n ", media.loadingSkeletonBase, " 63%\n );background-size:400% 100%;animation:", k, "-media-loading-wave 1.4s ease infinite;box-shadow:none;}&.", k, "-media-error .", k, "-media-shell,&.", k, "-media-custom-error .", k, "-media-shell{box-shadow:none;}&.", k, "-media-loading .", k, "-media-shell::before{content:none;}@keyframes ", k, "-media-loading-wave{0%{background-position:100% 50%;}100%{background-position:0 50%;}}.", k, "-media-image,.", k, "-media-video{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;background:#DCE1E9;}&.", k, "-media-loading .", k, "-media-image,&.", k, "-media-loading .", k, "-media-video{background:transparent;}.", k, "-media-visual-hidden{display:none;}.", k, "-media-audio-loader{display:none;}.", k, "-media-audio-card,.", k, "-media-error-card{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;background:", media.audioCardBg, ";box-sizing:border-box;}.", k, "-media-card-icon{display:block;width:32px;height:32px;flex:0 0 auto;}.", k, "-media-name-tooltip-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.", k, "-media-name-tooltip-trigger{position:absolute;inset:0;z-index:2;outline:none;}&.", k, "-media.", k, "-media-mini .", k, "-media-card-icon{width:24px;height:24px;}.", k, "-media-error-card{background:transparent;}.", k, "-media-placeholder{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;background:", media.placeholderBg, ";color:", media.placeholderColor, ";}.", k, "-media-placeholder .", k, "-icon{font-size:20px;}.", k, "-media-placeholder-asset{display:block;width:16px;height:16px;flex:0 0 auto;}&.", k, "-media-loading .", k, "-media-placeholder{background:transparent;}&.", k, "-media-mini .", k, "-media-placeholder .", k, "-icon,&.", k, "-media-small .", k, "-media-placeholder .", k, "-icon{font-size:16px;}.", k, "-media-overlay{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:", media.overlayBg, ";opacity:0;pointer-events:none;transition:opacity ", theme.transition.middle, ";}.", k, "-media-loading-overlay{position:absolute;inset:0;z-index:2;background:", media.overlayBg, ";pointer-events:none;}.", k, "-media-preview-trigger,&.", k, "-media-custom-mask .", k, "-media-overlay{pointer-events:auto;}.", k, "-media-video-preview-trigger{position:absolute;inset:0;z-index:4;width:24px;height:24px;margin:auto;pointer-events:auto;}.", k, "-media-loading-indicator{position:absolute;top:3px;left:3px;z-index:3;display:flex;align-items:center;justify-content:center;width:14px;height:14px;pointer-events:none;}.", k, "-media-loading-spinner{width:12px;height:12px;border:1.5px solid ", setAlpha(media.loadingSpinnerColor, 0.22), ";border-top-color:", media.loadingSpinnerColor, ";border-radius:50%;box-sizing:border-box;animation:", k, "-media-loading-spinner 0.8s linear infinite;}.", k, "-media-loading-video-icon{position:absolute;inset:0;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:auto;color:#FFFFFF;font-size:18px;line-height:1;pointer-events:none;}@keyframes ", k, "-media-loading-spinner{100%{transform:rotate(360deg);}}.", k, "-media-state-layer{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;box-sizing:border-box;}.", k, "-media-preview-trigger{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;padding:0;border:none;border-radius:0;background:transparent;color:#FFFFFF;cursor:pointer;transition:opacity ", theme.transition.middle, ";}.", k, "-media-preview-trigger:focus{outline:none;}.", k, "-media-preview-trigger .", k, "-icon,.", k, "-media-preview-trigger.ion{font-size:18px;}&.", k, "-media-mini .", k, "-media-preview-trigger .", k, "-icon,&.", k, "-media-small .", k, "-media-preview-trigger .", k, "-icon,&.", k, "-media-mini .", k, "-media-preview-trigger.ion,&.", k, "-media-small .", k, "-media-preview-trigger.ion{font-size:14px;}&.", k, "-media-mini .", k, "-media-video-preview-trigger,&.", k, "-media-small .", k, "-media-video-preview-trigger{width:18px;height:18px;}.", k, "-media-preview-trigger:hover:not(:disabled){background:transparent;}.", k, "-media-preview-trigger:disabled{opacity:0.5;cursor:not-allowed;}&.", k, "-media-mini .", k, "-media-loading-spinner,&.", k, "-media-small .", k, "-media-loading-spinner{width:10px;height:10px;border-width:1px;}&.", k, "-media-mini .", k, "-media-loading-indicator,&.", k, "-media-small .", k, "-media-loading-indicator{top:4px;left:4px;width:10px;height:10px;}&.", k, "-media-previewable:hover .", k, "-media-overlay{opacity:1;}&.", k, "-media-custom-mask:hover .", k, "-media-overlay{opacity:1;}&.", k, "-media-video-play-visible:hover .", k, "-media-overlay{opacity:1;}.", k, "-media-preview-icon.", k, "-icon,.", k, "-media-preview-icon.ion{color:inherit;}")
93491
93518
  );
93492
93519
  });
93493
93520
  var makeMediaGroupStyles = utils_cache(function makeMediaGroupStyles(k) {
@@ -93517,7 +93544,7 @@ var media_vdt_$tmp0 = {
93517
93544
  'tabindex': '-1'
93518
93545
  };
93519
93546
  /* harmony default export */ function media_vdt($props, $blocks, $__proto__) {
93520
- var _extends2;
93547
+ var _extends2, _$cn2, _$cn3;
93521
93548
  $blocks || ($blocks = {});
93522
93549
  $props || ($props = {});
93523
93550
  var $this = this;
@@ -93526,6 +93553,7 @@ var media_vdt_$tmp0 = {
93526
93553
  getRootStyle = _this$media.getRootStyle,
93527
93554
  getFileName = _this$media.getFileName,
93528
93555
  isLoading = _this$media.isLoading,
93556
+ shouldShowVisualMediaContent = _this$media.shouldShowVisualMediaContent,
93529
93557
  shouldShowImage = _this$media.shouldShowImage,
93530
93558
  shouldShowVideo = _this$media.shouldShowVideo,
93531
93559
  shouldShowAudioLoader = _this$media.shouldShowAudioLoader,
@@ -93542,15 +93570,18 @@ var media_vdt_$tmp0 = {
93542
93570
  getErrorCardAssetSrc = _this$media.getErrorCardAssetSrc,
93543
93571
  getMediaCardIconStyle = _this$media.getMediaCardIconStyle,
93544
93572
  shouldShowLoadingIndicator = _this$media.shouldShowLoadingIndicator,
93573
+ shouldShowLoadingVideoIcon = _this$media.shouldShowLoadingVideoIcon,
93545
93574
  shouldShowPlaceholder = _this$media.shouldShowPlaceholder,
93546
93575
  getPreviewIconClassName = _this$media.getPreviewIconClassName,
93547
93576
  getPlaceholderIconClassName = _this$media.getPlaceholderIconClassName,
93577
+ getPlaceholderAssetSrc = _this$media.getPlaceholderAssetSrc,
93548
93578
  getPreviewTitle = _this$media.getPreviewTitle,
93549
93579
  onClick = _this$media.onClick,
93550
93580
  onPreview = _this$media.onPreview,
93551
93581
  canPreview = _this$media.canPreview,
93552
93582
  shouldShowVideoPlayTrigger = _this$media.shouldShowVideoPlayTrigger,
93553
93583
  shouldShowMaskLayer = _this$media.shouldShowMaskLayer,
93584
+ shouldShowLoadingOverlay = _this$media.shouldShowLoadingOverlay,
93554
93585
  getViewerItem = _this$media.getViewerItem,
93555
93586
  getMaskValue = _this$media.getMaskValue,
93556
93587
  isStandalonePreviewRendered = _this$media.isStandalonePreviewRendered,
@@ -93594,6 +93625,7 @@ var media_vdt_$tmp0 = {
93594
93625
  theme: 'light'
93595
93626
  }, this.get('nameTooltipProps') || {});
93596
93627
  var mediaName = getFileName();
93628
+ var placeholderAssetSrc = getPlaceholderAssetSrc();
93597
93629
  var audioCard = createElementVNode(2, 'div', createElementVNode(2, 'img', null, 1, index_esm_className(k + "-media-card-icon " + k + "-media-audio-card-icon"), {
93598
93630
  'src': getAudioCardAssetSrc(),
93599
93631
  'alt': '',
@@ -93613,19 +93645,25 @@ var media_vdt_$tmp0 = {
93613
93645
  'title': showNameTooltip ? undefined : getFileName()
93614
93646
  }, getRestProps(this), {
93615
93647
  'ev-click': onClick
93616
- }), [createElementVNode(2, 'div', [shouldShowImage() ? createVNode('img', _extends({
93617
- 'className': index_esm_className(k + "-media-image"),
93648
+ }), [createElementVNode(2, 'div', [shouldShowLoadingOverlay() && !showCustomLoadingLayer ? createElementVNode(2, 'div', null, 1, index_esm_className(k + "-media-loading-overlay")) : undefined, shouldShowImage() ? createVNode('img', _extends({
93649
+ 'className': index_esm_className((_$cn2 = {}, _$cn2[k + "-media-image"] = true, _$cn2[k + "-media-visual-hidden"] = !shouldShowVisualMediaContent(), _$cn2)),
93618
93650
  'ref': imageRef
93619
93651
  }, getImageProps())) : shouldShowVideo() ? createVNode('video', _extends({
93620
93652
  'key': getVideoKey(),
93621
- 'className': index_esm_className(k + "-media-video"),
93653
+ 'className': index_esm_className((_$cn3 = {}, _$cn3[k + "-media-video"] = true, _$cn3[k + "-media-visual-hidden"] = !shouldShowVisualMediaContent(), _$cn3)),
93622
93654
  'ref': videoRef
93623
93655
  }, getVideoProps())) : undefined, shouldShowAudioLoader() ? createVNode('audio', _extends({
93624
93656
  'className': index_esm_className(k + "-media-audio-loader"),
93625
93657
  'ref': audioRef
93626
- }, getAudioLoaderProps())) : undefined, shouldShowErrorCard() && !showCustomErrorLayer ? errorCard : shouldShowAudioCard() && !showCustomStateLayer ? audioCard : shouldShowPlaceholder() && !showCustomLoadingLayer && !showCustomErrorLayer ? createElementVNode(2, 'div', createUnknownComponentVNode(Icon, {
93658
+ }, getAudioLoaderProps())) : undefined, shouldShowErrorCard() && !showCustomErrorLayer ? errorCard : shouldShowAudioCard() && !showCustomStateLayer ? audioCard : shouldShowPlaceholder() && !showCustomLoadingLayer && !showCustomErrorLayer ? createElementVNode(2, 'div', placeholderAssetSrc ? createElementVNode(2, 'img', null, 1, index_esm_className(k + "-media-placeholder-asset"), {
93659
+ 'src': placeholderAssetSrc,
93660
+ 'alt': '',
93661
+ 'draggable': false
93662
+ }) : createUnknownComponentVNode(Icon, {
93627
93663
  'className': index_esm_className(getPlaceholderIconClassName())
93628
- }), 2, index_esm_className(k + "-media-placeholder")) : undefined, shouldShowLoadingIndicator() && !showCustomLoadingLayer ? createElementVNode(2, 'div', createElementVNode(2, 'span', null, 1, index_esm_className(k + "-media-loading-spinner")), 2, index_esm_className(k + "-media-loading-indicator")) : undefined, showNameTooltip ? createUnknownComponentVNode(tooltip_Tooltip, _extends({
93664
+ }), 2, index_esm_className(k + "-media-placeholder")) : undefined, shouldShowLoadingIndicator() && !showCustomLoadingLayer ? createElementVNode(2, 'div', createElementVNode(2, 'span', null, 1, index_esm_className(k + "-media-loading-spinner")), 2, index_esm_className(k + "-media-loading-indicator")) : undefined, shouldShowLoadingVideoIcon() && !showCustomLoadingLayer ? createUnknownComponentVNode(Icon, {
93665
+ 'className': index_esm_className(k + "-media-loading-video-icon ion-ios-play")
93666
+ }) : undefined, showNameTooltip ? createUnknownComponentVNode(tooltip_Tooltip, _extends({
93629
93667
  'className': index_esm_className(k + "-media-name-tooltip")
93630
93668
  }, nameTooltipProps, {
93631
93669
  'children': createElementVNode(2, 'div', null, 1, index_esm_className(k + "-media-name-tooltip-trigger"), media_vdt_$tmp0),
@@ -93856,6 +93894,9 @@ function useMedia() {
93856
93894
  function isDone() {
93857
93895
  return getDisplayStatus() === 'done';
93858
93896
  }
93897
+ function isMediaReady() {
93898
+ return getInternalStatus() === 'done' || isDone();
93899
+ }
93859
93900
  // 自定义遮罩层仅在 default/done 展示,避免与 loading/error 状态层冲突。
93860
93901
  function shouldShowMaskLayer() {
93861
93902
  var status = getDisplayStatus();
@@ -93865,7 +93906,7 @@ function useMedia() {
93865
93906
  return !!instance.get('showPreview') && hasSource() && isDone();
93866
93907
  }
93867
93908
  function shouldShowVideoPlayTrigger() {
93868
- return !!instance.get('showPreview') && shouldShowVideo();
93909
+ return !!instance.get('showPreview') && shouldShowVideo() && isDone();
93869
93910
  }
93870
93911
  // 事件和插槽使用的公共媒体信息。
93871
93912
  function getValue() {
@@ -93930,6 +93971,9 @@ function useMedia() {
93930
93971
  function shouldShowVideo() {
93931
93972
  return getResolvedType() === 'video' && hasSource() && !isError();
93932
93973
  }
93974
+ function shouldShowVisualMediaContent() {
93975
+ return isMediaReady();
93976
+ }
93933
93977
  function shouldShowAudioLoader() {
93934
93978
  return getResolvedType() === 'audio' && hasSource() && !isError();
93935
93979
  }
@@ -93940,7 +93984,7 @@ function useMedia() {
93940
93984
  return isError();
93941
93985
  }
93942
93986
  function shouldShowPlaceholder() {
93943
- return !shouldShowImage() && !shouldShowVideo() && !shouldShowErrorCard();
93987
+ return (!shouldShowImage() || !shouldShowVisualMediaContent()) && (!shouldShowVideo() || !shouldShowVisualMediaContent()) && !shouldShowErrorCard();
93944
93988
  }
93945
93989
  // poster 是组件级视频封面,不从 videoProps 中读取。
93946
93990
  function getPosterSource() {
@@ -93986,6 +94030,13 @@ function useMedia() {
93986
94030
  function shouldShowLoadingIndicator() {
93987
94031
  return isLoading();
93988
94032
  }
94033
+ function shouldShowLoadingOverlay() {
94034
+ var type = getResolvedType();
94035
+ return isLoading() && hasSource() && shouldShowVisualMediaContent() && (type === 'image' || type === 'video');
94036
+ }
94037
+ function shouldShowLoadingVideoIcon() {
94038
+ return isLoading() && getResolvedType() === 'video' && hasSource() && shouldShowVisualMediaContent();
94039
+ }
93989
94040
  // 去掉已被组件接管的事件键,避免作为普通 attribute 透传到 DOM。
93990
94041
  function omitNativeHandlers(props, keys) {
93991
94042
  var nextProps = _extends({}, props);
@@ -94056,13 +94107,18 @@ function useMedia() {
94056
94107
  });
94057
94108
  }
94058
94109
  function getPreviewIconClassName() {
94059
- return getResolvedType() === 'image' ? 'ion-ios-eye-outline' : 'ion-ios-play';
94110
+ return getResolvedType() === 'image' ? 'k-icon-visible' : 'ion-ios-play';
94060
94111
  }
94061
94112
  function getPlaceholderIconClassName() {
94062
94113
  var resolvedType = getResolvedType();
94063
- if (resolvedType === 'video') return 'ion-videocamera';
94064
94114
  if (resolvedType === 'audio') return 'ion-ios-musical-note';
94065
- return 'ion-image';
94115
+ return '';
94116
+ }
94117
+ function getPlaceholderAssetSrc() {
94118
+ var resolvedType = getResolvedType();
94119
+ if (resolvedType === 'video') return mediaVideoPlaceholderUrl;
94120
+ if (resolvedType === 'image') return mediaImagePlaceholderUrl;
94121
+ return '';
94066
94122
  }
94067
94123
  function getPreviewTitle() {
94068
94124
  var resolvedType = getResolvedType();
@@ -94221,6 +94277,7 @@ function useMedia() {
94221
94277
  isLoading: isLoading,
94222
94278
  isError: isError,
94223
94279
  isDone: isDone,
94280
+ shouldShowVisualMediaContent: shouldShowVisualMediaContent,
94224
94281
  shouldShowLoadingIndicator: shouldShowLoadingIndicator,
94225
94282
  shouldShowImage: shouldShowImage,
94226
94283
  shouldShowVideo: shouldShowVideo,
@@ -94238,8 +94295,11 @@ function useMedia() {
94238
94295
  getAudioCardAssetSrc: getAudioCardAssetSrc,
94239
94296
  getErrorCardAssetSrc: getErrorCardAssetSrc,
94240
94297
  getMediaCardIconStyle: getMediaCardIconStyle,
94298
+ shouldShowLoadingOverlay: shouldShowLoadingOverlay,
94299
+ shouldShowLoadingVideoIcon: shouldShowLoadingVideoIcon,
94241
94300
  getPreviewIconClassName: getPreviewIconClassName,
94242
94301
  getPlaceholderIconClassName: getPlaceholderIconClassName,
94302
+ getPlaceholderAssetSrc: getPlaceholderAssetSrc,
94243
94303
  getPreviewTitle: getPreviewTitle,
94244
94304
  onClick: onClick,
94245
94305
  onPreview: onPreview,
@@ -94328,6 +94388,7 @@ Media.events = media_events;
94328
94388
 
94329
94389
  var fileCard_styles_defaults = {
94330
94390
  radius: '4px',
94391
+ mediaRadius: '6px',
94331
94392
  border: '1px solid #E5E8EE',
94332
94393
  titleColor: '#3F3F51',
94333
94394
  descriptionColor: '#868A9C',
@@ -94335,31 +94396,31 @@ var fileCard_styles_defaults = {
94335
94396
  file: {
94336
94397
  mini: {
94337
94398
  width: '160px',
94338
- minHeight: '34px',
94399
+ minHeight: '40px',
94339
94400
  iconSize: '24px',
94340
- padding: '5px 10px',
94401
+ padding: '8px',
94341
94402
  gap: '8px'
94342
94403
  },
94343
94404
  small: {
94344
94405
  width: '160px',
94345
- minHeight: '44px',
94406
+ minHeight: '48px',
94346
94407
  iconSize: '32px',
94347
- padding: '6px 12px',
94408
+ padding: '8px',
94348
94409
  gap: '8px'
94349
94410
  },
94350
94411
  default: {
94351
94412
  width: '160px',
94352
94413
  minHeight: '54px',
94353
94414
  iconSize: '32px',
94354
- padding: '8px 12px',
94415
+ padding: '8px',
94355
94416
  gap: '8px'
94356
94417
  },
94357
94418
  large: {
94358
94419
  width: '192px',
94359
94420
  minHeight: '64px',
94360
94421
  iconSize: '40px',
94361
- padding: '12px 14px',
94362
- gap: '10px'
94422
+ padding: '8px',
94423
+ gap: '8px'
94363
94424
  }
94364
94425
  },
94365
94426
  fileIcon: {
@@ -94381,6 +94442,7 @@ var fileCard_styles_defaults = {
94381
94442
  iconGap: '16px'
94382
94443
  },
94383
94444
  errorMaskBg: 'rgba(21, 27, 30, 0.46)',
94445
+ loadingOverlayBg: 'rgba(15, 23, 42, 0.42)',
94384
94446
  errorTextColor: theme.color.danger,
94385
94447
  actionBg: 'rgba(255, 255, 255, 0.18)',
94386
94448
  actionColor: '#FFFFFF',
@@ -94405,7 +94467,7 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94405
94467
  return (
94406
94468
  /*#__PURE__*/
94407
94469
  /*#__PURE__*/
94408
- css("&.", k, "-file-card{position:relative;display:inline-flex;flex:0 0 auto;align-self:flex-start;vertical-align:top;width:auto;max-width:100%;min-width:0;border:", fileCard.border, ";border-radius:", fileCard.radius, ";background:#FFFFFF;box-sizing:border-box;overflow:visible;}&.", k, "-file-card.", k, "-file-card-file{width:", fileCard.file.small.width, ";min-height:", fileCard.file.small.minHeight, ";border:", fileCard.border, ";border-radius:", fileCard.radius, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-mini{width:", fileCard.file.mini.width, ";min-height:", fileCard.file.mini.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-small{width:", fileCard.file.small.width, ";min-height:", fileCard.file.small.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-default{width:", fileCard.file.default.width, ";min-height:", fileCard.file.default.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-large{width:", fileCard.file.large.width, ";min-height:", fileCard.file.large.minHeight, ";}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-image{border:none;background:transparent;}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-video{border:none;background:transparent;}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-audio{border:none;background:transparent;}.", k, "-file-card-media-shell{position:relative;min-width:0;box-sizing:border-box;}.", k, "-file-card-media-view{display:inline-flex;}.", k, "-file-card-media-status-layer{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;pointer-events:none;}.", k, "-file-card-media-status-layer>*{pointer-events:auto;}.", k, "-file-card-media-error-artwork-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;gap:4px;padding:0 4px;border-radius:inherit;background:#F3F5F6;box-sizing:border-box;}.", k, "-file-card-media-error-artwork-icon{display:block;width:32px;height:32px;flex:0 0 auto;}.", k, "-file-card-file-shell{position:relative;width:100%;min-width:0;border-radius:inherit;overflow:hidden;background:linear-gradient(\n 90deg,\n ", fileCard.progressBg, " 0 var(--file-card-progress-percent, 0%),\n #FFFFFF var(--file-card-progress-percent, 0%) 100%\n );}.", k, "-file-card-file-main{display:flex;align-items:center;width:100%;min-width:0;gap:", fileCard.file.small.gap, ";padding:", fileCard.file.small.padding, ";box-sizing:border-box;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-main{gap:", fileCard.file.mini.gap, ";padding:", fileCard.file.mini.padding, ";}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-main{gap:", fileCard.file.large.gap, ";padding:", fileCard.file.large.padding, ";}&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-main{gap:", fileCard.file.default.gap, ";padding:", fileCard.file.default.padding, ";}.", k, "-file-card-file-icon,.", k, "-file-card-file-media-view{width:", fileCard.file.small.iconSize, ";height:", fileCard.file.small.iconSize, ";flex:0 0 auto;border-radius:4px;overflow:hidden;}.", k, "-file-card-file-icon{display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;letter-spacing:0.04em;color:", fileCard.fileIcon.defaultColor, ";}.", k, "-file-card-file-icon .", k, "-icon{font-size:16px;line-height:1;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-media-view{width:", fileCard.file.mini.iconSize, ";height:", fileCard.file.mini.iconSize, ";}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-icon{font-size:10px;}&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-media-view{width:", fileCard.file.default.iconSize, ";height:", fileCard.file.default.iconSize, ";}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-media-view{width:", fileCard.file.large.iconSize, ";height:", fileCard.file.large.iconSize, ";}.", k, "-file-card-file-icon-img{display:block;width:100%;height:100%;object-fit:cover;}.", k, "-file-card-file-icon-pdf{color:", fileCard.fileIcon.pdfColor, ";}.", k, "-file-card-file-icon-doc{color:", fileCard.fileIcon.docColor, ";}.", k, "-file-card-file-icon-sheet{color:", fileCard.fileIcon.sheetColor, ";}.", k, "-file-card-file-icon-slide{color:", fileCard.fileIcon.slideColor, ";}.", k, "-file-card-file-icon-archive{color:", fileCard.fileIcon.archiveColor, ";}.", k, "-file-card-file-icon-image{color:", fileCard.fileIcon.imageColor, ";}.", k, "-file-card-file-icon-video{color:", fileCard.fileIcon.videoColor, ";}.", k, "-file-card-file-icon-audio{color:", fileCard.fileIcon.audioColor, ";}.", k, "-file-card-file-content{flex:1;min-width:0;}.", k, "-file-card-title{display:flex;align-items:baseline;min-width:0;color:", fileCard.titleColor, ";font-weight:400;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-title{font-size:13px;line-height:18px;}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-title{font-size:15px;line-height:22px;}.", k, "-file-card-title-prefix{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.", k, "-file-card-title-suffix{flex:0 0 auto;white-space:nowrap;}.", k, "-file-card-title-status{color:", fileCard.titleColor, ";}.", k, "-file-card-title-status-error{color:", theme.color.danger, ";}.", k, "-file-card-description{color:", fileCard.descriptionColor, ";font-size:12px;line-height:18px;margin-top:2px;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-description{display:none;}.", k, "-file-card-action{color:inherit;border-radius:999px;background:transparent;transition:background ", theme.transition.small, ",color ", theme.transition.small, ",opacity ", theme.transition.small, ";}.", k, "-file-card-mask{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;}.", k, "-file-card-mask{gap:10px;background:", fileCard.maskBg, ";opacity:0;transition:opacity ", theme.transition.small, ";pointer-events:none;}.", k, "-file-card-error-text{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:0;color:", fileCard.errorTextColor, ";font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.", k, "-file-card-media-error-artwork-text{width:auto;max-width:100%;box-sizing:border-box;color:#FF4433;font-size:12px;line-height:12px;text-shadow:none;}.", k, "-file-card-mask>*{pointer-events:auto;}.", k, "-file-card-mask .", k, "-file-card-action{color:", fileCard.actionColor, ";background:", fileCard.actionBg, ";}.", k, "-file-card-mask .", k, "-file-card-action:hover{background:", fileCard.actionHoverBg, ";}&.", k, "-file-card:hover .", k, "-file-card-mask{opacity:1;}&.", k, "-file-card.", k, "-file-card-type-image .", k, "-file-card-mask{background:", fileCard.imagePreview.bgColor, ";gap:", fileCard.imagePreview.iconGap, ";color:", fileCard.imagePreview.color, ";transition:opacity ", theme.transition.middle, ";}&.", k, "-file-card.", k, "-file-card-type-image .", k, "-file-card-mask .", k, "-icon:not(:hover){color:inherit;}.", k, "-file-card-file-mask{background:rgba(255, 255, 255, 0.92);gap:8px;}.", k, "-file-card-file-mask .", k, "-file-card-action{color:#5D6378;background:rgba(63, 68, 81, 0.08);}.", k, "-file-card-file-mask .", k, "-file-card-action:hover{color:", theme.color.primary, ";background:", setAlpha(theme.color.primary, 0.12), ";}.", k, "-file-card-media-loading-text{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:0;color:#FFFFFF;font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0, 0, 0, 0.28);}&.", k, "-file-card.", k, "-file-card-type-audio .", k, "-file-card-media-loading-text{color:#3A3D52;text-shadow:none;}.", k, "-file-card-media-progress-text{position:absolute;top:3px;left:20px;z-index:4;color:#FFFFFF;font-size:11px;line-height:14px;white-space:nowrap;text-shadow:0 1px 2px rgba(0, 0, 0, 0.35);}&.", k, "-file-card>.", k, "-file-card-delete{position:absolute;top:2px;right:2px;z-index:4;display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;min-height:16px;flex:0 0 16px;margin:0;padding:0;border:none;border-radius:50%;cursor:pointer;color:", fileCard.deleteColor, ";background:", fileCard.deleteBg, ";box-shadow:", fileCard.deleteShadow, ";box-sizing:border-box;line-height:1;outline:none;opacity:0;pointer-events:none;transition:background ", theme.transition.small, ",opacity ", theme.transition.small, ";}&.", k, "-file-card>.", k, "-file-card-delete .", k, "-icon{margin:0;color:inherit;font-size:10px;line-height:1;}&.", k, "-file-card.", k, "-file-card-mini>.", k, "-file-card-delete{width:12px;min-width:12px;height:12px;min-height:12px;flex-basis:12px;}&.", k, "-file-card.", k, "-file-card-mini>.", k, "-file-card-delete .", k, "-icon{font-size:8px;}&.", k, "-file-card:hover>.", k, "-file-card-delete{opacity:1;pointer-events:auto;}&.", k, "-file-card>.", k, "-file-card-delete:hover,&.", k, "-file-card>.", k, "-file-card-delete:focus{color:", fileCard.deleteHoverColor, ";background:", fileCard.deleteHoverBg, ";box-shadow:", fileCard.deleteShadow, ";}&.", k, "-file-card.", k, "-file-card-error .", k, "-file-card-description{color:", theme.color.danger, ";}&.", k, "-file-card-list{display:flex;gap:", fileCard.listGap, ";align-items:flex-start;}&.", k, "-file-card-list-wrap{flex-wrap:wrap;align-items:flex-start;}&.", k, "-file-card-list-scrollX{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;box-sizing:border-box;width:100%;max-width:100%;min-width:0;scrollbar-width:thin;scrollbar-color:transparent transparent;scrollbar-gutter:stable;}&.", k, "-file-card-list-scrollY{flex-wrap:wrap;align-content:flex-start;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;height:100%;max-height:108px;min-height:0;max-width:100%;padding-right:6px;scrollbar-width:thin;scrollbar-color:transparent transparent;scrollbar-gutter:stable;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar{height:8px;}&.", k, "-file-card-list-scrollY::-webkit-scrollbar{width:8px;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar-track,&.", k, "-file-card-list-scrollY::-webkit-scrollbar-track{background:transparent;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar-thumb,&.", k, "-file-card-list-scrollY::-webkit-scrollbar-thumb{border-radius:999px;border:2px solid transparent;background:transparent;background-clip:content-box;}&.", k, "-file-card-list-scrollX:hover,&.", k, "-file-card-list-scrollY:hover{scrollbar-color:", fileCard.scrollbarThumb, " transparent;}&.", k, "-file-card-list-scrollX:hover::-webkit-scrollbar-thumb,&.", k, "-file-card-list-scrollY:hover::-webkit-scrollbar-thumb{background:", fileCard.scrollbarThumb, ";background-clip:content-box;}&.", k, "-file-card-list-scrollX:hover::-webkit-scrollbar-thumb:hover,&.", k, "-file-card-list-scrollY:hover::-webkit-scrollbar-thumb:hover{background:", fileCard.scrollbarThumbHover, ";background-clip:content-box;}.", k, "-file-card-list-extension{flex:0 0 auto;}")
94470
+ css("&.", k, "-file-card{position:relative;display:inline-flex;flex:0 0 auto;align-self:flex-start;vertical-align:top;width:auto;max-width:100%;min-width:0;border:", fileCard.border, ";border-radius:", fileCard.radius, ";background:#FFFFFF;box-sizing:border-box;overflow:visible;}&.", k, "-file-card.", k, "-file-card-file{width:", fileCard.file.small.width, ";min-height:", fileCard.file.small.minHeight, ";border:", fileCard.border, ";border-radius:", fileCard.radius, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-mini{width:", fileCard.file.mini.width, ";min-height:", fileCard.file.mini.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-small{width:", fileCard.file.small.width, ";min-height:", fileCard.file.small.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-default{width:", fileCard.file.default.width, ";min-height:", fileCard.file.default.minHeight, ";}&.", k, "-file-card.", k, "-file-card-file.", k, "-file-card-large{width:", fileCard.file.large.width, ";min-height:", fileCard.file.large.minHeight, ";}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-image{border:none;background:transparent;}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-video{border:none;background:transparent;}&.", k, "-file-card.", k, "-file-card-media.", k, "-file-card-type-audio{border:none;background:transparent;}.", k, "-file-card-media-shell{position:relative;min-width:0;border-radius:", fileCard.mediaRadius, ";box-sizing:border-box;overflow:hidden;}.", k, "-file-card-media-view{display:inline-flex;}.", k, "-file-card-media-status-layer{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;pointer-events:none;}.", k, "-file-card-media-loading-overlay{position:absolute;inset:0;z-index:2;border-radius:inherit;background:", fileCard.loadingOverlayBg, ";pointer-events:none;}.", k, "-file-card-media-status-layer>*{pointer-events:auto;}.", k, "-file-card-media-error-artwork-content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;gap:4px;padding:0 4px;border-radius:inherit;background:#F3F5F6;box-sizing:border-box;}.", k, "-file-card-media-error-artwork-icon{display:block;width:32px;height:32px;flex:0 0 auto;}.", k, "-file-card-file-shell{position:relative;width:100%;min-width:0;border-radius:inherit;overflow:hidden;background:linear-gradient(\n 90deg,\n ", fileCard.progressBg, " 0 var(--file-card-progress-percent, 0%),\n #FFFFFF var(--file-card-progress-percent, 0%) 100%\n );}.", k, "-file-card-file-main{display:flex;align-items:center;width:100%;min-width:0;gap:", fileCard.file.small.gap, ";padding:", fileCard.file.small.padding, ";box-sizing:border-box;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-main{gap:", fileCard.file.mini.gap, ";padding:", fileCard.file.mini.padding, ";}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-main{gap:", fileCard.file.large.gap, ";padding:", fileCard.file.large.padding, ";}&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-main{gap:", fileCard.file.default.gap, ";padding:", fileCard.file.default.padding, ";}.", k, "-file-card-file-icon,.", k, "-file-card-file-media-view{width:", fileCard.file.small.iconSize, ";height:", fileCard.file.small.iconSize, ";flex:0 0 auto;border-radius:4px;overflow:hidden;}.", k, "-file-card-file-icon{display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;letter-spacing:0.04em;color:", fileCard.fileIcon.defaultColor, ";}.", k, "-file-card-file-icon .", k, "-icon{font-size:16px;line-height:1;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-media-view{width:", fileCard.file.mini.iconSize, ";height:", fileCard.file.mini.iconSize, ";}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-file-icon{font-size:10px;}&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-default .", k, "-file-card-file-media-view{width:", fileCard.file.default.iconSize, ";height:", fileCard.file.default.iconSize, ";}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-icon,&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-file-media-view{width:", fileCard.file.large.iconSize, ";height:", fileCard.file.large.iconSize, ";}.", k, "-file-card-file-icon-img{display:block;width:100%;height:100%;object-fit:cover;}.", k, "-file-card-file-icon-pdf{color:", fileCard.fileIcon.pdfColor, ";}.", k, "-file-card-file-icon-doc{color:", fileCard.fileIcon.docColor, ";}.", k, "-file-card-file-icon-sheet{color:", fileCard.fileIcon.sheetColor, ";}.", k, "-file-card-file-icon-slide{color:", fileCard.fileIcon.slideColor, ";}.", k, "-file-card-file-icon-archive{color:", fileCard.fileIcon.archiveColor, ";}.", k, "-file-card-file-icon-image{color:", fileCard.fileIcon.imageColor, ";}.", k, "-file-card-file-icon-video{color:", fileCard.fileIcon.videoColor, ";}.", k, "-file-card-file-icon-audio{color:", fileCard.fileIcon.audioColor, ";}.", k, "-file-card-file-content{flex:1;min-width:0;}.", k, "-file-card-title{display:flex;align-items:baseline;min-width:0;color:", fileCard.titleColor, ";font-weight:400;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-title{font-size:13px;line-height:18px;}&.", k, "-file-card.", k, "-file-card-large .", k, "-file-card-title{font-size:15px;line-height:22px;}.", k, "-file-card-title-prefix{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.", k, "-file-card-title-suffix{flex:0 0 auto;white-space:nowrap;}.", k, "-file-card-title-status{color:", fileCard.titleColor, ";}.", k, "-file-card-title-status-error{color:", theme.color.danger, ";}.", k, "-file-card-description{color:", fileCard.descriptionColor, ";font-size:12px;line-height:18px;margin-top:2px;}&.", k, "-file-card.", k, "-file-card-mini .", k, "-file-card-description{display:none;}.", k, "-file-card-action{color:inherit;border-radius:999px;background:transparent;transition:background ", theme.transition.small, ",color ", theme.transition.small, ",opacity ", theme.transition.small, ";}.", k, "-file-card-mask{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;}.", k, "-file-card-mask{gap:10px;background:", fileCard.maskBg, ";opacity:0;transition:opacity ", theme.transition.small, ";pointer-events:none;}.", k, "-file-card-error-text{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:0;color:", fileCard.errorTextColor, ";font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.", k, "-file-card-media-error-artwork-text{width:auto;max-width:100%;box-sizing:border-box;color:#FF4433;font-size:12px;line-height:12px;text-shadow:none;}.", k, "-file-card-mask>*{pointer-events:auto;}.", k, "-file-card-mask .", k, "-file-card-action{color:", fileCard.actionColor, ";background:", fileCard.actionBg, ";}.", k, "-file-card-mask .", k, "-file-card-action:hover{background:", fileCard.actionHoverBg, ";}&.", k, "-file-card:hover .", k, "-file-card-mask{opacity:1;}&.", k, "-file-card.", k, "-file-card-type-image .", k, "-file-card-mask{background:", fileCard.imagePreview.bgColor, ";gap:", fileCard.imagePreview.iconGap, ";color:", fileCard.imagePreview.color, ";transition:opacity ", theme.transition.middle, ";}&.", k, "-file-card.", k, "-file-card-type-image .", k, "-file-card-mask .", k, "-icon:not(:hover){color:inherit;}.", k, "-file-card-file-mask{background:rgba(255, 255, 255, 0.92);gap:8px;}.", k, "-file-card-file-mask .", k, "-file-card-action{color:#5D6378;background:rgba(63, 68, 81, 0.08);}.", k, "-file-card-file-mask .", k, "-file-card-action:hover{color:", theme.color.primary, ";background:", setAlpha(theme.color.primary, 0.12), ";}.", k, "-file-card-media-loading-text{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:0;color:#FFFFFF;font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0, 0, 0, 0.28);}.", k, "-file-card-media-progress-text{position:absolute;top:3px;left:20px;z-index:4;color:#FFFFFF;font-size:11px;line-height:14px;white-space:nowrap;text-shadow:0 1px 2px rgba(0, 0, 0, 0.35);}&.", k, "-file-card>.", k, "-file-card-delete{position:absolute;top:2px;right:2px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;min-height:16px;flex:0 0 16px;margin:0;padding:0;border:none;border-radius:50%;cursor:pointer;color:", fileCard.deleteColor, ";background:", fileCard.deleteBg, ";box-shadow:", fileCard.deleteShadow, ";box-sizing:border-box;line-height:1;outline:none;opacity:0;pointer-events:none;transition:background ", theme.transition.small, ",opacity ", theme.transition.small, ";}&.", k, "-file-card>.", k, "-file-card-delete .", k, "-icon{margin:0;color:inherit;font-size:10px;line-height:1;}&.", k, "-file-card.", k, "-file-card-mini>.", k, "-file-card-delete{width:12px;min-width:12px;height:12px;min-height:12px;flex-basis:12px;}&.", k, "-file-card.", k, "-file-card-mini>.", k, "-file-card-delete .", k, "-icon{font-size:8px;}&.", k, "-file-card:hover>.", k, "-file-card-delete{opacity:1;pointer-events:auto;}&.", k, "-file-card>.", k, "-file-card-delete:hover,&.", k, "-file-card>.", k, "-file-card-delete:focus{color:", fileCard.deleteHoverColor, ";background:", fileCard.deleteHoverBg, ";box-shadow:", fileCard.deleteShadow, ";}&.", k, "-file-card.", k, "-file-card-error .", k, "-file-card-description{color:", theme.color.danger, ";}&.", k, "-file-card-list{display:flex;gap:", fileCard.listGap, ";align-items:flex-start;}&.", k, "-file-card-list-wrap{flex-wrap:wrap;align-items:flex-start;}&.", k, "-file-card-list-scrollX{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;box-sizing:border-box;width:100%;max-width:100%;min-width:0;scrollbar-width:thin;scrollbar-color:transparent transparent;scrollbar-gutter:stable;}&.", k, "-file-card-list-scrollY{flex-wrap:wrap;align-content:flex-start;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;height:100%;max-height:108px;min-height:0;max-width:100%;padding-right:6px;scrollbar-width:thin;scrollbar-color:transparent transparent;scrollbar-gutter:stable;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar{height:8px;}&.", k, "-file-card-list-scrollY::-webkit-scrollbar{width:8px;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar-track,&.", k, "-file-card-list-scrollY::-webkit-scrollbar-track{background:transparent;}&.", k, "-file-card-list-scrollX::-webkit-scrollbar-thumb,&.", k, "-file-card-list-scrollY::-webkit-scrollbar-thumb{border-radius:999px;border:2px solid transparent;background:transparent;background-clip:content-box;}&.", k, "-file-card-list-scrollX:hover,&.", k, "-file-card-list-scrollY:hover{scrollbar-color:", fileCard.scrollbarThumb, " transparent;}&.", k, "-file-card-list-scrollX:hover::-webkit-scrollbar-thumb,&.", k, "-file-card-list-scrollY:hover::-webkit-scrollbar-thumb{background:", fileCard.scrollbarThumb, ";background-clip:content-box;}&.", k, "-file-card-list-scrollX:hover::-webkit-scrollbar-thumb:hover,&.", k, "-file-card-list-scrollY:hover::-webkit-scrollbar-thumb:hover{background:", fileCard.scrollbarThumbHover, ";background-clip:content-box;}.", k, "-file-card-list-prefix,.", k, "-file-card-list-suffix{flex:0 0 auto;}")
94409
94471
  );
94410
94472
  });
94411
94473
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/fileCard/fileCard.vdt.js
@@ -94433,6 +94495,7 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94433
94495
  onDelete = _this$model.onDelete,
94434
94496
  getValue = _this$model.getValue,
94435
94497
  onPreview = _this$model.onPreview,
94498
+ isLoading = _this$model.isLoading,
94436
94499
  isError = _this$model.isError,
94437
94500
  getMediaLoadingText = _this$model.getMediaLoadingText,
94438
94501
  getMediaErrorText = _this$model.getMediaErrorText,
@@ -94459,7 +94522,7 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94459
94522
  getFileMediaType = _this$model.getFileMediaType,
94460
94523
  getMediaStatus = _this$model.getMediaStatus,
94461
94524
  getMediaShowPreview = _this$model.getMediaShowPreview,
94462
- onMediaError = _this$model.onMediaError,
94525
+ shouldShowMediaLoadingOverlay = _this$model.shouldShowMediaLoadingOverlay,
94463
94526
  getMediaSize = _this$model.getMediaSize,
94464
94527
  getFileMediaSize = _this$model.getFileMediaSize,
94465
94528
  shouldShowFileMedia = _this$model.shouldShowFileMedia;
@@ -94479,7 +94542,7 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94479
94542
  var value = getValue();
94480
94543
  var shouldShowFileContent = !isMediaType();
94481
94544
  var descriptionSlot = shouldShowFileContent && $blocks.description ? $blocks.description(noop, value) : undefined;
94482
- var fileMaskSlot = shouldShowFileContent && maskBlock ? maskBlock(noop, value) : undefined;
94545
+ var fileMaskSlot = shouldShowFileContent && !isLoading() && maskBlock ? maskBlock(noop, value) : undefined;
94483
94546
  var hasDescriptionSlot = !isEmptySlot(descriptionSlot);
94484
94547
  var hasFileMaskSlot = !isEmptySlot(fileMaskSlot);
94485
94548
  var isMini = (this.get('size') || 'default') === 'mini';
@@ -94510,7 +94573,6 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94510
94573
  'videoProps': this.get('videoProps'),
94511
94574
  'audioProps': this.get('audioProps'),
94512
94575
  'ev-preview': onPreview,
94513
- 'ev-loadError': onMediaError,
94514
94576
  '$blocks': function ($blocks) {
94515
94577
  var _$blocks = {},
94516
94578
  __$blocks = extend({}, $blocks);
@@ -94536,7 +94598,7 @@ var fileCard_styles_makeStyles = utils_cache(function makeStyles(k) {
94536
94598
  return block ? block.call($this, callBlock, data) : callBlock();
94537
94599
  }), __$blocks;
94538
94600
  }.call($this, EMPTY_OBJ)
94539
- }), shouldShowMediaStatusLayer() && !shouldUseMediaErrorArtworkLayout() ? createElementVNode(2, 'div', createElementVNode(2, 'span', isError() ? getMediaErrorText() : getMediaLoadingText(), 0, index_esm_className((_$cn2 = {}, _$cn2[k + "-file-card-media-loading-text"] = !isError(), _$cn2[k + "-file-card-error-text"] = isError(), _$cn2))), 2, index_esm_className(k + "-file-card-media-status-layer")) : undefined, shouldShowVisualMediaProgressText() ? createElementVNode(2, 'div', getMediaProgressText(), 0, index_esm_className(k + "-file-card-media-progress-text")) : undefined], 0, index_esm_className(k + "-file-card-media-shell")) : createElementVNode(2, 'div', [createElementVNode(2, 'div', [shouldShowFileMedia() ? createUnknownComponentVNode(Media, {
94601
+ }), shouldShowMediaLoadingOverlay() ? createElementVNode(2, 'div', null, 1, index_esm_className(k + "-file-card-media-loading-overlay")) : undefined, shouldShowMediaStatusLayer() && !shouldUseMediaErrorArtworkLayout() ? createElementVNode(2, 'div', createElementVNode(2, 'span', isError() ? getMediaErrorText() : getMediaLoadingText(), 0, index_esm_className((_$cn2 = {}, _$cn2[k + "-file-card-media-loading-text"] = !isError(), _$cn2[k + "-file-card-error-text"] = isError(), _$cn2))), 2, index_esm_className(k + "-file-card-media-status-layer")) : undefined, shouldShowVisualMediaProgressText() ? createElementVNode(2, 'div', getMediaProgressText(), 0, index_esm_className(k + "-file-card-media-progress-text")) : undefined], 0, index_esm_className(k + "-file-card-media-shell")) : createElementVNode(2, 'div', [createElementVNode(2, 'div', [shouldShowFileMedia() ? createUnknownComponentVNode(Media, {
94540
94602
  'className': index_esm_className(k + "-file-card-file-media-view"),
94541
94603
  'name': getFileName(),
94542
94604
  'type': getFileMediaType(),
@@ -94848,12 +94910,6 @@ function useFileCard() {
94848
94910
  function hasSource() {
94849
94911
  return !!instance.get('src');
94850
94912
  }
94851
- function isMediaLoadError() {
94852
- return !!instance.get('$mediaLoadError');
94853
- }
94854
- function setMediaLoadError(value) {
94855
- instance.set('$mediaLoadError', value);
94856
- }
94857
94913
  function shouldShowDeleteButton() {
94858
94914
  return !!instance.get('showDelIcon');
94859
94915
  }
@@ -94877,27 +94933,21 @@ function useFileCard() {
94877
94933
  function getMediaType() {
94878
94934
  return getResolvedType();
94879
94935
  }
94880
- function isImageOrVideoMedia() {
94881
- var mediaType = getMediaType();
94882
- return mediaType === 'image' || mediaType === 'video';
94883
- }
94884
- function shouldKeepVisualMediaOnError() {
94885
- if (!isError() || !hasSource()) return false;
94886
- if (isMediaLoadError()) return false;
94887
- return isImageOrVideoMedia();
94888
- }
94889
94936
  function getFileMediaType() {
94890
94937
  return getResourceType();
94891
94938
  }
94892
94939
  function getMediaStatus() {
94893
94940
  if (!isMediaType()) return 'default';
94894
- if (shouldKeepVisualMediaOnError()) return 'default';
94895
94941
  return getDisplayStatus();
94896
94942
  }
94897
94943
  function getMediaShowPreview() {
94898
94944
  if (isError()) return false;
94899
94945
  return instance.get('showPreview');
94900
94946
  }
94947
+ function shouldShowMediaLoadingOverlay() {
94948
+ var mediaType = getMediaType();
94949
+ return isLoading() && mediaType === 'audio' && (hasSpecifiedMediaLoadingText() || hasPercentProp());
94950
+ }
94901
94951
  function getMediaSize() {
94902
94952
  return instance.get('size') || 'default';
94903
94953
  }
@@ -94935,7 +94985,7 @@ function useFileCard() {
94935
94985
  return isMediaType() && isError() && !shouldHideMediaStatusTextForSize() && hasSpecifiedMediaErrorText();
94936
94986
  }
94937
94987
  function shouldUseMediaErrorArtworkLayout() {
94938
- return shouldRenderMediaErrorArtwork() && !shouldKeepVisualMediaOnError();
94988
+ return shouldRenderMediaErrorArtwork();
94939
94989
  }
94940
94990
  // 媒体卡片在 loading 且传入 percent 时都展示进度文本(不限制尺寸)。
94941
94991
  function shouldShowVisualMediaProgressText() {
@@ -94992,23 +95042,6 @@ function useFileCard() {
94992
95042
  e.stopPropagation();
94993
95043
  instance.trigger('delete', getValue(), e);
94994
95044
  }
94995
- function onMediaError() {
94996
- setMediaLoadError(true);
94997
- }
94998
- function bootstrap() {
94999
- instance.set('$mediaLoadError', false, {
95000
- silent: true
95001
- });
95002
- ['src', 'type', 'poster'].forEach(function (key) {
95003
- instance.watch(key, function () {
95004
- return setMediaLoadError(false);
95005
- });
95006
- });
95007
- instance.watch('status', function (status) {
95008
- if (status !== 'error') setMediaLoadError(false);
95009
- });
95010
- }
95011
- bootstrap();
95012
95045
  return {
95013
95046
  getRootClassNameObj: getRootClassNameObj,
95014
95047
  getProgressStyle: getProgressStyle,
@@ -95045,7 +95078,7 @@ function useFileCard() {
95045
95078
  getFileMediaType: getFileMediaType,
95046
95079
  getMediaStatus: getMediaStatus,
95047
95080
  getMediaShowPreview: getMediaShowPreview,
95048
- onMediaError: onMediaError,
95081
+ shouldShowMediaLoadingOverlay: shouldShowMediaLoadingOverlay,
95049
95082
  getMediaSize: getMediaSize,
95050
95083
  getFileMediaSize: getFileMediaSize,
95051
95084
  shouldShowFileMedia: shouldShowFileMedia
@@ -95157,12 +95190,14 @@ FileCard.events = fileCard_events;
95157
95190
  if (value && value.type === 1) return isEmptySlot(value.children);
95158
95191
  return false;
95159
95192
  };
95160
- var extensionSlot = $blocks.extension ? $blocks.extension(noop, items) : undefined;
95161
- var hasExtensionSlot = !isEmptySlot(extensionSlot);
95193
+ var prefixSlot = $blocks.prefix ? $blocks.prefix(noop, items) : undefined;
95194
+ var suffixSlot = $blocks.suffix ? $blocks.suffix(noop, items) : undefined;
95195
+ var hasPrefixSlot = !isEmptySlot(prefixSlot);
95196
+ var hasSuffixSlot = !isEmptySlot(suffixSlot);
95162
95197
  var classNameObj = _extends({}, getClassNameObj(), (_extends2 = {}, _extends2[className] = className, _extends2[fileCard_styles_makeStyles(k)] = true, _extends2));
95163
95198
  return createVNode('div', _extends({
95164
95199
  'className': index_esm_className(classNameObj)
95165
- }, getRestProps(this)), [map(items, function ($value, $key) {
95200
+ }, getRestProps(this)), [hasPrefixSlot ? createElementVNode(2, 'div', prefixSlot, 0, index_esm_className(k + "-file-card-list-prefix")) : undefined, map(items, function ($value, $key) {
95166
95201
  return createUnknownComponentVNode(FileCard, {
95167
95202
  'key': getItemKey($value, $key),
95168
95203
  'name': $value.name,
@@ -95193,7 +95228,7 @@ FileCard.events = fileCard_events;
95193
95228
  return onItemDelete($value, value, e);
95194
95229
  }
95195
95230
  }, getItemKey($value, $key));
95196
- }, $this), hasExtensionSlot ? createElementVNode(2, 'div', extensionSlot, 0, index_esm_className(k + "-file-card-list-extension")) : undefined]);
95231
+ }, $this), hasSuffixSlot ? createElementVNode(2, 'div', suffixSlot, 0, index_esm_className(k + "-file-card-list-suffix")) : undefined]);
95197
95232
  }
95198
95233
  ;
95199
95234
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/fileCard/useFileCardList.js
@@ -99084,7 +99119,7 @@ var progress_index_vdt_$tmp0 = {
99084
99119
  'from': '0.2',
99085
99120
  'to': '0'
99086
99121
  };
99087
- var _$tmp1 = {
99122
+ var index_vdt_$tmp1 = {
99088
99123
  'viewBox': '0 0 120 120'
99089
99124
  };
99090
99125
  /* harmony default export */ function progress_index_vdt($props, $blocks, $__proto__) {
@@ -99138,7 +99173,7 @@ var _$tmp1 = {
99138
99173
  'stroke-width': strokeWidth,
99139
99174
  'stroke-dasharray': circumference,
99140
99175
  'stroke-dashoffset': circumference
99141
- }) : undefined]), 0, index_esm_className(k + "-progress-canvas"), _$tmp1) : undefined, children ? createElementVNode(2, 'div', children, 0, index_esm_className(k + "-progress-text")) : showOuterText ? createElementVNode(2, 'div', function () {
99176
+ }) : undefined]), 0, index_esm_className(k + "-progress-canvas"), index_vdt_$tmp1) : undefined, children ? createElementVNode(2, 'div', children, 0, index_esm_className(k + "-progress-text")) : showOuterText ? createElementVNode(2, 'div', function () {
99142
99177
  if (type !== 'circle') {
99143
99178
  switch (status) {
99144
99179
  case 'success':
@@ -99680,22 +99715,31 @@ var sender_styles_defaults = {
99680
99715
  bg: '#FFFFFF',
99681
99716
  color: theme.color.text,
99682
99717
  placeholderColor: theme.color.placeholder,
99683
- disabledBg: theme.color.disabledBg,
99718
+ disabledBg: theme.color.bg,
99684
99719
  disabledColor: theme.color.disabled,
99685
99720
  fontSize: theme.fontSize,
99686
99721
  lineHeight: 1.5,
99722
+ prefixGap: '8px',
99723
+ prefixColor: '#868A9C',
99687
99724
  gradientDefault: SENDER_GRADIENT_DEFAULT,
99688
99725
  gradientActive: SENDER_GRADIENT_ACTIVE,
99726
+ activeBackdropFilter: 'blur(4px)',
99727
+ activeShadow: ['0px 4px 6px -4px rgba(0, 0, 0, 0.102)', '3px -3px 16px -5px rgba(113, 47, 255, 0.102)', '-3px 3px 14px -4px rgba(83, 112, 255, 0.102)'].join(', '),
99689
99728
  sendButtonSize: '32px',
99690
99729
  attachButtonSize: '16px',
99691
99730
  attachIconColor: '#868A9C',
99692
- attachIconHoverColor: theme.color.primary,
99693
- // type='image' 末尾的 + 框,尺寸和 FileCard image default 对齐
99694
- imageAddSize: '64px',
99695
- imageAddRadius: '4px',
99696
- imageAddBg: '#FFFFFF',
99697
- imageAddBorder: '1px dashed #D0D5E0',
99698
- imageAddColor: '#868A9C',
99731
+ get attachIconHoverColor() {
99732
+ return theme.color.primary;
99733
+ },
99734
+ // 附件列表末尾上传入口,尺寸和 FileCard media default 对齐
99735
+ listUploadSize: '64px',
99736
+ listUploadRadius: '6px',
99737
+ listUploadBg: '#FFFFFF',
99738
+ listUploadBorder: '1px dashed #E5E8EE',
99739
+ listUploadColor: '#868A9C',
99740
+ listUploadIconSize: '16px',
99741
+ listUploadTextFontSize: '12px',
99742
+ listUploadIconToTextGap: '8px',
99699
99743
  dragMaskBg: 'rgba(255, 255, 255, 0.72)',
99700
99744
  dragCardColor: '#5370FF',
99701
99745
  dragCardTextColor: theme.color.text,
@@ -99714,7 +99758,7 @@ var sender_styles_makeStyles = utils_cache(function makeStyles(k) {
99714
99758
  return (
99715
99759
  /*#__PURE__*/
99716
99760
  /*#__PURE__*/
99717
- css("position:relative;display:flex;flex-direction:column;box-sizing:border-box;.", k, "-sender-header,.", k, "-sender-footer{box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-header{margin-bottom:", sender.gapHeaderToShell, ";}.", k, "-sender-footer{margin-top:", sender.gapShellToFooter, ";}.", k, "-sender-shell{position:relative;display:flex;flex-direction:column;box-sizing:border-box;max-height:", sender.shellMaxH, ";padding:", sender.padding, ";background:", sender.bg, ";border-radius:", sender.radius, ";transition:background ", theme.transition.middle, ";min-width:0;overflow:hidden;}.", k, "-sender-shell::before{content:'';position:absolute;inset:0;padding:1px;border-radius:inherit;background:", sender.gradientDefault, ";-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none;transition:background ", theme.transition.middle, ",opacity ", theme.transition.middle, ";}.", k, "-sender-shell:hover::before,.", k, "-sender-shell.", k, "-sender-active::before{background:", sender.gradientActive, ";}&.", k, "-sender-disabled .", k, "-sender-shell::before{opacity:0.5;}&.", k, "-sender-disabled .", k, "-sender-shell{background:", sender.disabledBg, ";}.", k, "-sender-attachments{padding:0;box-sizing:border-box;min-width:0;flex:0 0 auto;}.", k, "-sender-attachments-image .", k, "-file-card-list{min-width:0;}.", k, "-sender-before-input{margin-bottom:", sender.gapTopToInput, ";padding:0;box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-attachments+.", k, "-sender-before-input{margin-top:", sender.gapAttachToTop, ";}.", k, "-sender-attachments+.", k, "-sender-input-area{margin-top:", sender.gapTopToInput, ";}.", k, "-sender-input-area{position:relative;display:flex;flex:0 0 auto;min-height:0;margin-bottom:", sender.gapInputToToolbar, ";padding:0;box-sizing:border-box;}.", k, "-sender-input{flex:1 1 auto;width:100%;min-width:0;min-height:0;border:none;outline:none;resize:none;background:transparent;color:", sender.color, ";font-family:inherit;font-size:", sender.fontSize, ";line-height:", sender.lineHeight, ";padding:0;scrollbar-width:thin;scrollbar-color:transparent transparent;}.", k, "-sender-input::-webkit-scrollbar{width:8px;}.", k, "-sender-input::-webkit-scrollbar-track{background:transparent;}.", k, "-sender-input::-webkit-scrollbar-thumb{border-radius:999px;border:2px solid transparent;background:transparent;background-clip:content-box;}.", k, "-sender-input:hover{scrollbar-color:", sender.scrollbarThumb, " transparent;}.", k, "-sender-input:hover::-webkit-scrollbar-thumb{background:", sender.scrollbarThumb, ";background-clip:content-box;}.", k, "-sender-input:hover::-webkit-scrollbar-thumb:hover{background:", sender.scrollbarThumbHover, ";background-clip:content-box;}.", k, "-sender-input::placeholder{color:", sender.placeholderColor, ";}&.", k, "-sender-disabled .", k, "-sender-input{color:", sender.disabledColor, ";cursor:not-allowed;}.", k, "-sender-toolbar{display:flex;gap:8px;padding:0;box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-toolbar-left{display:flex;align-items:center;gap:8px;margin-top:8px;flex:0 0 auto;}.", k, "-sender-toolbar-right{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:auto;}.", k, "-sender-toolbar-middle{flex:1 1 auto;min-width:0;display:flex;align-items:flex-end;gap:8px;}.", k, "-sender-attach-btn{display:inline-flex;align-items:center;justify-content:center;width:", sender.attachButtonSize, ";height:", sender.attachButtonSize, ";border-radius:50%;background:transparent;border:none;padding:0;cursor:pointer;color:", sender.attachIconColor, ";transition:color ", theme.transition.small, ",background ", theme.transition.small, ";}.", k, "-sender-attach-btn:hover{color:", sender.attachIconHoverColor, ";}.", k, "-sender-attach-btn:disabled,&.", k, "-sender-disabled .", k, "-sender-attach-btn{color:", theme.color.disabled, ";cursor:not-allowed;background:transparent;}.", k, "-sender-attach-btn svg{display:block;}.", k, "-sender-send-btn{display:inline-flex;align-items:center;justify-content:center;width:", sender.sendButtonSize, ";height:", sender.sendButtonSize, ";background:transparent;border:none;padding:0;cursor:pointer;transition:filter ", theme.transition.small, ";}.", k, "-sender-send-btn:disabled{cursor:not-allowed;filter:opacity(0.5);}.", k, "-sender-send-btn:not(:disabled):hover{filter:opacity(0.85);}.", k, "-sender-send-icon{display:block;width:32px;height:32px;pointer-events:none;filter:drop-shadow(0 4px 8px rgba(83, 112, 255, 0.32));}.", k, "-sender-image-add{display:inline-flex;align-items:center;justify-content:center;width:", sender.imageAddSize, ";height:", sender.imageAddSize, ";box-sizing:border-box;flex:0 0 auto;border-radius:", sender.imageAddRadius, ";border:", sender.imageAddBorder, ";background:", sender.imageAddBg, ";color:", sender.imageAddColor, ";cursor:pointer;transition:border-color ", theme.transition.small, ",color ", theme.transition.small, ";}.", k, "-sender-image-add:hover{border-color:", theme.color.primary, ";color:", theme.color.primary, ";}.", k, "-sender-image-add-disabled,.", k, "-sender-image-add-disabled:hover{cursor:not-allowed;border-color:", theme.color.border, ";color:", theme.color.disabled, ";}.", k, "-sender-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;top:-9999px;left:-9999px;}.", k, "-sender-drag-mask{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;background:", sender.dragMaskBg, ";backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}.", k, "-sender-drag-card{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:", sender.dragCardColor, ";}.", k, "-sender-drag-card .", k, "-icon{color:", sender.dragCardColor, ";font-size:32px;line-height:1;}.", k, "-sender-drag-text{color:", sender.dragCardTextColor, ";font-size:14px;font-weight:500;line-height:20px;}")
99761
+ css("position:relative;display:flex;flex-direction:column;box-sizing:border-box;.", k, "-sender-header,.", k, "-sender-footer{box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-header{margin-bottom:", sender.gapHeaderToShell, ";}.", k, "-sender-footer{margin-top:", sender.gapShellToFooter, ";}.", k, "-sender-shell{position:relative;display:flex;flex-direction:column;box-sizing:border-box;max-height:", sender.shellMaxH, ";padding:", sender.padding, ";background:", sender.bg, ";border-radius:", sender.radius, ";transition:background ", theme.transition.middle, ",box-shadow ", theme.transition.middle, ";min-width:0;overflow:hidden;}.", k, "-sender-shell::before{content:'';position:absolute;inset:0;padding:1px;border-radius:inherit;background:", sender.gradientDefault, ";-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none;transition:background ", theme.transition.middle, ",opacity ", theme.transition.middle, ";}&:not(.", k, "-sender-disabled) .", k, "-sender-shell:hover::before,.", k, "-sender-shell.", k, "-sender-active::before{background:", sender.gradientActive, ";}.", k, "-sender-shell.", k, "-sender-active{backdrop-filter:", sender.activeBackdropFilter, ";-webkit-backdrop-filter:", sender.activeBackdropFilter, ";box-shadow:", sender.activeShadow, ";}&.", k, "-sender-disabled .", k, "-sender-shell::before{opacity:0.5;}&.", k, "-sender-disabled .", k, "-sender-shell{background:", sender.disabledBg, ";}&.", k, "-sender-input-disabled .", k, "-sender-shell{background:", sender.disabledBg, ";}.", k, "-sender-attachments{padding:0;box-sizing:border-box;min-width:0;flex:0 0 auto;}.", k, "-sender-attachments-media .", k, "-file-card-list{min-width:0;}.", k, "-sender-before-input{margin-bottom:", sender.gapTopToInput, ";padding:0;box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-attachments+.", k, "-sender-before-input{margin-top:", sender.gapAttachToTop, ";}.", k, "-sender-attachments+.", k, "-sender-input-area{margin-top:", sender.gapTopToInput, ";}.", k, "-sender-input-area{position:relative;display:flex;align-items:flex-start;flex:0 0 auto;min-height:0;margin-bottom:", sender.gapInputToToolbar, ";padding:0;box-sizing:border-box;}.", k, "-sender-prefix{display:inline-flex;align-items:center;flex:0 0 auto;min-height:calc(", sender.fontSize, " * ", sender.lineHeight, ");margin-right:", sender.prefixGap, ";color:", sender.prefixColor, ";line-height:", sender.lineHeight, ";}.", k, "-sender-input{flex:1 1 auto;width:0;min-width:0;min-height:0;border:none;outline:none;resize:none;background:transparent;color:", sender.color, ";font-family:inherit;font-size:", sender.fontSize, ";line-height:", sender.lineHeight, ";padding:0;scrollbar-width:thin;scrollbar-color:transparent transparent;}.", k, "-sender-input::-webkit-scrollbar{width:8px;}.", k, "-sender-input::-webkit-scrollbar-track{background:transparent;}.", k, "-sender-input::-webkit-scrollbar-thumb{border-radius:999px;border:2px solid transparent;background:transparent;background-clip:content-box;}.", k, "-sender-input:hover{scrollbar-color:", sender.scrollbarThumb, " transparent;}.", k, "-sender-input:hover::-webkit-scrollbar-thumb{background:", sender.scrollbarThumb, ";background-clip:content-box;}.", k, "-sender-input:hover::-webkit-scrollbar-thumb:hover{background:", sender.scrollbarThumbHover, ";background-clip:content-box;}.", k, "-sender-input::placeholder{color:", sender.placeholderColor, ";}&.", k, "-sender-disabled .", k, "-sender-input,&.", k, "-sender-input-disabled .", k, "-sender-input{color:", sender.disabledColor, ";cursor:not-allowed;}.", k, "-sender-toolbar{display:flex;gap:8px;padding:0;box-sizing:border-box;flex:0 0 auto;}.", k, "-sender-toolbar-left{display:flex;align-items:center;gap:8px;margin-top:8px;flex:0 0 auto;}.", k, "-sender-toolbar-right{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:auto;}.", k, "-sender-toolbar-middle{flex:1 1 auto;min-width:0;display:flex;align-items:flex-end;gap:8px;}.", k, "-sender-attach-btn{display:inline-flex;align-items:center;justify-content:center;width:", sender.attachButtonSize, ";height:", sender.attachButtonSize, ";border-radius:50%;background:transparent;border:none;padding:0;cursor:pointer;color:", sender.attachIconColor, ";transition:color ", theme.transition.small, ",background ", theme.transition.small, ";}.", k, "-sender-attach-btn:hover{color:", sender.attachIconHoverColor, ";}.", k, "-sender-attach-btn:disabled,&.", k, "-sender-disabled .", k, "-sender-attach-btn,&.", k, "-sender-input-disabled .", k, "-sender-attach-btn{color:", theme.color.disabled, ";cursor:not-allowed;background:transparent;}.", k, "-sender-attach-btn svg{display:block;}.", k, "-sender-send-btn{display:inline-flex;align-items:center;justify-content:center;width:", sender.sendButtonSize, ";height:", sender.sendButtonSize, ";background:transparent;border:none;padding:0;cursor:pointer;transition:filter ", theme.transition.small, ";}.", k, "-sender-send-btn:disabled{cursor:not-allowed;filter:opacity(0.5);}.", k, "-sender-send-btn:not(:disabled):hover{filter:opacity(0.85);}.", k, "-sender-send-icon{display:block;width:32px;height:32px;pointer-events:none;filter:drop-shadow(0 4px 8px rgba(83, 112, 255, 0.32));}.", k, "-sender-list-upload{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:", sender.listUploadIconToTextGap, ";width:", sender.listUploadSize, ";height:", sender.listUploadSize, ";box-sizing:border-box;flex:0 0 auto;padding:0;border-radius:", sender.listUploadRadius, ";border:", sender.listUploadBorder, ";background:", sender.listUploadBg, ";color:", sender.listUploadColor, ";cursor:pointer;transition:border-color ", theme.transition.small, ",color ", theme.transition.small, ";}.", k, "-sender-list-upload .", k, "-icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:", sender.listUploadIconSize, ";height:", sender.listUploadIconSize, ";color:inherit;font-size:", sender.listUploadIconSize, ";line-height:1;transition:color ", theme.transition.small, ";}.", k, "-sender-list-upload-text{flex:0 0 auto;font-size:", sender.listUploadTextFontSize, ";line-height:1;color:inherit;transition:color ", theme.transition.small, ";}.", k, "-sender-list-upload:hover{border-color:", theme.color.primary, ";color:", theme.color.primary, ";}.", k, "-sender-list-upload:hover .", k, "-icon,.", k, "-sender-list-upload:hover .", k, "-sender-list-upload-text{color:inherit;}.", k, "-sender-list-upload-disabled,.", k, "-sender-list-upload-disabled:hover{cursor:not-allowed;border:", sender.listUploadBorder, ";color:", theme.color.disabled, ";}.", k, "-sender-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;top:-9999px;left:-9999px;}.", k, "-sender-drag-mask{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;background:", sender.dragMaskBg, ";backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}.", k, "-sender-drag-card{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:", sender.dragCardColor, ";}.", k, "-sender-drag-card .", k, "-icon{color:", sender.dragCardColor, ";font-size:32px;line-height:1;}.", k, "-sender-drag-text{color:", sender.dragCardTextColor, ";font-size:14px;font-weight:500;line-height:20px;}")
99718
99762
  );
99719
99763
  });
99720
99764
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/sender/icons.js
@@ -99746,6 +99790,9 @@ var senderAttachSvg = ATTACH_SVG;
99746
99790
 
99747
99791
 
99748
99792
 
99793
+
99794
+
99795
+
99749
99796
  var sender_vdt_$tmp0 = {
99750
99797
  'aria-hidden': 'true'
99751
99798
  };
@@ -99763,9 +99810,11 @@ var sender_vdt_$tmp0 = {
99763
99810
  var _this$input = this.input,
99764
99811
  isFocus = _this$input.isFocus,
99765
99812
  isDisabled = _this$input.isDisabled,
99813
+ isInputDisabled = _this$input.isInputDisabled,
99766
99814
  isGenerating = _this$input.isGenerating,
99767
99815
  isLoading = _this$input.isLoading,
99768
99816
  isSendButtonDisabled = _this$input.isSendButtonDisabled,
99817
+ isStopButtonDisabled = _this$input.isStopButtonDisabled,
99769
99818
  handleKeydown = _this$input.handleKeydown,
99770
99819
  handleInput = _this$input.handleInput,
99771
99820
  handleFocus = _this$input.handleFocus,
@@ -99776,6 +99825,7 @@ var sender_vdt_$tmp0 = {
99776
99825
  var _this$upload = this.upload,
99777
99826
  getAcceptAttr = _this$upload.getAcceptAttr,
99778
99827
  isMultiple = _this$upload.isMultiple,
99828
+ addFiles = _this$upload.addFiles,
99779
99829
  onInputChange = _this$upload.onInputChange,
99780
99830
  pickFiles = _this$upload.pickFiles,
99781
99831
  removeAttachment = _this$upload.removeAttachment;
@@ -99789,11 +99839,12 @@ var sender_vdt_$tmp0 = {
99789
99839
  readonly = _this$get.readonly,
99790
99840
  width = _this$get.width,
99791
99841
  maxHeight = _this$get.maxHeight,
99792
- type = _this$get.type,
99842
+ fileView = _this$get.fileView,
99843
+ uploadButton = _this$get.uploadButton,
99793
99844
  enableDragFile = _this$get.dragFile,
99794
99845
  attachments = _this$get.attachments,
99795
- showAttachmentsButton = _this$get.showAttachmentsButton,
99796
- uploadProps = _this$get.uploadProps;
99846
+ uploadProps = _this$get.uploadProps,
99847
+ buttonTooltip = _this$get.buttonTooltip;
99797
99848
  var k = this.config.k;
99798
99849
  var isEmptySlot = function isEmptySlot(value) {
99799
99850
  if (index_esm_isInvalid(value) || value === undefined || value === null || value === '') return true;
@@ -99803,35 +99854,47 @@ var sender_vdt_$tmp0 = {
99803
99854
  if (value && value.type === 1) return isEmptySlot(value.children);
99804
99855
  return false;
99805
99856
  };
99806
- var renderSlot = function renderSlot(name) {
99807
- return $blocks[name] ? $blocks[name](noop) : undefined;
99857
+ var renderSlot = function renderSlot(name, params) {
99858
+ return $blocks[name] ? $blocks[name](noop, params) : undefined;
99808
99859
  };
99809
99860
  var headerSlot = renderSlot('header');
99810
99861
  var footerSlot = renderSlot('footer');
99862
+ var prefixSlot = renderSlot('prefix');
99811
99863
  var beforeInputSlot = renderSlot('beforeInput');
99812
99864
  var configureSlot = renderSlot('configure');
99813
- var attachmentsButtonSlot = renderSlot('attachmentsButton');
99814
99865
  var hasHeaderSlot = !isEmptySlot(headerSlot);
99815
99866
  var hasFooterSlot = !isEmptySlot(footerSlot);
99867
+ var hasPrefixSlot = !isEmptySlot(prefixSlot);
99816
99868
  var hasBeforeInputSlot = !isEmptySlot(beforeInputSlot);
99817
99869
  var hasConfigureSlot = !isEmptySlot(configureSlot);
99818
- var hasAttachmentsButtonSlot = !isEmptySlot(attachmentsButtonSlot);
99819
99870
  var disabled = isDisabled();
99871
+ var inputDisabled = isInputDisabled();
99820
99872
  var generating = isGenerating();
99821
99873
  var loading = isLoading();
99822
- var sendDisabled = isSendButtonDisabled();
99874
+ var sendButtonDisabled = isSendButtonDisabled();
99875
+ var stopButtonDisabled = isStopButtonDisabled();
99823
99876
  var list = attachments || [];
99824
99877
  var hasAttachments = list.length > 0;
99825
99878
  var limit = uploadProps && uploadProps.limit;
99826
99879
  var reachLimit = limit !== undefined && limit !== null && list.length >= Number(limit);
99827
- var isImage = type === 'image';
99880
+ var isMediaView = fileView === 'media';
99828
99881
  var isDirectory = !!(uploadProps && uploadProps.directory);
99882
+ var showToolbarUploadButton = uploadButton === 'toolbar';
99883
+ var showListUploadButton = uploadButton === 'list';
99884
+ var getMediaItemType = function getMediaItemType(type) {
99885
+ var _context;
99886
+ var value = trim_default()(_context = (type || '').toLowerCase()).call(_context);
99887
+ if (value === 'image' || value === 'video' || value === 'audio' || starts_with_default()(value).call(value, 'image/') || starts_with_default()(value).call(value, 'video/') || starts_with_default()(value).call(value, 'audio/')) {
99888
+ return type;
99889
+ }
99890
+ return undefined;
99891
+ };
99829
99892
 
99830
- // 文本模式下,所有附件统一按「文件卡」呈现,避免引入额外的文件夹展示语义。
99831
- // 图片模式下把 type 交给 FileCard 自动识别(基于 name/src),避免业务透传 MIME 干扰媒体类型判断。
99832
- var renderItems = isImage ? map_default()(list).call(list, function (it) {
99893
+ // card 视图下,所有附件统一按「文件卡」呈现,避免引入额外的文件夹展示语义。
99894
+ // media 视图下保留明确媒体类型,但忽略 application/octet-stream 等泛 MIME,继续交给 FileCard 基于 name/src 识别。
99895
+ var renderItems = isMediaView ? map_default()(list).call(list, function (it) {
99833
99896
  return _extends({}, it, {
99834
- type: undefined
99897
+ type: getMediaItemType(it.type)
99835
99898
  });
99836
99899
  }) : map_default()(list).call(list, function (it) {
99837
99900
  return _extends({}, it, {
@@ -99839,12 +99902,8 @@ var sender_vdt_$tmp0 = {
99839
99902
  });
99840
99903
  });
99841
99904
 
99842
- // 图片模式即便没有附件也要展示 FileCardList,用来承载末尾的虚线 + 框。
99843
- var showAttachmentsArea = isImage || hasAttachments;
99844
- // 图片模式下不展示左下默认附件按钮,由 FileCardList 末尾的 + 框替代;用户自定义 slot 仍可保留。
99845
- var showDefaultAttachBtn = !isImage && !$blocks.attachmentsButton && showAttachmentsButton !== false;
99846
- var showAttachSlot = !isImage && hasAttachmentsButtonSlot;
99847
- var showToolbarLeft = showAttachSlot || showDefaultAttachBtn;
99905
+ // 列表入口即便没有附件也要展示 FileCardList,用来承载前置上传按钮。
99906
+ var showAttachmentsArea = showListUploadButton || hasAttachments;
99848
99907
  var onAttachmentClick = function onAttachmentClick(item, e) {
99849
99908
  _this.trigger('attachmentClick', item, e);
99850
99909
  };
@@ -99852,7 +99911,7 @@ var sender_vdt_$tmp0 = {
99852
99911
  _this.trigger('attachmentDelete', item, e);
99853
99912
  removeAttachment(item);
99854
99913
  };
99855
- var classNameObj = (_classNameObj = {}, _classNameObj[k + "-sender"] = true, _classNameObj[k + "-sender-" + type] = true, _classNameObj[k + "-sender-disabled"] = disabled, _classNameObj[className] = className, _classNameObj[sender_styles_makeStyles(k)] = true, _classNameObj);
99914
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-sender"] = true, _classNameObj[k + "-sender-file-view-" + fileView] = true, _classNameObj[k + "-sender-disabled"] = disabled, _classNameObj[k + "-sender-input-disabled"] = inputDisabled, _classNameObj[className] = className, _classNameObj[sender_styles_makeStyles(k)] = true, _classNameObj);
99856
99915
 
99857
99916
  // 整个输入外框 k-sender 的宽度
99858
99917
  if (width != null) {
@@ -99866,39 +99925,81 @@ var sender_vdt_$tmp0 = {
99866
99925
  maxHeight: index_esm_isNumber(maxHeight) ? maxHeight + "px" : maxHeight
99867
99926
  } : undefined;
99868
99927
  var placeholderText = placeholder != null ? placeholder : _$('输入对话内容(Enter发送, Shift + Enter 换行)');
99869
- var defaultSendButton = createElementVNode(2, 'button', createElementVNode(2, 'img', null, 1, index_esm_className(k + "-sender-send-icon"), {
99928
+ var getButtonTooltip = function getButtonTooltip(name) {
99929
+ var value = buttonTooltip && buttonTooltip[name];
99930
+ return value;
99931
+ };
99932
+ var renderButtonWithTooltip = function renderButtonWithTooltip(button, content, className) {
99933
+ return createUnknownComponentVNode(tooltip_Tooltip, {
99934
+ 'content': content,
99935
+ 'className': index_esm_className(className),
99936
+ 'children': button
99937
+ });
99938
+ };
99939
+ var sendButtonText = _$('发送');
99940
+ var stopButtonText = _$('停止生成');
99941
+ var uploadButtonText = isDirectory ? _$('上传文件夹') : _$('上传附件');
99942
+ var listUploadButtonText = _$('参考内容');
99943
+ var currentSendButtonTooltip = getButtonTooltip(generating ? 'stop' : 'send');
99944
+ var currentSendButtonAriaLabel = generating ? stopButtonText : sendButtonText;
99945
+ var currentUploadButtonTooltip = getButtonTooltip('upload');
99946
+ var currentListUploadButtonTooltip = getButtonTooltip('listUpload');
99947
+ var sendButtonTitle = currentSendButtonTooltip === undefined ? currentSendButtonAriaLabel : undefined;
99948
+ var uploadButtonTitle = currentUploadButtonTooltip === undefined ? uploadButtonText : undefined;
99949
+ var listUploadButtonTitle = currentListUploadButtonTooltip === undefined ? listUploadButtonText : undefined;
99950
+ var defaultSendButtonInner = createElementVNode(2, 'button', createElementVNode(2, 'img', null, 1, index_esm_className(k + "-sender-send-icon"), {
99870
99951
  'src': generating ? senderStopIcon : senderSendIcon,
99871
99952
  'alt': '',
99872
99953
  'draggable': false
99873
99954
  }), 2, index_esm_className(k + "-sender-send-btn"), {
99874
99955
  'type': 'button',
99875
- 'disabled': !generating && sendDisabled,
99956
+ 'disabled': generating ? stopButtonDisabled : sendButtonDisabled,
99876
99957
  'ev-click': handleSendClick,
99877
- 'title': generating ? _$('停止生成') : _$('发送'),
99878
- 'aria-label': generating ? _$('停止生成') : _$('发送')
99958
+ 'title': sendButtonTitle,
99959
+ 'aria-label': currentSendButtonAriaLabel
99879
99960
  });
99880
- var defaultAttachButton = createElementVNode(2, 'button', null, 1, index_esm_className(k + "-sender-attach-btn"), {
99961
+ var defaultSendButton = typeof currentSendButtonTooltip === 'string' ? renderButtonWithTooltip(defaultSendButtonInner, currentSendButtonTooltip, k + "-sender-send-tooltip") : defaultSendButtonInner;
99962
+ var defaultAttachButtonInner = createElementVNode(2, 'button', null, 1, index_esm_className(k + "-sender-attach-btn"), {
99881
99963
  'type': 'button',
99882
- 'disabled': disabled,
99964
+ 'disabled': inputDisabled || reachLimit,
99883
99965
  'ev-click': pickFiles,
99884
- 'title': isDirectory ? _$('上传文件夹') : _$('上传附件'),
99885
- 'aria-label': isDirectory ? _$('上传文件夹') : _$('上传附件'),
99966
+ 'title': uploadButtonTitle,
99967
+ 'aria-label': uploadButtonText,
99886
99968
  'innerHTML': senderAttachSvg
99887
99969
  });
99970
+ var defaultAttachButton = typeof currentUploadButtonTooltip === 'string' ? renderButtonWithTooltip(defaultAttachButtonInner, currentUploadButtonTooltip, k + "-sender-upload-tooltip") : defaultAttachButtonInner;
99971
+ var getUploadButtonSlotParams = function getUploadButtonSlotParams(position) {
99972
+ return {
99973
+ disabled: inputDisabled,
99974
+ reachLimit: reachLimit,
99975
+ position: position,
99976
+ addFiles: addFiles,
99977
+ pickFiles: pickFiles
99978
+ };
99979
+ };
99980
+ var renderUploadButtonSlot = function renderUploadButtonSlot(position) {
99981
+ var slot = renderSlot('uploadButton', getUploadButtonSlotParams(position));
99982
+ return isEmptySlot(slot) ? undefined : slot;
99983
+ };
99888
99984
 
99889
- // type='image' 末尾的虚线 + 框,与 Upload 画廊的 + 卡片视觉等效;点击触发文件选择。
99890
- var imageAddBox = createElementVNode(2, 'div', createUnknownComponentVNode(Icon, {
99891
- 'className': index_esm_className(k + "-icon-add-bold"),
99892
- 'size': 'large'
99893
- }), 2, index_esm_className((_$cn2 = {}, _$cn2[k + "-sender-image-add"] = true, _$cn2[k + "-sender-image-add-disabled"] = disabled, _$cn2)), {
99894
- 'ev-click': disabled ? undefined : pickFiles,
99985
+ // 附件列表末尾的虚线 +
99986
+ var listUploadButtonInner = createElementVNode(2, 'div', [createUnknownComponentVNode(Icon, {
99987
+ 'className': index_esm_className(k + "-icon-add-bold")
99988
+ }), createElementVNode(2, 'div', listUploadButtonText, 0, index_esm_className(k + "-sender-list-upload-text"))], 4, index_esm_className((_$cn2 = {}, _$cn2[k + "-sender-list-upload"] = true, _$cn2[k + "-sender-list-upload-disabled"] = inputDisabled, _$cn2)), {
99989
+ 'ev-click': inputDisabled ? undefined : pickFiles,
99895
99990
  'role': 'button',
99896
- 'title': _$('上传图片'),
99897
- 'aria-label': _$('上传图片')
99991
+ 'title': listUploadButtonTitle,
99992
+ 'aria-label': listUploadButtonText
99898
99993
  });
99994
+ var listUploadButton = typeof currentListUploadButtonTooltip === 'string' ? renderButtonWithTooltip(listUploadButtonInner, currentListUploadButtonTooltip, k + "-sender-list-upload-tooltip") : listUploadButtonInner;
99995
+ var toolbarUploadButtonSlot = showToolbarUploadButton ? renderUploadButtonSlot('toolbar') : undefined;
99996
+ var listUploadButtonSlot = showListUploadButton ? renderUploadButtonSlot('list') : undefined;
99997
+ var showDefaultToolbarUploadButton = showToolbarUploadButton && !toolbarUploadButtonSlot;
99998
+ var showToolbarLeft = showToolbarUploadButton;
99899
99999
  var sendButtonSlotParams = {
99900
100000
  generating: generating,
99901
- disabled: sendDisabled,
100001
+ disabled: sendButtonDisabled,
100002
+ stopDisabled: stopButtonDisabled,
99902
100003
  loading: loading,
99903
100004
  send: send,
99904
100005
  stopGenerate: stopGenerate
@@ -99907,21 +100008,22 @@ var sender_vdt_$tmp0 = {
99907
100008
  'className': index_esm_className(classNameObj)
99908
100009
  }, getRestProps(this), {
99909
100010
  'style': style
99910
- }), [hasHeaderSlot ? createElementVNode(2, 'div', headerSlot, 0, index_esm_className(k + "-sender-header")) : undefined, createElementVNode(2, 'div', [showAttachmentsArea ? createElementVNode(2, 'div', isImage ? createUnknownComponentVNode(FileCardList, {
100011
+ }), [hasHeaderSlot ? createElementVNode(2, 'div', headerSlot, 0, index_esm_className(k + "-sender-header")) : undefined, createElementVNode(2, 'div', [showAttachmentsArea ? createElementVNode(2, 'div', isMediaView ? createUnknownComponentVNode(FileCardList, {
99911
100012
  'items': renderItems,
99912
100013
  'deleteable': true,
99913
100014
  'overflow': 'scrollY',
100015
+ 'showNameTooltip': true,
99914
100016
  'ev-click': onAttachmentClick,
99915
100017
  'ev-delete': onAttachmentDelete,
99916
100018
  '$blocks': function ($blocks) {
99917
100019
  var _$blocks = {},
99918
100020
  __$blocks = extend({}, $blocks);
99919
- return (_$blocks['extension'] = function ($super) {
99920
- return !disabled && !reachLimit ? imageAddBox : undefined;
99921
- }, __$blocks['extension'] = function ($super, data) {
99922
- var block = $blocks['extension'];
100021
+ return (_$blocks['prefix'] = function ($super) {
100022
+ return showListUploadButton && !reachLimit ? listUploadButtonSlot || listUploadButton : undefined;
100023
+ }, __$blocks['prefix'] = function ($super, data) {
100024
+ var block = $blocks['prefix'];
99923
100025
  var callBlock = function callBlock() {
99924
- return _$blocks['extension'].call($this, $super, data);
100026
+ return _$blocks['prefix'].call($this, $super, data);
99925
100027
  };
99926
100028
  return block ? block.call($this, callBlock, data) : callBlock();
99927
100029
  }), __$blocks;
@@ -99930,20 +100032,34 @@ var sender_vdt_$tmp0 = {
99930
100032
  'items': renderItems,
99931
100033
  'deleteable': true,
99932
100034
  'overflow': 'scrollY',
100035
+ 'showNameTooltip': true,
99933
100036
  'ev-click': onAttachmentClick,
99934
- 'ev-delete': onAttachmentDelete
99935
- }), 2, index_esm_className((_$cn3 = {}, _$cn3[k + "-sender-attachments"] = true, _$cn3[k + "-sender-attachments-" + type] = true, _$cn3))) : undefined, hasBeforeInputSlot ? createElementVNode(2, 'div', beforeInputSlot, 0, index_esm_className(k + "-sender-before-input")) : undefined, createElementVNode(2, 'div', createElementVNode(256, 'textarea', null, 1, index_esm_className(k + "-sender-input"), {
100037
+ 'ev-delete': onAttachmentDelete,
100038
+ '$blocks': function ($blocks) {
100039
+ var _$blocks = {},
100040
+ __$blocks = extend({}, $blocks);
100041
+ return (_$blocks['prefix'] = function ($super) {
100042
+ return showListUploadButton && !reachLimit ? listUploadButtonSlot || listUploadButton : undefined;
100043
+ }, __$blocks['prefix'] = function ($super, data) {
100044
+ var block = $blocks['prefix'];
100045
+ var callBlock = function callBlock() {
100046
+ return _$blocks['prefix'].call($this, $super, data);
100047
+ };
100048
+ return block ? block.call($this, callBlock, data) : callBlock();
100049
+ }), __$blocks;
100050
+ }.call($this, EMPTY_OBJ)
100051
+ }), 2, index_esm_className((_$cn3 = {}, _$cn3[k + "-sender-attachments"] = true, _$cn3[k + "-sender-attachments-" + fileView] = true, _$cn3))) : undefined, hasBeforeInputSlot ? createElementVNode(2, 'div', beforeInputSlot, 0, index_esm_className(k + "-sender-before-input")) : undefined, createElementVNode(2, 'div', [hasPrefixSlot ? createElementVNode(2, 'div', prefixSlot, 0, index_esm_className(k + "-sender-prefix")) : undefined, createElementVNode(256, 'textarea', null, 1, index_esm_className(k + "-sender-input"), {
99936
100052
  'rows': 1,
99937
100053
  'value': value,
99938
100054
  'placeholder': placeholderText,
99939
- 'disabled': disabled,
100055
+ 'disabled': inputDisabled,
99940
100056
  'readOnly': readonly,
99941
100057
  'ev-input': handleInput,
99942
100058
  'ev-keydown': handleKeydown,
99943
100059
  'ev-paste': handlePaste,
99944
100060
  'ev-focus': handleFocus,
99945
100061
  'ev-blur': handleBlur
99946
- }, null, this.textareaRef), 2, index_esm_className(k + "-sender-input-area")), createElementVNode(2, 'div', [showToolbarLeft ? createElementVNode(2, 'div', showAttachSlot ? attachmentsButtonSlot : showDefaultAttachBtn ? defaultAttachButton : undefined, 0, index_esm_className(k + "-sender-toolbar-left")) : undefined, hasConfigureSlot ? createElementVNode(2, 'div', configureSlot, 0, index_esm_className(k + "-sender-toolbar-middle")) : undefined, createElementVNode(2, 'div', $blocks.sendButton ? (_$blocks['sendButton'] = function ($super) {
100062
+ }, null, this.textareaRef)], 0, index_esm_className(k + "-sender-input-area")), createElementVNode(2, 'div', [showToolbarLeft ? createElementVNode(2, 'div', toolbarUploadButtonSlot ? toolbarUploadButtonSlot : showDefaultToolbarUploadButton ? defaultAttachButton : undefined, 0, index_esm_className(k + "-sender-toolbar-left")) : undefined, hasConfigureSlot ? createElementVNode(2, 'div', configureSlot, 0, index_esm_className(k + "-sender-toolbar-middle")) : undefined, createElementVNode(2, 'div', $blocks.sendButton ? (_$blocks['sendButton'] = function ($super) {
99947
100063
  return null;
99948
100064
  }, __$blocks['sendButton'] = function ($super, data) {
99949
100065
  var block = $blocks['sendButton'];
@@ -99958,7 +100074,7 @@ var sender_vdt_$tmp0 = {
99958
100074
  'directory': isDirectory ? '' : undefined,
99959
100075
  'webkitdirectory': isDirectory ? '' : undefined,
99960
100076
  'ev-change': onInputChange
99961
- }, null, this.fileInputRef)], 0, index_esm_className((_$cn4 = {}, _$cn4[k + "-sender-shell"] = true, _$cn4[k + "-sender-active"] = isFocus.value && !disabled, _$cn4)), {
100077
+ }, null, this.fileInputRef)], 0, index_esm_className((_$cn4 = {}, _$cn4[k + "-sender-shell"] = true, _$cn4[k + "-sender-active"] = isFocus.value && !inputDisabled, _$cn4)), {
99962
100078
  'style': shellStyle
99963
100079
  }), hasFooterSlot ? createElementVNode(2, 'div', footerSlot, 0, index_esm_className(k + "-sender-footer")) : undefined, enableDragFile && dragController.dragOver.value ? createElementVNode(2, 'div', createElementVNode(2, 'div', [createUnknownComponentVNode(Icon, {
99964
100080
  'className': index_esm_className(k + "-icon-upload"),
@@ -99989,6 +100105,9 @@ function useSenderInput(textareaRef) {
99989
100105
  function isDisabled() {
99990
100106
  return !!instance.get('disabled');
99991
100107
  }
100108
+ function isInputDisabled() {
100109
+ return isDisabled() || !!instance.get('inputDisabled');
100110
+ }
99992
100111
  function isGenerating() {
99993
100112
  return !!instance.get('generating');
99994
100113
  }
@@ -99997,13 +100116,22 @@ function useSenderInput(textareaRef) {
99997
100116
  }
99998
100117
  /** 发送按钮的最终禁用态:业务强制 disabled 优先,其余按内容自动判定 */
99999
100118
  function isSendButtonDisabled() {
100000
- if (isDisabled() || isLoading()) return true;
100119
+ if (isDisabled() || isLoading() || instance.get('sendDisabled') || instance.get('inputDisabled')) return true;
100120
+ if (isGenerating()) return false;
100121
+ return isSendButtonAutoDisabled();
100122
+ }
100123
+ /** 生成中的停止按钮禁用态,独立于发送禁用态。 */
100124
+ function isStopButtonDisabled() {
100125
+ return isDisabled() || !!instance.get('stopDisabled');
100126
+ }
100127
+ function isSendDisabled() {
100128
+ if (isDisabled() || isLoading() || instance.get('sendDisabled') || instance.get('inputDisabled')) return true;
100001
100129
  if (isGenerating()) return false;
100002
100130
  return isSendButtonAutoDisabled();
100003
100131
  }
100004
100132
  // 发送消息
100005
100133
  function send() {
100006
- if (isGenerating() || isSendButtonDisabled()) return;
100134
+ if (isGenerating() || isSendDisabled()) return;
100007
100135
  var value = getValueText();
100008
100136
  var attachments = getCurrentAttachments();
100009
100137
  instance.trigger('messageSend', {
@@ -100019,10 +100147,11 @@ function useSenderInput(textareaRef) {
100019
100147
  }
100020
100148
  }
100021
100149
  function stopGenerate() {
100150
+ if (!isGenerating() || isStopButtonDisabled()) return;
100022
100151
  instance.trigger('stopGenerate');
100023
100152
  }
100024
100153
  function handleKeydown(e) {
100025
- if (e.key !== 'Enter' || !instance.get('submitOnEnter') || isDisabled() || instance.get('readonly')) return;
100154
+ if (e.key !== 'Enter' || !instance.get('submitOnEnter') || isInputDisabled() || instance.get('readonly')) return;
100026
100155
  // Shift / 中文 IME 期间不触发提交
100027
100156
  if (e.shiftKey || e.isComposing || e.keyCode === 229) return;
100028
100157
  e.preventDefault();
@@ -100031,6 +100160,7 @@ function useSenderInput(textareaRef) {
100031
100160
  send();
100032
100161
  }
100033
100162
  function handleInput(e) {
100163
+ if (isInputDisabled() || instance.get('readonly')) return;
100034
100164
  var next = e.target.value;
100035
100165
  instance.set('value', next);
100036
100166
  }
@@ -100052,9 +100182,12 @@ function useSenderInput(textareaRef) {
100052
100182
  return {
100053
100183
  isFocus: isFocus,
100054
100184
  isDisabled: isDisabled,
100185
+ isInputDisabled: isInputDisabled,
100055
100186
  isGenerating: isGenerating,
100056
100187
  isLoading: isLoading,
100057
100188
  isSendButtonDisabled: isSendButtonDisabled,
100189
+ isStopButtonDisabled: isStopButtonDisabled,
100190
+ isSendDisabled: isSendDisabled,
100058
100191
  send: send,
100059
100192
  stopGenerate: stopGenerate,
100060
100193
  handleKeydown: handleKeydown,
@@ -100206,8 +100339,6 @@ function useSenderUpload_arrayLikeToArray(arr, len) {
100206
100339
 
100207
100340
  // 用一个递增 id 给本地附件分配 key,与 Upload 组件保持一致策略。
100208
100341
  var useSenderUpload_uid = 0;
100209
- // 视觉模型默认 accept;普通文本模式不限制。
100210
- var IMAGE_ACCEPT = 'image/*';
100211
100342
  // 内置的「文件选择 + XHR 上传」逻辑。
100212
100343
  // 不直接复用 Upload 内部 hook,因为它强依赖 useInstance() as Upload 的状态形状;
100213
100344
  // 这里直接复用更底层的 request() 和上传约束规则,避免在 Sender 里渲染额外的 Upload 节点。
@@ -100220,7 +100351,6 @@ function useSenderUpload(fileInputRef) {
100220
100351
  var _getUploadProps = getUploadProps(),
100221
100352
  accept = _getUploadProps.accept;
100222
100353
  if (accept) return accept;
100223
- if (instance.get('type') === 'image') return IMAGE_ACCEPT;
100224
100354
  return undefined;
100225
100355
  }
100226
100356
  function isMultiple() {
@@ -100233,6 +100363,9 @@ function useSenderUpload(fileInputRef) {
100233
100363
  function getAttachments() {
100234
100364
  return instance.get('attachments') || [];
100235
100365
  }
100366
+ function isInputDisabled() {
100367
+ return !!instance.get('disabled') || !!instance.get('inputDisabled');
100368
+ }
100236
100369
  function setAttachments(next) {
100237
100370
  // 触发 change:attachments,配合 Vue v-model:attachments / React onChangeAttachments
100238
100371
  instance.set('attachments', next);
@@ -100370,13 +100503,19 @@ function useSenderUpload(fileInputRef) {
100370
100503
  return regenerator_default().wrap(function _callee2$(_context5) {
100371
100504
  while (1) switch (_context5.prev = _context5.next) {
100372
100505
  case 0:
100506
+ if (!isInputDisabled()) {
100507
+ _context5.next = 2;
100508
+ break;
100509
+ }
100510
+ return _context5.abrupt("return");
100511
+ case 2:
100373
100512
  props = getUploadProps();
100374
100513
  accept = getAcceptAttr();
100375
100514
  limit = props.limit, maxSize = props.maxSize, _props$autoUpload = props.autoUpload, autoUpload = _props$autoUpload === void 0 ? true : _props$autoUpload, beforeUpload = props.beforeUpload;
100376
100515
  current = getAttachments();
100377
100516
  incoming = from_default()(fileList);
100378
100517
  if (!(limit && current.length + incoming.length > limit)) {
100379
- _context5.next = 9;
100518
+ _context5.next = 11;
100380
100519
  break;
100381
100520
  }
100382
100521
  err = new Error(_$('超出文件数量最大限制:{limit}', {
@@ -100384,18 +100523,18 @@ function useSenderUpload(fileInputRef) {
100384
100523
  }));
100385
100524
  instance.trigger('uploadError', err, undefined);
100386
100525
  return _context5.abrupt("return");
100387
- case 9:
100526
+ case 11:
100388
100527
  next = slice_default()(current).call(current, 0); // 暂存待上传项,先一次性入列再异步发起请求,避免 UI 抖动
100389
100528
  queued = [];
100390
100529
  _iterator = useSenderUpload_createForOfIteratorHelperLoose(incoming);
100391
- case 12:
100530
+ case 14:
100392
100531
  if ((_step = _iterator()).done) {
100393
- _context5.next = 27;
100532
+ _context5.next = 29;
100394
100533
  break;
100395
100534
  }
100396
100535
  file = _step.value;
100397
100536
  if (!(maxSize && file.size > maxSize * 1024)) {
100398
- _context5.next = 18;
100537
+ _context5.next = 20;
100399
100538
  break;
100400
100539
  }
100401
100540
  _err = new Error(_$('"{name}" 超出文件最大限制:{maxSize}kb', {
@@ -100403,48 +100542,48 @@ function useSenderUpload(fileInputRef) {
100403
100542
  maxSize: maxSize
100404
100543
  }));
100405
100544
  instance.trigger('uploadError', _err, undefined);
100406
- return _context5.abrupt("continue", 25);
100407
- case 18:
100545
+ return _context5.abrupt("continue", 27);
100546
+ case 20:
100408
100547
  if (isAcceptValid(file, accept)) {
100409
- _context5.next = 22;
100548
+ _context5.next = 24;
100410
100549
  break;
100411
100550
  }
100412
100551
  _err2 = new Error(_$('"{name}" 文件类型不合法', {
100413
100552
  name: file.name
100414
100553
  }));
100415
100554
  instance.trigger('uploadError', _err2, undefined);
100416
- return _context5.abrupt("continue", 25);
100417
- case 22:
100555
+ return _context5.abrupt("continue", 27);
100556
+ case 24:
100418
100557
  _item = makeAttachment(file);
100419
100558
  queued.push(_item);
100420
100559
  next.push(_item);
100421
- case 25:
100422
- _context5.next = 12;
100423
- break;
100424
100560
  case 27:
100561
+ _context5.next = 14;
100562
+ break;
100563
+ case 29:
100425
100564
  setAttachments(next);
100426
100565
  _i = 0, _queued = queued;
100427
- case 29:
100566
+ case 31:
100428
100567
  if (!(_i < _queued.length)) {
100429
- _context5.next = 42;
100568
+ _context5.next = 44;
100430
100569
  break;
100431
100570
  }
100432
100571
  item = _queued[_i];
100433
100572
  if (!beforeUpload) {
100434
- _context5.next = 38;
100573
+ _context5.next = 40;
100435
100574
  break;
100436
100575
  }
100437
- _context5.next = 34;
100576
+ _context5.next = 36;
100438
100577
  return beforeUpload(item, getAttachments());
100439
- case 34:
100578
+ case 36:
100440
100579
  ok = _context5.sent;
100441
100580
  if (ok) {
100442
- _context5.next = 38;
100581
+ _context5.next = 40;
100443
100582
  break;
100444
100583
  }
100445
100584
  removeAttachment(item, false);
100446
- return _context5.abrupt("continue", 39);
100447
- case 38:
100585
+ return _context5.abrupt("continue", 41);
100586
+ case 40:
100448
100587
  if (autoUpload) {
100449
100588
  performUpload(item);
100450
100589
  } else {
@@ -100452,11 +100591,11 @@ function useSenderUpload(fileInputRef) {
100452
100591
  status: 'default'
100453
100592
  });
100454
100593
  }
100455
- case 39:
100594
+ case 41:
100456
100595
  _i++;
100457
- _context5.next = 29;
100596
+ _context5.next = 31;
100458
100597
  break;
100459
- case 42:
100598
+ case 44:
100460
100599
  case "end":
100461
100600
  return _context5.stop();
100462
100601
  }
@@ -100555,7 +100694,7 @@ function useSenderUpload(fileInputRef) {
100555
100694
  }
100556
100695
  function onInputChange(e) {
100557
100696
  var input = e.target;
100558
- if (input.files && input.files.length) {
100697
+ if (!isInputDisabled() && input.files && input.files.length) {
100559
100698
  addFiles(input.files);
100560
100699
  }
100561
100700
  input.value = '';
@@ -100563,7 +100702,10 @@ function useSenderUpload(fileInputRef) {
100563
100702
  /** 触发左下角 + 号按钮的文件选择 */
100564
100703
  function pickFiles() {
100565
100704
  var _fileInputRef$value;
100566
- if (instance.get('disabled')) return;
100705
+ if (isInputDisabled()) return;
100706
+ var _getUploadProps4 = getUploadProps(),
100707
+ limit = _getUploadProps4.limit;
100708
+ if (limit !== undefined && limit !== null && getAttachments().length >= Number(limit)) return;
100567
100709
  (_fileInputRef$value = fileInputRef.value) == null || _fileInputRef$value.click();
100568
100710
  }
100569
100711
  return {
@@ -100580,10 +100722,10 @@ function useSenderUpload(fileInputRef) {
100580
100722
 
100581
100723
 
100582
100724
 
100583
- // textarea 高度自适应:textarea 默认高 text=64、image=32;maxHeight 约束整个输入外框而非 textarea 本身。
100725
+ // textarea 高度自适应:文件卡视图默认 64,媒体缩略图视图默认 20;maxHeight 约束整个输入外框而非 textarea 本身。
100584
100726
  var SHELL_MAX_FALLBACK = 300;
100585
- var TEXTAREA_MIN_TEXT = 64;
100586
- var TEXTAREA_MIN_IMAGE = 20;
100727
+ var TEXTAREA_MIN_CARD = 64;
100728
+ var TEXTAREA_MIN_MEDIA = 20;
100587
100729
  function useAutoResize(textareaRef) {
100588
100730
  var instance = useInstance();
100589
100731
  var _useConfigContext = useConfigContext(),
@@ -100624,8 +100766,8 @@ function useAutoResize(textareaRef) {
100624
100766
  if (!el) return;
100625
100767
  var shell = getShell(el);
100626
100768
  if (!shell) return;
100627
- var isImage = instance.get('type') === 'image';
100628
- var min = isImage ? TEXTAREA_MIN_IMAGE : TEXTAREA_MIN_TEXT;
100769
+ var isMediaView = instance.get('fileView') === 'media';
100770
+ var min = isMediaView ? TEXTAREA_MIN_MEDIA : TEXTAREA_MIN_CARD;
100629
100771
  /** 整框最大高度(props 或默认 300),从实际 CSS 读取,支持 50vh 等合法 CSS 值 */
100630
100772
  var shellMax = getShellMaxHeight(shell);
100631
100773
  var nonInputH = measureNonInputBlockHeight(el, shell);
@@ -100664,7 +100806,7 @@ function useAutoResize(textareaRef) {
100664
100806
  inited: true,
100665
100807
  presented: true
100666
100808
  });
100667
- instance.watch('type', scheduleAdjust, {
100809
+ instance.watch('fileView', scheduleAdjust, {
100668
100810
  inited: true,
100669
100811
  presented: true
100670
100812
  });
@@ -100909,8 +101051,11 @@ function _extractDroppedFiles() {
100909
101051
  function useSenderDrag(addFiles) {
100910
101052
  var instance = useInstance();
100911
101053
  var dragOver = useState(false);
101054
+ function isInputDisabled() {
101055
+ return !!instance.get('disabled') || !!instance.get('inputDisabled');
101056
+ }
100912
101057
  function isEnabled() {
100913
- return !!instance.get('dragFile') && !instance.get('disabled');
101058
+ return !!instance.get('dragFile') && !isInputDisabled();
100914
101059
  }
100915
101060
  var controller = {
100916
101061
  dragOver: dragOver,
@@ -100921,7 +101066,7 @@ function useSenderDrag(addFiles) {
100921
101066
  e.stopPropagation();
100922
101067
  },
100923
101068
  onDragEnter: function onDragEnter() {
100924
- if (instance.get('disabled')) return;
101069
+ if (isInputDisabled()) return;
100925
101070
  controller.counter++;
100926
101071
  if (!dragOver.value) {
100927
101072
  dragOver.set(true);
@@ -100938,7 +101083,7 @@ function useSenderDrag(addFiles) {
100938
101083
  var _instance$get, _e$dataTransfer2;
100939
101084
  controller.stopEvent(e);
100940
101085
  controller.reset();
100941
- if (instance.get('disabled')) return;
101086
+ if (isInputDisabled()) return;
100942
101087
  var directoryEnabled = !!((_instance$get = instance.get('uploadProps')) != null && _instance$get.directory);
100943
101088
  var directFiles = (_e$dataTransfer2 = e.dataTransfer) == null ? void 0 : _e$dataTransfer2.files;
100944
101089
  if (!directoryEnabled && directFiles != null && directFiles.length) {
@@ -100993,6 +101138,12 @@ function useSenderDrag(addFiles) {
100993
101138
  }
100994
101139
  syncController();
100995
101140
  });
101141
+ instance.watch('inputDisabled', function (disabled) {
101142
+ if (disabled) {
101143
+ controller.reset();
101144
+ }
101145
+ syncController();
101146
+ });
100996
101147
  return {
100997
101148
  dragOver: dragOver
100998
101149
  };
@@ -101024,7 +101175,7 @@ function getClipboardFiles(e) {
101024
101175
  function useSenderPaste(addFiles) {
101025
101176
  var instance = useInstance();
101026
101177
  function handlePaste(e) {
101027
- if (!instance.get('pasteFile') || instance.get('disabled') || instance.get('readonly')) return;
101178
+ if (!instance.get('pasteFile') || instance.get('disabled') || instance.get('inputDisabled') || instance.get('readonly')) return;
101028
101179
  var files = getClipboardFiles(e);
101029
101180
  if (!files.length) return;
101030
101181
  e.preventDefault();
@@ -101049,17 +101200,21 @@ var sender_typeDefs = {
101049
101200
  value: String,
101050
101201
  placeholder: String,
101051
101202
  disabled: Boolean,
101203
+ inputDisabled: Boolean,
101204
+ sendDisabled: Boolean,
101205
+ stopDisabled: Boolean,
101052
101206
  readonly: Boolean,
101053
101207
  generating: Boolean,
101054
101208
  loading: Boolean,
101055
- type: ['text', 'image'],
101209
+ fileView: ['card', 'media'],
101210
+ uploadButton: ['toolbar', 'list', 'none'],
101211
+ buttonTooltip: Object,
101056
101212
  dragFile: Boolean,
101057
101213
  pasteFile: Boolean,
101058
101214
  width: [String, Number],
101059
101215
  maxHeight: [String, Number],
101060
101216
  attachments: Array,
101061
101217
  uploadProps: Object,
101062
- showAttachmentsButton: Boolean,
101063
101218
  submitOnEnter: Boolean,
101064
101219
  clearOnSend: Boolean
101065
101220
  };
@@ -101068,17 +101223,21 @@ var sender_defaults = function defaults() {
101068
101223
  value: '',
101069
101224
  placeholder: undefined,
101070
101225
  disabled: false,
101226
+ inputDisabled: false,
101227
+ sendDisabled: false,
101228
+ stopDisabled: false,
101071
101229
  readonly: false,
101072
101230
  generating: false,
101073
101231
  loading: false,
101074
- type: 'text',
101232
+ fileView: 'card',
101233
+ uploadButton: 'toolbar',
101234
+ buttonTooltip: undefined,
101075
101235
  dragFile: false,
101076
101236
  pasteFile: false,
101077
101237
  width: 640,
101078
101238
  maxHeight: undefined,
101079
101239
  attachments: undefined,
101080
101240
  uploadProps: undefined,
101081
- showAttachmentsButton: true,
101082
101241
  submitOnEnter: true,
101083
101242
  clearOnSend: true
101084
101243
  };
@@ -101135,9 +101294,12 @@ var Sender = /*#__PURE__*/function (_Component) {
101135
101294
  void this.upload.clearAttachments();
101136
101295
  }
101137
101296
  }
101297
+ /** 复用 Sender 内置上传逻辑添加本地文件,适合自定义附件弹窗确认后调用。 */;
101298
+ _proto.addFiles = function addFiles(files) {
101299
+ void this.upload.addFiles(files);
101300
+ }
101138
101301
  /** 主动触发停止生成,等价于点击生成中的停止按钮。 */;
101139
101302
  _proto.stopGenerate = function stopGenerate() {
101140
- if (!this.get('generating')) return;
101141
101303
  this.input.stopGenerate();
101142
101304
  };
101143
101305
  return Sender;
@@ -101381,7 +101543,7 @@ var spin_index_vdt_$tmp0 = {
101381
101543
  'cy': '60',
101382
101544
  'r': '57'
101383
101545
  };
101384
- var index_vdt_$tmp1 = {
101546
+ var spin_index_vdt_$tmp1 = {
101385
101547
  'viewBox': '0 0 120 120'
101386
101548
  };
101387
101549
  /* harmony default export */ function spin_index_vdt($props, $blocks, $__proto__) {
@@ -101399,7 +101561,7 @@ var index_vdt_$tmp1 = {
101399
101561
  var k = this.config.k;
101400
101562
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-spin"] = true, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[k + "-center"] = !overlay && center, _classNameObj[k + "-overlay"] = overlay, _classNameObj[className] = className, _classNameObj[spin_styles_makeStyles(k)] = true, _classNameObj);
101401
101563
  var canvas = createElementVNode(2, 'div', (_$blocks['canvas'] = function ($super) {
101402
- return createElementVNode(512, 'svg', createElementVNode(2, 'circle', null, 1, index_esm_className(k + "-spin-circle"), spin_index_vdt_$tmp0), 2, null, index_vdt_$tmp1);
101564
+ return createElementVNode(512, 'svg', createElementVNode(2, 'circle', null, 1, index_esm_className(k + "-spin-circle"), spin_index_vdt_$tmp0), 2, null, spin_index_vdt_$tmp1);
101403
101565
  }, __$blocks['canvas'] = function ($super, data) {
101404
101566
  var block = $blocks['canvas'];
101405
101567
  var callBlock = function callBlock() {
@@ -109587,7 +109749,7 @@ var xmarkdown_styles_makeStyles = utils_cache(function makeStyles(k) {
109587
109749
  return (
109588
109750
  /*#__PURE__*/
109589
109751
  /*#__PURE__*/
109590
- css("display:block;color:", xmarkdown.color, ";line-height:1.7;font-size:14px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;.", k, "-xmarkdown-loading,.", k, "-xmarkdown-empty{display:inline-flex;align-items:center;gap:8px;color:", xmarkdown.mutedColor, ";min-height:24px;}.", k, "-xmarkdown-loading-dots{display:inline-flex;align-items:center;gap:4px;margin-right:4px;}.", k, "-xmarkdown-loading-dot{width:", xmarkdown.loadingDotSize, ";height:", xmarkdown.loadingDotSize, ";border-radius:50%;background:", xmarkdown.loadingDotColor, ";display:inline-block;animation:", k, "-xmarkdown-loading-bounce 1s ease-in-out infinite;opacity:0.45;}.", k, "-xmarkdown-loading-dot:nth-of-type(2){animation-delay:0.14s;}.", k, "-xmarkdown-loading-dot:nth-of-type(3){animation-delay:0.28s;}@keyframes ", k, "-xmarkdown-loading-bounce{0%,80%,100%{transform:translateY(0) scale(0.9);opacity:0.45;}40%{transform:translateY(-4px) scale(1);opacity:1;}}.", k, "-xmarkdown-content{color:inherit;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;}.", k, "-xmarkdown-content p{font-size:12px;}.", k, "-xmarkdown-stable,.", k, "-xmarkdown-tail{display:contents;}.", k, "-xmarkdown-stable>:first-child{margin-top:0;}.", k, "-xmarkdown-stable>:last-child,.", k, "-xmarkdown-tail>:last-child{margin-bottom:0;}.", k, "-xmarkdown-content [data-kpc-xmarkdown-tail=\"true\"]{display:inline;white-space:pre-wrap;word-break:break-word;}.", k, "-xmarkdown-stable>p,.", k, "-xmarkdown-stable>ul,.", k, "-xmarkdown-stable>ol,.", k, "-xmarkdown-stable>blockquote,.", k, "-xmarkdown-stable>pre,.", k, "-xmarkdown-stable>table,.", k, "-xmarkdown-stable>hr,.", k, "-xmarkdown-stable>h1,.", k, "-xmarkdown-stable>h2,.", k, "-xmarkdown-stable>h3,.", k, "-xmarkdown-stable>h4,.", k, "-xmarkdown-stable>h5,.", k, "-xmarkdown-stable>h6{margin:0 0 12px;}.", k, "-xmarkdown-content blockquote>:first-child{margin-top:0;}.", k, "-xmarkdown-content blockquote>:last-child{margin-bottom:0;}.", k, "-xmarkdown-content ul,.", k, "-xmarkdown-content ol{padding-left:20px;}.", k, "-xmarkdown-content li{margin:6px 0;}.", k, "-xmarkdown-content li>p{margin:6px 0;}.", k, "-xmarkdown-content li>p:first-child{margin-top:0;}.", k, "-xmarkdown-content li>p:last-child{margin-bottom:0;}.", k, "-xmarkdown-content h1,.", k, "-xmarkdown-content h2,.", k, "-xmarkdown-content h3,.", k, "-xmarkdown-content h4,.", k, "-xmarkdown-content h5,.", k, "-xmarkdown-content h6{color:", xmarkdown.headingColor, ";font-weight:600;line-height:1.35;}.", k, "-xmarkdown-content h1{font-size:24px;}.", k, "-xmarkdown-content h2{font-size:20px;}.", k, "-xmarkdown-content h3{font-size:18px;}.", k, "-xmarkdown-content h4,.", k, "-xmarkdown-content h5,.", k, "-xmarkdown-content h6{font-size:16px;}.", k, "-xmarkdown-content a{color:", theme.color.primary, ";text-decoration:none;}.", k, "-xmarkdown-content a:hover{text-decoration:underline;}.", k, "-xmarkdown-content img{display:block;max-width:100%;height:auto;border-radius:8px;}.", k, "-xmarkdown-content hr{border:0;border-top:1px solid ", xmarkdown.hrColor, ";}.", k, "-xmarkdown-inline-code{display:inline-block;padding:0 6px;border-radius:6px;font-size:12px;line-height:1.7;vertical-align:baseline;background:", xmarkdown.inlineCodeBg, ";color:", xmarkdown.inlineCodeColor, ";border:1px solid ", xmarkdown.inlineCodeBorder, ";}.", k, "-xmarkdown-content pre{margin:0;overflow:auto;}.", k, "-xmarkdown-code-block,.", k, "-xmarkdown-mermaid-block{margin:0 0 12px;min-width:0;max-width:100%;overflow:hidden;border:1px solid ", xmarkdown.codeBlockBorder, ";border-radius:18px;background:", xmarkdown.codeBlockBg, ";box-sizing:border-box;}.", k, "-xmarkdown-code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid ", xmarkdown.codeBlockBorder, ";background:", xmarkdown.codeToolbarBg, ";color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-code-language{min-width:0;font-size:13px;font-weight:700;letter-spacing:0.02em;text-transform:uppercase;color:inherit;flex:1 1 auto;}.", k, "-xmarkdown-code-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:100%;margin-left:auto;}.", k, "-xmarkdown-toolbar-toggle-group,.", k, "-xmarkdown-toolbar-action-group{display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%;}.", k, "-xmarkdown-toolbar-toggle-group{margin-right:2px;}.", k, "-xmarkdown-toolbar-toggle{border:0;padding:0 6px;background:transparent;color:", xmarkdown.mutedColor, ";font-size:12px;line-height:20px;cursor:pointer;transition:color ", theme.transition.small, ";}.", k, "-xmarkdown-toolbar-toggle[data-kpc-selected=\"true\"]{color:", xmarkdown.codeToolbarColor, ";font-weight:600;}.", k, "-xmarkdown-toolbar-toggle:hover{color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-toolbar-icon-button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;color:", xmarkdown.codeActionColor, ";cursor:pointer;transition:color ", theme.transition.small, ",background ", theme.transition.small, ";}.", k, "-xmarkdown-toolbar-icon-button:hover:not(:disabled){background:", xmarkdown.codeActionHoverBg, ";color:", theme.color.primary, ";}.", k, "-xmarkdown-toolbar-icon-button:disabled{opacity:0.4;cursor:not-allowed;background:transparent;color:", xmarkdown.codeActionColor, ";}.", k, "-xmarkdown-toolbar-icon{font-size:14px;line-height:1;}.", k, "-xmarkdown-code-body,.", k, "-xmarkdown-mermaid-body{min-width:0;max-width:100%;overflow:auto;background:", xmarkdown.codeBlockBg, ";}.", k, "-xmarkdown-code-block pre,.", k, "-xmarkdown-mermaid-source{padding:0px;background:transparent;color:", xmarkdown.codeTextColor, ";}.", k, "-xmarkdown-code-block pre,.", k, "-xmarkdown-mermaid-source{font-family:SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;font-size:12px;line-height:1.7;}.", k, "-xmarkdown-code-block pre code,.", k, "-xmarkdown-mermaid-source code{display:block;min-width:fit-content;color:inherit;white-space:pre;word-break:normal;overflow-wrap:normal;padding:12px;}.", k, "-xmarkdown-code-block .hljs,.", k, "-xmarkdown-mermaid-source .hljs{background:transparent;color:", xmarkdown.codeTextColor, ";border:0;}.", k, "-xmarkdown-code-block .hljs-comment,.", k, "-xmarkdown-code-block .hljs-quote,.", k, "-xmarkdown-mermaid-source .hljs-comment,.", k, "-xmarkdown-mermaid-source .hljs-quote{color:", xmarkdown.codeCommentColor, ";}.", k, "-xmarkdown-code-block .hljs-keyword,.", k, "-xmarkdown-code-block .hljs-selector-tag,.", k, "-xmarkdown-code-block .hljs-literal,.", k, "-xmarkdown-code-block .hljs-link,.", k, "-xmarkdown-mermaid-source .hljs-keyword,.", k, "-xmarkdown-mermaid-source .hljs-selector-tag,.", k, "-xmarkdown-mermaid-source .hljs-literal,.", k, "-xmarkdown-mermaid-source .hljs-link{color:", xmarkdown.codeKeywordColor, ";}.", k, "-xmarkdown-code-block .hljs-string,.", k, "-xmarkdown-code-block .hljs-title,.", k, "-xmarkdown-code-block .hljs-type,.", k, "-xmarkdown-code-block .hljs-attribute,.", k, "-xmarkdown-code-block .hljs-symbol,.", k, "-xmarkdown-code-block .hljs-bullet,.", k, "-xmarkdown-code-block .hljs-addition,.", k, "-xmarkdown-mermaid-source .hljs-string,.", k, "-xmarkdown-mermaid-source .hljs-title,.", k, "-xmarkdown-mermaid-source .hljs-type,.", k, "-xmarkdown-mermaid-source .hljs-attribute,.", k, "-xmarkdown-mermaid-source .hljs-symbol,.", k, "-xmarkdown-mermaid-source .hljs-bullet,.", k, "-xmarkdown-mermaid-source .hljs-addition{color:", xmarkdown.codeStringColor, ";}.", k, "-xmarkdown-code-block .hljs-number,.", k, "-xmarkdown-code-block .hljs-built_in,.", k, "-xmarkdown-code-block .hljs-builtin-name,.", k, "-xmarkdown-code-block .hljs-variable,.", k, "-xmarkdown-code-block .hljs-template-variable,.", k, "-xmarkdown-code-block .hljs-params,.", k, "-xmarkdown-mermaid-source .hljs-number,.", k, "-xmarkdown-mermaid-source .hljs-built_in,.", k, "-xmarkdown-mermaid-source .hljs-builtin-name,.", k, "-xmarkdown-mermaid-source .hljs-variable,.", k, "-xmarkdown-mermaid-source .hljs-template-variable,.", k, "-xmarkdown-mermaid-source .hljs-params{color:", xmarkdown.codeNumberColor, ";}.", k, "-xmarkdown-code-block .hljs-function,.", k, "-xmarkdown-code-block .hljs-title.function_,.", k, "-xmarkdown-code-block .hljs-title.class_,.", k, "-xmarkdown-code-block .hljs-property,.", k, "-xmarkdown-mermaid-source .hljs-function,.", k, "-xmarkdown-mermaid-source .hljs-title.function_,.", k, "-xmarkdown-mermaid-source .hljs-title.class_,.", k, "-xmarkdown-mermaid-source .hljs-property{color:", xmarkdown.codeFunctionColor, ";}.", k, "-xmarkdown-code-block .hljs-deletion,.", k, "-xmarkdown-mermaid-source .hljs-deletion{color:", xmarkdown.mermaidErrorColor, ";}.", k, "-xmarkdown-mermaid-block{background:", xmarkdown.mermaidBg, ";}.", k, "-xmarkdown-mermaid-block .", k, "-xmarkdown-code-toolbar{border-bottom-color:", xmarkdown.borderColor, ";background:", xmarkdown.codeToolbarBg, ";color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-mermaid-canvas{position:relative;min-height:0;min-width:0;max-width:100%;padding:8px;box-sizing:border-box;overflow:hidden;background:", xmarkdown.mermaidCanvasBg, ";}.", k, "-xmarkdown-mermaid-viewport{overflow:auto;min-height:120px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;max-height:480px;border-radius:12px;background:linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 249, 252, 0.96) 100%);cursor:default;user-select:none;scrollbar-width:thin;scrollbar-color:", xmarkdown.scrollbarThumb, " transparent;}.", k, "-xmarkdown-mermaid-viewport[data-kpc-can-drag=\"true\"]{cursor:grab;}.", k, "-xmarkdown-mermaid-viewport[data-kpc-dragging=\"true\"]{cursor:grabbing;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar{width:10px;height:10px;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-track{background:transparent;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-thumb{background:", xmarkdown.scrollbarThumb, ";border:2px solid transparent;border-radius:999px;background-clip:padding-box;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-thumb:hover{background:", xmarkdown.scrollbarThumbHover, ";background-clip:padding-box;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-corner{background:transparent;}.", k, "-xmarkdown-mermaid-stage{display:flex;justify-content:center;align-items:center;min-width:100%;min-height:120px;padding:8px;box-sizing:border-box;}.", k, "-xmarkdown-mermaid-stage svg{display:block;margin:0 auto;transition:width ", theme.transition.small, ",height ", theme.transition.small, ";will-change:width,height;}.", k, "-xmarkdown-mermaid-source{display:none;margin:0;background:", xmarkdown.codeBlockBg, ";}.", k, "-xmarkdown-mermaid-block[data-kpc-view=\"source\"] .", k, "-xmarkdown-mermaid-source{display:block;}.", k, "-xmarkdown-mermaid-block[data-kpc-view=\"source\"] .", k, "-xmarkdown-mermaid-canvas{display:none;}.", k, "-xmarkdown-mermaid-error{padding:14px 16px;border-radius:8px;background:", xmarkdown.mermaidErrorBg, ";color:", xmarkdown.mermaidErrorColor, ";white-space:pre-wrap;}.", k, "-xmarkdown-content blockquote{padding:12px 16px;border-left:4px solid ", xmarkdown.blockquoteBorder, ";border-radius:0 10px 10px 0;background:", xmarkdown.blockquoteBg, ";color:", xmarkdown.mutedColor, ";}.", k, "-xmarkdown-table-wrap>table{width:max-content;min-width:100%;font-size:12px;border-collapse:collapse;border:1px solid ", xmarkdown.borderColor, ";border-radius:10px;}.", k, "-xmarkdown-table-wrap{max-width:100%;overflow-x:auto;overflow-y:hidden;margin:0 0 12px;}.", k, "-xmarkdown-table-wrap>table{margin:0;}.", k, "-xmarkdown-table-wrap>table>thead{background:", xmarkdown.tableHeadBg, ";}.", k, "-xmarkdown-table-wrap>table th,.", k, "-xmarkdown-table-wrap>table td{padding:10px 12px;border:1px solid ", xmarkdown.borderColor, ";text-align:left;vertical-align:top;}")
109752
+ css("display:block;color:", xmarkdown.color, ";line-height:1.7;font-size:14px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;.", k, "-xmarkdown-loading,.", k, "-xmarkdown-empty{display:inline-flex;align-items:center;gap:8px;color:", xmarkdown.mutedColor, ";min-height:24px;}.", k, "-xmarkdown-loading-dots{display:inline-flex;align-items:center;gap:4px;margin-right:4px;}.", k, "-xmarkdown-loading-dot{width:", xmarkdown.loadingDotSize, ";height:", xmarkdown.loadingDotSize, ";border-radius:50%;background:", xmarkdown.loadingDotColor, ";display:inline-block;animation:", k, "-xmarkdown-loading-bounce 1s ease-in-out infinite;opacity:0.45;}.", k, "-xmarkdown-loading-dot:nth-of-type(2){animation-delay:0.14s;}.", k, "-xmarkdown-loading-dot:nth-of-type(3){animation-delay:0.28s;}@keyframes ", k, "-xmarkdown-loading-bounce{0%,80%,100%{transform:translateY(0) scale(0.9);opacity:0.45;}40%{transform:translateY(-4px) scale(1);opacity:1;}}.", k, "-xmarkdown-content{color:inherit;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;}.", k, "-xmarkdown-content p{font-size:12px;}.", k, "-xmarkdown-stable,.", k, "-xmarkdown-tail{display:contents;}.", k, "-xmarkdown-content .", k, "-xmarkdown-typing-suffix{display:inline-flex;align-items:center;gap:4px;width:26px;height:6px;margin-top:8px;line-height:0;}.", k, "-xmarkdown-content .", k, "-xmarkdown-typing-suffix span{width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at center, #F8F9FA 0%, #D0D5D9 100%);animation:", k, "-xmarkdown-typing-suffix-pulse 1.2s ease-in-out infinite;}.", k, "-xmarkdown-content .", k, "-xmarkdown-typing-suffix span:nth-child(2){animation-delay:0.16s;}.", k, "-xmarkdown-content .", k, "-xmarkdown-typing-suffix span:nth-child(3){animation-delay:0.32s;}@keyframes ", k, "-xmarkdown-typing-suffix-pulse{0%,80%,100%{background:radial-gradient(circle at center, #F8F9FA 0%, #D0D5D9 100%);transform:translateY(0);}40%{background:radial-gradient(circle at center, ", setAlpha(theme.color.primary, 0.45), " 0%, ", theme.color.primary, " 100%);transform:translateY(-1px);}}.", k, "-xmarkdown-stable>:first-child{margin-top:0;}.", k, "-xmarkdown-stable>:last-child,.", k, "-xmarkdown-tail>:last-child{margin-bottom:0;}.", k, "-xmarkdown-content [data-kpc-xmarkdown-tail=\"true\"]{display:inline;white-space:pre-wrap;word-break:break-word;}.", k, "-xmarkdown-stable>p,.", k, "-xmarkdown-stable>ul,.", k, "-xmarkdown-stable>ol,.", k, "-xmarkdown-stable>blockquote,.", k, "-xmarkdown-stable>pre,.", k, "-xmarkdown-stable>table,.", k, "-xmarkdown-stable>hr,.", k, "-xmarkdown-stable>h1,.", k, "-xmarkdown-stable>h2,.", k, "-xmarkdown-stable>h3,.", k, "-xmarkdown-stable>h4,.", k, "-xmarkdown-stable>h5,.", k, "-xmarkdown-stable>h6{margin:0 0 12px;}.", k, "-xmarkdown-content blockquote>:first-child{margin-top:0;}.", k, "-xmarkdown-content blockquote>:last-child{margin-bottom:0;}.", k, "-xmarkdown-content ul,.", k, "-xmarkdown-content ol{padding-left:20px;}.", k, "-xmarkdown-content li{margin:6px 0;}.", k, "-xmarkdown-content li>p{margin:6px 0;}.", k, "-xmarkdown-content li>p:first-child{margin-top:0;}.", k, "-xmarkdown-content li>p:last-child{margin-bottom:0;}.", k, "-xmarkdown-content h1,.", k, "-xmarkdown-content h2,.", k, "-xmarkdown-content h3,.", k, "-xmarkdown-content h4,.", k, "-xmarkdown-content h5,.", k, "-xmarkdown-content h6{color:", xmarkdown.headingColor, ";font-weight:600;line-height:1.35;}.", k, "-xmarkdown-content h1{font-size:24px;}.", k, "-xmarkdown-content h2{font-size:20px;}.", k, "-xmarkdown-content h3{font-size:18px;}.", k, "-xmarkdown-content h4,.", k, "-xmarkdown-content h5,.", k, "-xmarkdown-content h6{font-size:16px;}.", k, "-xmarkdown-content a{color:", theme.color.primary, ";text-decoration:none;}.", k, "-xmarkdown-content a:hover{text-decoration:underline;}.", k, "-xmarkdown-content img{display:block;max-width:100%;height:auto;border-radius:8px;}.", k, "-xmarkdown-content hr{border:0;border-top:1px solid ", xmarkdown.hrColor, ";}.", k, "-xmarkdown-inline-code{display:inline-block;padding:0 6px;border-radius:6px;font-size:12px;line-height:1.7;vertical-align:baseline;background:", xmarkdown.inlineCodeBg, ";color:", xmarkdown.inlineCodeColor, ";border:1px solid ", xmarkdown.inlineCodeBorder, ";}.", k, "-xmarkdown-content pre{margin:0;overflow:auto;}.", k, "-xmarkdown-code-block,.", k, "-xmarkdown-mermaid-block{margin:0 0 12px;min-width:0;max-width:100%;overflow:hidden;border:1px solid ", xmarkdown.codeBlockBorder, ";border-radius:18px;background:", xmarkdown.codeBlockBg, ";box-sizing:border-box;}.", k, "-xmarkdown-stable:not(:empty)+.", k, "-xmarkdown-tail>.", k, "-xmarkdown-code-block:first-child,.", k, "-xmarkdown-stable:not(:empty)+.", k, "-xmarkdown-tail>.", k, "-xmarkdown-mermaid-block:first-child{margin-top:12px;}.", k, "-xmarkdown-code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid ", xmarkdown.codeBlockBorder, ";background:", xmarkdown.codeToolbarBg, ";color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-code-language{min-width:0;font-size:13px;font-weight:700;letter-spacing:0.02em;text-transform:uppercase;color:inherit;flex:1 1 auto;}.", k, "-xmarkdown-code-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:100%;margin-left:auto;}.", k, "-xmarkdown-toolbar-toggle-group,.", k, "-xmarkdown-toolbar-action-group{display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%;}.", k, "-xmarkdown-toolbar-toggle-group{margin-right:2px;}.", k, "-xmarkdown-toolbar-toggle{border:0;padding:0 6px;background:transparent;color:", xmarkdown.mutedColor, ";font-size:12px;line-height:20px;cursor:pointer;transition:color ", theme.transition.small, ";}.", k, "-xmarkdown-toolbar-toggle[data-kpc-selected=\"true\"]{color:", xmarkdown.codeToolbarColor, ";font-weight:600;}.", k, "-xmarkdown-toolbar-toggle:hover{color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-toolbar-icon-button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;color:", xmarkdown.codeActionColor, ";cursor:pointer;transition:color ", theme.transition.small, ",background ", theme.transition.small, ";}.", k, "-xmarkdown-toolbar-icon-button:hover:not(:disabled){background:", xmarkdown.codeActionHoverBg, ";color:", theme.color.primary, ";}.", k, "-xmarkdown-toolbar-icon-button:disabled{opacity:0.4;cursor:not-allowed;background:transparent;color:", xmarkdown.codeActionColor, ";}.", k, "-xmarkdown-toolbar-icon{font-size:14px;line-height:1;}.", k, "-xmarkdown-code-body,.", k, "-xmarkdown-mermaid-body{min-width:0;max-width:100%;overflow:auto;background:", xmarkdown.codeBlockBg, ";}.", k, "-xmarkdown-code-block pre,.", k, "-xmarkdown-mermaid-source{padding:0px;background:transparent;color:", xmarkdown.codeTextColor, ";}.", k, "-xmarkdown-code-block pre,.", k, "-xmarkdown-mermaid-source{font-family:SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;font-size:12px;line-height:1.7;}.", k, "-xmarkdown-code-block pre code,.", k, "-xmarkdown-mermaid-source code{display:block;min-width:fit-content;color:inherit;white-space:pre;word-break:normal;overflow-wrap:normal;padding:12px;}.", k, "-xmarkdown-code-block .hljs,.", k, "-xmarkdown-mermaid-source .hljs{background:transparent;color:", xmarkdown.codeTextColor, ";border:0;}.", k, "-xmarkdown-code-block .hljs-comment,.", k, "-xmarkdown-code-block .hljs-quote,.", k, "-xmarkdown-mermaid-source .hljs-comment,.", k, "-xmarkdown-mermaid-source .hljs-quote{color:", xmarkdown.codeCommentColor, ";}.", k, "-xmarkdown-code-block .hljs-keyword,.", k, "-xmarkdown-code-block .hljs-selector-tag,.", k, "-xmarkdown-code-block .hljs-literal,.", k, "-xmarkdown-code-block .hljs-link,.", k, "-xmarkdown-mermaid-source .hljs-keyword,.", k, "-xmarkdown-mermaid-source .hljs-selector-tag,.", k, "-xmarkdown-mermaid-source .hljs-literal,.", k, "-xmarkdown-mermaid-source .hljs-link{color:", xmarkdown.codeKeywordColor, ";}.", k, "-xmarkdown-code-block .hljs-string,.", k, "-xmarkdown-code-block .hljs-title,.", k, "-xmarkdown-code-block .hljs-type,.", k, "-xmarkdown-code-block .hljs-attribute,.", k, "-xmarkdown-code-block .hljs-symbol,.", k, "-xmarkdown-code-block .hljs-bullet,.", k, "-xmarkdown-code-block .hljs-addition,.", k, "-xmarkdown-mermaid-source .hljs-string,.", k, "-xmarkdown-mermaid-source .hljs-title,.", k, "-xmarkdown-mermaid-source .hljs-type,.", k, "-xmarkdown-mermaid-source .hljs-attribute,.", k, "-xmarkdown-mermaid-source .hljs-symbol,.", k, "-xmarkdown-mermaid-source .hljs-bullet,.", k, "-xmarkdown-mermaid-source .hljs-addition{color:", xmarkdown.codeStringColor, ";}.", k, "-xmarkdown-code-block .hljs-number,.", k, "-xmarkdown-code-block .hljs-built_in,.", k, "-xmarkdown-code-block .hljs-builtin-name,.", k, "-xmarkdown-code-block .hljs-variable,.", k, "-xmarkdown-code-block .hljs-template-variable,.", k, "-xmarkdown-code-block .hljs-params,.", k, "-xmarkdown-mermaid-source .hljs-number,.", k, "-xmarkdown-mermaid-source .hljs-built_in,.", k, "-xmarkdown-mermaid-source .hljs-builtin-name,.", k, "-xmarkdown-mermaid-source .hljs-variable,.", k, "-xmarkdown-mermaid-source .hljs-template-variable,.", k, "-xmarkdown-mermaid-source .hljs-params{color:", xmarkdown.codeNumberColor, ";}.", k, "-xmarkdown-code-block .hljs-function,.", k, "-xmarkdown-code-block .hljs-title.function_,.", k, "-xmarkdown-code-block .hljs-title.class_,.", k, "-xmarkdown-code-block .hljs-property,.", k, "-xmarkdown-mermaid-source .hljs-function,.", k, "-xmarkdown-mermaid-source .hljs-title.function_,.", k, "-xmarkdown-mermaid-source .hljs-title.class_,.", k, "-xmarkdown-mermaid-source .hljs-property{color:", xmarkdown.codeFunctionColor, ";}.", k, "-xmarkdown-code-block .hljs-deletion,.", k, "-xmarkdown-mermaid-source .hljs-deletion{color:", xmarkdown.mermaidErrorColor, ";}.", k, "-xmarkdown-mermaid-block{background:", xmarkdown.mermaidBg, ";}.", k, "-xmarkdown-mermaid-block .", k, "-xmarkdown-code-toolbar{border-bottom-color:", xmarkdown.borderColor, ";background:", xmarkdown.codeToolbarBg, ";color:", xmarkdown.codeToolbarColor, ";}.", k, "-xmarkdown-mermaid-canvas{position:relative;min-height:0;min-width:0;max-width:100%;padding:8px;box-sizing:border-box;overflow:hidden;background:", xmarkdown.mermaidCanvasBg, ";}.", k, "-xmarkdown-mermaid-viewport{overflow:auto;min-height:120px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;max-height:480px;border-radius:12px;background:linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 249, 252, 0.96) 100%);cursor:default;user-select:none;scrollbar-width:thin;scrollbar-color:", xmarkdown.scrollbarThumb, " transparent;}.", k, "-xmarkdown-mermaid-viewport[data-kpc-can-drag=\"true\"]{cursor:grab;}.", k, "-xmarkdown-mermaid-viewport[data-kpc-dragging=\"true\"]{cursor:grabbing;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar{width:10px;height:10px;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-track{background:transparent;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-thumb{background:", xmarkdown.scrollbarThumb, ";border:2px solid transparent;border-radius:999px;background-clip:padding-box;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-thumb:hover{background:", xmarkdown.scrollbarThumbHover, ";background-clip:padding-box;}.", k, "-xmarkdown-mermaid-viewport::-webkit-scrollbar-corner{background:transparent;}.", k, "-xmarkdown-mermaid-stage{display:flex;justify-content:center;align-items:center;min-width:100%;min-height:120px;padding:8px;box-sizing:border-box;}.", k, "-xmarkdown-mermaid-stage svg{display:block;margin:0 auto;transition:width ", theme.transition.small, ",height ", theme.transition.small, ";will-change:width,height;}.", k, "-xmarkdown-mermaid-source{display:none;margin:0;background:", xmarkdown.codeBlockBg, ";}.", k, "-xmarkdown-mermaid-block[data-kpc-view=\"source\"] .", k, "-xmarkdown-mermaid-source{display:block;}.", k, "-xmarkdown-mermaid-block[data-kpc-view=\"source\"] .", k, "-xmarkdown-mermaid-canvas{display:none;}.", k, "-xmarkdown-mermaid-error{padding:14px 16px;border-radius:8px;background:", xmarkdown.mermaidErrorBg, ";color:", xmarkdown.mermaidErrorColor, ";white-space:pre-wrap;}.", k, "-xmarkdown-content blockquote{padding:12px 16px;border-left:4px solid ", xmarkdown.blockquoteBorder, ";border-radius:0 10px 10px 0;background:", xmarkdown.blockquoteBg, ";color:", xmarkdown.mutedColor, ";}.", k, "-xmarkdown-table-wrap>table{width:max-content;min-width:100%;font-size:12px;border-collapse:collapse;border:1px solid ", xmarkdown.borderColor, ";border-radius:10px;}.", k, "-xmarkdown-table-wrap{max-width:100%;overflow-x:auto;overflow-y:hidden;margin:0 0 12px;}.", k, "-xmarkdown-table-wrap>table{margin:0;}.", k, "-xmarkdown-table-wrap>table>thead{background:", xmarkdown.tableHeadBg, ";}.", k, "-xmarkdown-table-wrap>table th,.", k, "-xmarkdown-table-wrap>table td{padding:10px 12px;border:1px solid ", xmarkdown.borderColor, ";text-align:left;vertical-align:top;}")
109591
109753
  );
109592
109754
  });
109593
109755
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/components/xmarkdown/xmarkdown.vdt.js
@@ -109596,6 +109758,9 @@ var xmarkdown_styles_makeStyles = utils_cache(function makeStyles(k) {
109596
109758
 
109597
109759
 
109598
109760
 
109761
+ var xmarkdown_vdt_$tmp0 = {
109762
+ 'aria-hidden': 'true'
109763
+ };
109599
109764
  /* harmony default export */ function xmarkdown_vdt($props, $blocks, $__proto__) {
109600
109765
  var _classNameObj;
109601
109766
  $blocks || ($blocks = {});
@@ -109609,7 +109774,8 @@ var xmarkdown_styles_makeStyles = utils_cache(function makeStyles(k) {
109609
109774
  contentRef = _this$contentModel.contentRef;
109610
109775
  var _this$display = this.display,
109611
109776
  shouldShowLoadingShell = _this$display.shouldShowLoadingShell,
109612
- shouldShowEmpty = _this$display.shouldShowEmpty;
109777
+ shouldShowEmpty = _this$display.shouldShowEmpty,
109778
+ shouldShowTypingSuffix = _this$display.shouldShowTypingSuffix;
109613
109779
  var stableNodes = this.display.getRenderedStableNodes();
109614
109780
  var tailNodes = this.display.getRenderedTailNodes();
109615
109781
  var showLoadingShell = shouldShowLoadingShell();
@@ -109631,7 +109797,7 @@ var xmarkdown_styles_makeStyles = utils_cache(function makeStyles(k) {
109631
109797
  'className': index_esm_className(classNameObj)
109632
109798
  }, getRestProps(this), {
109633
109799
  'ref': rootRef
109634
- }), showLoadingShell ? hasLoadingSlot ? loadingSlot : createElementVNode(2, 'div', createElementVNode(2, 'div', [createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot")), createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot")), createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot"))], 4, index_esm_className(k + "-xmarkdown-loading-dots")), 2, index_esm_className(k + "-xmarkdown-loading")) : showEmpty ? hasEmptySlot ? createElementVNode(2, 'div', emptySlot, 0, index_esm_className(k + "-xmarkdown-empty")) : undefined : createElementVNode(2, 'div', [createElementVNode(2, 'div', stableNodes, 0, index_esm_className(k + "-xmarkdown-stable")), createElementVNode(2, 'div', tailNodes, 0, index_esm_className(k + "-xmarkdown-tail"))], 4, index_esm_className(k + "-xmarkdown-content"), null, null, contentRef));
109800
+ }), showLoadingShell ? hasLoadingSlot ? loadingSlot : createElementVNode(2, 'div', createElementVNode(2, 'div', [createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot")), createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot")), createElementVNode(2, 'div', null, 1, index_esm_className(k + "-xmarkdown-loading-dot"))], 4, index_esm_className(k + "-xmarkdown-loading-dots")), 2, index_esm_className(k + "-xmarkdown-loading")) : showEmpty ? hasEmptySlot ? createElementVNode(2, 'div', emptySlot, 0, index_esm_className(k + "-xmarkdown-empty")) : undefined : createElementVNode(2, 'div', [createElementVNode(2, 'div', [createElementVNode(2, 'div', stableNodes, 0, index_esm_className(k + "-xmarkdown-stable")), createElementVNode(2, 'div', tailNodes, 0, index_esm_className(k + "-xmarkdown-tail"))], 4, index_esm_className(k + "-xmarkdown-body")), shouldShowTypingSuffix() ? createElementVNode(2, 'div', [createElementVNode(2, 'span'), createElementVNode(2, 'span'), createElementVNode(2, 'span')], 4, index_esm_className(k + "-xmarkdown-typing-suffix"), xmarkdown_vdt_$tmp0) : undefined], 0, index_esm_className(k + "-xmarkdown-content"), null, null, contentRef));
109635
109801
  }
109636
109802
  ;
109637
109803
  // EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.js
@@ -110048,10 +110214,10 @@ function streaming_createForOfIteratorHelperLoose(o, allowArrayLike) {
110048
110214
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
110049
110215
  }
110050
110216
  function streaming_unsupportedIterableToArray(o, minLen) {
110051
- var _context12;
110217
+ var _context15;
110052
110218
  if (!o) return;
110053
110219
  if (typeof o === "string") return streaming_arrayLikeToArray(o, minLen);
110054
- var n = slice_default()(_context12 = Object.prototype.toString.call(o)).call(_context12, 8, -1);
110220
+ var n = slice_default()(_context15 = Object.prototype.toString.call(o)).call(_context15, 8, -1);
110055
110221
  if (n === "Object" && o.constructor) n = o.constructor.name;
110056
110222
  if (n === "Map" || n === "Set") return from_default()(o);
110057
110223
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return streaming_arrayLikeToArray(o, minLen);
@@ -110259,7 +110425,7 @@ function recognizeToken(cache) {
110259
110425
  cache.token = 'list';
110260
110426
  return;
110261
110427
  }
110262
- if (starts_with_default()(_context6 = cache.pending).call(_context6, '|')) {
110428
+ if (starts_with_default()(_context6 = cache.pending).call(_context6, '|') && !isInTableContext(cache.completeMarkdown)) {
110263
110429
  cache.token = 'table';
110264
110430
  return;
110265
110431
  }
@@ -110364,13 +110530,46 @@ function isTableIncomplete(markdown) {
110364
110530
  if (lines.length <= 1) return true;
110365
110531
  var header = lines[0],
110366
110532
  separator = lines[1];
110367
- if (!/^\|.*\|$/.test(trim_default()(header).call(header))) return false;
110533
+ if (!isTableRow(header)) return false;
110368
110534
  var columns = filter_default()(_context9 = map_default()(_context10 = trim_default()(separator).call(separator).split('|')).call(_context10, function (column) {
110369
110535
  return trim_default()(column).call(column);
110370
110536
  })).call(_context9, Boolean);
110537
+ return isTableSeparatorColumns(columns, true);
110538
+ }
110539
+ /**
110540
+ * 判断当前 pending 是否是在已有表格后继续追加新行。
110541
+ * 这种场景直接进入 stable 渲染,让 markdown-it 增量填充各列,避免整行原样压在 tail 中。
110542
+ */
110543
+ function isInTableContext(completeMarkdown) {
110544
+ var _context12, _context13;
110545
+ var lines = completeMarkdown.split('\n');
110546
+ var block = [];
110547
+ var end = lines.length - 1;
110548
+ while (end >= 0 && !trim_default()(_context11 = lines[end]).call(_context11)) {
110549
+ var _context11;
110550
+ end--;
110551
+ }
110552
+ for (var i = end; i >= 0; i--) {
110553
+ var line = lines[i];
110554
+ if (!trim_default()(line).call(line)) break;
110555
+ block.unshift(line);
110556
+ }
110557
+ if (block.length < 2) return false;
110558
+ var header = block[0],
110559
+ separator = block[1];
110560
+ if (!isTableRow(header)) return false;
110561
+ var columns = filter_default()(_context12 = map_default()(_context13 = trim_default()(separator).call(separator).split('|')).call(_context13, function (column) {
110562
+ return trim_default()(column).call(column);
110563
+ })).call(_context12, Boolean);
110564
+ return isTableSeparatorColumns(columns, false);
110565
+ }
110566
+ function isTableRow(line) {
110567
+ return /^\|.*\|$/.test(trim_default()(line).call(line));
110568
+ }
110569
+ function isTableSeparatorColumns(columns, allowTrailingColon) {
110371
110570
  var separatorRegex = /^:?-+:?$/;
110372
- return columns.every(function (column, index) {
110373
- return index === columns.length - 1 ? column === ':' || separatorRegex.test(column) : separatorRegex.test(column);
110571
+ return columns.length > 0 && columns.every(function (column, index) {
110572
+ return allowTrailingColon && index === columns.length - 1 ? column === ':' || separatorRegex.test(column) : separatorRegex.test(column);
110374
110573
  });
110375
110574
  }
110376
110575
  /**
@@ -110444,11 +110643,11 @@ function findOpenMathBlock(source) {
110444
110643
  * 提取未闭合代码围栏的语言标记
110445
110644
  */
110446
110645
  function extractLanguageFromFence(tailText) {
110447
- var _context11;
110646
+ var _context14;
110448
110647
  var firstLineEnd = tailText.indexOf('\n');
110449
110648
  var firstLine = firstLineEnd === -1 ? tailText : slice_default()(tailText).call(tailText, 0, firstLineEnd);
110450
110649
  var match = firstLine.match(/^ {0,3}`{3,}(\S*)/);
110451
- return match && match[1] ? trim_default()(_context11 = match[1]).call(_context11).toLowerCase() : undefined;
110650
+ return match && match[1] ? trim_default()(_context14 = match[1]).call(_context14).toLowerCase() : undefined;
110452
110651
  }
110453
110652
  /**
110454
110653
  * 渲染未闭合的代码围栏
@@ -119920,6 +120119,13 @@ function useXMarkdownDisplay(getPrefixCls) {
119920
120119
  function isTypingActive() {
119921
120120
  return !!instance.get('$typingActive');
119922
120121
  }
120122
+ function shouldShowTypingSuffix() {
120123
+ var typing = instance.get('typing');
120124
+ if (!typing) return false;
120125
+ if (typeof typing === 'boolean') return false;
120126
+ if (typing.suffix !== true) return false;
120127
+ return !instance.get('loading') && (isTypingActive() || !!instance.get('streaming'));
120128
+ }
119923
120129
  return {
119924
120130
  onMounted: function onMounted() {
119925
120131
  mounted = true;
@@ -119946,7 +120152,8 @@ function useXMarkdownDisplay(getPrefixCls) {
119946
120152
  getRenderedBlockData: getRenderedBlockData,
119947
120153
  getRenderedNodes: getRenderedNodes,
119948
120154
  // 状态查询
119949
- isTypingActive: isTypingActive
120155
+ isTypingActive: isTypingActive,
120156
+ shouldShowTypingSuffix: shouldShowTypingSuffix
119950
120157
  };
119951
120158
  }
119952
120159
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/number/parse-float.js
@@ -121063,7 +121270,7 @@ XMarkdown.events = xmarkdown_events;
121063
121270
 
121064
121271
  ;// CONCATENATED MODULE: ./packages/kpc-vue-next/index.js
121065
121272
  /*!
121066
- * @king-design v3.8.0-beta.0
121273
+ * @king-design v3.8.0-beta.1
121067
121274
  *
121068
121275
  * Copyright (c) Kingsoft Cloud
121069
121276
  * Released under the MIT License
@@ -121140,7 +121347,7 @@ XMarkdown.events = xmarkdown_events;
121140
121347
 
121141
121348
 
121142
121349
 
121143
- var version = '3.8.0-beta.0';
121350
+ var version = '3.8.0-beta.1';
121144
121351
  /* generate end */
121145
121352
 
121146
121353