@puckeditor/plugin-ai 0.8.0-canary.4a02872e → 0.8.0-canary.5e420ede
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.css +143 -109
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +285 -195
- package/dist/index.mjs +285 -195
- package/package.json +22 -22
package/dist/index.css
CHANGED
|
@@ -1,79 +1,106 @@
|
|
|
1
1
|
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Chat/styles.module.css/#css-module-data */
|
|
2
|
-
.
|
|
2
|
+
._Chat_1ei0a_1 {
|
|
3
3
|
background: white;
|
|
4
4
|
height: 100%;
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
text-align: left;
|
|
8
8
|
}
|
|
9
|
-
._Chat-
|
|
9
|
+
._Chat-header_1ei0a_9 {
|
|
10
10
|
display: block;
|
|
11
11
|
padding: 8px 16px;
|
|
12
12
|
font-weight: 600;
|
|
13
13
|
border-bottom: 1px solid var(--puck-color-grey-09);
|
|
14
14
|
}
|
|
15
15
|
@media (min-width: 638px) {
|
|
16
|
-
._Chat-
|
|
16
|
+
._Chat-header_1ei0a_9 {
|
|
17
17
|
display: block;
|
|
18
18
|
padding: 16px;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
._Chat-
|
|
21
|
+
._Chat-placeholder_1ei0a_23 {
|
|
22
22
|
align-items: center;
|
|
23
23
|
box-sizing: border-box;
|
|
24
|
-
color: var(--puck-color-grey-
|
|
24
|
+
color: var(--puck-color-grey-04);
|
|
25
25
|
display: none;
|
|
26
|
-
justify-content: center;
|
|
27
26
|
flex-direction: column;
|
|
27
|
+
gap: 8px;
|
|
28
28
|
height: 100%;
|
|
29
|
-
|
|
29
|
+
justify-content: center;
|
|
30
30
|
padding: 32px;
|
|
31
|
-
|
|
31
|
+
text-align: center;
|
|
32
32
|
}
|
|
33
33
|
@media (min-width: 638px) {
|
|
34
|
-
._Chat-
|
|
34
|
+
._Chat-placeholder_1ei0a_23 {
|
|
35
35
|
display: flex;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
._Chat-
|
|
38
|
+
._Chat-placeholderIcon_1ei0a_42 {
|
|
39
|
+
align-items: center;
|
|
40
|
+
background-color: var(--puck-color-azure-11);
|
|
41
|
+
border-radius: 999px;
|
|
42
|
+
color: var(--puck-color-azure-04);
|
|
39
43
|
display: flex;
|
|
40
|
-
gap: 8px;
|
|
41
44
|
justify-content: center;
|
|
45
|
+
margin-bottom: 4px;
|
|
46
|
+
padding: 12px;
|
|
47
|
+
}
|
|
48
|
+
._Chat-placeholderTitle_1ei0a_53 {
|
|
49
|
+
color: var(--puck-color-grey-01);
|
|
50
|
+
font-size: var(--puck-font-size-s);
|
|
51
|
+
}
|
|
52
|
+
._Chat-placeholderDescription_1ei0a_58 {
|
|
53
|
+
font-size: var(--puck-font-size-xxs);
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
max-width: 260px;
|
|
56
|
+
}
|
|
57
|
+
._Chat-actions_1ei0a_64 {
|
|
58
|
+
display: flex;
|
|
42
59
|
flex-wrap: wrap;
|
|
43
|
-
|
|
60
|
+
gap: 8px;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
margin-top: 8px;
|
|
44
63
|
}
|
|
45
|
-
._Chat-
|
|
46
|
-
._Chat-
|
|
64
|
+
._Chat-action_1ei0a_64,
|
|
65
|
+
._Chat-actionOutlined_1ei0a_73 {
|
|
66
|
+
appearance: none;
|
|
47
67
|
border: 1px solid var(--puck-color-azure-04);
|
|
48
|
-
border-radius:
|
|
49
|
-
padding: 4px 12px;
|
|
50
|
-
font-size: 12px;
|
|
68
|
+
border-radius: 999px;
|
|
51
69
|
cursor: pointer;
|
|
70
|
+
font-family: inherit;
|
|
71
|
+
font-size: var(--puck-font-size-xxs);
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
padding: 8px 14px;
|
|
52
74
|
}
|
|
53
|
-
._Chat-
|
|
75
|
+
._Chat-action_1ei0a_64 {
|
|
54
76
|
background: var(--puck-color-azure-04);
|
|
55
77
|
color: white;
|
|
56
78
|
}
|
|
57
|
-
._Chat-
|
|
58
|
-
|
|
79
|
+
._Chat-action_1ei0a_64:hover {
|
|
80
|
+
background-color: var(--puck-color-azure-03);
|
|
59
81
|
}
|
|
60
|
-
._Chat-
|
|
82
|
+
._Chat-actionOutlined_1ei0a_73 {
|
|
61
83
|
background: transparent;
|
|
62
84
|
color: var(--puck-color-azure-04);
|
|
63
85
|
}
|
|
64
|
-
._Chat-
|
|
86
|
+
._Chat-actionOutlined_1ei0a_73:hover {
|
|
65
87
|
background: var(--puck-color-azure-11);
|
|
66
88
|
}
|
|
67
|
-
._Chat-
|
|
89
|
+
._Chat-action_1ei0a_64:focus-visible,
|
|
90
|
+
._Chat-actionOutlined_1ei0a_73:focus-visible {
|
|
91
|
+
outline: 2px solid var(--puck-color-azure-04);
|
|
92
|
+
outline-offset: 2px;
|
|
93
|
+
}
|
|
94
|
+
._Chat-attachmentControls_1ei0a_108 {
|
|
68
95
|
align-items: center;
|
|
69
96
|
display: flex;
|
|
70
97
|
flex-wrap: wrap;
|
|
71
98
|
gap: 6px;
|
|
72
99
|
}
|
|
73
|
-
._Chat-
|
|
100
|
+
._Chat-attachmentInput_1ei0a_115 {
|
|
74
101
|
display: none;
|
|
75
102
|
}
|
|
76
|
-
._Chat-
|
|
103
|
+
._Chat-attachmentButton_1ei0a_119 {
|
|
77
104
|
align-items: center;
|
|
78
105
|
background: none;
|
|
79
106
|
border-radius: 4px;
|
|
@@ -86,19 +113,19 @@
|
|
|
86
113
|
padding: 8px;
|
|
87
114
|
white-space: nowrap;
|
|
88
115
|
}
|
|
89
|
-
._Chat-
|
|
90
|
-
._Chat-
|
|
116
|
+
._Chat-attachmentButton_1ei0a_119:hover,
|
|
117
|
+
._Chat-attachmentButton_1ei0a_119:focus-visible {
|
|
91
118
|
background-color: var(--puck-color-azure-12);
|
|
92
119
|
color: var(--puck-color-azure-04);
|
|
93
120
|
}
|
|
94
|
-
._Chat-
|
|
121
|
+
._Chat-attachmentButton_1ei0a_119:focus-visible {
|
|
95
122
|
outline: 2px solid var(--puck-color-azure-04);
|
|
96
123
|
}
|
|
97
|
-
._Chat-
|
|
124
|
+
._Chat-attachmentButton_1ei0a_119:disabled {
|
|
98
125
|
cursor: not-allowed;
|
|
99
126
|
opacity: 0.5;
|
|
100
127
|
}
|
|
101
|
-
._Chat-
|
|
128
|
+
._Chat-attachmentButton_1ei0a_119:disabled:hover {
|
|
102
129
|
border-color: var(--puck-color-grey-09);
|
|
103
130
|
color: var(--puck-color-grey-04);
|
|
104
131
|
}
|
|
@@ -1531,7 +1558,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1531
1558
|
}
|
|
1532
1559
|
|
|
1533
1560
|
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/ChatBody/styles.module.css/#css-module-data */
|
|
1534
|
-
.
|
|
1561
|
+
._Chat_1utn2_1 {
|
|
1535
1562
|
--fade-size: 32px;
|
|
1536
1563
|
--chat-background-color: white;
|
|
1537
1564
|
display: flex;
|
|
@@ -1541,50 +1568,50 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1541
1568
|
overflow: hidden;
|
|
1542
1569
|
}
|
|
1543
1570
|
@media (min-width: 638px) {
|
|
1544
|
-
.
|
|
1571
|
+
._Chat_1utn2_1 {
|
|
1545
1572
|
max-height: none;
|
|
1546
1573
|
}
|
|
1547
1574
|
}
|
|
1548
|
-
._Chat-
|
|
1575
|
+
._Chat-inner_1utn2_17 {
|
|
1549
1576
|
background-color: var(--chat-background-color);
|
|
1550
1577
|
display: flex;
|
|
1551
1578
|
flex-direction: column;
|
|
1552
1579
|
max-height: 100%;
|
|
1553
1580
|
position: relative;
|
|
1554
1581
|
}
|
|
1555
|
-
._Chat--
|
|
1582
|
+
._Chat--hasMessages_1utn2_25 ._Chat-inner_1utn2_17 {
|
|
1556
1583
|
padding-top: 0;
|
|
1557
1584
|
}
|
|
1558
|
-
.
|
|
1585
|
+
._Chat_1utn2_1:not(._Chat--hasChildren_1utn2_29) ._Chat-inner_1utn2_17 {
|
|
1559
1586
|
height: 100%;
|
|
1560
1587
|
padding-top: 0;
|
|
1561
1588
|
}
|
|
1562
|
-
._Chat-
|
|
1589
|
+
._Chat-body_1utn2_34 {
|
|
1563
1590
|
padding: 16px;
|
|
1564
1591
|
overflow: auto;
|
|
1565
1592
|
}
|
|
1566
|
-
._Chat--
|
|
1593
|
+
._Chat--hasMessages_1utn2_25 ._Chat-messages_1utn2_39 {
|
|
1567
1594
|
display: flex;
|
|
1568
1595
|
flex-direction: column-reverse;
|
|
1569
1596
|
gap: 16px;
|
|
1570
1597
|
overflow: auto;
|
|
1571
1598
|
}
|
|
1572
|
-
._Chat-
|
|
1599
|
+
._Chat-form_1utn2_46 {
|
|
1573
1600
|
background-color: white;
|
|
1574
1601
|
padding: 16px;
|
|
1575
1602
|
}
|
|
1576
|
-
._Chat--
|
|
1603
|
+
._Chat--hideInput_1utn2_51 ._Chat-form_1utn2_46 {
|
|
1577
1604
|
display: none;
|
|
1578
1605
|
}
|
|
1579
|
-
._Chat--
|
|
1606
|
+
._Chat--hasMessages_1utn2_25 ._Chat-form_1utn2_46 {
|
|
1580
1607
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
1581
1608
|
}
|
|
1582
1609
|
@media (min-width: 638px) {
|
|
1583
|
-
._Chat-
|
|
1610
|
+
._Chat-form_1utn2_46 {
|
|
1584
1611
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
1585
1612
|
}
|
|
1586
1613
|
}
|
|
1587
|
-
._Chat-
|
|
1614
|
+
._Chat-formHelper_1utn2_65 {
|
|
1588
1615
|
align-items: center;
|
|
1589
1616
|
display: flex;
|
|
1590
1617
|
color: var(--puck-color-grey-04);
|
|
@@ -1593,11 +1620,11 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1593
1620
|
gap: 8px;
|
|
1594
1621
|
padding-bottom: 12px;
|
|
1595
1622
|
}
|
|
1596
|
-
._Chat--
|
|
1623
|
+
._Chat--hasMessages_1utn2_25 ._Chat-formHelper_1utn2_65 {
|
|
1597
1624
|
opacity: 0;
|
|
1598
1625
|
transition: opacity 250ms ease-in;
|
|
1599
1626
|
}
|
|
1600
|
-
._Chat-
|
|
1627
|
+
._Chat-examplePrompts_1utn2_80 {
|
|
1601
1628
|
align-items: center;
|
|
1602
1629
|
display: flex;
|
|
1603
1630
|
flex-wrap: nowrap;
|
|
@@ -1606,7 +1633,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1606
1633
|
width: 100%;
|
|
1607
1634
|
overflow-x: auto;
|
|
1608
1635
|
}
|
|
1609
|
-
._Chat-
|
|
1636
|
+
._Chat-examplePrompt_1utn2_80 {
|
|
1610
1637
|
align-items: center;
|
|
1611
1638
|
background: white;
|
|
1612
1639
|
border: 1px solid var(--puck-color-grey-09);
|
|
@@ -1619,30 +1646,36 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1619
1646
|
padding: 6px 12px;
|
|
1620
1647
|
text-wrap: nowrap;
|
|
1621
1648
|
}
|
|
1622
|
-
._Chat-
|
|
1649
|
+
._Chat-examplePrompt_1utn2_80:hover {
|
|
1623
1650
|
background: var(--puck-color-azure-11);
|
|
1624
1651
|
border-color: var(--puck-color-azure-08);
|
|
1625
1652
|
color: var(--puck-color-azure-04);
|
|
1626
1653
|
}
|
|
1627
|
-
._Chat-
|
|
1654
|
+
._Chat-examplePrompt_1utn2_80:disabled,
|
|
1655
|
+
._Chat-examplePrompt_1utn2_80[aria-disabled=true] {
|
|
1656
|
+
cursor: not-allowed;
|
|
1657
|
+
opacity: 0.5;
|
|
1658
|
+
pointer-events: none;
|
|
1659
|
+
}
|
|
1660
|
+
._Chat-examplePromptArrow_1utn2_117 {
|
|
1628
1661
|
display: flex;
|
|
1629
1662
|
margin-left: auto;
|
|
1630
1663
|
}
|
|
1631
|
-
._Chat-
|
|
1664
|
+
._Chat-default_1utn2_122 {
|
|
1632
1665
|
overflow-y: auto;
|
|
1633
1666
|
flex-grow: 1;
|
|
1634
1667
|
}
|
|
1635
|
-
._Chat--
|
|
1668
|
+
._Chat--hasMessages_1utn2_25 ._Chat-default_1utn2_122 {
|
|
1636
1669
|
opacity: 0;
|
|
1637
1670
|
padding: 0;
|
|
1638
1671
|
pointer-events: none;
|
|
1639
1672
|
transition: opacity 250ms ease-in;
|
|
1640
1673
|
}
|
|
1641
|
-
._Chat--
|
|
1674
|
+
._Chat--hasMessages_1utn2_25 {
|
|
1642
1675
|
background-color: white;
|
|
1643
1676
|
transition: background-color 250ms ease-in;
|
|
1644
1677
|
}
|
|
1645
|
-
.
|
|
1678
|
+
._ChatMessage_1utn2_139 {
|
|
1646
1679
|
display: flex;
|
|
1647
1680
|
flex-direction: column;
|
|
1648
1681
|
gap: 16px;
|
|
@@ -1650,7 +1683,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1650
1683
|
line-height: var(--line-height-s);
|
|
1651
1684
|
overflow-wrap: break-word;
|
|
1652
1685
|
}
|
|
1653
|
-
._ChatMessage--
|
|
1686
|
+
._ChatMessage--userRole_1utn2_148 ._ChatMessage-userBubble_1utn2_148 {
|
|
1654
1687
|
background: var(--puck-color-azure-10);
|
|
1655
1688
|
border-radius: 16px;
|
|
1656
1689
|
color: var(--puck-color-grey-03);
|
|
@@ -1660,12 +1693,12 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1660
1693
|
margin-left: 24px;
|
|
1661
1694
|
padding: 12px 16px;
|
|
1662
1695
|
}
|
|
1663
|
-
._ChatMessage-
|
|
1696
|
+
._ChatMessage-userAttachments_1utn2_159 {
|
|
1664
1697
|
display: flex;
|
|
1665
1698
|
flex-wrap: wrap;
|
|
1666
1699
|
gap: 6px;
|
|
1667
1700
|
}
|
|
1668
|
-
._ChatMessage-
|
|
1701
|
+
._ChatMessage-thumbnail_1utn2_165 {
|
|
1669
1702
|
align-items: center;
|
|
1670
1703
|
background: var(--puck-color-grey-12);
|
|
1671
1704
|
border: 1px solid var(--puck-color-grey-09);
|
|
@@ -1681,18 +1714,18 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1681
1714
|
text-decoration: none;
|
|
1682
1715
|
width: 92px;
|
|
1683
1716
|
}
|
|
1684
|
-
._ChatMessage-
|
|
1717
|
+
._ChatMessage-thumbnail_1utn2_165:hover {
|
|
1685
1718
|
border-color: var(--puck-color-azure-08);
|
|
1686
1719
|
color: var(--puck-color-azure-04);
|
|
1687
1720
|
opacity: 0.6;
|
|
1688
1721
|
}
|
|
1689
|
-
._ChatMessage-
|
|
1722
|
+
._ChatMessage-thumbnail_1utn2_165 img {
|
|
1690
1723
|
display: block;
|
|
1691
1724
|
height: 100%;
|
|
1692
1725
|
object-fit: cover;
|
|
1693
1726
|
width: 100%;
|
|
1694
1727
|
}
|
|
1695
|
-
._ChatMessage-
|
|
1728
|
+
._ChatMessage-thumbnailLabel_1utn2_195 {
|
|
1696
1729
|
background: var(--puck-color-grey-12);
|
|
1697
1730
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
1698
1731
|
bottom: 0;
|
|
@@ -1711,70 +1744,70 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1711
1744
|
text-overflow: ellipsis;
|
|
1712
1745
|
white-space: nowrap;
|
|
1713
1746
|
}
|
|
1714
|
-
.
|
|
1715
|
-
.
|
|
1747
|
+
._ChatMessage_1utn2_139 ul,
|
|
1748
|
+
._ChatMessage_1utn2_139 ol {
|
|
1716
1749
|
list-style: decimal;
|
|
1717
1750
|
margin: 0;
|
|
1718
1751
|
margin-bottom: 12px;
|
|
1719
1752
|
margin-top: 12px;
|
|
1720
1753
|
padding-left: 32px;
|
|
1721
1754
|
}
|
|
1722
|
-
.
|
|
1755
|
+
._ChatMessage_1utn2_139 li {
|
|
1723
1756
|
margin-bottom: 8px;
|
|
1724
1757
|
margin-top: 8px;
|
|
1725
1758
|
padding-left: 8px;
|
|
1726
1759
|
}
|
|
1727
|
-
.
|
|
1728
|
-
.
|
|
1729
|
-
.
|
|
1730
|
-
.
|
|
1731
|
-
.
|
|
1732
|
-
.
|
|
1760
|
+
._ChatMessage_1utn2_139 h1,
|
|
1761
|
+
._ChatMessage_1utn2_139 h2,
|
|
1762
|
+
._ChatMessage_1utn2_139 h3,
|
|
1763
|
+
._ChatMessage_1utn2_139 h4,
|
|
1764
|
+
._ChatMessage_1utn2_139 h5,
|
|
1765
|
+
._ChatMessage_1utn2_139 h6 {
|
|
1733
1766
|
font-weight: 600;
|
|
1734
1767
|
}
|
|
1735
|
-
.
|
|
1768
|
+
._ChatMessage_1utn2_139 h1 {
|
|
1736
1769
|
font-size: var(--puck-font-l);
|
|
1737
1770
|
}
|
|
1738
|
-
.
|
|
1771
|
+
._ChatMessage_1utn2_139 h2 {
|
|
1739
1772
|
font-size: var(--puck-font-m);
|
|
1740
1773
|
}
|
|
1741
|
-
.
|
|
1774
|
+
._ChatMessage_1utn2_139 h3 {
|
|
1742
1775
|
font-size: var(--puck-font-m);
|
|
1743
1776
|
}
|
|
1744
|
-
.
|
|
1777
|
+
._ChatMessage_1utn2_139 h4 {
|
|
1745
1778
|
font-size: var(--puck-font-s);
|
|
1746
1779
|
}
|
|
1747
|
-
.
|
|
1780
|
+
._ChatMessage_1utn2_139 h5 {
|
|
1748
1781
|
font-size: var(--puck-font-xs);
|
|
1749
1782
|
}
|
|
1750
|
-
.
|
|
1783
|
+
._ChatMessage_1utn2_139 h6 {
|
|
1751
1784
|
font-size: var(--puck-font-xm);
|
|
1752
1785
|
}
|
|
1753
|
-
.
|
|
1786
|
+
._ChatMessage_1utn2_139 p {
|
|
1754
1787
|
margin-bottom: 8px;
|
|
1755
1788
|
margin-top: 8px;
|
|
1756
1789
|
}
|
|
1757
|
-
._ChatMessage-
|
|
1790
|
+
._ChatMessage-text_1utn2_268 > *:first-of-type {
|
|
1758
1791
|
margin-top: 0px;
|
|
1759
1792
|
}
|
|
1760
|
-
._ChatMessage-
|
|
1793
|
+
._ChatMessage-text_1utn2_268 > *:last-of-type {
|
|
1761
1794
|
margin-bottom: 0px;
|
|
1762
1795
|
}
|
|
1763
|
-
.
|
|
1796
|
+
._ChatMessage_1utn2_139 a {
|
|
1764
1797
|
color: var(--puck-color-azure-04);
|
|
1765
1798
|
font-weight: 600;
|
|
1766
1799
|
text-decoration: none;
|
|
1767
1800
|
}
|
|
1768
|
-
.
|
|
1801
|
+
._ChatMessage_1utn2_139 a:hover {
|
|
1769
1802
|
color: var(--puck-color-azure-05);
|
|
1770
1803
|
}
|
|
1771
|
-
.
|
|
1804
|
+
._ChatMessage_1utn2_139 hr {
|
|
1772
1805
|
border-top: none;
|
|
1773
1806
|
border-bottom-color: var(--puck-color-grey-09);
|
|
1774
1807
|
margin-bottom: 16px;
|
|
1775
1808
|
margin-top: 16px;
|
|
1776
1809
|
}
|
|
1777
|
-
._ChatMessage-
|
|
1810
|
+
._ChatMessage-text_1utn2_268 blockquote {
|
|
1778
1811
|
margin-bottom: 8px;
|
|
1779
1812
|
margin-top: 8px;
|
|
1780
1813
|
margin-left: 0;
|
|
@@ -1783,73 +1816,73 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1783
1816
|
padding-bottom: 2px;
|
|
1784
1817
|
padding-top: 2px;
|
|
1785
1818
|
}
|
|
1786
|
-
._ChatMessage-
|
|
1819
|
+
._ChatMessage-event_1utn2_303 {
|
|
1787
1820
|
color: var(--puck-color-grey-05);
|
|
1788
1821
|
}
|
|
1789
|
-
._ChatMessage-
|
|
1822
|
+
._ChatMessage-eventBody_1utn2_307 > ._ChatMessage-event_1utn2_303:first-child {
|
|
1790
1823
|
padding-top: 8px;
|
|
1791
1824
|
}
|
|
1792
|
-
._ChatMessage-
|
|
1825
|
+
._ChatMessage-eventBody_1utn2_307 > ._ChatMessage-event_1utn2_303:last-child {
|
|
1793
1826
|
padding-bottom: 8px;
|
|
1794
1827
|
margin-bottom: 0;
|
|
1795
1828
|
}
|
|
1796
|
-
._ChatMessage-
|
|
1829
|
+
._ChatMessage-eventCollapse_1utn2_316 {
|
|
1797
1830
|
display: none;
|
|
1798
1831
|
}
|
|
1799
|
-
._ChatMessage-
|
|
1832
|
+
._ChatMessage-event_1utn2_303[open] > ._ChatMessage-eventHeader_1utn2_320 > ._ChatMessage-eventExpand_1utn2_320 {
|
|
1800
1833
|
display: none;
|
|
1801
1834
|
}
|
|
1802
|
-
._ChatMessage-
|
|
1835
|
+
._ChatMessage-event_1utn2_303[open] > ._ChatMessage-eventHeader_1utn2_320 > ._ChatMessage-eventCollapse_1utn2_316 {
|
|
1803
1836
|
display: block;
|
|
1804
1837
|
}
|
|
1805
|
-
._ChatMessage-
|
|
1838
|
+
._ChatMessage-eventHeader_1utn2_320 {
|
|
1806
1839
|
align-items: center;
|
|
1807
1840
|
display: flex;
|
|
1808
1841
|
gap: 8px;
|
|
1809
1842
|
cursor: pointer;
|
|
1810
1843
|
list-style: none;
|
|
1811
1844
|
}
|
|
1812
|
-
._ChatMessage-
|
|
1845
|
+
._ChatMessage-eventHeader_1utn2_320::-webkit-details-marker {
|
|
1813
1846
|
display: none;
|
|
1814
1847
|
}
|
|
1815
|
-
._ChatMessage-
|
|
1848
|
+
._ChatMessage-eventHeader_1utn2_320:hover {
|
|
1816
1849
|
color: var(--puck-color-grey-03);
|
|
1817
1850
|
}
|
|
1818
|
-
._ChatMessage-
|
|
1851
|
+
._ChatMessage-eventIcon_1utn2_346 {
|
|
1819
1852
|
display: flex;
|
|
1820
1853
|
}
|
|
1821
|
-
._ChatMessage-
|
|
1854
|
+
._ChatMessage-eventLabel_1utn2_350 {
|
|
1822
1855
|
text-overflow: ellipsis;
|
|
1823
1856
|
overflow: hidden;
|
|
1824
1857
|
white-space: nowrap;
|
|
1825
1858
|
}
|
|
1826
|
-
._ChatMessage-
|
|
1859
|
+
._ChatMessage-eventBody_1utn2_307 {
|
|
1827
1860
|
border-left: 2px solid var(--puck-color-grey-09);
|
|
1828
1861
|
color: var(--puck-color-grey-05);
|
|
1829
1862
|
font-size: var(--puck-font-size-xxs);
|
|
1830
1863
|
margin-top: 8px;
|
|
1831
1864
|
padding-left: 12px;
|
|
1832
1865
|
}
|
|
1833
|
-
._ChatMessage-
|
|
1866
|
+
._ChatMessage-attachmentImage_1utn2_364 {
|
|
1834
1867
|
margin-bottom: 12px;
|
|
1835
1868
|
margin-top: 12px;
|
|
1836
1869
|
margin-right: 24px;
|
|
1837
1870
|
}
|
|
1838
|
-
._ChatMessage-
|
|
1871
|
+
._ChatMessage-attachmentImage_1utn2_364 a {
|
|
1839
1872
|
display: inline-block;
|
|
1840
1873
|
}
|
|
1841
|
-
._ChatMessage-
|
|
1874
|
+
._ChatMessage-attachmentImage_1utn2_364 img {
|
|
1842
1875
|
border: 1px solid var(--puck-color-grey-09);
|
|
1843
1876
|
border-radius: 16px;
|
|
1844
1877
|
display: block;
|
|
1845
1878
|
max-width: min(100%, 280px);
|
|
1846
1879
|
}
|
|
1847
|
-
._ChatMessage-
|
|
1880
|
+
._ChatMessage-attachmentFile_1utn2_381 {
|
|
1848
1881
|
margin-bottom: 12px;
|
|
1849
1882
|
margin-top: 12px;
|
|
1850
1883
|
margin-right: 24px;
|
|
1851
1884
|
}
|
|
1852
|
-
._ChatMessage-
|
|
1885
|
+
._ChatMessage-attachmentFile_1utn2_381 a {
|
|
1853
1886
|
align-items: center;
|
|
1854
1887
|
background: var(--puck-color-grey-12);
|
|
1855
1888
|
border: 1px solid var(--puck-color-grey-08);
|
|
@@ -1860,11 +1893,11 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1860
1893
|
padding: 8px 12px;
|
|
1861
1894
|
text-decoration: none;
|
|
1862
1895
|
}
|
|
1863
|
-
._ChatMessage-
|
|
1896
|
+
._ChatMessage-attachmentFile_1utn2_381 a:hover {
|
|
1864
1897
|
border-color: var(--puck-color-azure-08);
|
|
1865
1898
|
color: var(--puck-color-azure-04);
|
|
1866
1899
|
}
|
|
1867
|
-
._Chat-
|
|
1900
|
+
._Chat-loader_1utn2_404 {
|
|
1868
1901
|
align-items: center;
|
|
1869
1902
|
color: var(--puck-color-grey-05);
|
|
1870
1903
|
display: flex;
|
|
@@ -1873,10 +1906,10 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1873
1906
|
line-height: var(--line-height-s);
|
|
1874
1907
|
margin-top: 16px;
|
|
1875
1908
|
}
|
|
1876
|
-
._Chat-
|
|
1909
|
+
._Chat-loaderIcon_1utn2_414 {
|
|
1877
1910
|
height: 16px;
|
|
1878
1911
|
}
|
|
1879
|
-
._Chat-
|
|
1912
|
+
._Chat-error_1utn2_418 {
|
|
1880
1913
|
align-items: center;
|
|
1881
1914
|
display: flex;
|
|
1882
1915
|
gap: 8px;
|
|
@@ -1884,13 +1917,13 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1884
1917
|
margin: 16px;
|
|
1885
1918
|
margin-top: 0;
|
|
1886
1919
|
}
|
|
1887
|
-
._Chat-
|
|
1920
|
+
._Chat-errorLabel_1utn2_427 {
|
|
1888
1921
|
color: var(--puck-color-red-04);
|
|
1889
1922
|
}
|
|
1890
|
-
._Chat-
|
|
1923
|
+
._Chat-errorAction_1utn2_431 {
|
|
1891
1924
|
margin-left: auto;
|
|
1892
1925
|
}
|
|
1893
|
-
._Chat-
|
|
1926
|
+
._Chat-userError_1utn2_435 {
|
|
1894
1927
|
align-items: center;
|
|
1895
1928
|
color: var(--puck-color-red-04);
|
|
1896
1929
|
display: flex;
|
|
@@ -1899,17 +1932,17 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1899
1932
|
padding: 0 16px;
|
|
1900
1933
|
padding-bottom: 8px;
|
|
1901
1934
|
}
|
|
1902
|
-
._Chat-
|
|
1935
|
+
._Chat-userErrorDismiss_1utn2_445 {
|
|
1903
1936
|
all: unset;
|
|
1904
1937
|
cursor: pointer;
|
|
1905
1938
|
display: flex;
|
|
1906
1939
|
flex-shrink: 0;
|
|
1907
1940
|
opacity: 0.6;
|
|
1908
1941
|
}
|
|
1909
|
-
._Chat-
|
|
1942
|
+
._Chat-userErrorDismiss_1utn2_445:hover {
|
|
1910
1943
|
opacity: 1;
|
|
1911
1944
|
}
|
|
1912
|
-
._Chat-
|
|
1945
|
+
._Chat-userErrorDismiss_1utn2_445:focus-visible {
|
|
1913
1946
|
border-radius: 4px;
|
|
1914
1947
|
outline: 2px solid var(--puck-color-azure-04);
|
|
1915
1948
|
opacity: 1;
|
|
@@ -2242,10 +2275,11 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2242
2275
|
}
|
|
2243
2276
|
|
|
2244
2277
|
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Drawer/styles.module.css/#css-module-data */
|
|
2245
|
-
._Drawer--
|
|
2246
|
-
|
|
2247
|
-
color: var(--puck-color-grey-05);
|
|
2278
|
+
._Drawer--empty_8e8cs_1 {
|
|
2279
|
+
color: var(--puck-color-text-subtle);
|
|
2248
2280
|
display: flex;
|
|
2249
2281
|
justify-content: center;
|
|
2250
2282
|
height: 100%;
|
|
2283
|
+
font-size: var(--puck-font-size-xxs);
|
|
2284
|
+
margin: var(--puck-space-2) var(--puck-space-1);
|
|
2251
2285
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import { PuckAction, Data, Config } from '@puckeditor/core';
|
|
4
|
-
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
5
|
+
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus, ChatOnFinishCallback } from 'ai';
|
|
5
6
|
|
|
6
7
|
type _JSONSchema = boolean | JSONSchema;
|
|
7
8
|
type JSONSchema = {
|
|
@@ -266,11 +267,16 @@ type AiPluginProps = {
|
|
|
266
267
|
type: "file";
|
|
267
268
|
}>[];
|
|
268
269
|
}) => void | Promise<void>;
|
|
270
|
+
onFinish?: ChatOnFinishCallback<PuckMessage>;
|
|
269
271
|
examplePrompts?: {
|
|
270
272
|
label: string;
|
|
271
273
|
href?: string;
|
|
272
274
|
onClick?: () => void;
|
|
273
275
|
}[];
|
|
276
|
+
placeholder?: ReactNode;
|
|
277
|
+
actions?: ReactNode | ((state: {
|
|
278
|
+
disabled: boolean;
|
|
279
|
+
}) => ReactNode);
|
|
274
280
|
};
|
|
275
281
|
scrollTracking?: boolean;
|
|
276
282
|
prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
|
|
@@ -286,6 +292,7 @@ declare global {
|
|
|
286
292
|
setMessages: (_messages: PuckMessage[]) => void;
|
|
287
293
|
processData: (_messages: DataUIPart<PuckDataParts>) => void;
|
|
288
294
|
setStatus: (_status: ChatStatus) => void;
|
|
295
|
+
focus: () => void;
|
|
289
296
|
};
|
|
290
297
|
}
|
|
291
298
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import { PuckAction, Data, Config } from '@puckeditor/core';
|
|
4
|
-
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
5
|
+
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus, ChatOnFinishCallback } from 'ai';
|
|
5
6
|
|
|
6
7
|
type _JSONSchema = boolean | JSONSchema;
|
|
7
8
|
type JSONSchema = {
|
|
@@ -266,11 +267,16 @@ type AiPluginProps = {
|
|
|
266
267
|
type: "file";
|
|
267
268
|
}>[];
|
|
268
269
|
}) => void | Promise<void>;
|
|
270
|
+
onFinish?: ChatOnFinishCallback<PuckMessage>;
|
|
269
271
|
examplePrompts?: {
|
|
270
272
|
label: string;
|
|
271
273
|
href?: string;
|
|
272
274
|
onClick?: () => void;
|
|
273
275
|
}[];
|
|
276
|
+
placeholder?: ReactNode;
|
|
277
|
+
actions?: ReactNode | ((state: {
|
|
278
|
+
disabled: boolean;
|
|
279
|
+
}) => ReactNode);
|
|
274
280
|
};
|
|
275
281
|
scrollTracking?: boolean;
|
|
276
282
|
prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
|
|
@@ -286,6 +292,7 @@ declare global {
|
|
|
286
292
|
setMessages: (_messages: PuckMessage[]) => void;
|
|
287
293
|
processData: (_messages: DataUIPart<PuckDataParts>) => void;
|
|
288
294
|
setStatus: (_status: ChatStatus) => void;
|
|
295
|
+
focus: () => void;
|
|
289
296
|
};
|
|
290
297
|
}
|
|
291
298
|
}
|