@canvas-components/print-design-plugin 0.1.7 → 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.
package/dist/react.css CHANGED
@@ -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
+ }
package/dist/react.d.cts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as _canvas_components_print_design from '@canvas-components/print-design';
2
+ import { PrintDesignAgentApi } from '@canvas-components/print-design';
2
3
  import { P as PrintDesignNativePlugin } from './model-BwhSanYM.cjs';
3
4
  import * as _canvas_components_react_print_design from '@canvas-components/react-print-design';
4
5
  import { PrintDesignComponentFactory, PrintDesignComponentMenuItem, PrintDesignPropertySection, PrintDesignComponentContextMenu, PrintDesignToolRegistry, PrintDesignComponentFactoryRegistry, PrintDesignPropertySectionRegistry } from '@canvas-components/react-print-design';
6
+ import * as react from 'react';
5
7
  import '@canvas-components/barcode';
6
8
  import '@canvas-components/qrcode';
7
9
 
@@ -22,6 +24,102 @@ interface PrintDesignPluginMenuGroup {
22
24
  })[];
23
25
  }
24
26
 
27
+ /** 浏览器直连的模型配置。 */
28
+ interface PrintDesignAiChatConfig {
29
+ baseUrl: string;
30
+ key: string;
31
+ model: string;
32
+ /** 默认不传;显式选择时传给支持 reasoning_effort 的模型服务。 */
33
+ reasoningEffort?: PrintDesignAiChatReasoningEffort;
34
+ /** 本次发送时的画布选区快照,不写入连接配置。 */
35
+ selection?: PrintDesignAiChatSelection;
36
+ panelWidths?: PrintDesignAiChatPanelWidths;
37
+ }
38
+ /** OpenAI 兼容请求中的思考程度。 */
39
+ type PrintDesignAiChatReasoningEffort = "low" | "medium" | "high";
40
+ /** 用户发送消息时选中的页面及元素摘要。 */
41
+ interface PrintDesignAiChatSelection {
42
+ pageId: string;
43
+ pageName: string;
44
+ elements: Array<{
45
+ id: string;
46
+ type: string;
47
+ label: string;
48
+ preview?: string;
49
+ }>;
50
+ }
51
+ /** 一个独立的模型连接,Base URL、密钥和模型随连接保存。 */
52
+ interface PrintDesignAiChatProfile {
53
+ id: string;
54
+ name: string;
55
+ baseUrl: string;
56
+ key: string;
57
+ model: string;
58
+ reasoningEffort?: PrintDesignAiChatReasoningEffort;
59
+ /** 从当前连接获取的模型列表,与连接配置一起加密保存。 */
60
+ models?: string[];
61
+ }
62
+ /** 多连接配置;panelWidths 用于兼容旧版单连接存储。 */
63
+ interface PrintDesignAiChatSettings {
64
+ profiles: PrintDesignAiChatProfile[];
65
+ activeProfileId: string;
66
+ panelWidths?: PrintDesignAiChatPanelWidths;
67
+ }
68
+ /** AI 右侧面板的宽度约束,单位为 CSS 像素。 */
69
+ interface PrintDesignAiChatPanelWidths {
70
+ min: number;
71
+ max: number;
72
+ current: number;
73
+ }
74
+ /** 宿主可替换模型请求实现,以接入其他浏览器端模型。 */
75
+ interface PrintDesignAiChatProvider {
76
+ listModels(config: Pick<PrintDesignAiChatConfig, "baseUrl" | "key">, signal?: AbortSignal): Promise<string[]>;
77
+ complete(config: PrintDesignAiChatConfig, messages: readonly PrintDesignAiChatMessage[], signal?: AbortSignal, agentApi?: PrintDesignAgentApi): Promise<string>;
78
+ /** 可选的增量回复;未实现时仍使用 complete。 */
79
+ stream?(config: PrintDesignAiChatConfig, messages: readonly PrintDesignAiChatMessage[], onDelta: (delta: PrintDesignAiChatDelta) => void, signal?: AbortSignal, agentApi?: PrintDesignAgentApi): Promise<PrintDesignAiChatResult>;
80
+ }
81
+ /** 一段增量文本;思考与最终回复分别更新。 */
82
+ interface PrintDesignAiChatDelta {
83
+ content?: string;
84
+ reasoning?: string;
85
+ }
86
+ /** 一次流式回复完成后的文本。 */
87
+ interface PrintDesignAiChatResult {
88
+ content: string;
89
+ reasoning?: string;
90
+ }
91
+ /** 发送给模型的对话消息。 */
92
+ interface PrintDesignAiChatMessage {
93
+ role: "user" | "assistant";
94
+ content: string;
95
+ /** 模型返回的思考内容;使用工具时可回传给兼容提供方。 */
96
+ reasoning?: string;
97
+ }
98
+ /** AI 对话插件的宿主选项。 */
99
+ interface PrintDesignAiChatOptions {
100
+ /** 首次打开时的默认值;内置共享密钥仍会暴露给浏览器用户。 */
101
+ defaultConfig?: Partial<PrintDesignAiChatConfig>;
102
+ provider?: PrintDesignAiChatProvider;
103
+ /** 初次打开时的宽度配置,单位为 CSS 像素。 */
104
+ panelWidths?: Partial<PrintDesignAiChatPanelWidths>;
105
+ }
106
+ /** 编辑器向右侧面板传递的运行时能力。 */
107
+ interface PrintDesignAiChatPanelContext {
108
+ onClose(): void;
109
+ panelWidths: PrintDesignAiChatPanelWidths;
110
+ onPanelWidthsChange(value: PrintDesignAiChatPanelWidths): void;
111
+ agentApi: PrintDesignAgentApi;
112
+ selection?: PrintDesignAiChatSelection;
113
+ }
114
+
115
+ /** 浏览器端 AI 对话插件,由宿主独立装配到设计器右侧。 */
116
+ declare function createPrintDesignAiChatPlugin(options?: PrintDesignAiChatOptions): {
117
+ initialPanelWidths: PrintDesignAiChatPanelWidths;
118
+ render: (context: PrintDesignAiChatPanelContext) => react.FunctionComponentElement<PrintDesignAiChatPanelContext & {
119
+ options: PrintDesignAiChatOptions;
120
+ }>;
121
+ };
122
+
25
123
  /** 内置组件逐个注册,顺序与原生注册项一致。 */
