@antdv-next/x 1.0.0 → 1.0.2-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.
@@ -172,7 +172,10 @@ var XBubble = /* @__PURE__ */ defineComponent({
172
172
  const { class: _class, style: _style, ...rest } = attrs;
173
173
  return rest;
174
174
  });
175
- const memoedContent = computed(() => {
175
+ const fallbackContent = computed(() => {
176
+ return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
177
+ });
178
+ const resolveMainContent = () => {
176
179
  if (slots.content) {
177
180
  const slotNode = slots.content({
178
181
  content: props.content,
@@ -180,23 +183,23 @@ var XBubble = /* @__PURE__ */ defineComponent({
180
183
  });
181
184
  if (hasRenderableNode(slotNode)) return slotNode;
182
185
  }
183
- return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
184
- });
186
+ return fallbackContent.value;
187
+ };
185
188
  const mergedTyping = computed(() => {
186
189
  if (typeof props.typing === "function") return props.typing(props.content, props.info);
187
190
  return props.typing;
188
191
  });
189
192
  const usingInnerAnimation = computed(() => {
190
- return Boolean(mergedTyping.value) && typeof memoedContent.value === "string";
193
+ return Boolean(mergedTyping.value) && typeof fallbackContent.value === "string";
191
194
  });
192
195
  watch(() => [
193
- memoedContent.value,
196
+ fallbackContent.value,
194
197
  usingInnerAnimation.value,
195
198
  props.streaming
196
199
  ], () => {
197
200
  if (usingInnerAnimation.value) return;
198
201
  if (props.streaming) return;
199
- if (typeof memoedContent.value === "string") props.onTypingComplete?.(memoedContent.value);
202
+ if (typeof fallbackContent.value === "string") props.onTypingComplete?.(fallbackContent.value);
200
203
  }, { immediate: true });
201
204
  const footerPlacement = computed(() => {
202
205
  if (props.footerPlacement) return props.footerPlacement;
@@ -246,7 +249,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
246
249
  "style": getSlotStyle("footer")
247
250
  }, [node]);
248
251
  };
249
- const renderMainContent = () => {
252
+ const renderMainContent = (mainContent, usingInnerAnimationInRender) => {
250
253
  if (isEditing.value) {
251
254
  if (typeof props.content !== "string") throw new Error("[Bubble] Editable mode only supports string content.");
252
255
  return createVNode(EditableContent, {
@@ -258,14 +261,14 @@ var XBubble = /* @__PURE__ */ defineComponent({
258
261
  "onEditCancel": props.onEditCancel
259
262
  }, null);
260
263
  }
261
- return usingInnerAnimation.value && typeof memoedContent.value === "string" ? createVNode(TypingContent, {
264
+ return usingInnerAnimationInRender && typeof mainContent === "string" ? createVNode(TypingContent, {
262
265
  "prefixCls": props.prefixCls,
263
266
  "streaming": props.streaming,
264
267
  "typing": mergedTyping.value,
265
- "content": memoedContent.value,
268
+ "content": mainContent,
266
269
  "onTyping": props.onTyping,
267
270
  "onTypingComplete": props.onTypingComplete
268
- }, null) : memoedContent.value;
271
+ }, null) : mainContent;
269
272
  };
270
273
  const renderContent = () => {
271
274
  if (props.loading) {
@@ -279,6 +282,8 @@ var XBubble = /* @__PURE__ */ defineComponent({
279
282
  if (props.loadingRender) return props.loadingRender(props.content, props.info);
280
283
  return createVNode(loading_default, { "prefixCls": props.prefixCls }, null);
281
284
  }
285
+ const mainContent = resolveMainContent();
286
+ const usingInnerAnimationInRender = Boolean(mergedTyping.value) && typeof mainContent === "string";
282
287
  return createVNode("div", {
283
288
  "class": getSlotClassName("body"),
284
289
  "style": getSlotStyle("body")
@@ -292,7 +297,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
292
297
  contextConfig.value.classes?.content,
293
298
  props.classes?.content,
294
299
  {
295
- [`${prefixCls.value}-content-string`]: typeof memoedContent.value === "string",
300
+ [`${prefixCls.value}-content-string`]: typeof mainContent === "string",
296
301
  [`${prefixCls.value}-content-editing`]: isEditing.value,
297
302
  [`${prefixCls.value}-content-${props.info.status}`]: props.info.status
298
303
  }
@@ -301,7 +306,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
301
306
  ...contextConfig.value.styles?.content,
302
307
  ...props.styles?.content
303
308
  }
304
- }, [isFooterInner.value ? createVNode(Fragment, null, [createVNode("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent()]), !isEditing.value ? renderFooter() : null]) : renderMainContent()]),
309
+ }, [isFooterInner.value ? createVNode(Fragment, null, [createVNode("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent(mainContent, usingInnerAnimationInRender)]), !isEditing.value ? renderFooter() : null]) : renderMainContent(mainContent, usingInnerAnimationInRender)]),
305
310
  !isEditing.value && !isFooterInner.value ? renderFooter() : null
306
311
  ]);
307
312
  };
@@ -291,7 +291,7 @@ var XFileCard = /* @__PURE__ */ defineComponent({
291
291
  ],
292
292
  "style": mergedStyles.value.file
293
293
  }, [createVNode(Image, mergeProps({
294
- "class": `${props.prefixCls}-image-img`,
294
+ "rootClass": `${props.prefixCls}-image-img`,
295
295
  "width": mergedStyles.value.file?.width,
296
296
  "height": mergedStyles.value.file?.height,
297
297
  "alt": props.name,
package/dist/index.esm.js CHANGED
@@ -13,7 +13,7 @@ import lightTheme from "shiki/dist/themes/vitesse-light.mjs";
13
13
  import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
14
14
  import { KeyCode, classNames } from "@v-c/util";
15
15
  //#region package.json
16
- var version = "1.0.0";
16
+ var version = "1.0.2-beta.1";
17
17
  //#endregion
18
18
  //#region components/x-provider/context.ts
19
19
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -2115,7 +2115,7 @@ var XFileCard = /* @__PURE__ */ defineComponent({
2115
2115
  ],
2116
2116
  "style": mergedStyles.value.file
2117
2117
  }, [createVNode(Image$1, mergeProps({
2118
- "class": `${props.prefixCls}-image-img`,
2118
+ "rootClass": `${props.prefixCls}-image-img`,
2119
2119
  "width": mergedStyles.value.file?.width,
2120
2120
  "height": mergedStyles.value.file?.height,
2121
2121
  "alt": props.name,
@@ -4021,7 +4021,10 @@ var XBubble = /* @__PURE__ */ defineComponent({
4021
4021
  const { class: _class, style: _style, ...rest } = attrs;
4022
4022
  return rest;
4023
4023
  });
4024
- const memoedContent = computed(() => {
4024
+ const fallbackContent = computed(() => {
4025
+ return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
4026
+ });
4027
+ const resolveMainContent = () => {
4025
4028
  if (slots.content) {
4026
4029
  const slotNode = slots.content({
4027
4030
  content: props.content,
@@ -4029,23 +4032,23 @@ var XBubble = /* @__PURE__ */ defineComponent({
4029
4032
  });
4030
4033
  if (hasRenderableNode(slotNode)) return slotNode;
4031
4034
  }
4032
- return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
4033
- });
4035
+ return fallbackContent.value;
4036
+ };
4034
4037
  const mergedTyping = computed(() => {
4035
4038
  if (typeof props.typing === "function") return props.typing(props.content, props.info);
4036
4039
  return props.typing;
4037
4040
  });
4038
4041
  const usingInnerAnimation = computed(() => {
4039
- return Boolean(mergedTyping.value) && typeof memoedContent.value === "string";
4042
+ return Boolean(mergedTyping.value) && typeof fallbackContent.value === "string";
4040
4043
  });
4041
4044
  watch(() => [
4042
- memoedContent.value,
4045
+ fallbackContent.value,
4043
4046
  usingInnerAnimation.value,
4044
4047
  props.streaming
4045
4048
  ], () => {
4046
4049
  if (usingInnerAnimation.value) return;
4047
4050
  if (props.streaming) return;
4048
- if (typeof memoedContent.value === "string") props.onTypingComplete?.(memoedContent.value);
4051
+ if (typeof fallbackContent.value === "string") props.onTypingComplete?.(fallbackContent.value);
4049
4052
  }, { immediate: true });
4050
4053
  const footerPlacement = computed(() => {
4051
4054
  if (props.footerPlacement) return props.footerPlacement;
@@ -4095,7 +4098,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
4095
4098
  "style": getSlotStyle("footer")
4096
4099
  }, [node]);
4097
4100
  };
4098
- const renderMainContent = () => {
4101
+ const renderMainContent = (mainContent, usingInnerAnimationInRender) => {
4099
4102
  if (isEditing.value) {
4100
4103
  if (typeof props.content !== "string") throw new Error("[Bubble] Editable mode only supports string content.");
4101
4104
  return createVNode(EditableContent, {
@@ -4107,14 +4110,14 @@ var XBubble = /* @__PURE__ */ defineComponent({
4107
4110
  "onEditCancel": props.onEditCancel
4108
4111
  }, null);
4109
4112
  }
4110
- return usingInnerAnimation.value && typeof memoedContent.value === "string" ? createVNode(TypingContent, {
4113
+ return usingInnerAnimationInRender && typeof mainContent === "string" ? createVNode(TypingContent, {
4111
4114
  "prefixCls": props.prefixCls,
4112
4115
  "streaming": props.streaming,
4113
4116
  "typing": mergedTyping.value,
4114
- "content": memoedContent.value,
4117
+ "content": mainContent,
4115
4118
  "onTyping": props.onTyping,
4116
4119
  "onTypingComplete": props.onTypingComplete
4117
- }, null) : memoedContent.value;
4120
+ }, null) : mainContent;
4118
4121
  };
4119
4122
  const renderContent = () => {
4120
4123
  if (props.loading) {
@@ -4128,6 +4131,8 @@ var XBubble = /* @__PURE__ */ defineComponent({
4128
4131
  if (props.loadingRender) return props.loadingRender(props.content, props.info);
4129
4132
  return createVNode(loading_default, { "prefixCls": props.prefixCls }, null);
4130
4133
  }
4134
+ const mainContent = resolveMainContent();
4135
+ const usingInnerAnimationInRender = Boolean(mergedTyping.value) && typeof mainContent === "string";
4131
4136
  return createVNode("div", {
4132
4137
  "class": getSlotClassName("body"),
4133
4138
  "style": getSlotStyle("body")
@@ -4141,7 +4146,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
4141
4146
  contextConfig.value.classes?.content,
4142
4147
  props.classes?.content,
4143
4148
  {
4144
- [`${prefixCls.value}-content-string`]: typeof memoedContent.value === "string",
4149
+ [`${prefixCls.value}-content-string`]: typeof mainContent === "string",
4145
4150
  [`${prefixCls.value}-content-editing`]: isEditing.value,
4146
4151
  [`${prefixCls.value}-content-${props.info.status}`]: props.info.status
4147
4152
  }
@@ -4150,7 +4155,7 @@ var XBubble = /* @__PURE__ */ defineComponent({
4150
4155
  ...contextConfig.value.styles?.content,
4151
4156
  ...props.styles?.content
4152
4157
  }
4153
- }, [isFooterInner.value ? createVNode(Fragment, null, [createVNode("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent()]), !isEditing.value ? renderFooter() : null]) : renderMainContent()]),
4158
+ }, [isFooterInner.value ? createVNode(Fragment, null, [createVNode("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent(mainContent, usingInnerAnimationInRender)]), !isEditing.value ? renderFooter() : null]) : renderMainContent(mainContent, usingInnerAnimationInRender)]),
4154
4159
  !isEditing.value && !isFooterInner.value ? renderFooter() : null
4155
4160
  ]);
4156
4161
  };
package/dist/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
49
49
  shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
50
50
  //#region package.json
51
- var version = "1.0.0";
51
+ var version = "1.0.2-beta.1";
52
52
  //#endregion
53
53
  //#region components/x-provider/context.ts
54
54
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -2150,7 +2150,7 @@
2150
2150
  ],
2151
2151
  "style": mergedStyles.value.file
2152
2152
  }, [(0, vue.createVNode)(antdv_next.Image, (0, vue.mergeProps)({
2153
- "class": `${props.prefixCls}-image-img`,
2153
+ "rootClass": `${props.prefixCls}-image-img`,
2154
2154
  "width": mergedStyles.value.file?.width,
2155
2155
  "height": mergedStyles.value.file?.height,
2156
2156
  "alt": props.name,
@@ -4056,7 +4056,10 @@
4056
4056
  const { class: _class, style: _style, ...rest } = attrs;
4057
4057
  return rest;
4058
4058
  });
4059
- const memoedContent = (0, vue.computed)(() => {
4059
+ const fallbackContent = (0, vue.computed)(() => {
4060
+ return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
4061
+ });
4062
+ const resolveMainContent = () => {
4060
4063
  if (slots.content) {
4061
4064
  const slotNode = slots.content({
4062
4065
  content: props.content,
@@ -4064,23 +4067,23 @@
4064
4067
  });
4065
4068
  if (hasRenderableNode(slotNode)) return slotNode;
4066
4069
  }
4067
- return props.contentRender ? props.contentRender(props.content, props.info) : props.content;
4068
- });
4070
+ return fallbackContent.value;
4071
+ };
4069
4072
  const mergedTyping = (0, vue.computed)(() => {
4070
4073
  if (typeof props.typing === "function") return props.typing(props.content, props.info);
4071
4074
  return props.typing;
4072
4075
  });
4073
4076
  const usingInnerAnimation = (0, vue.computed)(() => {
4074
- return Boolean(mergedTyping.value) && typeof memoedContent.value === "string";
4077
+ return Boolean(mergedTyping.value) && typeof fallbackContent.value === "string";
4075
4078
  });
4076
4079
  (0, vue.watch)(() => [
4077
- memoedContent.value,
4080
+ fallbackContent.value,
4078
4081
  usingInnerAnimation.value,
4079
4082
  props.streaming
4080
4083
  ], () => {
4081
4084
  if (usingInnerAnimation.value) return;
4082
4085
  if (props.streaming) return;
4083
- if (typeof memoedContent.value === "string") props.onTypingComplete?.(memoedContent.value);
4086
+ if (typeof fallbackContent.value === "string") props.onTypingComplete?.(fallbackContent.value);
4084
4087
  }, { immediate: true });
4085
4088
  const footerPlacement = (0, vue.computed)(() => {
4086
4089
  if (props.footerPlacement) return props.footerPlacement;
@@ -4130,7 +4133,7 @@
4130
4133
  "style": getSlotStyle("footer")
4131
4134
  }, [node]);
4132
4135
  };
4133
- const renderMainContent = () => {
4136
+ const renderMainContent = (mainContent, usingInnerAnimationInRender) => {
4134
4137
  if (isEditing.value) {
4135
4138
  if (typeof props.content !== "string") throw new Error("[Bubble] Editable mode only supports string content.");
4136
4139
  return (0, vue.createVNode)(EditableContent, {
@@ -4142,14 +4145,14 @@
4142
4145
  "onEditCancel": props.onEditCancel
4143
4146
  }, null);
4144
4147
  }
4145
- return usingInnerAnimation.value && typeof memoedContent.value === "string" ? (0, vue.createVNode)(TypingContent, {
4148
+ return usingInnerAnimationInRender && typeof mainContent === "string" ? (0, vue.createVNode)(TypingContent, {
4146
4149
  "prefixCls": props.prefixCls,
4147
4150
  "streaming": props.streaming,
4148
4151
  "typing": mergedTyping.value,
4149
- "content": memoedContent.value,
4152
+ "content": mainContent,
4150
4153
  "onTyping": props.onTyping,
4151
4154
  "onTypingComplete": props.onTypingComplete
4152
- }, null) : memoedContent.value;
4155
+ }, null) : mainContent;
4153
4156
  };
4154
4157
  const renderContent = () => {
4155
4158
  if (props.loading) {
@@ -4163,6 +4166,8 @@
4163
4166
  if (props.loadingRender) return props.loadingRender(props.content, props.info);
4164
4167
  return (0, vue.createVNode)(loading_default, { "prefixCls": props.prefixCls }, null);
4165
4168
  }
4169
+ const mainContent = resolveMainContent();
4170
+ const usingInnerAnimationInRender = Boolean(mergedTyping.value) && typeof mainContent === "string";
4166
4171
  return (0, vue.createVNode)("div", {
4167
4172
  "class": getSlotClassName("body"),
4168
4173
  "style": getSlotStyle("body")
@@ -4176,7 +4181,7 @@
4176
4181
  contextConfig.value.classes?.content,
4177
4182
  props.classes?.content,
4178
4183
  {
4179
- [`${prefixCls.value}-content-string`]: typeof memoedContent.value === "string",
4184
+ [`${prefixCls.value}-content-string`]: typeof mainContent === "string",
4180
4185
  [`${prefixCls.value}-content-editing`]: isEditing.value,
4181
4186
  [`${prefixCls.value}-content-${props.info.status}`]: props.info.status
4182
4187
  }
@@ -4185,7 +4190,7 @@
4185
4190
  ...contextConfig.value.styles?.content,
4186
4191
  ...props.styles?.content
4187
4192
  }
4188
- }, [isFooterInner.value ? (0, vue.createVNode)(vue.Fragment, null, [(0, vue.createVNode)("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent()]), !isEditing.value ? renderFooter() : null]) : renderMainContent()]),
4193
+ }, [isFooterInner.value ? (0, vue.createVNode)(vue.Fragment, null, [(0, vue.createVNode)("div", { "class": `${prefixCls.value}-content-with-footer` }, [renderMainContent(mainContent, usingInnerAnimationInRender)]), !isEditing.value ? renderFooter() : null]) : renderMainContent(mainContent, usingInnerAnimationInRender)]),
4189
4194
  !isEditing.value && !isFooterInner.value ? renderFooter() : null
4190
4195
  ]);
4191
4196
  };
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.0.0";
2
+ var version = "1.0.2-beta.1";
3
3
  //#endregion
4
4
  export { version };
@@ -3,7 +3,7 @@ import { S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l,
3
3
  import { Comment as C, Fragment as w, Teleport as T, Text as E, Transition as D, TransitionGroup as O, cloneVNode as k, computed as A, createTextVNode as j, createVNode as M, defineComponent as N, getCurrentInstance as P, getCurrentScope as F, h as I, inject as L, isVNode as R, markRaw as z, mergeDefaults as B, mergeProps as V, nextTick as H, onBeforeMount as ee, onBeforeUnmount as U, onBeforeUpdate as te, onMounted as W, onScopeDispose as ne, onUnmounted as re, onUpdated as ie, provide as G, reactive as ae, ref as K, render as oe, resolveDynamicComponent as se, shallowReactive as ce, shallowRef as q, toRaw as le, toRef as ue, toRefs as de, toValue as fe, triggerRef as pe, unref as me, useAttrs as he, useId as ge, useSlots as _e, vShow as ve, watch as J, watchEffect as ye, withDirectives as be } from "vue";
4
4
  import xe, { ArrowUpOutlined as Se, AudioMutedOutlined as Ce, AudioOutlined as we, CheckCircleFilled as Te, CheckCircleOutlined as Ee, CheckOutlined as De, ClearOutlined as Oe, CloseCircleFilled as ke, CloseCircleOutlined as Ae, CloseOutlined as je, CopyOutlined as Me, DeleteOutlined as Ne, DislikeFilled as Pe, DislikeOutlined as Fe, DownOutlined as Ie, DownloadOutlined as Le, EditOutlined as Re, EllipsisOutlined as ze, EnterOutlined as Be, EyeInvisibleOutlined as Ve, EyeOutlined as He, FileExcelFilled as Ue, FileImageFilled as We, FileMarkdownFilled as Ge, FilePdfFilled as Ke, FilePptFilled as qe, FileTextFilled as Je, FileTwoTone as Ye, FileWordFilled as Xe, FileZipFilled as Ze, IconContextProvider as Qe, JavaOutlined as $e, JavaScriptOutlined as et, LeftOutlined as tt, LikeFilled as nt, LikeOutlined as rt, LoadingOutlined as it, MinusCircleOutlined as at, MoonOutlined as ot, MutedOutlined as st, PaperClipOutlined as ct, PictureTwoTone as lt, PlusOutlined as ut, PythonOutlined as dt, RightOutlined as ft, RotateLeftOutlined as pt, RotateRightOutlined as mt, SearchOutlined as ht, SoundOutlined as gt, SunOutlined as _t, SwapOutlined as vt, ZoomInOutlined as yt, ZoomOutOutlined as bt } from "@antdv-next/icons";
5
5
  //#region package.json
6
- var xt = "1.0.0", St = "anticon", Ct = {}, wt = [
6
+ var xt = "1.0.2-beta.1", St = "anticon", Ct = {}, wt = [
7
7
  "outlined",
8
8
  "borderless",
9
9
  "filled",
@@ -41407,7 +41407,7 @@ var Hk = /* @__PURE__ */ N({
41407
41407
  ],
41408
41408
  style: f.value.file
41409
41409
  }, [M(cT, V({
41410
- class: `${e.prefixCls}-image-img`,
41410
+ rootClass: `${e.prefixCls}-image-img`,
41411
41411
  width: f.value.file?.width,
41412
41412
  height: f.value.file?.height,
41413
41413
  alt: e.name,
@@ -43097,7 +43097,7 @@ var GA = /* @__PURE__ */ N({
43097
43097
  let c = A(() => {
43098
43098
  let { class: e, style: t, ...n } = r;
43099
43099
  return n;
43100
- }), l = A(() => {
43100
+ }), l = A(() => e.contentRender ? e.contentRender(e.content, e.info) : e.content), u = () => {
43101
43101
  if (n.content) {
43102
43102
  let t = n.content({
43103
43103
  content: e.content,
@@ -43105,45 +43105,45 @@ var GA = /* @__PURE__ */ N({
43105
43105
  });
43106
43106
  if (Lt(t)) return t;
43107
43107
  }
43108
- return e.contentRender ? e.contentRender(e.content, e.info) : e.content;
43109
- }), u = A(() => typeof e.typing == "function" ? e.typing(e.content, e.info) : e.typing), d = A(() => !!u.value && typeof l.value == "string");
43108
+ return l.value;
43109
+ }, d = A(() => typeof e.typing == "function" ? e.typing(e.content, e.info) : e.typing), f = A(() => !!d.value && typeof l.value == "string");
43110
43110
  J(() => [
43111
43111
  l.value,
43112
- d.value,
43112
+ f.value,
43113
43113
  e.streaming
43114
43114
  ], () => {
43115
- d.value || e.streaming || typeof l.value == "string" && e.onTypingComplete?.(l.value);
43115
+ f.value || e.streaming || typeof l.value == "string" && e.onTypingComplete?.(l.value);
43116
43116
  }, { immediate: !0 });
43117
- let f = A(() => e.footerPlacement ? e.footerPlacement : e.placement === "start" ? "outer-start" : "outer-end"), p = A(() => typeof e.editable == "boolean" ? e.editable : e.editable?.editing), m = A(() => f.value.includes("inner")), h = (t) => [
43117
+ let p = A(() => e.footerPlacement ? e.footerPlacement : e.placement === "start" ? "outer-start" : "outer-end"), m = A(() => typeof e.editable == "boolean" ? e.editable : e.editable?.editing), h = A(() => p.value.includes("inner")), g = (t) => [
43118
43118
  `${e.prefixCls}-${t}`,
43119
43119
  i.value.classes?.[t],
43120
43120
  e.classes?.[t]
43121
- ], g = (t) => ({
43121
+ ], _ = (t) => ({
43122
43122
  ...i.value.styles?.[t],
43123
43123
  ...e.styles?.[t]
43124
- }), _ = (t, r) => {
43124
+ }), v = (t, r) => {
43125
43125
  let i = n[t];
43126
43126
  return i ? i({
43127
43127
  content: e.content,
43128
43128
  info: e.info
43129
43129
  }) : WA(r, e.content, e.info);
43130
- }, v = () => {
43131
- let t = _("header", e.header);
43130
+ }, y = () => {
43131
+ let t = v("header", e.header);
43132
43132
  return t ? M("div", {
43133
- class: h("header"),
43134
- style: g("header")
43133
+ class: g("header"),
43134
+ style: _("header")
43135
43135
  }, [t]) : null;
43136
- }, y = () => {
43137
- let t = _("footer", e.footer);
43136
+ }, b = () => {
43137
+ let t = v("footer", e.footer);
43138
43138
  return t ? M("div", {
43139
- class: [h("footer"), {
43140
- [`${e.prefixCls}-footer-start`]: f.value.includes("start"),
43141
- [`${e.prefixCls}-footer-end`]: f.value.includes("end")
43139
+ class: [g("footer"), {
43140
+ [`${e.prefixCls}-footer-start`]: p.value.includes("start"),
43141
+ [`${e.prefixCls}-footer-end`]: p.value.includes("end")
43142
43142
  }],
43143
- style: g("footer")
43143
+ style: _("footer")
43144
43144
  }, [t]) : null;
43145
- }, b = () => {
43146
- if (p.value) {
43145
+ }, x = (t, n) => {
43146
+ if (m.value) {
43147
43147
  if (typeof e.content != "string") throw Error("[Bubble] Editable mode only supports string content.");
43148
43148
  return M(TA, {
43149
43149
  prefixCls: e.prefixCls,
@@ -43154,15 +43154,15 @@ var GA = /* @__PURE__ */ N({
43154
43154
  onEditCancel: e.onEditCancel
43155
43155
  }, null);
43156
43156
  }
43157
- return d.value && typeof l.value == "string" ? M(UA, {
43157
+ return n && typeof t == "string" ? M(UA, {
43158
43158
  prefixCls: e.prefixCls,
43159
43159
  streaming: e.streaming,
43160
- typing: u.value,
43161
- content: l.value,
43160
+ typing: d.value,
43161
+ content: t,
43162
43162
  onTyping: e.onTyping,
43163
43163
  onTypingComplete: e.onTypingComplete
43164
- }, null) : l.value;
43165
- }, x = () => {
43164
+ }, null) : t;
43165
+ }, S = () => {
43166
43166
  if (e.loading) {
43167
43167
  if (n.loading) {
43168
43168
  let t = n.loading({
@@ -43173,38 +43173,39 @@ var GA = /* @__PURE__ */ N({
43173
43173
  }
43174
43174
  return e.loadingRender ? e.loadingRender(e.content, e.info) : M(EA, { prefixCls: e.prefixCls }, null);
43175
43175
  }
43176
+ let t = u(), r = !!d.value && typeof t == "string";
43176
43177
  return M("div", {
43177
- class: h("body"),
43178
- style: g("body")
43178
+ class: g("body"),
43179
+ style: _("body")
43179
43180
  }, [
43180
- v(),
43181
+ y(),
43181
43182
  M("div", {
43182
43183
  class: [
43183
- `${S.value}-content`,
43184
- `${S.value}-content-${T.value}`,
43185
- `${S.value}-content-${E.value}`,
43184
+ `${C.value}-content`,
43185
+ `${C.value}-content-${E.value}`,
43186
+ `${C.value}-content-${D.value}`,
43186
43187
  i.value.classes?.content,
43187
43188
  e.classes?.content,
43188
43189
  {
43189
- [`${S.value}-content-string`]: typeof l.value == "string",
43190
- [`${S.value}-content-editing`]: p.value,
43191
- [`${S.value}-content-${e.info.status}`]: e.info.status
43190
+ [`${C.value}-content-string`]: typeof t == "string",
43191
+ [`${C.value}-content-editing`]: m.value,
43192
+ [`${C.value}-content-${e.info.status}`]: e.info.status
43192
43193
  }
43193
43194
  ],
43194
43195
  style: {
43195
43196
  ...i.value.styles?.content,
43196
43197
  ...e.styles?.content
43197
43198
  }
43198
- }, [m.value ? M(w, null, [M("div", { class: `${S.value}-content-with-footer` }, [b()]), p.value ? null : y()]) : b()]),
43199
- !p.value && !m.value ? y() : null
43199
+ }, [h.value ? M(w, null, [M("div", { class: `${C.value}-content-with-footer` }, [x(t, r)]), m.value ? null : b()]) : x(t, r)]),
43200
+ !m.value && !h.value ? b() : null
43200
43201
  ]);
43201
- }, { prefixCls: S, placement: C, variant: T, shape: E } = de(e);
43202
+ }, { prefixCls: C, placement: T, variant: E, shape: D } = de(e);
43202
43203
  return () => {
43203
- let t = _("avatar", e.avatar), n = _("extra", e.extra);
43204
+ let t = v("avatar", e.avatar), n = v("extra", e.extra);
43204
43205
  return M("div", V({ ref: a }, c.value, {
43205
43206
  class: [
43206
- S.value,
43207
- `${S.value}-${C.value}`,
43207
+ C.value,
43208
+ `${C.value}-${T.value}`,
43208
43209
  i.value.classes?.root,
43209
43210
  e.rootClass,
43210
43211
  e.classes?.root,
@@ -43213,8 +43214,8 @@ var GA = /* @__PURE__ */ N({
43213
43214
  r.class,
43214
43215
  e.class,
43215
43216
  {
43216
- [`${S.value}-loading`]: e.loading,
43217
- [`${S.value}-${e.info.status}`]: e.info.status
43217
+ [`${C.value}-loading`]: e.loading,
43218
+ [`${C.value}-${e.info.status}`]: e.info.status
43218
43219
  }
43219
43220
  ],
43220
43221
  style: [
@@ -43226,13 +43227,13 @@ var GA = /* @__PURE__ */ N({
43226
43227
  ]
43227
43228
  }), [
43228
43229
  t ? M("div", {
43229
- class: h("avatar"),
43230
- style: g("avatar")
43230
+ class: g("avatar"),
43231
+ style: _("avatar")
43231
43232
  }, [t]) : null,
43232
- x(),
43233
- !p.value && !e.loading && n ? M("div", {
43234
- class: h("extra"),
43235
- style: g("extra")
43233
+ S(),
43234
+ !m.value && !e.loading && n ? M("div", {
43235
+ class: g("extra"),
43236
+ style: _("extra")
43236
43237
  }, [n]) : null
43237
43238
  ]);
43238
43239
  };