@canvas-components/print-design-plugin 0.1.6 → 0.1.8

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.
@@ -720,3 +720,337 @@
720
720
  .cc-print-design-task-dependency-row > * {
721
721
  min-width: 0;
722
722
  }
723
+
724
+ /* src/ai-chat/style.css */
725
+ .cc-print-design-ai-panel {
726
+ display: flex;
727
+ flex-direction: column;
728
+ width: 100%;
729
+ height: 100%;
730
+ min-width: 0;
731
+ min-height: 0;
732
+ background: var(--pd-surface, #fff);
733
+ color: var(--pd-text, #263244);
734
+ border-left: 1px solid var(--pd-border, #e4e8ef);
735
+ }
736
+ .cc-print-design-ai-header {
737
+ display: flex;
738
+ align-items: center;
739
+ justify-content: space-between;
740
+ box-sizing: border-box;
741
+ height: var(--pd-panel-header-height, 36px);
742
+ flex: 0 0 var(--pd-panel-header-height, 36px);
743
+ padding: 0 12px;
744
+ border-bottom: 1px solid var(--pd-border, #e4e8ef);
745
+ }
746
+ .cc-print-design-ai-header > div {
747
+ display: flex;
748
+ align-items: center;
749
+ gap: 8px;
750
+ }
751
+ .cc-print-design-ai-panel button {
752
+ cursor: pointer;
753
+ font: inherit;
754
+ }
755
+ .cc-print-design-ai-header button,
756
+ .cc-print-design-ai-composer-more {
757
+ border: 0;
758
+ background: transparent;
759
+ color: inherit;
760
+ }
761
+ .cc-print-design-ai-messages {
762
+ flex: 1;
763
+ min-height: 0;
764
+ overflow: auto;
765
+ overscroll-behavior: contain;
766
+ }
767
+ .cc-print-design-ai-message {
768
+ box-sizing: border-box;
769
+ display: flex;
770
+ flex-direction: column;
771
+ align-items: flex-start;
772
+ padding: 9px 12px;
773
+ }
774
+ .cc-print-design-ai-message-user {
775
+ align-items: flex-end;
776
+ }
777
+ .cc-print-design-ai-message > span {
778
+ display: block;
779
+ max-width: 85%;
780
+ margin-bottom: 4px;
781
+ color: var(--pd-muted, #8993a2);
782
+ font-size: 11px;
783
+ overflow: hidden;
784
+ text-overflow: ellipsis;
785
+ white-space: nowrap;
786
+ }
787
+ .cc-print-design-ai-message p {
788
+ margin: 0;
789
+ max-width: min(85%, 680px);
790
+ padding: 10px;
791
+ border-radius: 10px;
792
+ background: var(--pd-hover, #f5f7fa);
793
+ white-space: pre-wrap;
794
+ overflow-wrap: anywhere;
795
+ line-height: 1.5;
796
+ }
797
+ .cc-print-design-ai-message-user p {
798
+ background: var(--pd-selected, #edf4ff);
799
+ }
800
+ .cc-print-design-ai-reasoning {
801
+ box-sizing: border-box;
802
+ width: min(85%, 680px);
803
+ max-width: 100%;
804
+ margin-bottom: 6px;
805
+ border: 1px solid var(--pd-border, #e4e8ef);
806
+ border-radius: 8px;
807
+ background: var(--pd-hover, #f5f7fa);
808
+ }
809
+ .cc-print-design-ai-reasoning summary {
810
+ padding: 7px 10px;
811
+ color: var(--pd-muted, #8993a2);
812
+ cursor: pointer;
813
+ }
814
+ .cc-print-design-ai-reasoning > div {
815
+ max-height: 180px;
816
+ overflow: auto;
817
+ padding: 0 10px 10px;
818
+ font-size: 12px;
819
+ line-height: 1.5;
820
+ white-space: pre-wrap;
821
+ overflow-wrap: anywhere;
822
+ }
823
+ .cc-print-design-ai-message-thinking .cc-print-design-ai-thinking-indicator {
824
+ display: inline-flex;
825
+ align-items: center;
826
+ gap: 8px;
827
+ color: var(--pd-muted, #8993a2);
828
+ }
829
+ .cc-print-design-ai-thinking-dots {
830
+ display: inline-flex;
831
+ align-items: center;
832
+ gap: 3px;
833
+ }
834
+ .cc-print-design-ai-thinking-dots i {
835
+ width: 5px;
836
+ height: 5px;
837
+ border-radius: 50%;
838
+ background: currentColor;
839
+ animation: cc-print-design-ai-thinking 1s ease-in-out infinite;
840
+ }
841
+ .cc-print-design-ai-thinking-dots i:nth-child(2) {
842
+ animation-delay: 0.16s;
843
+ }
844
+ .cc-print-design-ai-thinking-dots i:nth-child(3) {
845
+ animation-delay: 0.32s;
846
+ }
847
+ @keyframes cc-print-design-ai-thinking {
848
+ 0%, 60%, 100% {
849
+ opacity: 0.35;
850
+ transform: translateY(0);
851
+ }
852
+ 30% {
853
+ opacity: 1;
854
+ transform: translateY(-3px);
855
+ }
856
+ }
857
+ @media (prefers-reduced-motion: reduce) {
858
+ .cc-print-design-ai-thinking-dots i {
859
+ animation: none;
860
+ }
861
+ }
862
+ .cc-print-design-ai-settings {
863
+ display: grid;
864
+ gap: 8px;
865
+ padding: 12px;
866
+ border-top: 1px solid var(--pd-border, #e4e8ef);
867
+ max-height: 48%;
868
+ overflow: auto;
869
+ }
870
+ .cc-print-design-ai-settings label {
871
+ display: grid;
872
+ gap: 4px;
873
+ }
874
+ .cc-print-design-ai-composer textarea {
875
+ box-sizing: border-box;
876
+ width: 100%;
877
+ padding: 8px;
878
+ border: 1px solid var(--pd-border, #e4e8ef);
879
+ border-radius: 6px;
880
+ background: var(--pd-surface, #fff);
881
+ color: inherit;
882
+ font: inherit;
883
+ }
884
+ .cc-print-design-ai-settings-actions {
885
+ display: flex;
886
+ justify-content: flex-end;
887
+ gap: 8px;
888
+ }
889
+ .cc-print-design-ai-key-row {
890
+ display: flex;
891
+ align-items: end;
892
+ gap: 8px;
893
+ }
894
+ .cc-print-design-ai-key-row label {
895
+ flex: 1;
896
+ min-width: 0;
897
+ }
898
+ .cc-print-design-ai-key-row button {
899
+ flex: 0 0 auto;
900
+ white-space: nowrap;
901
+ }
902
+ .cc-print-design-ai-width-fields {
903
+ display: grid;
904
+ grid-template-columns: repeat(3, minmax(0, 1fr));
905
+ gap: 6px;
906
+ }
907
+ .cc-print-design-ai-profile-picker {
908
+ display: flex;
909
+ align-items: end;
910
+ gap: 8px;
911
+ }
912
+ .cc-print-design-ai-profile-picker label {
913
+ flex: 1;
914
+ min-width: 0;
915
+ }
916
+ .cc-print-design-ai-profile-picker button {
917
+ height: 34px;
918
+ }
919
+ .cc-print-design-ai-dialog-layout {
920
+ display: flex;
921
+ height: 100%;
922
+ min-height: 0;
923
+ }
924
+ .cc-print-design-ai-dialog-nav {
925
+ display: flex;
926
+ width: 150px;
927
+ flex: 0 0 150px;
928
+ flex-direction: column;
929
+ gap: 4px;
930
+ padding: 14px 8px;
931
+ border-right: 1px solid var(--pd-border, #e4e8ef);
932
+ background: var(--pd-hover, #f5f7fa);
933
+ }
934
+ .cc-print-design-ai-dialog-nav button {
935
+ padding: 10px 12px;
936
+ border: 0;
937
+ border-radius: 6px;
938
+ background: transparent;
939
+ text-align: left;
940
+ cursor: pointer;
941
+ }
942
+ .cc-print-design-ai-dialog-nav button[aria-current=page] {
943
+ background: var(--pd-selected, #edf4ff);
944
+ color: var(--pd-primary, #1677ff);
945
+ }
946
+ .cc-print-design-ai-dialog-content {
947
+ flex: 1;
948
+ min-width: 0;
949
+ min-height: 0;
950
+ overflow: auto;
951
+ }
952
+ .cc-print-design-ai-dialog .cc-print-design-ai-settings {
953
+ max-height: none;
954
+ border-top: 0;
955
+ }
956
+ .cc-print-design-ai-history {
957
+ min-height: 140px;
958
+ max-height: none;
959
+ overflow: auto;
960
+ padding: 8px 0;
961
+ }
962
+ .cc-print-design-ai-history > p {
963
+ color: var(--pd-muted, #8993a2);
964
+ text-align: center;
965
+ }
966
+ .cc-print-design-ai-history-item {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 8px;
970
+ border-bottom: 1px solid var(--pd-border, #e4e8ef);
971
+ }
972
+ .cc-print-design-ai-history-item > button:first-child {
973
+ display: flex;
974
+ flex: 1;
975
+ min-width: 0;
976
+ flex-direction: column;
977
+ align-items: flex-start;
978
+ gap: 4px;
979
+ padding: 9px 10px;
980
+ border: 0;
981
+ background: transparent;
982
+ text-align: left;
983
+ cursor: pointer;
984
+ }
985
+ .cc-print-design-ai-history-item > button:first-child.active {
986
+ color: var(--pd-primary, #1677ff);
987
+ }
988
+ .cc-print-design-ai-history-item span {
989
+ overflow: hidden;
990
+ max-width: 100%;
991
+ text-overflow: ellipsis;
992
+ white-space: nowrap;
993
+ }
994
+ .cc-print-design-ai-history-item small {
995
+ color: var(--pd-muted, #8993a2);
996
+ }
997
+ .cc-print-design-ai-history-delete {
998
+ border: 0;
999
+ background: transparent;
1000
+ color: var(--pd-danger, #dc2626);
1001
+ cursor: pointer;
1002
+ }
1003
+ .cc-print-design-ai-composer {
1004
+ padding: 10px;
1005
+ border-top: 1px solid var(--pd-border, #e4e8ef);
1006
+ }
1007
+ .cc-print-design-ai-selection {
1008
+ min-width: 0;
1009
+ margin-bottom: 8px;
1010
+ color: var(--pd-muted, #8993a2);
1011
+ font-size: 11px;
1012
+ }
1013
+ .cc-print-design-ai-selection-items {
1014
+ display: flex;
1015
+ flex-wrap: wrap;
1016
+ gap: 5px;
1017
+ max-height: 80px;
1018
+ margin-top: 5px;
1019
+ overflow: auto;
1020
+ }
1021
+ .cc-print-design-ai-selection-item {
1022
+ max-width: 100%;
1023
+ }
1024
+ .cc-print-design-ai-selection-item strong,
1025
+ .cc-print-design-ai-selection-item small {
1026
+ overflow: hidden;
1027
+ text-overflow: ellipsis;
1028
+ white-space: nowrap;
1029
+ }
1030
+ .cc-print-design-ai-selection-item strong {
1031
+ flex: 0 0 auto;
1032
+ max-width: 115px;
1033
+ }
1034
+ .cc-print-design-ai-selection-item small {
1035
+ flex: 1 1 auto;
1036
+ min-width: 0;
1037
+ color: var(--pd-muted, #8993a2);
1038
+ }
1039
+ .cc-print-design-ai-composer textarea {
1040
+ resize: vertical;
1041
+ min-height: 70px;
1042
+ }
1043
+ .cc-print-design-ai-composer-tools {
1044
+ display: flex;
1045
+ align-items: center;
1046
+ gap: 8px;
1047
+ margin-top: 6px;
1048
+ }
1049
+ .cc-print-design-ai-composer-tools .canvas-react-select-wrap:first-of-type {
1050
+ flex: 1;
1051
+ min-width: 0;
1052
+ }
1053
+ .cc-print-design-ai-composer-tools .canvas-react-select-wrap:last-child {
1054
+ flex: 0 0 94px;
1055
+ min-width: 0;
1056
+ }