@runtypelabs/persona 3.8.0 → 3.8.2
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/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +11 -11
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +17 -14
- package/dist/theme-editor.js +17 -14
- package/dist/widget.css +102 -102
- package/package.json +1 -1
- package/src/components/approval-bubble.ts +1 -0
- package/src/components/message-bubble.ts +7 -7
- package/src/components/reasoning-bubble.ts +2 -2
- package/src/components/tool-bubble.ts +2 -2
- package/src/styles/widget.css +102 -102
- package/src/ui.ts +6 -3
package/dist/theme-editor.cjs
CHANGED
|
@@ -9585,19 +9585,19 @@ var createTimestamp = (message, timestampConfig) => {
|
|
|
9585
9585
|
return timestamp;
|
|
9586
9586
|
};
|
|
9587
9587
|
var getBubbleClasses = (role, layout = "bubble") => {
|
|
9588
|
-
const baseClasses = ["
|
|
9588
|
+
const baseClasses = ["persona-message-bubble", "persona-max-w-[85%]"];
|
|
9589
9589
|
switch (layout) {
|
|
9590
9590
|
case "flat":
|
|
9591
9591
|
if (role === "user") {
|
|
9592
9592
|
baseClasses.push(
|
|
9593
|
-
"
|
|
9593
|
+
"persona-message-user-bubble",
|
|
9594
9594
|
"persona-ml-auto",
|
|
9595
9595
|
"persona-text-persona-primary",
|
|
9596
9596
|
"persona-py-2"
|
|
9597
9597
|
);
|
|
9598
9598
|
} else {
|
|
9599
9599
|
baseClasses.push(
|
|
9600
|
-
"
|
|
9600
|
+
"persona-message-assistant-bubble",
|
|
9601
9601
|
"persona-text-persona-primary",
|
|
9602
9602
|
"persona-py-2"
|
|
9603
9603
|
);
|
|
@@ -9610,7 +9610,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9610
9610
|
);
|
|
9611
9611
|
if (role === "user") {
|
|
9612
9612
|
baseClasses.push(
|
|
9613
|
-
"
|
|
9613
|
+
"persona-message-user-bubble",
|
|
9614
9614
|
"persona-ml-auto",
|
|
9615
9615
|
"persona-bg-persona-accent",
|
|
9616
9616
|
"persona-text-white",
|
|
@@ -9620,7 +9620,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9620
9620
|
);
|
|
9621
9621
|
} else {
|
|
9622
9622
|
baseClasses.push(
|
|
9623
|
-
"
|
|
9623
|
+
"persona-message-assistant-bubble",
|
|
9624
9624
|
"persona-bg-persona-surface",
|
|
9625
9625
|
"persona-text-persona-primary",
|
|
9626
9626
|
"persona-px-3",
|
|
@@ -9639,7 +9639,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9639
9639
|
);
|
|
9640
9640
|
if (role === "user") {
|
|
9641
9641
|
baseClasses.push(
|
|
9642
|
-
"
|
|
9642
|
+
"persona-message-user-bubble",
|
|
9643
9643
|
"persona-ml-auto",
|
|
9644
9644
|
"persona-bg-persona-accent",
|
|
9645
9645
|
"persona-text-white",
|
|
@@ -9648,7 +9648,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9648
9648
|
);
|
|
9649
9649
|
} else {
|
|
9650
9650
|
baseClasses.push(
|
|
9651
|
-
"
|
|
9651
|
+
"persona-message-assistant-bubble",
|
|
9652
9652
|
"persona-bg-persona-surface",
|
|
9653
9653
|
"persona-border",
|
|
9654
9654
|
"persona-border-persona-message-border",
|
|
@@ -9844,8 +9844,8 @@ var createReasoningBubble = (message) => {
|
|
|
9844
9844
|
const bubble = createElement(
|
|
9845
9845
|
"div",
|
|
9846
9846
|
[
|
|
9847
|
-
"
|
|
9848
|
-
"
|
|
9847
|
+
"persona-message-bubble",
|
|
9848
|
+
"persona-reasoning-bubble",
|
|
9849
9849
|
"persona-w-full",
|
|
9850
9850
|
"persona-max-w-[85%]",
|
|
9851
9851
|
"persona-rounded-2xl",
|
|
@@ -9956,8 +9956,8 @@ var createToolBubble = (message, config) => {
|
|
|
9956
9956
|
const bubble = createElement(
|
|
9957
9957
|
"div",
|
|
9958
9958
|
[
|
|
9959
|
-
"
|
|
9960
|
-
"
|
|
9959
|
+
"persona-message-bubble",
|
|
9960
|
+
"persona-tool-bubble",
|
|
9961
9961
|
"persona-w-full",
|
|
9962
9962
|
"persona-max-w-[85%]",
|
|
9963
9963
|
"persona-rounded-2xl",
|
|
@@ -10179,6 +10179,7 @@ var createApprovalBubble = (message, config) => {
|
|
|
10179
10179
|
const bubble = createElement(
|
|
10180
10180
|
"div",
|
|
10181
10181
|
[
|
|
10182
|
+
"persona-approval-bubble",
|
|
10182
10183
|
"persona-w-full",
|
|
10183
10184
|
"persona-max-w-[85%]",
|
|
10184
10185
|
"persona-rounded-2xl",
|
|
@@ -13624,7 +13625,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13624
13625
|
const target = event.target;
|
|
13625
13626
|
const headerButton = target.closest('button[data-expand-header="true"]');
|
|
13626
13627
|
if (!headerButton) return;
|
|
13627
|
-
const bubble = headerButton.closest(".
|
|
13628
|
+
const bubble = headerButton.closest(".persona-reasoning-bubble, .persona-tool-bubble");
|
|
13628
13629
|
if (!bubble) return;
|
|
13629
13630
|
const messageId = bubble.getAttribute("data-message-id");
|
|
13630
13631
|
if (!messageId) return;
|
|
@@ -13644,6 +13645,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13644
13645
|
}
|
|
13645
13646
|
updateToolBubbleUI(messageId, bubble, config);
|
|
13646
13647
|
}
|
|
13648
|
+
messageCache.delete(messageId);
|
|
13647
13649
|
};
|
|
13648
13650
|
messagesWrapper.addEventListener("pointerdown", (event) => {
|
|
13649
13651
|
const target = event.target;
|
|
@@ -13731,7 +13733,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13731
13733
|
if (!approvalButton) return;
|
|
13732
13734
|
event.preventDefault();
|
|
13733
13735
|
event.stopPropagation();
|
|
13734
|
-
const approvalBubble = approvalButton.closest(".
|
|
13736
|
+
const approvalBubble = approvalButton.closest(".persona-approval-bubble");
|
|
13735
13737
|
if (!approvalBubble) return;
|
|
13736
13738
|
const messageId = approvalBubble.getAttribute("data-message-id");
|
|
13737
13739
|
if (!messageId) return;
|
|
@@ -13808,6 +13810,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13808
13810
|
if (openPrevented === true) return;
|
|
13809
13811
|
event.preventDefault();
|
|
13810
13812
|
event.stopPropagation();
|
|
13813
|
+
artifactsPaneUserHidden = false;
|
|
13811
13814
|
session.selectArtifact(artifactId);
|
|
13812
13815
|
syncArtifactPane();
|
|
13813
13816
|
});
|
|
@@ -14630,7 +14633,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14630
14633
|
if (wrapChrome) {
|
|
14631
14634
|
const componentWrapper = document.createElement("div");
|
|
14632
14635
|
componentWrapper.className = [
|
|
14633
|
-
"
|
|
14636
|
+
"persona-message-bubble",
|
|
14634
14637
|
"persona-max-w-[85%]",
|
|
14635
14638
|
"persona-rounded-2xl",
|
|
14636
14639
|
"persona-bg-persona-surface",
|
package/dist/theme-editor.js
CHANGED
|
@@ -9480,19 +9480,19 @@ var createTimestamp = (message, timestampConfig) => {
|
|
|
9480
9480
|
return timestamp;
|
|
9481
9481
|
};
|
|
9482
9482
|
var getBubbleClasses = (role, layout = "bubble") => {
|
|
9483
|
-
const baseClasses = ["
|
|
9483
|
+
const baseClasses = ["persona-message-bubble", "persona-max-w-[85%]"];
|
|
9484
9484
|
switch (layout) {
|
|
9485
9485
|
case "flat":
|
|
9486
9486
|
if (role === "user") {
|
|
9487
9487
|
baseClasses.push(
|
|
9488
|
-
"
|
|
9488
|
+
"persona-message-user-bubble",
|
|
9489
9489
|
"persona-ml-auto",
|
|
9490
9490
|
"persona-text-persona-primary",
|
|
9491
9491
|
"persona-py-2"
|
|
9492
9492
|
);
|
|
9493
9493
|
} else {
|
|
9494
9494
|
baseClasses.push(
|
|
9495
|
-
"
|
|
9495
|
+
"persona-message-assistant-bubble",
|
|
9496
9496
|
"persona-text-persona-primary",
|
|
9497
9497
|
"persona-py-2"
|
|
9498
9498
|
);
|
|
@@ -9505,7 +9505,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9505
9505
|
);
|
|
9506
9506
|
if (role === "user") {
|
|
9507
9507
|
baseClasses.push(
|
|
9508
|
-
"
|
|
9508
|
+
"persona-message-user-bubble",
|
|
9509
9509
|
"persona-ml-auto",
|
|
9510
9510
|
"persona-bg-persona-accent",
|
|
9511
9511
|
"persona-text-white",
|
|
@@ -9515,7 +9515,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9515
9515
|
);
|
|
9516
9516
|
} else {
|
|
9517
9517
|
baseClasses.push(
|
|
9518
|
-
"
|
|
9518
|
+
"persona-message-assistant-bubble",
|
|
9519
9519
|
"persona-bg-persona-surface",
|
|
9520
9520
|
"persona-text-persona-primary",
|
|
9521
9521
|
"persona-px-3",
|
|
@@ -9534,7 +9534,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9534
9534
|
);
|
|
9535
9535
|
if (role === "user") {
|
|
9536
9536
|
baseClasses.push(
|
|
9537
|
-
"
|
|
9537
|
+
"persona-message-user-bubble",
|
|
9538
9538
|
"persona-ml-auto",
|
|
9539
9539
|
"persona-bg-persona-accent",
|
|
9540
9540
|
"persona-text-white",
|
|
@@ -9543,7 +9543,7 @@ var getBubbleClasses = (role, layout = "bubble") => {
|
|
|
9543
9543
|
);
|
|
9544
9544
|
} else {
|
|
9545
9545
|
baseClasses.push(
|
|
9546
|
-
"
|
|
9546
|
+
"persona-message-assistant-bubble",
|
|
9547
9547
|
"persona-bg-persona-surface",
|
|
9548
9548
|
"persona-border",
|
|
9549
9549
|
"persona-border-persona-message-border",
|
|
@@ -9739,8 +9739,8 @@ var createReasoningBubble = (message) => {
|
|
|
9739
9739
|
const bubble = createElement(
|
|
9740
9740
|
"div",
|
|
9741
9741
|
[
|
|
9742
|
-
"
|
|
9743
|
-
"
|
|
9742
|
+
"persona-message-bubble",
|
|
9743
|
+
"persona-reasoning-bubble",
|
|
9744
9744
|
"persona-w-full",
|
|
9745
9745
|
"persona-max-w-[85%]",
|
|
9746
9746
|
"persona-rounded-2xl",
|
|
@@ -9851,8 +9851,8 @@ var createToolBubble = (message, config) => {
|
|
|
9851
9851
|
const bubble = createElement(
|
|
9852
9852
|
"div",
|
|
9853
9853
|
[
|
|
9854
|
-
"
|
|
9855
|
-
"
|
|
9854
|
+
"persona-message-bubble",
|
|
9855
|
+
"persona-tool-bubble",
|
|
9856
9856
|
"persona-w-full",
|
|
9857
9857
|
"persona-max-w-[85%]",
|
|
9858
9858
|
"persona-rounded-2xl",
|
|
@@ -10074,6 +10074,7 @@ var createApprovalBubble = (message, config) => {
|
|
|
10074
10074
|
const bubble = createElement(
|
|
10075
10075
|
"div",
|
|
10076
10076
|
[
|
|
10077
|
+
"persona-approval-bubble",
|
|
10077
10078
|
"persona-w-full",
|
|
10078
10079
|
"persona-max-w-[85%]",
|
|
10079
10080
|
"persona-rounded-2xl",
|
|
@@ -13519,7 +13520,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13519
13520
|
const target = event.target;
|
|
13520
13521
|
const headerButton = target.closest('button[data-expand-header="true"]');
|
|
13521
13522
|
if (!headerButton) return;
|
|
13522
|
-
const bubble = headerButton.closest(".
|
|
13523
|
+
const bubble = headerButton.closest(".persona-reasoning-bubble, .persona-tool-bubble");
|
|
13523
13524
|
if (!bubble) return;
|
|
13524
13525
|
const messageId = bubble.getAttribute("data-message-id");
|
|
13525
13526
|
if (!messageId) return;
|
|
@@ -13539,6 +13540,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13539
13540
|
}
|
|
13540
13541
|
updateToolBubbleUI(messageId, bubble, config);
|
|
13541
13542
|
}
|
|
13543
|
+
messageCache.delete(messageId);
|
|
13542
13544
|
};
|
|
13543
13545
|
messagesWrapper.addEventListener("pointerdown", (event) => {
|
|
13544
13546
|
const target = event.target;
|
|
@@ -13626,7 +13628,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13626
13628
|
if (!approvalButton) return;
|
|
13627
13629
|
event.preventDefault();
|
|
13628
13630
|
event.stopPropagation();
|
|
13629
|
-
const approvalBubble = approvalButton.closest(".
|
|
13631
|
+
const approvalBubble = approvalButton.closest(".persona-approval-bubble");
|
|
13630
13632
|
if (!approvalBubble) return;
|
|
13631
13633
|
const messageId = approvalBubble.getAttribute("data-message-id");
|
|
13632
13634
|
if (!messageId) return;
|
|
@@ -13703,6 +13705,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
13703
13705
|
if (openPrevented === true) return;
|
|
13704
13706
|
event.preventDefault();
|
|
13705
13707
|
event.stopPropagation();
|
|
13708
|
+
artifactsPaneUserHidden = false;
|
|
13706
13709
|
session.selectArtifact(artifactId);
|
|
13707
13710
|
syncArtifactPane();
|
|
13708
13711
|
});
|
|
@@ -14525,7 +14528,7 @@ var createAgentExperience = (mount, initialConfig, runtimeOptions) => {
|
|
|
14525
14528
|
if (wrapChrome) {
|
|
14526
14529
|
const componentWrapper = document.createElement("div");
|
|
14527
14530
|
componentWrapper.className = [
|
|
14528
|
-
"
|
|
14531
|
+
"persona-message-bubble",
|
|
14529
14532
|
"persona-max-w-[85%]",
|
|
14530
14533
|
"persona-rounded-2xl",
|
|
14531
14534
|
"persona-bg-persona-surface",
|