@vunk/plus 1.11.1 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/agent-chat-provider/index.mjs +14 -6
- package/components/agent-chat-provider/src/index.vue.d.ts +6 -0
- package/components/agent-chat-provider/src/types.d.ts +3 -2
- package/components/agent-chat-provider/src/use.d.ts +2 -2
- package/components/broadcasting-markdown/index.mjs +138 -3
- package/components/broadcasting-markdown/src/index.vue.d.ts +1 -1
- package/components/bubble-list/index.mjs +1 -1
- package/components/bubble-list/src/core/index.vue.d.ts +7 -155
- package/components/bubble-list/src/index.vue.d.ts +7 -155
- package/components/chat-independent/src/index.vue.d.ts +7 -155
- package/components/metahuman-broadcasting/src/index.vue.d.ts +6 -2
- package/components/pixi-frame/index.mjs +71 -21
- package/components/pixi-frame/src/bitmap.vue.d.ts +5 -1
- package/components/pixi-frame/src/index.vue.d.ts +5 -1
- package/components/routes-menu-content/index.mjs +1 -1
- package/element/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/element/bubble/index.d.ts +4 -0
- package/element/bubble/index.mjs +154 -0
- package/element/bubble/src/index.vue.d.ts +51 -0
- package/element/bubble/src/types.d.ts +19 -0
- package/element/index.css +1 -0
- package/element/thinking/index.d.ts +4 -0
- package/element/thinking/index.mjs +232 -0
- package/element/thinking/src/index.vue.d.ts +53 -0
- package/element/thinking/src/types.d.ts +20 -0
- package/package.json +12 -1
- package/components/bubble-templates/src/legacy.vue.d.ts +0 -153
|
@@ -1610,164 +1610,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1610
1610
|
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
1611
1611
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1612
1612
|
readonly Bubble: {
|
|
1613
|
-
new (...args: any[]):
|
|
1614
|
-
onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1615
|
-
onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1616
|
-
onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1617
|
-
onAvatarError?: ((e: Event) => any) | undefined;
|
|
1618
|
-
}>, {
|
|
1619
|
-
interrupt: () => void;
|
|
1620
|
-
continue: () => void;
|
|
1621
|
-
restart: () => void;
|
|
1622
|
-
destroy: () => void;
|
|
1623
|
-
renderedContent: ComputedRef<string>;
|
|
1624
|
-
isTyping: Ref<boolean>;
|
|
1625
|
-
progress: ComputedRef<number>;
|
|
1626
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1627
|
-
start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1628
|
-
finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1629
|
-
writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1630
|
-
avatarError: (e: Event) => any;
|
|
1631
|
-
}, import("vue").PublicProps, {
|
|
1632
|
-
maxWidth: string;
|
|
1633
|
-
noStyle: boolean;
|
|
1634
|
-
content: string;
|
|
1635
|
-
placement: "start" | "end";
|
|
1636
|
-
avatar: string;
|
|
1637
|
-
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
1638
|
-
avatarSize: string;
|
|
1639
|
-
avatarGap: string;
|
|
1640
|
-
avatarShape: "circle" | "square";
|
|
1641
|
-
avatarSrcSet: string;
|
|
1642
|
-
avatarAlt: string;
|
|
1643
|
-
avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
1644
|
-
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
|
|
1645
|
-
typewriterRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
|
|
1646
|
-
onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1647
|
-
onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1648
|
-
onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1649
|
-
}>, {
|
|
1650
|
-
interrupt: () => void;
|
|
1651
|
-
continue: () => void;
|
|
1652
|
-
restart: () => void;
|
|
1653
|
-
destroy: () => void;
|
|
1654
|
-
renderedContent: ComputedRef<string>;
|
|
1655
|
-
isTyping: Ref<boolean>;
|
|
1656
|
-
progress: ComputedRef<number>;
|
|
1657
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
1658
|
-
start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1659
|
-
finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1660
|
-
writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1661
|
-
}, import("vue").PublicProps, {
|
|
1662
|
-
content: string;
|
|
1663
|
-
isMarkdown: boolean;
|
|
1664
|
-
typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
|
|
1665
|
-
isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
|
|
1666
|
-
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
|
|
1667
|
-
typeWriterRef: HTMLDivElement;
|
|
1668
|
-
markdownContentRef: HTMLDivElement;
|
|
1669
|
-
}, HTMLDivElement, import("vue").ComponentProvideOptions, {
|
|
1670
|
-
P: {};
|
|
1671
|
-
B: {};
|
|
1672
|
-
D: {};
|
|
1673
|
-
C: {};
|
|
1674
|
-
M: {};
|
|
1675
|
-
Defaults: {};
|
|
1676
|
-
}, Readonly<import("vue-element-plus-x/./types/Typewriter").TypewriterProps> & Readonly<{
|
|
1677
|
-
onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1678
|
-
onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1679
|
-
onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1680
|
-
}>, {
|
|
1681
|
-
interrupt: () => void;
|
|
1682
|
-
continue: () => void;
|
|
1683
|
-
restart: () => void;
|
|
1684
|
-
destroy: () => void;
|
|
1685
|
-
renderedContent: ComputedRef<string>;
|
|
1686
|
-
isTyping: Ref<boolean>;
|
|
1687
|
-
progress: ComputedRef<number>;
|
|
1688
|
-
}, {}, {}, {}, {
|
|
1689
|
-
content: string;
|
|
1690
|
-
isMarkdown: boolean;
|
|
1691
|
-
typing: boolean | import("vue-element-plus-x/./types/Typewriter").TypingConfig;
|
|
1692
|
-
isFog: boolean | import("vue-element-plus-x/./types/Typewriter").TypingFogfig;
|
|
1693
|
-
}> | null;
|
|
1694
|
-
}, any, import("vue").ComponentProvideOptions, {
|
|
1695
|
-
P: {};
|
|
1696
|
-
B: {};
|
|
1697
|
-
D: {};
|
|
1698
|
-
C: {};
|
|
1699
|
-
M: {};
|
|
1700
|
-
Defaults: {};
|
|
1701
|
-
}, Readonly<import("vue-element-plus-x/./types/Bubble").BubbleProps> & Readonly<{
|
|
1702
|
-
onStart?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1703
|
-
onFinish?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1704
|
-
onWriting?: ((instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any) | undefined;
|
|
1705
|
-
onAvatarError?: ((e: Event) => any) | undefined;
|
|
1706
|
-
}>, {
|
|
1707
|
-
interrupt: () => void;
|
|
1708
|
-
continue: () => void;
|
|
1709
|
-
restart: () => void;
|
|
1710
|
-
destroy: () => void;
|
|
1711
|
-
renderedContent: ComputedRef<string>;
|
|
1712
|
-
isTyping: Ref<boolean>;
|
|
1713
|
-
progress: ComputedRef<number>;
|
|
1714
|
-
}, {}, {}, {}, {
|
|
1715
|
-
maxWidth: string;
|
|
1716
|
-
noStyle: boolean;
|
|
1717
|
-
content: string;
|
|
1718
|
-
placement: "start" | "end";
|
|
1719
|
-
avatar: string;
|
|
1720
|
-
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
1721
|
-
avatarSize: string;
|
|
1722
|
-
avatarGap: string;
|
|
1723
|
-
avatarShape: "circle" | "square";
|
|
1724
|
-
avatarSrcSet: string;
|
|
1725
|
-
avatarAlt: string;
|
|
1726
|
-
avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
1727
|
-
}>;
|
|
1613
|
+
new (...args: any[]): any;
|
|
1728
1614
|
__isFragment?: never;
|
|
1729
1615
|
__isTeleport?: never;
|
|
1730
1616
|
__isSuspense?: never;
|
|
1731
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
interrupt: () => void;
|
|
1738
|
-
continue: () => void;
|
|
1739
|
-
restart: () => void;
|
|
1740
|
-
destroy: () => void;
|
|
1741
|
-
renderedContent: ComputedRef<string>;
|
|
1742
|
-
isTyping: Ref<boolean>;
|
|
1743
|
-
progress: ComputedRef<number>;
|
|
1744
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1745
|
-
start: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1746
|
-
finish: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1747
|
-
writing: (instance: import("vue-element-plus-x/./types/Typewriter").TypewriterInstance) => any;
|
|
1748
|
-
avatarError: (e: Event) => any;
|
|
1749
|
-
}, string, {
|
|
1750
|
-
maxWidth: string;
|
|
1751
|
-
noStyle: boolean;
|
|
1752
|
-
content: string;
|
|
1753
|
-
placement: "start" | "end";
|
|
1754
|
-
avatar: string;
|
|
1755
|
-
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
1756
|
-
avatarSize: string;
|
|
1757
|
-
avatarGap: string;
|
|
1758
|
-
avatarShape: "circle" | "square";
|
|
1759
|
-
avatarSrcSet: string;
|
|
1760
|
-
avatarAlt: string;
|
|
1761
|
-
avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
1762
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
1763
|
-
$slots: {
|
|
1764
|
-
avatar?(_: {}): any;
|
|
1765
|
-
header?(_: {}): any;
|
|
1766
|
-
content?(_: {}): any;
|
|
1767
|
-
loading?(_: {}): any;
|
|
1768
|
-
footer?(_: {}): any;
|
|
1769
|
-
};
|
|
1770
|
-
});
|
|
1617
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
1618
|
+
[x: string]: any;
|
|
1619
|
+
[x: symbol]: any;
|
|
1620
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
1621
|
+
install(app: import("vue").App): void;
|
|
1622
|
+
};
|
|
1771
1623
|
loadingBg: {
|
|
1772
1624
|
new (...args: any[]): any;
|
|
1773
1625
|
__isFragment?: never;
|
|
@@ -163,7 +163,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
163
163
|
theData: import("vue").ComputedRef<__VkBroadcastingMarkdown.Paragraph[]>;
|
|
164
164
|
ParagraphStatus: typeof import("@vunk/plus/components/broadcasting-markdown").ParagraphStatus;
|
|
165
165
|
fulfilledTextValue: import("vue").ComputedRef<string>;
|
|
166
|
-
processingParagraph: (paragraph: __VkBroadcastingMarkdown.Paragraph) => Promise<void
|
|
166
|
+
processingParagraph: (paragraph: __VkBroadcastingMarkdown.Paragraph) => Promise<void>;
|
|
167
167
|
setData: (obj: any, e: import("@vunk/core/shared").SetDataEvent) => void;
|
|
168
168
|
Broadcast: typeof TickerStatus;
|
|
169
169
|
isParagraphEnabled: (currentIndex: number) => boolean;
|
|
@@ -552,7 +552,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
552
552
|
index: import("vue").WritableComputedRef<number, number>;
|
|
553
553
|
lastScheduledClearIndex: Ref<number, number>;
|
|
554
554
|
scheduleClearFrame: (frameIndex: number) => void;
|
|
555
|
-
|
|
555
|
+
animationId: number | null;
|
|
556
|
+
lastFrameTime: number;
|
|
557
|
+
frameCount: number;
|
|
558
|
+
lastFpsUpdateTime: number;
|
|
559
|
+
startFrameLoop: () => void;
|
|
556
560
|
play: () => void;
|
|
557
561
|
pause: () => void;
|
|
558
562
|
stop: () => void;
|
|
@@ -1047,7 +1047,7 @@ const emits = {
|
|
|
1047
1047
|
"setData": null
|
|
1048
1048
|
};
|
|
1049
1049
|
|
|
1050
|
-
const appInjectKey = Symbol("appInjectKey");
|
|
1050
|
+
const appInjectKey = /* @__PURE__ */ Symbol("appInjectKey");
|
|
1051
1051
|
function initPixiApp() {
|
|
1052
1052
|
const application = new Application();
|
|
1053
1053
|
const whenDef = new Deferred();
|
|
@@ -1454,24 +1454,58 @@ var _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1454
1454
|
});
|
|
1455
1455
|
});
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1458
|
-
|
|
1457
|
+
let animationId = null;
|
|
1458
|
+
let lastFrameTime = 0;
|
|
1459
|
+
let frameCount = 0;
|
|
1460
|
+
let lastFpsUpdateTime = 0;
|
|
1461
|
+
function startFrameLoop() {
|
|
1462
|
+
if (animationId !== null)
|
|
1459
1463
|
return;
|
|
1464
|
+
lastFrameTime = performance.now();
|
|
1465
|
+
lastFpsUpdateTime = lastFrameTime;
|
|
1466
|
+
frameCount = 0;
|
|
1467
|
+
function renderFrame() {
|
|
1468
|
+
const now = performance.now();
|
|
1469
|
+
const frameDuration = 1e3 / props.frameRate;
|
|
1470
|
+
const delta = now - lastFrameTime;
|
|
1471
|
+
if (delta >= frameDuration) {
|
|
1472
|
+
lastFrameTime = now - delta % frameDuration;
|
|
1473
|
+
drawFrame();
|
|
1474
|
+
frameCount++;
|
|
1475
|
+
const elapsed = now - lastFpsUpdateTime;
|
|
1476
|
+
if (elapsed >= 1e3) {
|
|
1477
|
+
const currentFps = Math.round(frameCount * 1e3 / elapsed);
|
|
1478
|
+
console.log(`[Bitmap] FPS: ${currentFps}`);
|
|
1479
|
+
frameCount = 0;
|
|
1480
|
+
lastFpsUpdateTime = now;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
if (props.status === TickerStatus.playing) {
|
|
1484
|
+
animationId = requestAnimationFrame(renderFrame);
|
|
1485
|
+
} else {
|
|
1486
|
+
animationId = null;
|
|
1487
|
+
}
|
|
1460
1488
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1489
|
+
function drawFrame() {
|
|
1490
|
+
if (props.data.length === 0 || props.status !== TickerStatus.playing) {
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1493
|
+
const bitmap = props.data[index.value];
|
|
1494
|
+
if (bitmap) {
|
|
1495
|
+
const originIndex = index.value - 1;
|
|
1496
|
+
if (originIndex >= 0) {
|
|
1497
|
+
scheduleClearFrame(originIndex);
|
|
1498
|
+
}
|
|
1499
|
+
updateTextureFromBitmap(bitmap);
|
|
1500
|
+
index.value = index.value + 1;
|
|
1501
|
+
} else {
|
|
1502
|
+
console.warn(
|
|
1503
|
+
`Bitmap for index ${index.value} not found. Ensure the data is loaded.`
|
|
1504
|
+
);
|
|
1505
|
+
emit("notFound", index.value);
|
|
1466
1506
|
}
|
|
1467
|
-
updateTextureFromBitmap(bitmap);
|
|
1468
|
-
index.value = index.value + 1;
|
|
1469
|
-
} else {
|
|
1470
|
-
console.warn(
|
|
1471
|
-
`Bitmap for index ${index.value} not found. Ensure the data is loaded.`
|
|
1472
|
-
);
|
|
1473
|
-
emit("notFound", index.value);
|
|
1474
1507
|
}
|
|
1508
|
+
animationId = requestAnimationFrame(renderFrame);
|
|
1475
1509
|
}
|
|
1476
1510
|
watchEffect(() => {
|
|
1477
1511
|
if (props.prerender && index.value === 0 && props.data.length > 0 && props.data[0]) {
|
|
@@ -1485,21 +1519,21 @@ var _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1485
1519
|
}, { immediate: true });
|
|
1486
1520
|
function play() {
|
|
1487
1521
|
if (props.data.length > 0) {
|
|
1488
|
-
application.ticker.minFPS = props.frameRate;
|
|
1489
|
-
application.ticker.maxFPS = props.frameRate;
|
|
1490
1522
|
emit("update:status", TickerStatus.playing);
|
|
1491
|
-
|
|
1523
|
+
startFrameLoop();
|
|
1492
1524
|
} else {
|
|
1493
1525
|
emit("update:status", TickerStatus.stopped);
|
|
1494
1526
|
}
|
|
1495
1527
|
}
|
|
1496
1528
|
function pause() {
|
|
1497
|
-
application.ticker.remove(drawFrame);
|
|
1498
1529
|
emit("update:status", TickerStatus.paused);
|
|
1499
1530
|
}
|
|
1500
1531
|
function stop() {
|
|
1501
|
-
application.ticker.remove(drawFrame);
|
|
1502
1532
|
emit("update:status", TickerStatus.stopped);
|
|
1533
|
+
if (animationId !== null) {
|
|
1534
|
+
cancelAnimationFrame(animationId);
|
|
1535
|
+
animationId = null;
|
|
1536
|
+
}
|
|
1503
1537
|
emit("update:data", []);
|
|
1504
1538
|
index.value = 0;
|
|
1505
1539
|
lastScheduledClearIndex.value = -1;
|
|
@@ -1508,7 +1542,23 @@ var _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1508
1542
|
stop();
|
|
1509
1543
|
texture.destroy();
|
|
1510
1544
|
});
|
|
1511
|
-
const __returned__ = { props, emit, sprite, resizeSprite, application, texture, updateTextureFromBitmap, index, lastScheduledClearIndex, scheduleClearFrame,
|
|
1545
|
+
const __returned__ = { props, emit, sprite, resizeSprite, application, texture, updateTextureFromBitmap, index, lastScheduledClearIndex, scheduleClearFrame, get animationId() {
|
|
1546
|
+
return animationId;
|
|
1547
|
+
}, set animationId(v) {
|
|
1548
|
+
animationId = v;
|
|
1549
|
+
}, get lastFrameTime() {
|
|
1550
|
+
return lastFrameTime;
|
|
1551
|
+
}, set lastFrameTime(v) {
|
|
1552
|
+
lastFrameTime = v;
|
|
1553
|
+
}, get frameCount() {
|
|
1554
|
+
return frameCount;
|
|
1555
|
+
}, set frameCount(v) {
|
|
1556
|
+
frameCount = v;
|
|
1557
|
+
}, get lastFpsUpdateTime() {
|
|
1558
|
+
return lastFpsUpdateTime;
|
|
1559
|
+
}, set lastFpsUpdateTime(v) {
|
|
1560
|
+
lastFpsUpdateTime = v;
|
|
1561
|
+
}, startFrameLoop, play, pause, stop };
|
|
1512
1562
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1513
1563
|
return __returned__;
|
|
1514
1564
|
}
|
|
@@ -92,7 +92,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
92
92
|
index: import("vue").WritableComputedRef<number, number>;
|
|
93
93
|
lastScheduledClearIndex: import("vue").Ref<number, number>;
|
|
94
94
|
scheduleClearFrame: (frameIndex: number) => void;
|
|
95
|
-
|
|
95
|
+
animationId: number | null;
|
|
96
|
+
lastFrameTime: number;
|
|
97
|
+
frameCount: number;
|
|
98
|
+
lastFpsUpdateTime: number;
|
|
99
|
+
startFrameLoop: () => void;
|
|
96
100
|
play: () => void;
|
|
97
101
|
pause: () => void;
|
|
98
102
|
stop: () => void;
|
|
@@ -524,7 +524,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
524
524
|
index: import("vue").WritableComputedRef<number, number>;
|
|
525
525
|
lastScheduledClearIndex: import("vue").Ref<number, number>;
|
|
526
526
|
scheduleClearFrame: (frameIndex: number) => void;
|
|
527
|
-
|
|
527
|
+
animationId: number | null;
|
|
528
|
+
lastFrameTime: number;
|
|
529
|
+
frameCount: number;
|
|
530
|
+
lastFpsUpdateTime: number;
|
|
531
|
+
startFrameLoop: () => void;
|
|
528
532
|
play: () => void;
|
|
529
533
|
pause: () => void;
|
|
530
534
|
stop: () => void;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as B, ref as s, watch as T, computed as u, onUnmounted as F, resolveComponent as N, createElementBlock as a, createCommentVNode as t, openBlock as l, normalizeStyle as c, normalizeClass as f, createElementVNode as i, createVNode as V, renderSlot as n, Fragment as D, renderList as G } from "vue";
|
|
2
|
+
import { _ as W } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const A = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "el-bubble-avatar el-bubble-avatar-size"
|
|
6
|
+
}, I = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "el-bubble-avatar-placeholder"
|
|
9
|
+
}, L = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "el-bubble-avatar"
|
|
12
|
+
}, R = { class: "el-bubble-content-wrapper" }, U = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "el-bubble-header"
|
|
15
|
+
}, j = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "el-bubble-loading-wrap"
|
|
18
|
+
}, q = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "el-bubble-loading-wrap"
|
|
21
|
+
}, H = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "el-bubble-footer"
|
|
24
|
+
}, J = /* @__PURE__ */ B({
|
|
25
|
+
__name: "index",
|
|
26
|
+
props: {
|
|
27
|
+
placement: { default: "start" },
|
|
28
|
+
avatar: { default: "" },
|
|
29
|
+
loading: { type: Boolean },
|
|
30
|
+
shape: {},
|
|
31
|
+
variant: { default: "filled" },
|
|
32
|
+
maxWidth: { default: "500px" },
|
|
33
|
+
avatarSize: { default: "" },
|
|
34
|
+
avatarGap: { default: "12px" },
|
|
35
|
+
avatarShape: { default: "circle" },
|
|
36
|
+
avatarSrcSet: { default: "" },
|
|
37
|
+
avatarAlt: { default: "" },
|
|
38
|
+
avatarFit: { default: "cover" },
|
|
39
|
+
noStyle: { type: Boolean, default: !1 },
|
|
40
|
+
content: { default: "" }
|
|
41
|
+
},
|
|
42
|
+
emits: ["avatarError"],
|
|
43
|
+
setup(y, { expose: h, emit: m }) {
|
|
44
|
+
const g = y, S = m, o = s(!1), $ = s(!1);
|
|
45
|
+
T(
|
|
46
|
+
() => g.content,
|
|
47
|
+
(e, v) => {
|
|
48
|
+
e !== v && o.value && b();
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
const r = s(), d = {
|
|
52
|
+
interrupt: w,
|
|
53
|
+
continue: z,
|
|
54
|
+
restart: b,
|
|
55
|
+
destroy: C,
|
|
56
|
+
renderedContent: u(
|
|
57
|
+
() => o.value ? "" : r.value?.renderedContent.value || ""
|
|
58
|
+
),
|
|
59
|
+
isTyping: u(
|
|
60
|
+
() => !o.value && (r.value?.isTyping.value || !1)
|
|
61
|
+
),
|
|
62
|
+
progress: u(
|
|
63
|
+
() => o.value ? 0 : r.value?.progress.value || 0
|
|
64
|
+
)
|
|
65
|
+
};
|
|
66
|
+
function k(e) {
|
|
67
|
+
S("avatarError", e);
|
|
68
|
+
}
|
|
69
|
+
function w() {
|
|
70
|
+
r.value?.interrupt();
|
|
71
|
+
}
|
|
72
|
+
function z() {
|
|
73
|
+
r.value?.continue();
|
|
74
|
+
}
|
|
75
|
+
function b() {
|
|
76
|
+
o.value = !1, r.value?.restart();
|
|
77
|
+
}
|
|
78
|
+
function C() {
|
|
79
|
+
r.value?.destroy(), o.value = !0;
|
|
80
|
+
}
|
|
81
|
+
return F(d.destroy), h(d), (e, v) => {
|
|
82
|
+
const E = N("el-avatar");
|
|
83
|
+
return o.value ? t("", !0) : (l(), a("div", {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: f(["el-bubble", {
|
|
86
|
+
"el-bubble-start": e.placement === "start",
|
|
87
|
+
"el-bubble-end": e.placement === "end",
|
|
88
|
+
"el-bubble-no-style": e.noStyle,
|
|
89
|
+
"el-bubble-is-typing": $.value
|
|
90
|
+
// 新增动态类名
|
|
91
|
+
}]),
|
|
92
|
+
style: c({
|
|
93
|
+
"--el-box-shadow-tertiary": `0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
94
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
95
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)`,
|
|
96
|
+
"--bubble-content-max-width": `${e.maxWidth}`,
|
|
97
|
+
"--el-bubble-avatar-placeholder-width": `${e.$slots.avatar ? "" : e.avatarSize}`,
|
|
98
|
+
"--el-bubble-avatar-placeholder-height": `${e.$slots.avatar ? "" : e.avatarSize}`,
|
|
99
|
+
"--el-bubble-avatar-placeholder-gap": `${e.avatarGap}`
|
|
100
|
+
})
|
|
101
|
+
}, [
|
|
102
|
+
!e.$slots.avatar && e.avatar ? (l(), a("div", A, [
|
|
103
|
+
V(E, {
|
|
104
|
+
size: 0,
|
|
105
|
+
src: e.avatar,
|
|
106
|
+
shape: e.avatarShape,
|
|
107
|
+
"src-set": e.avatarSrcSet,
|
|
108
|
+
alt: e.avatarFit,
|
|
109
|
+
onError: k
|
|
110
|
+
}, null, 8, ["src", "shape", "src-set", "alt"])
|
|
111
|
+
])) : t("", !0),
|
|
112
|
+
!e.$slots.avatar && !e.avatar && e.avatarSize ? (l(), a("div", I)) : t("", !0),
|
|
113
|
+
e.$slots.avatar ? (l(), a("div", L, [
|
|
114
|
+
n(e.$slots, "avatar", {}, void 0, !0)
|
|
115
|
+
])) : t("", !0),
|
|
116
|
+
i("div", R, [
|
|
117
|
+
e.$slots.header ? (l(), a("div", U, [
|
|
118
|
+
n(e.$slots, "header", {}, void 0, !0)
|
|
119
|
+
])) : t("", !0),
|
|
120
|
+
i("div", {
|
|
121
|
+
class: f(["el-bubble-content", {
|
|
122
|
+
"el-bubble-content-loading": e.loading,
|
|
123
|
+
"el-bubble-content-round": e.shape === "round" && !e.noStyle,
|
|
124
|
+
"el-bubble-content-corner": e.shape === "corner" && !e.noStyle,
|
|
125
|
+
"el-bubble-content-filled": e.variant === "filled" && !e.noStyle,
|
|
126
|
+
"el-bubble-content-borderless": e.variant === "borderless" && !e.noStyle,
|
|
127
|
+
"el-bubble-content-outlined": e.variant === "outlined" && !e.noStyle,
|
|
128
|
+
"el-bubble-content-shadow": e.variant === "shadow" && !e.noStyle
|
|
129
|
+
}])
|
|
130
|
+
}, [
|
|
131
|
+
!o.value && e.$slots.content && !e.loading ? n(e.$slots, "content", { key: 0 }, void 0, !0) : t("", !0),
|
|
132
|
+
e.loading && !e.$slots.loading ? (l(), a("div", j, [
|
|
133
|
+
(l(), a(D, null, G(3, (K, p) => i("div", {
|
|
134
|
+
key: p,
|
|
135
|
+
class: "dot",
|
|
136
|
+
style: c({ animationDelay: `${p * 0.2}s` })
|
|
137
|
+
}, null, 4)), 64))
|
|
138
|
+
])) : t("", !0),
|
|
139
|
+
e.loading && e.$slots.loading ? (l(), a("div", q, [
|
|
140
|
+
n(e.$slots, "loading", {}, void 0, !0)
|
|
141
|
+
])) : t("", !0)
|
|
142
|
+
], 2),
|
|
143
|
+
e.$slots.footer ? (l(), a("div", H, [
|
|
144
|
+
n(e.$slots, "footer", {}, void 0, !0)
|
|
145
|
+
])) : t("", !0)
|
|
146
|
+
])
|
|
147
|
+
], 6));
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}), P = /* @__PURE__ */ W(J, [["__scopeId", "data-v-84e81b19"]]);
|
|
151
|
+
export {
|
|
152
|
+
P as Bubble,
|
|
153
|
+
P as default
|
|
154
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BubbleProps } from './types';
|
|
2
|
+
declare function interrupt(): void;
|
|
3
|
+
declare function continueTyping(): void;
|
|
4
|
+
declare function restart(): void;
|
|
5
|
+
declare function destroy(): void;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
avatar?(_: {}): any;
|
|
10
|
+
header?(_: {}): any;
|
|
11
|
+
content?(_: {}): any;
|
|
12
|
+
loading?(_: {}): any;
|
|
13
|
+
footer?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<BubbleProps, {
|
|
20
|
+
interrupt: typeof interrupt;
|
|
21
|
+
continue: typeof continueTyping;
|
|
22
|
+
restart: typeof restart;
|
|
23
|
+
destroy: typeof destroy;
|
|
24
|
+
renderedContent: import('vue').ComputedRef<any>;
|
|
25
|
+
isTyping: import('vue').ComputedRef<any>;
|
|
26
|
+
progress: import('vue').ComputedRef<any>;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
avatarError: (e: Event) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<BubbleProps> & Readonly<{
|
|
30
|
+
onAvatarError?: ((e: Event) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
placement: "start" | "end";
|
|
33
|
+
avatar: string;
|
|
34
|
+
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
35
|
+
maxWidth: string;
|
|
36
|
+
avatarSize: string;
|
|
37
|
+
avatarGap: string;
|
|
38
|
+
avatarShape: "circle" | "square";
|
|
39
|
+
avatarSrcSet: string;
|
|
40
|
+
avatarAlt: string;
|
|
41
|
+
avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
42
|
+
noStyle: boolean;
|
|
43
|
+
content: string;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface BubbleProps {
|
|
2
|
+
placement?: 'start' | 'end';
|
|
3
|
+
avatar?: string;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
shape?: 'round' | 'corner';
|
|
6
|
+
variant?: 'filled' | 'borderless' | 'outlined' | 'shadow';
|
|
7
|
+
maxWidth?: string;
|
|
8
|
+
avatarSize?: string;
|
|
9
|
+
avatarGap?: string;
|
|
10
|
+
avatarShape?: 'circle' | 'square';
|
|
11
|
+
avatarSrcSet?: string;
|
|
12
|
+
avatarAlt?: string;
|
|
13
|
+
avatarFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
14
|
+
noStyle?: boolean;
|
|
15
|
+
content?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface BubbleEmits {
|
|
18
|
+
(event: 'avatarError', e: Event): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.el-bubble[data-v-84e81b19]{display:flex;gap:var(--el-bubble-avatar-placeholder-gap)}.el-bubble-avatar-size[data-v-84e81b19] .el-avatar,.el-bubble-avatar-placeholder[data-v-84e81b19]{width:var(--el-bubble-avatar-placeholder-width);height:var(--el-bubble-avatar-placeholder-height)}.el-bubble-start .el-bubble-content-wrapper .el-bubble-content-corner[data-v-84e81b19]{border-start-start-radius:calc(var(--el-border-radius-base) - 2px)}.el-bubble-end[data-v-84e81b19]{justify-content:end;flex-direction:row-reverse}.el-bubble-end .el-bubble-content-wrapper[data-v-84e81b19]{align-items:flex-end}.el-bubble-end .el-bubble-content-wrapper .el-bubble-content-corner[data-v-84e81b19]{border-start-end-radius:calc(var(--el-border-radius-base) - 2px)}.el-bubble-no-style .el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19]{background-color:transparent;padding:0}.el-bubble-content-wrapper[data-v-84e81b19]{flex:auto;display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}.el-bubble-content-wrapper .el-bubble-header[data-v-84e81b19],.el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19],.el-bubble-content-wrapper .el-bubble-footer[data-v-84e81b19]{font-size:var(--el-font-size-base);color:var(--el-text-color-primary);line-height:var(--el-font-line-height-primary)}.el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19]{background-color:var(--el-fill-color);padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border-radius:calc(var(--el-border-radius-base) + 4px);position:relative;box-sizing:border-box;min-width:0;max-width:var(--bubble-content-max-width);color:var(--el-text-color-primary);font-size:var(--el-font-size-base);line-height:var(--el-font-line-height-primary);min-height:calc(var(--el-padding-sm, 12px) * 2 + var(--el-font-line-height-primary) * var(--el-font-size-base));word-break:break-word}.el-bubble-content-wrapper .el-bubble-content .no-content[data-v-84e81b19]{height:0}.el-bubble-content-wrapper .el-bubble-content-round[data-v-84e81b19]{border-radius:var(--el-border-radius-round)}.el-bubble-content-wrapper .el-bubble-content-filled[data-v-84e81b19]{background-color:var(--el-fill-color)}.el-bubble-content-wrapper .el-bubble-content-borderless[data-v-84e81b19]{background-color:var(--el-fill-color);border:var(--el-border-width) solid var(--el-border-color)}.el-bubble-content-wrapper .el-bubble-content-outlined[data-v-84e81b19]{background:none;border:var(--el-border-width) solid var(--el-border-color)}.el-bubble-content-wrapper .el-bubble-content-shadow[data-v-84e81b19]{background:none;box-shadow:var(--el-box-shadow)}.el-bubble-content-wrapper .el-bubble-content-loading[data-v-84e81b19]{width:fit-content}.el-bubble-content-wrapper .el-bubble-content-loading .el-bubble-loading-wrap[data-v-84e81b19]{display:flex;justify-content:center;align-items:center;gap:5px}.el-bubble-content-wrapper .el-bubble-content-loading .dot[data-v-84e81b19]{will-change:transform;width:5px;height:5px;background-color:var(--el-color-primary);border-radius:50%;animation:wave-84e81b19 1s infinite ease-in-out}.el-bubble-content-wrapper .el-bubble-content-loading .dot-2[data-v-84e81b19]{animation-delay:.2s}.el-bubble-content-wrapper .el-bubble-content-loading .dot-3[data-v-84e81b19]{animation-delay:.4s}@keyframes wave-84e81b19{0%,to{transform:translateY(-2px)}50%{transform:translateY(2px)}}.el-bubble-content-wrapper .el-bubble-footer[data-v-84e81b19]{margin-top:var(--el-padding-sm, 12px)}.el-thinking[data-v-1247234a]{font-family:system-ui,sans-serif;margin:0 auto}.trigger[data-v-1247234a]{display:flex;align-items:center;height:100%;width:var(--el-thinking-button-width);gap:8px;padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border:1px solid #e4e4e4;border-radius:8px;background:#fff;cursor:pointer;margin-bottom:8px}.trigger .el-icon-center[data-v-1247234a]{height:100%;display:flex;align-items:center}.trigger .start-color[data-v-1247234a]{color:var(--el-color-warning)}.trigger .end-color[data-v-1247234a]{color:var(--el-color-success)}.trigger .is-loading[data-v-1247234a]{color:var(--el-color-primary)}.trigger .error-color[data-v-1247234a]{color:var(--el-color-danger)}.trigger .cancel-color[data-v-1247234a]{color:var(--el-color-info)}.trigger[data-v-1247234a]:hover{background:#f8f8f8}.trigger.disabled[data-v-1247234a]{cursor:pointer}.trigger[data-v-1247234a]:disabled{cursor:not-allowed;opacity:.7}.status-icon[data-v-1247234a]{font-size:1.2em}.arrow[data-v-1247234a]{margin-left:auto;transition:transform var(--el-thinking-animation-duration)}.arrow.expanded[data-v-1247234a]{transform:rotate(180deg)}.slide-enter-active[data-v-1247234a],.slide-leave-active[data-v-1247234a]{height:calc-size(max-content,size);transition:height var(--el-thinking-animation-duration) ease-in-out,opacity var(--el-thinking-animation-duration) ease-in-out;overflow:hidden}.slide-enter-from[data-v-1247234a],.slide-leave-to[data-v-1247234a]{height:0!important;opacity:0}.content-wrapper[data-v-1247234a]{box-sizing:border-box;min-width:0}.content pre[data-v-1247234a]{border:1px solid #eee;background:var(--el-thinking-content-wrapper-background-color);padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border-radius:calc(var(--el-border-radius-base) + 4px);max-width:var(--el-thinking-content-wrapper-width);font-size:14px;color:var(--el-thinking-content-wrapper-color);white-space:pre-wrap;font-family:DeepSeek-CJK-patch,Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Oxygen,Open Sans,sans-serif;margin:0;line-height:var(--el-font-line-height-primary)}.error-state[data-v-1247234a]{border-color:#ffd0d0;background:#fff0f0}.error-message[data-v-1247234a]{color:#dc3545;height:fit-content;padding:8px;background:#ffeef0;border-radius:4px}
|