@puckeditor/plugin-ai 0.4.1-canary.fd49bc87 → 0.4.1-canary.fd833f7d
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 +142 -93
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +164 -117
- package/dist/index.mjs +170 -119
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css/#css-module-data */
|
|
2
|
-
.
|
|
2
|
+
._Chat_3s08c_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_3s08c_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_3s08c_9 {
|
|
17
17
|
display: block;
|
|
18
18
|
padding: 16px;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
._Chat-
|
|
21
|
+
._Chat-placeholder_3s08c_23 {
|
|
22
22
|
align-items: center;
|
|
23
|
+
box-sizing: border-box;
|
|
23
24
|
color: var(--puck-color-grey-06);
|
|
24
25
|
display: none;
|
|
25
26
|
justify-content: center;
|
|
@@ -30,37 +31,37 @@
|
|
|
30
31
|
gap: 8px;
|
|
31
32
|
}
|
|
32
33
|
@media (min-width: 638px) {
|
|
33
|
-
._Chat-
|
|
34
|
+
._Chat-placeholder_3s08c_23 {
|
|
34
35
|
display: flex;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
._Chat-
|
|
38
|
+
._Chat-actions_3s08c_42 {
|
|
38
39
|
display: flex;
|
|
39
40
|
gap: 8px;
|
|
40
41
|
justify-content: center;
|
|
41
42
|
flex-wrap: wrap;
|
|
42
43
|
margin-top: 4px;
|
|
43
44
|
}
|
|
44
|
-
._Chat-
|
|
45
|
-
._Chat-
|
|
45
|
+
._Chat-action_3s08c_42,
|
|
46
|
+
._Chat-actionOutlined_3s08c_51 {
|
|
46
47
|
border: 1px solid var(--puck-color-azure-04);
|
|
47
48
|
border-radius: 16px;
|
|
48
49
|
padding: 4px 12px;
|
|
49
50
|
font-size: 12px;
|
|
50
51
|
cursor: pointer;
|
|
51
52
|
}
|
|
52
|
-
._Chat-
|
|
53
|
+
._Chat-action_3s08c_42 {
|
|
53
54
|
background: var(--puck-color-azure-04);
|
|
54
55
|
color: white;
|
|
55
56
|
}
|
|
56
|
-
._Chat-
|
|
57
|
+
._Chat-action_3s08c_42:hover {
|
|
57
58
|
opacity: 0.8;
|
|
58
59
|
}
|
|
59
|
-
._Chat-
|
|
60
|
+
._Chat-actionOutlined_3s08c_51 {
|
|
60
61
|
background: transparent;
|
|
61
62
|
color: var(--puck-color-azure-04);
|
|
62
63
|
}
|
|
63
|
-
._Chat-
|
|
64
|
+
._Chat-actionOutlined_3s08c_51:hover {
|
|
64
65
|
background: var(--puck-color-azure-11);
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -545,6 +546,44 @@ p {
|
|
|
545
546
|
color: var(--puck-color-azure-04);
|
|
546
547
|
}
|
|
547
548
|
|
|
549
|
+
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/CardSelector/styles.module.css/#css-module-data */
|
|
550
|
+
._CardSelector_1ogry_1 {
|
|
551
|
+
display: grid;
|
|
552
|
+
gap: 16px;
|
|
553
|
+
}
|
|
554
|
+
@media (min-width: 768px) {
|
|
555
|
+
._CardSelector_1ogry_1 {
|
|
556
|
+
grid-template-columns: 1fr 1fr;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
._CardSelectorOption_1ogry_12 {
|
|
560
|
+
display: flex;
|
|
561
|
+
flex-direction: column;
|
|
562
|
+
background-color: white;
|
|
563
|
+
padding: 16px;
|
|
564
|
+
text-align: left;
|
|
565
|
+
max-width: 640px;
|
|
566
|
+
border: 1px solid var(--puck-color-grey-09);
|
|
567
|
+
border-radius: 16px;
|
|
568
|
+
}
|
|
569
|
+
._CardSelectorOption--isSelected_1ogry_23 {
|
|
570
|
+
border-color: var(--puck-color-azure-04);
|
|
571
|
+
}
|
|
572
|
+
._CardSelectorOption--disabled_1ogry_27 {
|
|
573
|
+
color: var(--puck-color-grey-05);
|
|
574
|
+
}
|
|
575
|
+
._CardSelectorOption-description_1ogry_31 {
|
|
576
|
+
font-size: var(--puck-font-size-xs);
|
|
577
|
+
}
|
|
578
|
+
._CardSelectorOption-body_1ogry_35 {
|
|
579
|
+
margin-top: 12px;
|
|
580
|
+
}
|
|
581
|
+
._CardSelectorOption_1ogry_12:hover:not(._CardSelectorOption--isSelected_1ogry_23):not(._CardSelectorOption--disabled_1ogry_27) {
|
|
582
|
+
background-color: var(--puck-color-azure-12);
|
|
583
|
+
border-color: var(--puck-color-azure-04);
|
|
584
|
+
cursor: pointer;
|
|
585
|
+
}
|
|
586
|
+
|
|
548
587
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Code/Code.module.css/#css-module-data */
|
|
549
588
|
._Code_d4378_1 {
|
|
550
589
|
border-radius: 8px;
|
|
@@ -1118,7 +1157,7 @@ p {
|
|
|
1118
1157
|
}
|
|
1119
1158
|
|
|
1120
1159
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css/#css-module-data */
|
|
1121
|
-
.
|
|
1160
|
+
._Chat_1njo2_1 {
|
|
1122
1161
|
--fade-size: 32px;
|
|
1123
1162
|
--chat-background-color: white;
|
|
1124
1163
|
display: flex;
|
|
@@ -1128,46 +1167,46 @@ p {
|
|
|
1128
1167
|
overflow: hidden;
|
|
1129
1168
|
}
|
|
1130
1169
|
@media (min-width: 638px) {
|
|
1131
|
-
.
|
|
1170
|
+
._Chat_1njo2_1 {
|
|
1132
1171
|
max-height: none;
|
|
1133
1172
|
}
|
|
1134
1173
|
}
|
|
1135
|
-
._Chat-
|
|
1174
|
+
._Chat-inner_1njo2_17 {
|
|
1136
1175
|
background-color: var(--chat-background-color);
|
|
1137
1176
|
display: flex;
|
|
1138
1177
|
flex-direction: column;
|
|
1139
1178
|
max-height: 100%;
|
|
1140
1179
|
position: relative;
|
|
1141
1180
|
}
|
|
1142
|
-
._Chat--
|
|
1181
|
+
._Chat--hasMessages_1njo2_25 ._Chat-inner_1njo2_17 {
|
|
1143
1182
|
padding-top: 0;
|
|
1144
1183
|
}
|
|
1145
|
-
.
|
|
1184
|
+
._Chat_1njo2_1:not(._Chat--hasChildren_1njo2_29) ._Chat-inner_1njo2_17 {
|
|
1146
1185
|
height: 100%;
|
|
1147
1186
|
padding-top: 0;
|
|
1148
1187
|
}
|
|
1149
|
-
._Chat--
|
|
1188
|
+
._Chat--hasMessages_1njo2_25 ._Chat-messages_1njo2_34 {
|
|
1150
1189
|
display: flex;
|
|
1151
1190
|
flex-direction: column-reverse;
|
|
1152
1191
|
padding: 16px;
|
|
1153
1192
|
overflow: auto;
|
|
1154
1193
|
}
|
|
1155
|
-
._Chat-
|
|
1194
|
+
._Chat-form_1njo2_41 {
|
|
1156
1195
|
background-color: white;
|
|
1157
1196
|
padding: 16px;
|
|
1158
1197
|
}
|
|
1159
|
-
._Chat--
|
|
1198
|
+
._Chat--hideInput_1njo2_46 ._Chat-form_1njo2_41 {
|
|
1160
1199
|
display: none;
|
|
1161
1200
|
}
|
|
1162
|
-
._Chat--
|
|
1201
|
+
._Chat--hasMessages_1njo2_25 ._Chat-form_1njo2_41 {
|
|
1163
1202
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
1164
1203
|
}
|
|
1165
1204
|
@media (min-width: 638px) {
|
|
1166
|
-
._Chat-
|
|
1205
|
+
._Chat-form_1njo2_41 {
|
|
1167
1206
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
1168
1207
|
}
|
|
1169
1208
|
}
|
|
1170
|
-
._Chat-
|
|
1209
|
+
._Chat-formHelper_1njo2_60 {
|
|
1171
1210
|
align-items: center;
|
|
1172
1211
|
display: flex;
|
|
1173
1212
|
color: var(--puck-color-grey-04);
|
|
@@ -1176,11 +1215,11 @@ p {
|
|
|
1176
1215
|
gap: 8px;
|
|
1177
1216
|
padding-bottom: 12px;
|
|
1178
1217
|
}
|
|
1179
|
-
._Chat--
|
|
1218
|
+
._Chat--hasMessages_1njo2_25 ._Chat-formHelper_1njo2_60 {
|
|
1180
1219
|
opacity: 0;
|
|
1181
1220
|
transition: opacity 250ms ease-in;
|
|
1182
1221
|
}
|
|
1183
|
-
._Chat-
|
|
1222
|
+
._Chat-examplePrompts_1njo2_75 {
|
|
1184
1223
|
align-items: center;
|
|
1185
1224
|
display: flex;
|
|
1186
1225
|
flex-wrap: nowrap;
|
|
@@ -1189,7 +1228,7 @@ p {
|
|
|
1189
1228
|
width: 100%;
|
|
1190
1229
|
overflow-x: auto;
|
|
1191
1230
|
}
|
|
1192
|
-
._Chat-
|
|
1231
|
+
._Chat-examplePrompt_1njo2_75 {
|
|
1193
1232
|
align-items: center;
|
|
1194
1233
|
background: white;
|
|
1195
1234
|
border: 1px solid var(--puck-color-grey-09);
|
|
@@ -1198,37 +1237,39 @@ p {
|
|
|
1198
1237
|
display: flex;
|
|
1199
1238
|
gap: 4px;
|
|
1200
1239
|
font-size: var(--puck-font-size-xxxs);
|
|
1240
|
+
justify-content: center;
|
|
1201
1241
|
padding: 6px 12px;
|
|
1202
1242
|
text-wrap: nowrap;
|
|
1203
1243
|
}
|
|
1204
|
-
._Chat-
|
|
1244
|
+
._Chat-examplePrompt_1njo2_75:hover {
|
|
1205
1245
|
background: var(--puck-color-azure-11);
|
|
1206
1246
|
border-color: var(--puck-color-azure-08);
|
|
1207
1247
|
color: var(--puck-color-azure-04);
|
|
1208
1248
|
}
|
|
1209
|
-
._Chat-
|
|
1249
|
+
._Chat-examplePromptArrow_1njo2_105 {
|
|
1250
|
+
display: flex;
|
|
1210
1251
|
margin-left: auto;
|
|
1211
1252
|
}
|
|
1212
|
-
._Chat-
|
|
1253
|
+
._Chat-default_1njo2_110 {
|
|
1213
1254
|
overflow-y: auto;
|
|
1214
1255
|
flex-grow: 1;
|
|
1215
1256
|
}
|
|
1216
|
-
._Chat--
|
|
1257
|
+
._Chat--hasMessages_1njo2_25 ._Chat-default_1njo2_110 {
|
|
1217
1258
|
opacity: 0;
|
|
1218
1259
|
padding: 0;
|
|
1219
1260
|
pointer-events: none;
|
|
1220
1261
|
transition: opacity 250ms ease-in;
|
|
1221
1262
|
}
|
|
1222
|
-
._Chat--
|
|
1263
|
+
._Chat--hasMessages_1njo2_25 {
|
|
1223
1264
|
background-color: white;
|
|
1224
1265
|
transition: background-color 250ms ease-in;
|
|
1225
1266
|
}
|
|
1226
|
-
.
|
|
1267
|
+
._ChatMessage_1njo2_127 {
|
|
1227
1268
|
font-size: var(--puck-font-size-xs);
|
|
1228
1269
|
line-height: var(--line-height-s);
|
|
1229
1270
|
overflow-wrap: break-word;
|
|
1230
1271
|
}
|
|
1231
|
-
._ChatMessage--
|
|
1272
|
+
._ChatMessage--userRole_1njo2_133 ._ChatMessage-text_1njo2_133 {
|
|
1232
1273
|
background: var(--puck-color-azure-10);
|
|
1233
1274
|
border-radius: 16px;
|
|
1234
1275
|
color: var(--puck-color-grey-03);
|
|
@@ -1237,70 +1278,70 @@ p {
|
|
|
1237
1278
|
margin-top: 8px;
|
|
1238
1279
|
padding: 12px 16px;
|
|
1239
1280
|
}
|
|
1240
|
-
.
|
|
1241
|
-
.
|
|
1281
|
+
._ChatMessage_1njo2_127 ul,
|
|
1282
|
+
._ChatMessage_1njo2_127 ol {
|
|
1242
1283
|
list-style: decimal;
|
|
1243
1284
|
margin: 0;
|
|
1244
1285
|
margin-bottom: 12px;
|
|
1245
1286
|
margin-top: 12px;
|
|
1246
1287
|
padding-left: 32px;
|
|
1247
1288
|
}
|
|
1248
|
-
.
|
|
1289
|
+
._ChatMessage_1njo2_127 li {
|
|
1249
1290
|
margin-bottom: 8px;
|
|
1250
1291
|
margin-top: 8px;
|
|
1251
1292
|
padding-left: 8px;
|
|
1252
1293
|
}
|
|
1253
|
-
.
|
|
1254
|
-
.
|
|
1255
|
-
.
|
|
1256
|
-
.
|
|
1257
|
-
.
|
|
1258
|
-
.
|
|
1294
|
+
._ChatMessage_1njo2_127 h1,
|
|
1295
|
+
._ChatMessage_1njo2_127 h2,
|
|
1296
|
+
._ChatMessage_1njo2_127 h3,
|
|
1297
|
+
._ChatMessage_1njo2_127 h4,
|
|
1298
|
+
._ChatMessage_1njo2_127 h5,
|
|
1299
|
+
._ChatMessage_1njo2_127 h6 {
|
|
1259
1300
|
font-weight: 600;
|
|
1260
1301
|
}
|
|
1261
|
-
.
|
|
1302
|
+
._ChatMessage_1njo2_127 h1 {
|
|
1262
1303
|
font-size: var(--puck-font-l);
|
|
1263
1304
|
}
|
|
1264
|
-
.
|
|
1305
|
+
._ChatMessage_1njo2_127 h2 {
|
|
1265
1306
|
font-size: var(--puck-font-m);
|
|
1266
1307
|
}
|
|
1267
|
-
.
|
|
1308
|
+
._ChatMessage_1njo2_127 h3 {
|
|
1268
1309
|
font-size: var(--puck-font-m);
|
|
1269
1310
|
}
|
|
1270
|
-
.
|
|
1311
|
+
._ChatMessage_1njo2_127 h4 {
|
|
1271
1312
|
font-size: var(--puck-font-s);
|
|
1272
1313
|
}
|
|
1273
|
-
.
|
|
1314
|
+
._ChatMessage_1njo2_127 h5 {
|
|
1274
1315
|
font-size: var(--puck-font-xs);
|
|
1275
1316
|
}
|
|
1276
|
-
.
|
|
1317
|
+
._ChatMessage_1njo2_127 h6 {
|
|
1277
1318
|
font-size: var(--puck-font-xm);
|
|
1278
1319
|
}
|
|
1279
|
-
.
|
|
1320
|
+
._ChatMessage_1njo2_127 p {
|
|
1280
1321
|
margin-bottom: 8px;
|
|
1281
1322
|
margin-top: 8px;
|
|
1282
1323
|
}
|
|
1283
|
-
._ChatMessage--
|
|
1324
|
+
._ChatMessage--userRole_1njo2_133 ._ChatMessage-text_1njo2_133 > *:first-of-type {
|
|
1284
1325
|
margin-top: 0px;
|
|
1285
1326
|
}
|
|
1286
|
-
._ChatMessage--
|
|
1327
|
+
._ChatMessage--userRole_1njo2_133 ._ChatMessage-text_1njo2_133 > *:last-of-type {
|
|
1287
1328
|
margin-bottom: 0px;
|
|
1288
1329
|
}
|
|
1289
|
-
.
|
|
1330
|
+
._ChatMessage_1njo2_127 a {
|
|
1290
1331
|
color: var(--puck-color-azure-04);
|
|
1291
1332
|
font-weight: 600;
|
|
1292
1333
|
text-decoration: none;
|
|
1293
1334
|
}
|
|
1294
|
-
.
|
|
1335
|
+
._ChatMessage_1njo2_127 a:hover {
|
|
1295
1336
|
color: var(--puck-color-azure-05);
|
|
1296
1337
|
}
|
|
1297
|
-
.
|
|
1338
|
+
._ChatMessage_1njo2_127 hr {
|
|
1298
1339
|
border-top: none;
|
|
1299
1340
|
border-bottom-color: var(--puck-color-grey-09);
|
|
1300
1341
|
margin-bottom: 16px;
|
|
1301
1342
|
margin-top: 16px;
|
|
1302
1343
|
}
|
|
1303
|
-
.
|
|
1344
|
+
._ChatMessage_1njo2_127 blockquote {
|
|
1304
1345
|
margin-bottom: 8px;
|
|
1305
1346
|
margin-top: 8px;
|
|
1306
1347
|
margin-left: 0;
|
|
@@ -1309,7 +1350,7 @@ p {
|
|
|
1309
1350
|
padding-bottom: 2px;
|
|
1310
1351
|
padding-top: 2px;
|
|
1311
1352
|
}
|
|
1312
|
-
._ChatMessage-
|
|
1353
|
+
._ChatMessage-data_1njo2_231 {
|
|
1313
1354
|
background: var(--puck-color-grey-12);
|
|
1314
1355
|
border: 1px solid var(--puck-color-grey-08);
|
|
1315
1356
|
border-radius: 16px;
|
|
@@ -1319,19 +1360,19 @@ p {
|
|
|
1319
1360
|
margin-top: 12px;
|
|
1320
1361
|
padding: 12px 16px;
|
|
1321
1362
|
}
|
|
1322
|
-
._ChatMessage-
|
|
1363
|
+
._ChatMessage-dataInner_1njo2_242 {
|
|
1323
1364
|
align-items: center;
|
|
1324
1365
|
display: flex;
|
|
1325
1366
|
gap: 8px;
|
|
1326
1367
|
}
|
|
1327
|
-
._ChatMessage-
|
|
1368
|
+
._ChatMessage-dataIcon_1njo2_248 {
|
|
1328
1369
|
display: flex;
|
|
1329
1370
|
}
|
|
1330
|
-
._Chat-
|
|
1371
|
+
._Chat-loader_1njo2_252 {
|
|
1331
1372
|
padding: 16px;
|
|
1332
1373
|
padding-top: 0;
|
|
1333
1374
|
}
|
|
1334
|
-
._Chat-
|
|
1375
|
+
._Chat-error_1njo2_257 {
|
|
1335
1376
|
align-items: center;
|
|
1336
1377
|
display: flex;
|
|
1337
1378
|
gap: 8px;
|
|
@@ -1339,30 +1380,30 @@ p {
|
|
|
1339
1380
|
margin: 16px;
|
|
1340
1381
|
margin-top: 0;
|
|
1341
1382
|
}
|
|
1342
|
-
._Chat-
|
|
1383
|
+
._Chat-errorLabel_1njo2_266 {
|
|
1343
1384
|
color: var(--puck-color-red-04);
|
|
1344
1385
|
}
|
|
1345
|
-
._Chat-
|
|
1386
|
+
._Chat-errorAction_1njo2_270 {
|
|
1346
1387
|
margin-left: auto;
|
|
1347
1388
|
}
|
|
1348
1389
|
|
|
1349
1390
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/PromptForm/styles.module.css/#css-module-data */
|
|
1350
|
-
.
|
|
1391
|
+
._PromptForm_1r4kq_1 {
|
|
1351
1392
|
--radius: 9px;
|
|
1352
1393
|
background-color: var(--puck-color-grey-09);
|
|
1353
1394
|
border-radius: var(--radius);
|
|
1354
1395
|
width: 100%;
|
|
1355
1396
|
}
|
|
1356
|
-
._PromptForm-
|
|
1397
|
+
._PromptForm-inner_1r4kq_8 {
|
|
1357
1398
|
border-radius: var(--radius);
|
|
1358
1399
|
padding: 1px;
|
|
1359
1400
|
position: relative;
|
|
1360
1401
|
}
|
|
1361
|
-
._PromptForm--
|
|
1402
|
+
._PromptForm--dark_1r4kq_14 {
|
|
1362
1403
|
background-color: var(--puck-color-grey-02);
|
|
1363
1404
|
box-shadow: none;
|
|
1364
1405
|
}
|
|
1365
|
-
._PromptForm--
|
|
1406
|
+
._PromptForm--glow_1r4kq_19 ._PromptForm-glow_1r4kq_19 {
|
|
1366
1407
|
border: 2px solid transparent;
|
|
1367
1408
|
border-radius: var(--radius);
|
|
1368
1409
|
mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
|
|
@@ -1372,7 +1413,7 @@ p {
|
|
|
1372
1413
|
pointer-events: none;
|
|
1373
1414
|
inset: 0;
|
|
1374
1415
|
}
|
|
1375
|
-
._PromptForm--
|
|
1416
|
+
._PromptForm--glow_1r4kq_19 ._PromptForm-glow_1r4kq_19::after {
|
|
1376
1417
|
background:
|
|
1377
1418
|
radial-gradient(
|
|
1378
1419
|
circle at center,
|
|
@@ -1381,84 +1422,90 @@ p {
|
|
|
1381
1422
|
content: "";
|
|
1382
1423
|
offset-path: rect(0 100% 100% 0 round 200px);
|
|
1383
1424
|
offset-anchor: calc(var(--anchor) * 1%) 50%;
|
|
1384
|
-
animation:
|
|
1425
|
+
animation: _loop_1r4kq_1 9s infinite linear;
|
|
1385
1426
|
position: absolute;
|
|
1386
1427
|
height: 312px;
|
|
1387
1428
|
aspect-ratio: 1 / 1;
|
|
1388
1429
|
display: inline-block;
|
|
1389
1430
|
}
|
|
1390
|
-
._PromptForm--
|
|
1431
|
+
._PromptForm--dark_1r4kq_14._PromptForm--glow_1r4kq_19 ._PromptForm-glow_1r4kq_19::after {
|
|
1391
1432
|
background:
|
|
1392
1433
|
radial-gradient(
|
|
1393
1434
|
circle at center,
|
|
1394
1435
|
var(--puck-color-azure-08),
|
|
1395
1436
|
transparent 50%);
|
|
1396
1437
|
}
|
|
1397
|
-
@keyframes
|
|
1438
|
+
@keyframes _loop_1r4kq_1 {
|
|
1398
1439
|
to {
|
|
1399
1440
|
offset-distance: 100%;
|
|
1400
1441
|
}
|
|
1401
1442
|
}
|
|
1402
|
-
._PromptForm-
|
|
1443
|
+
._PromptForm-formInner_1r4kq_60 {
|
|
1444
|
+
background-color: white;
|
|
1445
|
+
border-radius: 8px;
|
|
1403
1446
|
position: relative;
|
|
1404
1447
|
}
|
|
1405
|
-
._PromptForm-
|
|
1406
|
-
background-color:
|
|
1448
|
+
._PromptForm-input_1r4kq_66 {
|
|
1449
|
+
background-color: transparent;
|
|
1407
1450
|
border: none;
|
|
1408
|
-
border-radius: 8px;
|
|
1409
1451
|
display: block;
|
|
1410
1452
|
resize: none;
|
|
1411
1453
|
color: var(--puck-color-grey-03);
|
|
1412
1454
|
padding: 12px 16px;
|
|
1413
1455
|
padding-left: 16px;
|
|
1414
1456
|
padding-right: 8px;
|
|
1457
|
+
padding-bottom: 4px;
|
|
1415
1458
|
font-family: inherit;
|
|
1416
1459
|
font-size: var(--puck-font-size-xs);
|
|
1417
1460
|
line-height: var(--line-height-s);
|
|
1418
|
-
padding-bottom: 48px;
|
|
1419
1461
|
outline-offset: -1;
|
|
1420
1462
|
width: 100%;
|
|
1421
1463
|
box-sizing: border-box;
|
|
1422
1464
|
}
|
|
1423
|
-
._PromptForm-
|
|
1424
|
-
outline
|
|
1465
|
+
._PromptForm-input_1r4kq_66:focus {
|
|
1466
|
+
outline: none;
|
|
1425
1467
|
}
|
|
1426
|
-
._PromptForm
|
|
1468
|
+
._PromptForm-formInner_1r4kq_60:has(._PromptForm-input_1r4kq_66:focus) {
|
|
1469
|
+
outline: 2px solid var(--puck-color-azure-04);
|
|
1470
|
+
}
|
|
1471
|
+
._PromptForm--dark_1r4kq_14 ._PromptForm-input_1r4kq_66 {
|
|
1427
1472
|
background-color: var(--puck-color-grey-01);
|
|
1428
1473
|
color: var(--puck-color-grey-08);
|
|
1429
1474
|
}
|
|
1430
|
-
._PromptForm--
|
|
1475
|
+
._PromptForm--disabled_1r4kq_97 ._PromptForm-input_1r4kq_66 {
|
|
1431
1476
|
background-color: var(--puck-color-grey-12);
|
|
1432
1477
|
cursor: not-allowed;
|
|
1433
1478
|
}
|
|
1434
|
-
._PromptForm-
|
|
1479
|
+
._PromptForm-helper_1r4kq_102 {
|
|
1435
1480
|
align-items: center;
|
|
1436
|
-
color: var(--puck-color-grey-
|
|
1481
|
+
color: var(--puck-color-grey-04);
|
|
1437
1482
|
display: flex;
|
|
1438
1483
|
gap: 4px;
|
|
1439
1484
|
font-size: var(--puck-font-size-xxs);
|
|
1440
1485
|
font-weight: 500;
|
|
1441
|
-
padding:
|
|
1486
|
+
padding: 6px 12px;
|
|
1442
1487
|
}
|
|
1443
|
-
._PromptForm-
|
|
1488
|
+
._PromptForm-actions_1r4kq_112 {
|
|
1489
|
+
align-items: flex-end;
|
|
1490
|
+
cursor: text;
|
|
1444
1491
|
display: flex;
|
|
1445
|
-
position: absolute;
|
|
1446
1492
|
gap: 8px;
|
|
1447
1493
|
bottom: 0;
|
|
1448
1494
|
left: 0;
|
|
1449
1495
|
right: 0;
|
|
1450
1496
|
padding: 6px;
|
|
1451
|
-
pointer-events: none;
|
|
1452
1497
|
}
|
|
1453
|
-
._PromptForm-
|
|
1498
|
+
._PromptForm-actionsLeft_1r4kq_123 {
|
|
1454
1499
|
align-items: center;
|
|
1500
|
+
cursor: auto;
|
|
1455
1501
|
display: flex;
|
|
1456
1502
|
padding-left: 8px;
|
|
1457
1503
|
}
|
|
1458
|
-
._PromptForm-
|
|
1504
|
+
._PromptForm-actionsRight_1r4kq_130 {
|
|
1505
|
+
cursor: auto;
|
|
1459
1506
|
margin-left: auto;
|
|
1460
1507
|
}
|
|
1461
|
-
._PromptForm-
|
|
1508
|
+
._PromptForm-actionSubmit_1r4kq_135 {
|
|
1462
1509
|
background: var(--puck-color-azure-04);
|
|
1463
1510
|
border-radius: 48px;
|
|
1464
1511
|
color: white;
|
|
@@ -1466,20 +1513,22 @@ p {
|
|
|
1466
1513
|
align-items: center;
|
|
1467
1514
|
justify-content: center;
|
|
1468
1515
|
align-self: flex-end;
|
|
1469
|
-
|
|
1470
|
-
height: 32px;
|
|
1516
|
+
padding: 4px;
|
|
1471
1517
|
border: 0;
|
|
1472
1518
|
pointer-events: auto;
|
|
1473
1519
|
cursor: pointer;
|
|
1474
1520
|
}
|
|
1475
|
-
._PromptForm-
|
|
1521
|
+
._PromptForm--userCta_1r4kq_149 ._PromptForm-actionSubmit_1r4kq_135 {
|
|
1522
|
+
padding: 8px 12px;
|
|
1523
|
+
}
|
|
1524
|
+
._PromptForm-actionSubmit_1r4kq_135:hover {
|
|
1476
1525
|
background: var(--puck-color-azure-05);
|
|
1477
1526
|
}
|
|
1478
|
-
._PromptForm--
|
|
1527
|
+
._PromptForm--isDisabled_1r4kq_157 ._PromptForm-actionSubmit_1r4kq_135 {
|
|
1479
1528
|
background-color: var(--puck-color-grey-06);
|
|
1480
1529
|
cursor: not-allowed;
|
|
1481
1530
|
}
|
|
1482
|
-
._PromptForm--
|
|
1531
|
+
._PromptForm--isLoading_1r4kq_162 ._PromptForm-actionSubmit_1r4kq_135 {
|
|
1483
1532
|
background-color: var(--puck-color-azure-06);
|
|
1484
1533
|
cursor: not-allowed;
|
|
1485
1534
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { LanguageModelUsage, UIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
3
|
+
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
4
4
|
import { PuckAction, Data } from '@measured/puck';
|
|
5
5
|
|
|
6
6
|
type _JSONSchema = boolean | JSONSchema;
|
|
@@ -189,6 +189,7 @@ type AiPluginProps = {
|
|
|
189
189
|
declare global {
|
|
190
190
|
interface Window {
|
|
191
191
|
__PUCK_AI: {
|
|
192
|
+
sendMessage: (message: CreateUIMessage<PuckMessage>) => void;
|
|
192
193
|
setMessages: (_messages: PuckMessage[]) => void;
|
|
193
194
|
processData: (_messages: DataUIPart<PuckDataParts>) => void;
|
|
194
195
|
setStatus: (_status: ChatStatus) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { LanguageModelUsage, UIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
3
|
+
import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
|
|
4
4
|
import { PuckAction, Data } from '@measured/puck';
|
|
5
5
|
|
|
6
6
|
type _JSONSchema = boolean | JSONSchema;
|
|
@@ -189,6 +189,7 @@ type AiPluginProps = {
|
|
|
189
189
|
declare global {
|
|
190
190
|
interface Window {
|
|
191
191
|
__PUCK_AI: {
|
|
192
|
+
sendMessage: (message: CreateUIMessage<PuckMessage>) => void;
|
|
192
193
|
setMessages: (_messages: PuckMessage[]) => void;
|
|
193
194
|
processData: (_messages: DataUIPart<PuckDataParts>) => void;
|
|
194
195
|
setStatus: (_status: ChatStatus) => void;
|