@puckeditor/plugin-ai 0.1.0-canary.dfd624ec → 0.1.0-canary.e0b219c5
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 +68 -153
- package/dist/index.d.mts +27 -107
- package/dist/index.d.ts +27 -107
- package/dist/index.js +487 -634
- package/dist/index.mjs +482 -629
- package/package.json +5 -4
package/dist/index.css
CHANGED
|
@@ -234,7 +234,7 @@ p {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css/#css-module-data */
|
|
237
|
-
._Modal-
|
|
237
|
+
._Modal-background_874yi_1 {
|
|
238
238
|
align-items: center;
|
|
239
239
|
display: flex;
|
|
240
240
|
justify-content: center;
|
|
@@ -248,26 +248,24 @@ p {
|
|
|
248
248
|
opacity: 0;
|
|
249
249
|
pointer-events: none;
|
|
250
250
|
}
|
|
251
|
-
._Modal--
|
|
251
|
+
._Modal--visible_874yi_16 ._Modal-background_874yi_1 {
|
|
252
252
|
opacity: 1;
|
|
253
253
|
transition: opacity ease 100ms;
|
|
254
254
|
pointer-events: auto;
|
|
255
255
|
}
|
|
256
|
-
._Modal-
|
|
256
|
+
._Modal-modal_874yi_22 {
|
|
257
257
|
background: white;
|
|
258
|
-
border-radius:
|
|
258
|
+
border-radius: 8px;
|
|
259
259
|
display: block;
|
|
260
|
-
|
|
261
|
-
margin-inline: 24px;
|
|
262
|
-
overflow: auto;
|
|
260
|
+
overflow: hidden;
|
|
263
261
|
}
|
|
264
262
|
|
|
265
263
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css/#css-module-data */
|
|
266
|
-
.
|
|
264
|
+
._Button_w2ngt_1 {
|
|
267
265
|
appearance: none;
|
|
268
266
|
background: none;
|
|
269
267
|
border: 1px solid transparent;
|
|
270
|
-
border-radius:
|
|
268
|
+
border-radius: 4px;
|
|
271
269
|
color: var(--puck-color-white);
|
|
272
270
|
display: inline-flex;
|
|
273
271
|
align-items: center;
|
|
@@ -285,80 +283,69 @@ p {
|
|
|
285
283
|
white-space: nowrap;
|
|
286
284
|
margin: 0;
|
|
287
285
|
}
|
|
288
|
-
.
|
|
289
|
-
.
|
|
286
|
+
._Button_w2ngt_1:hover,
|
|
287
|
+
._Button_w2ngt_1:active {
|
|
290
288
|
transition: none;
|
|
291
289
|
}
|
|
292
|
-
._Button--
|
|
290
|
+
._Button--medium_w2ngt_29 {
|
|
293
291
|
min-height: 34px;
|
|
294
292
|
padding-bottom: 7px;
|
|
295
293
|
padding-left: 19px;
|
|
296
294
|
padding-right: 19px;
|
|
297
295
|
padding-top: 7px;
|
|
298
296
|
}
|
|
299
|
-
._Button--
|
|
297
|
+
._Button--large_w2ngt_37 {
|
|
300
298
|
padding-bottom: 11px;
|
|
301
299
|
padding-left: 19px;
|
|
302
300
|
padding-right: 19px;
|
|
303
301
|
padding-top: 11px;
|
|
304
302
|
}
|
|
305
|
-
._Button-
|
|
303
|
+
._Button-icon_w2ngt_44 {
|
|
306
304
|
margin-top: 2px;
|
|
307
305
|
}
|
|
308
|
-
._Button--
|
|
306
|
+
._Button--primary_w2ngt_48 {
|
|
309
307
|
background: var(--puck-color-azure-04);
|
|
310
308
|
}
|
|
311
|
-
.
|
|
309
|
+
._Button_w2ngt_1:focus-visible {
|
|
312
310
|
outline: 2px solid var(--puck-color-azure-05);
|
|
313
311
|
outline-offset: 2px;
|
|
314
312
|
}
|
|
315
313
|
@media (hover: hover) and (pointer: fine) {
|
|
316
|
-
._Button--
|
|
314
|
+
._Button--primary_w2ngt_48:hover {
|
|
317
315
|
background-color: var(--puck-color-azure-03);
|
|
318
316
|
}
|
|
319
317
|
}
|
|
320
|
-
._Button--
|
|
318
|
+
._Button--primary_w2ngt_48:active {
|
|
321
319
|
background-color: var(--puck-color-azure-02);
|
|
322
320
|
}
|
|
323
|
-
._Button--
|
|
321
|
+
._Button--secondary_w2ngt_67 {
|
|
324
322
|
border: 1px solid currentColor;
|
|
325
323
|
color: currentColor;
|
|
326
324
|
}
|
|
327
325
|
@media (hover: hover) and (pointer: fine) {
|
|
328
|
-
._Button--
|
|
326
|
+
._Button--secondary_w2ngt_67:hover {
|
|
329
327
|
background-color: var(--puck-color-azure-12);
|
|
330
328
|
color: var(--puck-color-black);
|
|
331
329
|
}
|
|
332
330
|
}
|
|
333
|
-
._Button--
|
|
331
|
+
._Button--secondary_w2ngt_67:active {
|
|
334
332
|
background-color: var(--puck-color-azure-11);
|
|
335
333
|
color: var(--puck-color-black);
|
|
336
334
|
}
|
|
337
|
-
._Button--
|
|
338
|
-
background: var(--puck-color-red-04);
|
|
339
|
-
}
|
|
340
|
-
@media (hover: hover) and (pointer: fine) {
|
|
341
|
-
._Button--danger_1wyvm_84:hover {
|
|
342
|
-
background-color: var(--puck-color-red-03);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
._Button--danger_1wyvm_84:active {
|
|
346
|
-
background-color: var(--puck-color-red-02);
|
|
347
|
-
}
|
|
348
|
-
._Button--flush_1wyvm_98 {
|
|
335
|
+
._Button--flush_w2ngt_84 {
|
|
349
336
|
border-radius: 0;
|
|
350
337
|
}
|
|
351
|
-
._Button--
|
|
352
|
-
._Button--
|
|
338
|
+
._Button--disabled_w2ngt_88,
|
|
339
|
+
._Button--disabled_w2ngt_88:hover {
|
|
353
340
|
background-color: var(--puck-color-grey-09);
|
|
354
341
|
color: var(--puck-color-grey-03);
|
|
355
342
|
cursor: not-allowed;
|
|
356
343
|
}
|
|
357
|
-
._Button--
|
|
344
|
+
._Button--fullWidth_w2ngt_95 {
|
|
358
345
|
justify-content: center;
|
|
359
346
|
width: 100%;
|
|
360
347
|
}
|
|
361
|
-
._Button-
|
|
348
|
+
._Button-spinner_w2ngt_100 {
|
|
362
349
|
padding-left: 8px;
|
|
363
350
|
}
|
|
364
351
|
|
|
@@ -385,72 +372,43 @@ p {
|
|
|
385
372
|
}
|
|
386
373
|
|
|
387
374
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Heading/Heading.module.css/#css-module-data */
|
|
388
|
-
.
|
|
375
|
+
._Heading_1czuc_1 {
|
|
389
376
|
display: block;
|
|
390
377
|
font-weight: 700;
|
|
391
378
|
margin: 0;
|
|
392
379
|
}
|
|
393
|
-
.
|
|
380
|
+
._Heading_1czuc_1 b {
|
|
394
381
|
font-weight: 700;
|
|
395
382
|
}
|
|
396
|
-
._Heading--
|
|
383
|
+
._Heading--xxxxl_1czuc_11 {
|
|
384
|
+
font-size: var(--puck-font-size-xxxxl);
|
|
385
|
+
letter-spacing: 0.08ch;
|
|
386
|
+
font-weight: 800;
|
|
387
|
+
}
|
|
388
|
+
._Heading--xxxl_1czuc_17 {
|
|
397
389
|
font-size: var(--puck-font-size-xxxl);
|
|
398
390
|
}
|
|
399
|
-
._Heading--
|
|
391
|
+
._Heading--xxl_1czuc_21 {
|
|
400
392
|
font-size: var(--puck-font-size-xxl);
|
|
401
393
|
}
|
|
402
|
-
._Heading--
|
|
394
|
+
._Heading--xl_1czuc_25 {
|
|
403
395
|
font-size: var(--puck-font-size-xl);
|
|
404
396
|
}
|
|
405
|
-
._Heading--
|
|
397
|
+
._Heading--l_1czuc_29 {
|
|
406
398
|
font-size: var(--puck-font-size-l);
|
|
407
399
|
}
|
|
408
|
-
._Heading--
|
|
400
|
+
._Heading--m_1czuc_33 {
|
|
409
401
|
font-size: var(--puck-font-size-m);
|
|
410
402
|
}
|
|
411
|
-
._Heading--
|
|
403
|
+
._Heading--s_1czuc_37 {
|
|
412
404
|
font-size: var(--puck-font-size-s);
|
|
413
405
|
}
|
|
414
|
-
._Heading--
|
|
406
|
+
._Heading--xs_1czuc_41 {
|
|
415
407
|
font-size: var(--puck-font-size-xs);
|
|
416
408
|
}
|
|
417
|
-
._Heading--
|
|
409
|
+
._Heading--xxs_1czuc_45 {
|
|
418
410
|
font-size: var(--puck-font-size-xxs);
|
|
419
411
|
}
|
|
420
|
-
._Heading--xxs_qkzg9_43 {
|
|
421
|
-
font-size: var(--puck-font-size-xxs);
|
|
422
|
-
}
|
|
423
|
-
@media (min-width: 768px) {
|
|
424
|
-
._Heading--xxxxl_qkzg9_11 {
|
|
425
|
-
font-size: var(--puck-font-size-xxxxl);
|
|
426
|
-
letter-spacing: 0.08ch;
|
|
427
|
-
font-weight: 800;
|
|
428
|
-
}
|
|
429
|
-
._Heading--xxxl_qkzg9_15 {
|
|
430
|
-
font-size: var(--puck-font-size-xxxl);
|
|
431
|
-
}
|
|
432
|
-
._Heading--xxl_qkzg9_19 {
|
|
433
|
-
font-size: var(--puck-font-size-xxl);
|
|
434
|
-
}
|
|
435
|
-
._Heading--xl_qkzg9_23 {
|
|
436
|
-
font-size: var(--puck-font-size-xl);
|
|
437
|
-
}
|
|
438
|
-
._Heading--l_qkzg9_27 {
|
|
439
|
-
font-size: var(--puck-font-size-l);
|
|
440
|
-
}
|
|
441
|
-
._Heading--m_qkzg9_31 {
|
|
442
|
-
font-size: var(--puck-font-size-m);
|
|
443
|
-
}
|
|
444
|
-
._Heading--s_qkzg9_35 {
|
|
445
|
-
font-size: var(--puck-font-size-s);
|
|
446
|
-
}
|
|
447
|
-
._Heading--xs_qkzg9_39 {
|
|
448
|
-
font-size: var(--puck-font-size-xs);
|
|
449
|
-
}
|
|
450
|
-
._Heading--xxs_qkzg9_43 {
|
|
451
|
-
font-size: var(--puck-font-size-xxs);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
412
|
|
|
455
413
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Align/Align.module.css/#css-module-data */
|
|
456
414
|
._Align_oewlu_1 {
|
|
@@ -644,13 +602,13 @@ p {
|
|
|
644
602
|
}
|
|
645
603
|
|
|
646
604
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css/#css-module-data */
|
|
647
|
-
.
|
|
605
|
+
._Page_1pzwy_1 {
|
|
648
606
|
display: flex;
|
|
649
607
|
flex-direction: column;
|
|
650
608
|
height: 100%;
|
|
651
609
|
overflow: hidden;
|
|
652
610
|
}
|
|
653
|
-
._Page-
|
|
611
|
+
._Page-masthead_1pzwy_8 {
|
|
654
612
|
align-items: center;
|
|
655
613
|
display: flex;
|
|
656
614
|
gap: 16px;
|
|
@@ -658,47 +616,45 @@ p {
|
|
|
658
616
|
box-sizing: border-box;
|
|
659
617
|
border-bottom: 1px solid var(--puck-color-grey-10);
|
|
660
618
|
min-height: 64px;
|
|
661
|
-
overflow-x: auto;
|
|
662
619
|
}
|
|
663
|
-
._Page-
|
|
620
|
+
._Page-crumbs_1pzwy_18 {
|
|
664
621
|
display: flex;
|
|
665
622
|
gap: 32px;
|
|
666
623
|
}
|
|
667
|
-
._Page-
|
|
624
|
+
._Page-crumb_1pzwy_18 {
|
|
668
625
|
color: var(--puck-color-grey-05);
|
|
669
626
|
position: relative;
|
|
670
|
-
white-space: nowrap;
|
|
671
627
|
}
|
|
672
|
-
._Page-
|
|
628
|
+
._Page-crumbLink_1pzwy_28 {
|
|
673
629
|
color: var(--puck-color-grey-05);
|
|
674
630
|
text-decoration: none;
|
|
675
631
|
}
|
|
676
|
-
._Page-
|
|
632
|
+
._Page-crumbLink_1pzwy_28:hover {
|
|
677
633
|
color: var(--puck-color-azure-04);
|
|
678
634
|
}
|
|
679
|
-
._Page-
|
|
635
|
+
._Page-crumb_1pzwy_18:last-of-type {
|
|
680
636
|
color: var(--puck-color-grey-01);
|
|
681
637
|
font-weight: 600;
|
|
682
638
|
}
|
|
683
|
-
._Page-
|
|
639
|
+
._Page-crumb_1pzwy_18::before {
|
|
684
640
|
position: absolute;
|
|
685
641
|
content: "/";
|
|
686
642
|
left: -19px;
|
|
687
643
|
color: var(--puck-color-grey-09);
|
|
688
644
|
font-weight: 400;
|
|
689
645
|
}
|
|
690
|
-
._Page-
|
|
646
|
+
._Page-crumb_1pzwy_18:first-of-type::before {
|
|
691
647
|
display: none;
|
|
692
648
|
}
|
|
693
|
-
._Page-
|
|
649
|
+
._Page-crumb_1pzwy_18 {
|
|
694
650
|
color: var(--puck-color-grey-05);
|
|
695
651
|
position: relative;
|
|
696
652
|
text-decoration: none;
|
|
697
653
|
}
|
|
698
|
-
._Page-
|
|
654
|
+
._Page-actions_1pzwy_60 {
|
|
699
655
|
margin-left: auto;
|
|
700
656
|
}
|
|
701
|
-
._Page-
|
|
657
|
+
._Page-footer_1pzwy_64 {
|
|
702
658
|
border-top: 1px solid var(--puck-color-grey-10);
|
|
703
659
|
padding: 16px 24px;
|
|
704
660
|
}
|
|
@@ -813,26 +769,26 @@ p {
|
|
|
813
769
|
}
|
|
814
770
|
|
|
815
771
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css/#css-module-data */
|
|
816
|
-
.
|
|
772
|
+
._Table_1w0os_1 {
|
|
817
773
|
color: black;
|
|
818
774
|
display: flex;
|
|
819
775
|
flex-direction: column;
|
|
820
776
|
flex-grow: 1;
|
|
821
777
|
overflow-y: auto;
|
|
822
778
|
}
|
|
823
|
-
._Table-
|
|
779
|
+
._Table-filters_1w0os_9 {
|
|
824
780
|
margin: 16px;
|
|
825
781
|
}
|
|
826
|
-
._Table-
|
|
782
|
+
._Table-inner_1w0os_13 {
|
|
827
783
|
text-align: left;
|
|
828
784
|
}
|
|
829
|
-
._Table-
|
|
785
|
+
._Table-table_1w0os_17 {
|
|
830
786
|
color: var(--puck-color-grey-02);
|
|
831
787
|
font-size: var(--puck-font-size-xxs);
|
|
832
788
|
position: relative;
|
|
833
789
|
width: 100%;
|
|
834
790
|
}
|
|
835
|
-
.
|
|
791
|
+
._Table_1w0os_1 thead {
|
|
836
792
|
background: white;
|
|
837
793
|
font-size: var(--puck-font-size-xxs);
|
|
838
794
|
position: sticky;
|
|
@@ -840,20 +796,17 @@ p {
|
|
|
840
796
|
white-space: nowrap;
|
|
841
797
|
z-index: 1;
|
|
842
798
|
}
|
|
843
|
-
.
|
|
799
|
+
._Table_1w0os_1 thead::after {
|
|
844
800
|
content: "";
|
|
845
801
|
position: absolute;
|
|
846
802
|
height: 1px;
|
|
847
803
|
width: 100%;
|
|
848
804
|
background-color: var(--puck-color-grey-10);
|
|
849
805
|
}
|
|
850
|
-
.
|
|
851
|
-
display: none;
|
|
852
|
-
}
|
|
853
|
-
._Table_1bbu5_1 tbody tr {
|
|
806
|
+
._Table_1w0os_1 tbody tr {
|
|
854
807
|
z-index: 0;
|
|
855
808
|
}
|
|
856
|
-
.
|
|
809
|
+
._Table_1w0os_1 th {
|
|
857
810
|
background: var(--puck-color-grey-12);
|
|
858
811
|
font-weight: 400;
|
|
859
812
|
padding-left: 24px;
|
|
@@ -862,12 +815,12 @@ p {
|
|
|
862
815
|
padding-top: 12px;
|
|
863
816
|
}
|
|
864
817
|
@media (--standard-viewport) {
|
|
865
|
-
.
|
|
818
|
+
._Table_1w0os_1 th {
|
|
866
819
|
padding-left: 32px;
|
|
867
820
|
padding-right: 32px;
|
|
868
821
|
}
|
|
869
822
|
}
|
|
870
|
-
.
|
|
823
|
+
._Table_1w0os_1 td {
|
|
871
824
|
border-bottom: 1px solid var(--puck-color-grey-10);
|
|
872
825
|
padding-left: 24px;
|
|
873
826
|
padding-right: 24px;
|
|
@@ -875,26 +828,26 @@ p {
|
|
|
875
828
|
padding-top: 16px;
|
|
876
829
|
white-space: nowrap;
|
|
877
830
|
}
|
|
878
|
-
.
|
|
831
|
+
._Table_1w0os_1 td:not(:first-of-type) {
|
|
879
832
|
color: var(--puck-color-grey-05);
|
|
880
833
|
}
|
|
881
|
-
.
|
|
834
|
+
._Table_1w0os_1 tbody tr:last-of-type td {
|
|
882
835
|
border-bottom: none;
|
|
883
836
|
}
|
|
884
837
|
@media (--standard-viewport) {
|
|
885
|
-
.
|
|
838
|
+
._Table_1w0os_1 td {
|
|
886
839
|
padding-left: 32px;
|
|
887
840
|
padding-right: 32px;
|
|
888
841
|
}
|
|
889
842
|
}
|
|
890
|
-
._Table-
|
|
843
|
+
._Table-footer_1w0os_85 {
|
|
891
844
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
892
845
|
}
|
|
893
|
-
._Table--
|
|
846
|
+
._Table--clickableRows_1w0os_89 tbody tr:hover {
|
|
894
847
|
background: var(--puck-color-azure-12);
|
|
895
848
|
cursor: pointer;
|
|
896
849
|
}
|
|
897
|
-
._Table-
|
|
850
|
+
._Table-placeholder_1w0os_94 {
|
|
898
851
|
align-items: center;
|
|
899
852
|
color: var(--puck-color-grey-06);
|
|
900
853
|
justify-content: center;
|
|
@@ -904,12 +857,9 @@ p {
|
|
|
904
857
|
width: 100%;
|
|
905
858
|
height: 100%;
|
|
906
859
|
}
|
|
907
|
-
._Table-
|
|
860
|
+
._Table-loader_1w0os_105 {
|
|
908
861
|
padding: 16px 24px;
|
|
909
862
|
}
|
|
910
|
-
._TableRow--highlightRow_1bbu5_113 {
|
|
911
|
-
background-color: var(--puck-color-grey-12);
|
|
912
|
-
}
|
|
913
863
|
|
|
914
864
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css/#css-module-data */
|
|
915
865
|
._VerticalSpace_1tjaw_1 {
|
|
@@ -943,41 +893,6 @@ p {
|
|
|
943
893
|
padding-top: 128px;
|
|
944
894
|
}
|
|
945
895
|
|
|
946
|
-
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Viewport/styles.module.css/#css-module-data */
|
|
947
|
-
._Viewport_1vvhm_3 {
|
|
948
|
-
}
|
|
949
|
-
._Viewport--standard_1vvhm_6,
|
|
950
|
-
._Viewport--inline_1vvhm_7._Viewport--standard_1vvhm_6 {
|
|
951
|
-
display: none;
|
|
952
|
-
}
|
|
953
|
-
._Viewport--narrow_1vvhm_11 {
|
|
954
|
-
display: block;
|
|
955
|
-
}
|
|
956
|
-
._Viewport--inline_1vvhm_7._Viewport--narrow_1vvhm_11 {
|
|
957
|
-
display: inline;
|
|
958
|
-
}
|
|
959
|
-
._Viewport--flex_1vvhm_19._Viewport--narrow_1vvhm_11 {
|
|
960
|
-
display: flex;
|
|
961
|
-
}
|
|
962
|
-
@media (min-width: 768px) {
|
|
963
|
-
._Viewport--narrow_1vvhm_11,
|
|
964
|
-
._Viewport--inline_1vvhm_7._Viewport--narrow_1vvhm_11,
|
|
965
|
-
._Viewport--flex_1vvhm_19._Viewport--narrow_1vvhm_11 {
|
|
966
|
-
display: none;
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
@media (min-width: 768px) {
|
|
970
|
-
._Viewport--standard_1vvhm_6 {
|
|
971
|
-
display: block;
|
|
972
|
-
}
|
|
973
|
-
._Viewport--inline_1vvhm_7._Viewport--standard_1vvhm_6 {
|
|
974
|
-
display: inline;
|
|
975
|
-
}
|
|
976
|
-
._Viewport--flex_1vvhm_19._Viewport--standard_1vvhm_6 {
|
|
977
|
-
display: flex;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
|
|
981
896
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css/#css-module-data */
|
|
982
897
|
._Chat_150yz_1 {
|
|
983
898
|
--fade-size: 32px;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,115 +1,22 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UIMessage, ChatStatus } from 'ai';
|
|
3
|
+
import { PuckProviderMetadata, PuckDataParts } from '@puckeditor/platform-types';
|
|
4
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
5
|
|
|
3
|
-
type
|
|
4
|
-
type JSONSchema = {
|
|
5
|
-
[k: string]: unknown;
|
|
6
|
-
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
7
|
-
$id?: string;
|
|
8
|
-
$anchor?: string;
|
|
9
|
-
$ref?: string;
|
|
10
|
-
$dynamicRef?: string;
|
|
11
|
-
$dynamicAnchor?: string;
|
|
12
|
-
$vocabulary?: Record<string, boolean>;
|
|
13
|
-
$comment?: string;
|
|
14
|
-
$defs?: Record<string, JSONSchema>;
|
|
15
|
-
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
16
|
-
additionalItems?: _JSONSchema;
|
|
17
|
-
unevaluatedItems?: _JSONSchema;
|
|
18
|
-
prefixItems?: _JSONSchema[];
|
|
19
|
-
items?: _JSONSchema | _JSONSchema[];
|
|
20
|
-
contains?: _JSONSchema;
|
|
21
|
-
additionalProperties?: _JSONSchema;
|
|
22
|
-
unevaluatedProperties?: _JSONSchema;
|
|
23
|
-
properties?: Record<string, _JSONSchema>;
|
|
24
|
-
patternProperties?: Record<string, _JSONSchema>;
|
|
25
|
-
dependentSchemas?: Record<string, _JSONSchema>;
|
|
26
|
-
propertyNames?: _JSONSchema;
|
|
27
|
-
if?: _JSONSchema;
|
|
28
|
-
then?: _JSONSchema;
|
|
29
|
-
else?: _JSONSchema;
|
|
30
|
-
allOf?: JSONSchema[];
|
|
31
|
-
anyOf?: JSONSchema[];
|
|
32
|
-
oneOf?: JSONSchema[];
|
|
33
|
-
not?: _JSONSchema;
|
|
34
|
-
multipleOf?: number;
|
|
35
|
-
maximum?: number;
|
|
36
|
-
exclusiveMaximum?: number | boolean;
|
|
37
|
-
minimum?: number;
|
|
38
|
-
exclusiveMinimum?: number | boolean;
|
|
39
|
-
maxLength?: number;
|
|
40
|
-
minLength?: number;
|
|
41
|
-
pattern?: string;
|
|
42
|
-
maxItems?: number;
|
|
43
|
-
minItems?: number;
|
|
44
|
-
uniqueItems?: boolean;
|
|
45
|
-
maxContains?: number;
|
|
46
|
-
minContains?: number;
|
|
47
|
-
maxProperties?: number;
|
|
48
|
-
minProperties?: number;
|
|
49
|
-
required?: string[];
|
|
50
|
-
dependentRequired?: Record<string, string[]>;
|
|
51
|
-
enum?: Array<string | number | boolean | null>;
|
|
52
|
-
const?: string | number | boolean | null;
|
|
53
|
-
id?: string;
|
|
54
|
-
title?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
default?: unknown;
|
|
57
|
-
deprecated?: boolean;
|
|
58
|
-
readOnly?: boolean;
|
|
59
|
-
writeOnly?: boolean;
|
|
60
|
-
nullable?: boolean;
|
|
61
|
-
examples?: unknown[];
|
|
62
|
-
format?: string;
|
|
63
|
-
contentMediaType?: string;
|
|
64
|
-
contentEncoding?: string;
|
|
65
|
-
contentSchema?: JSONSchema;
|
|
66
|
-
_prefault?: unknown;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
type ComponentAiParams = {
|
|
70
|
-
instructions?: string;
|
|
71
|
-
schema?: JSONSchema;
|
|
72
|
-
defaultZone?: { allow?: string[]; disallow?: string[]; disabled?: boolean };
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type FieldAiParams = {
|
|
76
|
-
instructions?: string;
|
|
77
|
-
exclude?: boolean;
|
|
78
|
-
required?: boolean;
|
|
79
|
-
stream?: boolean;
|
|
80
|
-
schema?: JSONSchema;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
declare module "@measured/puck" {
|
|
84
|
-
export interface ComponentMetadata {
|
|
85
|
-
ai?: ComponentAiParams;
|
|
86
|
-
}
|
|
6
|
+
type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
|
|
87
7
|
|
|
88
|
-
|
|
89
|
-
ai?: ComponentAiParams;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface FieldMetadata {
|
|
93
|
-
ai?: FieldAiParams;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface BaseField {
|
|
97
|
-
ai?: FieldAiParams;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
type AiPluginProps = {
|
|
8
|
+
type ChatProps$1 = {
|
|
102
9
|
host?: string;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
10
|
+
onSubmit?: (prompt: string) => void;
|
|
11
|
+
examplePrompts?: {
|
|
12
|
+
href: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
chatId?: string;
|
|
16
|
+
initialMessages?: PuckMessage[];
|
|
110
17
|
};
|
|
111
18
|
|
|
112
|
-
declare function
|
|
19
|
+
declare function createAIPlugin(opts?: ChatProps$1): {
|
|
113
20
|
label: string;
|
|
114
21
|
name: string;
|
|
115
22
|
render: () => react_jsx_runtime.JSX.Element;
|
|
@@ -117,4 +24,17 @@ declare function createAiPlugin(opts?: AiPluginProps): {
|
|
|
117
24
|
mobilePanelHeight: "min-content";
|
|
118
25
|
};
|
|
119
26
|
|
|
120
|
-
|
|
27
|
+
type ChatProps = {
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
examplePrompts?: ReactNode;
|
|
30
|
+
handleSubmit?: (prompt: string) => void;
|
|
31
|
+
hideInput?: boolean;
|
|
32
|
+
inputRef?: RefObject<HTMLTextAreaElement | null>;
|
|
33
|
+
status?: ChatStatus;
|
|
34
|
+
messages?: PuckMessage[];
|
|
35
|
+
error?: string;
|
|
36
|
+
handleRetry?: () => void;
|
|
37
|
+
};
|
|
38
|
+
declare function ChatBody({ children, examplePrompts, handleSubmit, hideInput, inputRef, messages, status, error, handleRetry, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { ChatBody, createAIPlugin as default };
|