next-ai-editor 0.2.1 → 0.2.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/{AIEditorProvider-CKA2K_g2.js → AIEditorProvider-633ZBZul.js} +89 -60
- package/dist/AIEditorProvider-633ZBZul.js.map +1 -0
- package/dist/{AIEditorProvider-C_zRSAuV.cjs → AIEditorProvider-IjMydA1Y.cjs} +88 -59
- package/dist/AIEditorProvider-IjMydA1Y.cjs.map +1 -0
- package/dist/client/AIEditorProvider.d.ts +1 -0
- package/dist/client/AIEditorProvider.d.ts.map +1 -1
- package/dist/client/components/ChatPanel.d.ts.map +1 -1
- package/dist/client/components/ControlPill.d.ts +1 -1
- package/dist/client/components/ControlPill.d.ts.map +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/next-ai-editor.css +216 -109
- package/package.json +1 -1
- package/dist/AIEditorProvider-CKA2K_g2.js.map +0 -1
- package/dist/AIEditorProvider-C_zRSAuV.cjs.map +0 -1
package/dist/next-ai-editor.css
CHANGED
|
@@ -310,27 +310,21 @@
|
|
|
310
310
|
font-weight: 500;
|
|
311
311
|
}
|
|
312
312
|
.chat-panel {
|
|
313
|
-
|
|
314
|
-
bottom: 5.5rem;
|
|
315
|
-
left: 50%;
|
|
316
|
-
transform: translateX(-50%);
|
|
317
|
-
width: 600px;
|
|
318
|
-
max-width: 90vw;
|
|
313
|
+
width: 100%;
|
|
319
314
|
display: flex;
|
|
320
315
|
flex-direction: column;
|
|
321
316
|
gap: 12px;
|
|
322
|
-
|
|
323
|
-
animation: chatPanelSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
317
|
+
animation: chatPanelFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
324
318
|
}
|
|
325
319
|
|
|
326
|
-
@keyframes
|
|
320
|
+
@keyframes chatPanelFadeIn {
|
|
327
321
|
from {
|
|
328
322
|
opacity: 0;
|
|
329
|
-
transform:
|
|
323
|
+
transform: translateY(8px);
|
|
330
324
|
}
|
|
331
325
|
to {
|
|
332
326
|
opacity: 1;
|
|
333
|
-
transform:
|
|
327
|
+
transform: translateY(0);
|
|
334
328
|
}
|
|
335
329
|
}
|
|
336
330
|
|
|
@@ -340,23 +334,74 @@
|
|
|
340
334
|
}
|
|
341
335
|
|
|
342
336
|
/* Messages */
|
|
337
|
+
.chat-panel-messages-container {
|
|
338
|
+
display: flex;
|
|
339
|
+
flex-direction: column;
|
|
340
|
+
overflow: hidden;
|
|
341
|
+
border-radius: 12px;
|
|
342
|
+
transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.chat-panel.light .chat-panel-messages-container {
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.chat-panel-messages-container.collapsed {
|
|
349
|
+
max-height: 40px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.chat-panel-messages-container.expanded {
|
|
353
|
+
max-height: 450px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.chat-panel-messages-header {
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
justify-content: space-between;
|
|
360
|
+
padding: 8px 4px;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
user-select: none;
|
|
363
|
+
flex-shrink: 0;
|
|
364
|
+
border-radius: 8px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.chat-panel-messages-header:hover {
|
|
368
|
+
background: rgba(0, 0, 0, 0.1);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.chat-panel.light .chat-panel-messages-header:hover {
|
|
372
|
+
background: rgba(0, 0, 0, 0.05);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.chat-panel-messages-title {
|
|
376
|
+
font-size: 12px;
|
|
377
|
+
font-weight: 600;
|
|
378
|
+
color: #a1a1aa;
|
|
379
|
+
text-transform: uppercase;
|
|
380
|
+
letter-spacing: 0.5px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.chat-panel.light .chat-panel-messages-title {
|
|
384
|
+
color: #71717a;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.chat-panel-messages-toggle {
|
|
388
|
+
font-size: 12px;
|
|
389
|
+
color: #71717a;
|
|
390
|
+
transition: transform 0.2s;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.chat-panel-messages-container.collapsed .chat-panel-messages-toggle {
|
|
394
|
+
transform: rotate(-90deg);
|
|
395
|
+
}
|
|
396
|
+
|
|
343
397
|
.chat-panel-messages {
|
|
344
398
|
max-height: 400px;
|
|
345
399
|
overflow-y: auto;
|
|
346
|
-
padding:
|
|
347
|
-
background: rgba(0, 0, 0, 0.15);
|
|
348
|
-
backdrop-filter: blur(40px) saturate(150%);
|
|
349
|
-
-webkit-backdrop-filter: blur(40px) saturate(150%);
|
|
350
|
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
351
|
-
border-radius: 16px;
|
|
352
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
|
400
|
+
padding: 0 14px 14px 14px;
|
|
353
401
|
}
|
|
354
402
|
|
|
355
|
-
.chat-panel.
|
|
356
|
-
|
|
357
|
-
backdrop-filter: blur(40px) saturate(150%);
|
|
358
|
-
-webkit-backdrop-filter: blur(40px) saturate(150%);
|
|
359
|
-
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
403
|
+
.chat-panel-messages-container.collapsed .chat-panel-messages {
|
|
404
|
+
display: none;
|
|
360
405
|
}
|
|
361
406
|
|
|
362
407
|
/* Scrollbar styling */
|
|
@@ -380,29 +425,53 @@
|
|
|
380
425
|
|
|
381
426
|
/* Input area */
|
|
382
427
|
.chat-panel-input {
|
|
383
|
-
padding: 16px
|
|
384
|
-
background: rgba(
|
|
385
|
-
|
|
386
|
-
-
|
|
387
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
388
|
-
border-radius: 16px;
|
|
389
|
-
box-shadow:
|
|
390
|
-
0 8px 32px rgba(0, 0, 0, 0.3),
|
|
391
|
-
inset 0 1px 1px rgba(255, 255, 255, 0.05);
|
|
428
|
+
padding: 14px 16px;
|
|
429
|
+
background: rgba(20, 20, 30, 0.95);
|
|
430
|
+
border: none;
|
|
431
|
+
border-radius: 12px;
|
|
392
432
|
}
|
|
393
433
|
|
|
394
434
|
.chat-panel.light .chat-panel-input {
|
|
395
|
-
background: rgba(255, 255, 255, 0.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
435
|
+
background: rgba(255, 255, 255, 0.95);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Toolbar */
|
|
439
|
+
.chat-panel-toolbar {
|
|
440
|
+
display: flex;
|
|
441
|
+
justify-content: space-between;
|
|
442
|
+
align-items: center;
|
|
443
|
+
margin-top: 10px;
|
|
399
444
|
}
|
|
400
445
|
|
|
401
446
|
/* Tools */
|
|
402
447
|
.chat-panel-tools {
|
|
403
448
|
display: flex;
|
|
404
449
|
gap: 6px;
|
|
405
|
-
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Close button */
|
|
453
|
+
.close-button {
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
justify-content: center;
|
|
457
|
+
width: 28px;
|
|
458
|
+
height: 28px;
|
|
459
|
+
border: none;
|
|
460
|
+
background: transparent;
|
|
461
|
+
border-radius: 6px;
|
|
462
|
+
color: #71717a;
|
|
463
|
+
cursor: pointer;
|
|
464
|
+
transition: all 0.15s;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.close-button:hover {
|
|
468
|
+
background: rgba(0, 0, 0, 0.1);
|
|
469
|
+
color: #a1a1aa;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.chat-panel.light .close-button:hover {
|
|
473
|
+
background: rgba(0, 0, 0, 0.05);
|
|
474
|
+
color: #52525b;
|
|
406
475
|
}
|
|
407
476
|
|
|
408
477
|
.tool-button {
|
|
@@ -549,9 +618,9 @@
|
|
|
549
618
|
min-height: 40px;
|
|
550
619
|
max-height: 200px;
|
|
551
620
|
padding: 10px 14px;
|
|
552
|
-
background:
|
|
553
|
-
border:
|
|
554
|
-
border-radius:
|
|
621
|
+
background: rgba(255, 255, 255, 0.08);
|
|
622
|
+
border: none;
|
|
623
|
+
border-radius: 10px;
|
|
555
624
|
color: #e4e4e7;
|
|
556
625
|
font-size: 14px;
|
|
557
626
|
font-family: system-ui, -apple-system, sans-serif;
|
|
@@ -560,15 +629,17 @@
|
|
|
560
629
|
}
|
|
561
630
|
|
|
562
631
|
.chat-panel.light .message-input {
|
|
563
|
-
background: rgba(0, 0, 0, 0.
|
|
564
|
-
border-color: rgba(99, 102, 241, 0.2);
|
|
632
|
+
background: rgba(0, 0, 0, 0.04);
|
|
565
633
|
color: #18181b;
|
|
566
634
|
}
|
|
567
635
|
|
|
568
636
|
.message-input:focus {
|
|
569
637
|
outline: none;
|
|
570
|
-
|
|
571
|
-
|
|
638
|
+
background: rgba(255, 255, 255, 0.12);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.chat-panel.light .message-input:focus {
|
|
642
|
+
background: rgba(0, 0, 0, 0.06);
|
|
572
643
|
}
|
|
573
644
|
|
|
574
645
|
.message-input:disabled {
|
|
@@ -674,20 +745,20 @@
|
|
|
674
745
|
}
|
|
675
746
|
|
|
676
747
|
.message-content {
|
|
677
|
-
background: #
|
|
748
|
+
background: #3f3f46;
|
|
678
749
|
padding: 10px 14px;
|
|
679
750
|
border-radius: 12px;
|
|
680
751
|
font-size: 14px;
|
|
681
752
|
line-height: 1.5;
|
|
682
|
-
color: #
|
|
753
|
+
color: #ffffff;
|
|
683
754
|
max-width: 85%;
|
|
684
755
|
white-space: pre-wrap;
|
|
685
756
|
word-wrap: break-word;
|
|
686
757
|
}
|
|
687
758
|
|
|
688
759
|
.chat-panel.light .message-content {
|
|
689
|
-
background: #
|
|
690
|
-
color: #
|
|
760
|
+
background: #3f3f46;
|
|
761
|
+
color: #ffffff;
|
|
691
762
|
}
|
|
692
763
|
|
|
693
764
|
.message-user .message-content {
|
|
@@ -696,8 +767,13 @@
|
|
|
696
767
|
}
|
|
697
768
|
|
|
698
769
|
.message-assistant .message-content {
|
|
699
|
-
background: #
|
|
700
|
-
color: #
|
|
770
|
+
background: #3f3f46;
|
|
771
|
+
color: #ffffff;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.chat-panel.light .message-assistant .message-content {
|
|
775
|
+
background: #3f3f46;
|
|
776
|
+
color: #ffffff;
|
|
701
777
|
}
|
|
702
778
|
|
|
703
779
|
/* Tool messages */
|
|
@@ -765,73 +841,40 @@
|
|
|
765
841
|
}
|
|
766
842
|
/* Control Pill - Bottom chat toggle */
|
|
767
843
|
.control-pill {
|
|
768
|
-
position: fixed;
|
|
769
|
-
bottom: 2rem;
|
|
770
|
-
left: 50%;
|
|
771
|
-
transform: translateX(-50%);
|
|
772
|
-
z-index: 100000;
|
|
773
|
-
animation: pillFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
774
844
|
color-scheme: light;
|
|
775
845
|
cursor: pointer;
|
|
776
846
|
user-select: none;
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
@keyframes pillFadeIn {
|
|
780
|
-
from {
|
|
781
|
-
opacity: 0;
|
|
782
|
-
transform: translateX(-50%) translateY(10px);
|
|
783
|
-
}
|
|
784
|
-
to {
|
|
785
|
-
opacity: 1;
|
|
786
|
-
transform: translateX(-50%) translateY(0);
|
|
787
|
-
}
|
|
847
|
+
flex-shrink: 0;
|
|
788
848
|
}
|
|
789
849
|
|
|
790
850
|
.control-pill-inner {
|
|
791
851
|
display: flex;
|
|
792
852
|
align-items: center;
|
|
793
|
-
gap: 0.
|
|
794
|
-
padding: 0.
|
|
795
|
-
background:
|
|
796
|
-
145deg,
|
|
797
|
-
rgba(255, 255, 255, 0.98) 0%,
|
|
798
|
-
rgba(252, 252, 254, 0.96) 50%,
|
|
799
|
-
rgba(250, 250, 253, 0.95) 100%
|
|
800
|
-
);
|
|
801
|
-
backdrop-filter: blur(40px) saturate(200%);
|
|
802
|
-
-webkit-backdrop-filter: blur(40px) saturate(200%);
|
|
853
|
+
gap: 0.625rem;
|
|
854
|
+
padding: 0.625rem 1.25rem;
|
|
855
|
+
background: #ffffff;
|
|
803
856
|
border-radius: 50px;
|
|
804
|
-
border:
|
|
805
|
-
box-shadow:
|
|
806
|
-
0 20px 60px rgba(99, 102, 241, 0.25),
|
|
807
|
-
0 10px 30px rgba(0, 0, 0, 0.15),
|
|
808
|
-
0 5px 15px rgba(0, 0, 0, 0.08),
|
|
809
|
-
inset 0 2px 4px rgba(255, 255, 255, 0.9),
|
|
810
|
-
inset 0 -2px 4px rgba(99, 102, 241, 0.05);
|
|
857
|
+
border: none;
|
|
858
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
811
859
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
812
860
|
}
|
|
813
861
|
|
|
814
862
|
.control-pill:hover .control-pill-inner {
|
|
815
|
-
box-shadow:
|
|
816
|
-
|
|
817
|
-
0 12px 35px rgba(0, 0, 0, 0.18),
|
|
818
|
-
0 6px 18px rgba(0, 0, 0, 0.1),
|
|
819
|
-
inset 0 2px 4px rgba(255, 255, 255, 0.9),
|
|
820
|
-
inset 0 -2px 4px rgba(99, 102, 241, 0.08);
|
|
821
|
-
transform: translateY(-2px);
|
|
863
|
+
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
|
|
864
|
+
transform: translateY(-1px);
|
|
822
865
|
}
|
|
823
866
|
|
|
824
867
|
.control-pill:active .control-pill-inner {
|
|
825
868
|
transform: translateY(0);
|
|
869
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
826
870
|
}
|
|
827
871
|
|
|
828
872
|
.pill-icon {
|
|
829
|
-
|
|
830
|
-
line-height: 1;
|
|
873
|
+
color: #6366f1;
|
|
831
874
|
}
|
|
832
875
|
|
|
833
876
|
.pill-label {
|
|
834
|
-
font-size: 0.
|
|
877
|
+
font-size: 0.875rem;
|
|
835
878
|
font-weight: 600;
|
|
836
879
|
color: #4f46e5;
|
|
837
880
|
line-height: 1;
|
|
@@ -860,21 +903,85 @@
|
|
|
860
903
|
}
|
|
861
904
|
|
|
862
905
|
.control-pill-hint {
|
|
863
|
-
|
|
864
|
-
text-align: center;
|
|
865
|
-
font-size: 0.75rem;
|
|
866
|
-
color: #9ca3af;
|
|
867
|
-
opacity: 0.8;
|
|
906
|
+
display: none;
|
|
868
907
|
}
|
|
908
|
+
/* Editor Container - unified wrapper for chat and pill */
|
|
909
|
+
.editor-container {
|
|
910
|
+
position: fixed;
|
|
911
|
+
bottom: 2rem;
|
|
912
|
+
left: 50%;
|
|
913
|
+
transform: translateX(-50%);
|
|
914
|
+
z-index: 100000;
|
|
915
|
+
display: flex;
|
|
916
|
+
flex-direction: column;
|
|
917
|
+
align-items: center;
|
|
918
|
+
gap: 12px;
|
|
919
|
+
width: auto;
|
|
920
|
+
max-width: 90vw;
|
|
869
921
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
border
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
922
|
+
/* Translucent background */
|
|
923
|
+
background: rgba(0, 0, 0, 0.4);
|
|
924
|
+
backdrop-filter: blur(40px) saturate(150%);
|
|
925
|
+
-webkit-backdrop-filter: blur(40px) saturate(150%);
|
|
926
|
+
border: none;
|
|
927
|
+
box-shadow:
|
|
928
|
+
0 20px 60px rgba(0, 0, 0, 0.4),
|
|
929
|
+
0 10px 30px rgba(0, 0, 0, 0.2);
|
|
930
|
+
|
|
931
|
+
/* Smooth transitions */
|
|
932
|
+
transition:
|
|
933
|
+
width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
|
|
934
|
+
padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
|
|
935
|
+
border-radius 0.35s cubic-bezier(0.16, 1, 0.3, 1),
|
|
936
|
+
gap 0.35s cubic-bezier(0.16, 1, 0.3, 1),
|
|
937
|
+
box-shadow 0.2s ease;
|
|
938
|
+
|
|
939
|
+
/* Animation for appearing */
|
|
940
|
+
animation: containerFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.editor-container.light {
|
|
944
|
+
background: rgba(255, 255, 255, 0.65);
|
|
945
|
+
border: none;
|
|
946
|
+
box-shadow:
|
|
947
|
+
0 20px 60px rgba(0, 0, 0, 0.12),
|
|
948
|
+
0 10px 30px rgba(0, 0, 0, 0.06);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/* Collapsed state - just the pill */
|
|
952
|
+
.editor-container.collapsed {
|
|
953
|
+
padding: 6px;
|
|
954
|
+
border-radius: 50px;
|
|
955
|
+
gap: 0;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/* Expanded state - pill + chat */
|
|
959
|
+
.editor-container.expanded {
|
|
960
|
+
width: 624px;
|
|
961
|
+
padding: 16px;
|
|
962
|
+
border-radius: 20px;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/* Hover effect on collapsed state */
|
|
966
|
+
.editor-container.collapsed:hover {
|
|
967
|
+
box-shadow:
|
|
968
|
+
0 24px 70px rgba(99, 102, 241, 0.25),
|
|
969
|
+
0 12px 35px rgba(0, 0, 0, 0.25);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.editor-container.light.collapsed:hover {
|
|
973
|
+
box-shadow:
|
|
974
|
+
0 24px 70px rgba(99, 102, 241, 0.2),
|
|
975
|
+
0 12px 35px rgba(0, 0, 0, 0.1);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
@keyframes containerFadeIn {
|
|
979
|
+
from {
|
|
980
|
+
opacity: 0;
|
|
981
|
+
transform: translateX(-50%) translateY(10px);
|
|
982
|
+
}
|
|
983
|
+
to {
|
|
984
|
+
opacity: 1;
|
|
985
|
+
transform: translateX(-50%) translateY(0);
|
|
986
|
+
}
|
|
880
987
|
}
|
package/package.json
CHANGED