@puckeditor/plugin-ai 0.4.1-canary.fd49bc87 → 0.4.1-canary.fd69f4a0

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