26
124
  declare const builtinReactComponentPlugins: readonly PrintDesignReactPlugin[];
27
125
  /** 统一插件包提供设计器及独立打印端所需的能力。 */
@@ -76,4 +174,4 @@ declare const builtinPrintDesignPlugins: Readonly<{
76
174
  componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
77
175
  }>;
78
176
 
79
- export { builtinPrintDesignPlugins, builtinReactComponentPlugins };
177
+ export { type PrintDesignAiChatConfig, type PrintDesignAiChatMessage, type PrintDesignAiChatOptions, type PrintDesignAiChatPanelWidths, type PrintDesignAiChatProfile, type PrintDesignAiChatProvider, type PrintDesignAiChatReasoningEffort, type PrintDesignAiChatSelection, type PrintDesignAiChatSettings, builtinPrintDesignPlugins, builtinReactComponentPlugins, createPrintDesignAiChatPlugin };
package/dist/react.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as _canvas_components_print_design from '@canvas-components/print-design';
2
+ import { PrintDesignAgentApi } from '@canvas-components/print-design';
2
3
  import { P as PrintDesignNativePlugin } from './model-BwhSanYM.js';
3
4
  import * as _canvas_components_react_print_design from '@canvas-components/react-print-design';
4
5
  import { PrintDesignComponentFactory, PrintDesignComponentMenuItem, PrintDesignPropertySection, PrintDesignComponentContextMenu, PrintDesignToolRegistry, PrintDesignComponentFactoryRegistry, PrintDesignPropertySectionRegistry } from '@canvas-components/react-print-design';
6
+ import * as react from 'react';
5
7
  import '@canvas-components/barcode';
6
8
  import '@canvas-components/qrcode';
7
9
 
@@ -22,6 +24,102 @@ interface PrintDesignPluginMenuGroup {
22
24
  })[];
23
25
  }
24
26
 
27
+ /** 浏览器直连的模型配置。 */
28
+ interface PrintDesignAiChatConfig {
29
+ baseUrl: string;
30
+ key: string;
31
+ model: string;
32
+ /** 默认不传;显式选择时传给支持 reasoning_effort 的模型服务。 */
33
+ reasoningEffort?: PrintDesignAiChatReasoningEffort;
34
+ /** 本次发送时的画布选区快照,不写入连接配置。 */
35
+ selection?: PrintDesignAiChatSelection;
36
+ panelWidths?: PrintDesignAiChatPanelWidths;
37
+ }
38
+ /** OpenAI 兼容请求中的思考程度。 */
39
+ type PrintDesignAiChatReasoningEffort = "low" | "medium" | "high";
40
+ /** 用户发送消息时选中的页面及元素摘要。 */
41
+ interface PrintDesignAiChatSelection {
42
+ pageId: string;
43
+ pageName: string;
44
+ elements: Array<{
45
+ id: string;
46
+ type: string;
47
+ label: string;
48
+ preview?: string;
49
+ }>;
50
+ }
51
+ /** 一个独立的模型连接,Base URL、密钥和模型随连接保存。 */
52
+ interface PrintDesignAiChatProfile {
53
+ id: string;
54
+ name: string;
55
+ baseUrl: string;
56
+ key: string;
57
+ model: string;
58
+ reasoningEffort?: PrintDesignAiChatReasoningEffort;
59
+ /** 从当前连接获取的模型列表,与连接配置一起加密保存。 */
60
+ models?: string[];
61
+ }
62
+ /** 多连接配置;panelWidths 用于兼容旧版单连接存储。 */
63
+ interface PrintDesignAiChatSettings {
64
+ profiles: PrintDesignAiChatProfile[];
65
+ activeProfileId: string;
66
+ panelWidths?: PrintDesignAiChatPanelWidths;
67
+ }
68
+ /** AI 右侧面板的宽度约束,单位为 CSS 像素。 */
69
+ interface PrintDesignAiChatPanelWidths {
70
+ min: number;
71
+ max: number;
72
+ current: number;
73
+ }
74
+ /** 宿主可替换模型请求实现,以接入其他浏览器端模型。 */
75
+ interface PrintDesignAiChatProvider {
76
+ listModels(config: Pick<PrintDesignAiChatConfig, "baseUrl" | "key">, signal?: AbortSignal): Promise<string[]>;
77
+ complete(config: PrintDesignAiChatConfig, messages: readonly PrintDesignAiChatMessage[], signal?: AbortSignal, agentApi?: PrintDesignAgentApi): Promise<string>;
78
+ /** 可选的增量回复;未实现时仍使用 complete。 */
79
+ stream?(config: PrintDesignAiChatConfig, messages: readonly PrintDesignAiChatMessage[], onDelta: (delta: PrintDesignAiChatDelta) => void, signal?: AbortSignal, agentApi?: PrintDesignAgentApi): Promise<PrintDesignAiChatResult>;
80
+ }
81
+ /** 一段增量文本;思考与最终回复分别更新。 */
82
+ interface PrintDesignAiChatDelta {
83
+ content?: string;
84
+ reasoning?: string;
85
+ }
86
+ /** 一次流式回复完成后的文本。 */
87
+ interface PrintDesignAiChatResult {
88
+ content: string;
89
+ reasoning?: string;
90
+ }
91
+ /** 发送给模型的对话消息。 */
92
+ interface PrintDesignAiChatMessage {
93
+ role: "user" | "assistant";
94
+ content: string;
95
+ /** 模型返回的思考内容;使用工具时可回传给兼容提供方。 */
96
+ reasoning?: string;
97
+ }
98
+ /** AI 对话插件的宿主选项。 */
99
+ interface PrintDesignAiChatOptions {
100
+ /** 首次打开时的默认值;内置共享密钥仍会暴露给浏览器用户。 */
101
+ defaultConfig?: Partial<PrintDesignAiChatConfig>;
102
+ provider?: PrintDesignAiChatProvider;
103
+ /** 初次打开时的宽度配置,单位为 CSS 像素。 */
104
+ panelWidths?: Partial<PrintDesignAiChatPanelWidths>;
105
+ }
106
+ /** 编辑器向右侧面板传递的运行时能力。 */
107
+ interface PrintDesignAiChatPanelContext {
108
+ onClose(): void;
109
+ panelWidths: PrintDesignAiChatPanelWidths;
110
+ onPanelWidthsChange(value: PrintDesignAiChatPanelWidths): void;
111
+ agentApi: PrintDesignAgentApi;
112
+ selection?: PrintDesignAiChatSelection;
113
+ }
114
+
115
+ /** 浏览器端 AI 对话插件,由宿主独立装配到设计器右侧。 */
116
+ declare function createPrintDesignAiChatPlugin(options?: PrintDesignAiChatOptions): {
117
+ initialPanelWidths: PrintDesignAiChatPanelWidths;
118
+ render: (context: PrintDesignAiChatPanelContext) => react.FunctionComponentElement<PrintDesignAiChatPanelContext & {
119
+ options: PrintDesignAiChatOptions;
120
+ }>;
121
+ };
122
+
25
123
  /** 内置组件逐个注册,顺序与原生注册项一致。 */
26
124
  declare const builtinReactComponentPlugins: readonly PrintDesignReactPlugin[];
27
125
  /** 统一插件包提供设计器及独立打印端所需的能力。 */
@@ -76,4 +174,4 @@ declare const builtinPrintDesignPlugins: Readonly<{
76
174
  componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
77
175
  }>;
78
176
 
79
- export { builtinPrintDesignPlugins, builtinReactComponentPlugins };
177
+ export { type PrintDesignAiChatConfig, type PrintDesignAiChatMessage, type PrintDesignAiChatOptions, type PrintDesignAiChatPanelWidths, type PrintDesignAiChatProfile, type PrintDesignAiChatProvider, type PrintDesignAiChatReasoningEffort, type PrintDesignAiChatSelection, type PrintDesignAiChatSettings, builtinPrintDesignPlugins, builtinReactComponentPlugins, createPrintDesignAiChatPlugin };