@freecallai/pro 0.0.4 → 0.0.6

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.
Files changed (94) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +23 -23
  3. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang--MPtqZY_.js +193 -0
  4. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DIIFWISD.js +4995 -0
  5. package/dist/KnowledgeArea-CEX1esVZ.js +4 -0
  6. package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-Bg1e7xYT.js +1653 -0
  7. package/dist/ToolForm-Ch1YRmMw.js +196 -0
  8. package/dist/agent-prompt-editor/index.js +917 -0
  9. package/dist/agent-prompt-editor/legacy-converter/index.js +490 -0
  10. package/dist/{choice-C1SxozNA.js → choice-2dbddjJU.js} +1 -1
  11. package/dist/edition-info/index.js +1 -1
  12. package/dist/filters/index.js +1 -1
  13. package/dist/{guard-CXpVx8UR.js → guard-Cr_ny-sR.js} +226 -213
  14. package/dist/{index-B8jg37Wj.js → index-5FRWdHnd.js} +1 -1
  15. package/dist/index-7x1OTv0m.js +98 -0
  16. package/dist/{index-CM0MN2DT.js → index-BBxrpF3v.js} +1 -1
  17. package/dist/index-CEjD03Kk.js +5 -0
  18. package/dist/{index-UjI4WA5F.js → index-CK_CrdQW.js} +1 -1
  19. package/dist/index-Ck8RYpuE.js +816 -0
  20. package/dist/{index-lNhA3N9x.js → index-DBQsQ1ZK.js} +1 -0
  21. package/dist/{index-BqXNMfLG.js → index-DiaPY8Db.js} +2 -2
  22. package/dist/{index-bSNw0XAf.js → index-DmdrsEvk.js} +1 -1
  23. package/dist/index-DnmCPdCI.js +168 -0
  24. package/dist/{index-Cy4DqT8R.js → index-DwDYy2lj.js} +1 -1
  25. package/dist/{index-CZc2Gyjb.js → index-aic1yCBs.js} +1 -1
  26. package/dist/index-sWjZ9xuV.js +5 -0
  27. package/dist/index.js +13 -13
  28. package/dist/{inline-Zj7Hqg-_.js → inline-8aNfINLF.js} +1 -1
  29. package/dist/knowledge-type-picker/index.js +1 -1
  30. package/dist/{knowledge-DaTnF2IW.js → knowledge-y2j0ijgx.js} +1 -1
  31. package/dist/media-id-b2dgniSy.js +15 -0
  32. package/dist/{media-migration-C2QLMSpd.js → media-migration-Dy_rbdkK.js} +1 -1
  33. package/dist/media-policy-BwKjZPWt.js +158 -0
  34. package/dist/{media-upload-D9MYBbLg.js → media-upload-BetGuTLJ.js} +1 -1
  35. package/dist/model-DvukseoR.js +146 -0
  36. package/dist/navigation/index.js +1 -1
  37. package/dist/rich-text/index.js +75 -73
  38. package/dist/rich-text/legacy-converter/index.js +822 -799
  39. package/dist/style.css +1 -1
  40. package/dist/switcher/index.js +1 -1
  41. package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +550 -0
  42. package/dist/types/agent-prompt-editor/agent-size-chart.d.ts +3 -0
  43. package/dist/types/agent-prompt-editor/document-adapter.d.ts +3 -0
  44. package/dist/types/agent-prompt-editor/index.d.ts +6 -0
  45. package/dist/types/agent-prompt-editor/legacy-converter-index.d.ts +2 -0
  46. package/dist/types/agent-prompt-editor/legacy-converter.d.ts +26 -0
  47. package/dist/types/agent-prompt-editor/model.d.ts +21 -0
  48. package/dist/types/agent-prompt-editor/types.d.ts +56 -0
  49. package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +1 -3
  50. package/dist/types/edition-info/presets.d.ts +8 -0
  51. package/dist/types/edition-info/types.d.ts +1 -0
  52. package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
  53. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
  54. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
  55. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
  56. package/dist/types/index.d.ts +4 -1
  57. package/dist/types/navigation/FkpNavigation.vue.d.ts +20 -29
  58. package/dist/types/navigation/NavigationButton.vue.d.ts +26 -0
  59. package/dist/types/navigation/NavigationGroup.vue.d.ts +45 -0
  60. package/dist/types/navigation/NavigationIcon.vue.d.ts +28 -0
  61. package/dist/types/navigation/NavigationNodes.vue.d.ts +40 -0
  62. package/dist/types/navigation/index.d.ts +1 -1
  63. package/dist/types/navigation/types.d.ts +43 -5
  64. package/dist/types/navigation/use-navigation-tree.d.ts +13 -0
  65. package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -9
  66. package/dist/types/rich-text/config/descriptor.d.ts +1 -0
  67. package/dist/types/rich-text/config/resolve.d.ts +1 -1
  68. package/dist/types/rich-text/index.d.ts +4 -1
  69. package/dist/types/rich-text/knowledge-document-adapter.d.ts +2 -0
  70. package/dist/types/rich-text/model/question-text.d.ts +1 -1
  71. package/dist/types/rich-text/plugins/registry.d.ts +2 -1
  72. package/dist/types/rich-text/public/types.d.ts +16 -0
  73. package/dist/types/rich-text/runtime/document-adapter.d.ts +9 -0
  74. package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +9 -3
  75. package/dist/types/rich-text/runtime/media-sources.d.ts +7 -0
  76. package/dist/types/rich-text/runtime/media-upload-session.d.ts +2 -0
  77. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +3 -3
  78. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +18 -3
  79. package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +190 -0
  80. package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
  81. package/dist/types/rich-text/ui/token-renderer.d.ts +3 -0
  82. package/dist/types/rich-text/ui/useMediaHint.d.ts +6 -0
  83. package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
  84. package/dist/types-PvYB5e85.js +14 -0
  85. package/package.json +13 -5
  86. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-DYwu7oQs.js +0 -187
  87. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js +0 -4885
  88. package/dist/KnowledgeArea-BH-_uF6R.js +0 -1438
  89. package/dist/ToolForm-C6XW31Y7.js +0 -185
  90. package/dist/index-CS2xQQ8W.js +0 -168
  91. package/dist/index-D0bJAQSN.js +0 -327
  92. package/dist/index-DAZ1ulyA.js +0 -5
  93. package/dist/index-DCmHHi07.js +0 -71
  94. package/dist/index-F7lDP1lI.js +0 -5
@@ -1,10 +1,17 @@
1
1
  import { JSONContent } from '@tiptap/core';
2
+ import { CapabilityDescriptor } from '../config/descriptor';
3
+ import { CapabilityModule } from '../plugins/operations';
4
+ import { MediaSourceOptions } from '../runtime/media-sources';
2
5
  export type KnowledgeType = 'normal' | 'reasoning' | 'agent';
3
6
  export interface AddKnowledgeSceneRequest {
4
7
  type: KnowledgeType;
5
8
  scene: KnowledgeSceneV1;
6
9
  position: 'start';
7
10
  }
11
+ export interface DeleteKnowledgeSceneRequest {
12
+ sceneKey: string;
13
+ scene: KnowledgeSceneV1;
14
+ }
8
15
  export type CapabilitySlot = 'questionAction' | 'knowledgeInline' | 'knowledgeBlock' | 'sceneAction' | 'toolbarOnly';
9
16
  export type CapabilityId = 'todo' | 'ticket' | 'tableKnowledge' | 'originalReply' | 'memory' | 'tagged' | 'variable' | 'image' | 'video' | 'separator' | 'attribute' | 'tool' | 'agentSelect' | 'reasoningPolish' | 'reasoningTemplate';
10
17
  export interface KnowledgeSceneV1 {
@@ -583,6 +590,10 @@ export interface FkpRichTextProps {
583
590
  * @en Remote and page-level capability rules.
584
591
  */
585
592
  config?: SceneConfigLayersV1;
593
+ /** 图片和视频工具栏的来源;每种默认仅本地。单一来源直接执行,两种来源显示选择菜单。
594
+ * @en Toolbar sources for images and videos. Each defaults to local only; one source runs directly, two open a chooser.
595
+ */
596
+ mediaSources?: MediaSourceOptions;
586
597
  /** 宿主权限快照;过期或无效时禁止编辑。
587
598
  * @en Host authorization snapshot; expired or invalid snapshots lock editing.
588
599
  */
@@ -591,6 +602,10 @@ export interface FkpRichTextProps {
591
602
  * @en Asynchronous host business ports; the component makes no direct HTTP calls.
592
603
  */
593
604
  ports?: RichTextHostPorts;
605
+ /** Replace an installed capability implementation in this editor instance. Return undefined to use the built-in implementation. The ID, slot, versions and actions must match the descriptor. Trusted application code only.
606
+ * @en Override an installed capability implementation for this editor instance. Return undefined for the built-in implementation. Identity, versions and actions must match the descriptor. Trusted application code only.
607
+ */
608
+ capabilityLoader?: CapabilityModuleLoader;
594
609
  /** 宿主已接收的 change 修订号;配合受控回显避免旧值覆盖新编辑。
595
610
  * @en Last acknowledged change revision, preventing stale controlled echoes.
596
611
  * @defaultValue 0
@@ -612,6 +627,7 @@ export interface FkpRichTextProps {
612
627
  */
613
628
  typeSelectionMode?: 'switch' | 'add';
614
629
  }
630
+ export type CapabilityModuleLoader = (descriptor: Readonly<CapabilityDescriptor>) => CapabilityModule | undefined | Promise<CapabilityModule | undefined>;
615
631
  export interface FkpRichTextHandle {
616
632
  /** 撤销最近一次尚未被后续编辑覆盖的知识类型切换。
617
633
  * @en Undo the most recent uninterrupted knowledge type switch.
@@ -0,0 +1,9 @@
1
+ import { Extensions } from '@tiptap/core';
2
+ import { KnowledgeClipboardAdapter } from './knowledge-clipboard';
3
+ /** Private seam between the document editor and its scene-specific host. */
4
+ export interface DocumentAdapter {
5
+ ariaLabel: string;
6
+ placeholder: string;
7
+ extensions?: Extensions;
8
+ clipboard?: KnowledgeClipboardAdapter;
9
+ }
@@ -1,16 +1,22 @@
1
- import { Slice, Schema } from '@tiptap/pm/model';
1
+ import { Slice, Node as ProseMirrorNode, Schema } from '@tiptap/pm/model';
2
2
  import { CapabilityId, CapabilitySlot } from '../public/types';
3
3
  export type PasteCapability = Pick<{
4
4
  id: CapabilityId;
5
5
  slot: CapabilitySlot;
6
6
  }, 'id' | 'slot'>;
7
+ /** Extra document nodes and token rules supplied by the owning editor. */
8
+ export interface KnowledgeClipboardAdapter {
9
+ sanitizeInlineNode?: (element: Element) => HTMLElement | null | undefined;
10
+ allowBusinessToken?: (kind: string, key: string) => boolean;
11
+ serializeNode?: (node: ProseMirrorNode) => string | undefined;
12
+ }
7
13
  /** The copied fragment has node markers, with no editor-specific outer wrapper. */
8
- export declare function writeKnowledgeClipboard(data: DataTransfer, slice: Slice, schema: Schema): boolean;
14
+ export declare function writeKnowledgeClipboard(data: DataTransfer, slice: Slice, schema: Schema, adapter?: KnowledgeClipboardAdapter): boolean;
9
15
  export interface KnowledgeHtmlReadResult {
10
16
  slice: Slice | null;
11
17
  /** True when HTML was parsed, including content intentionally filtered out. */
12
18
  handled: boolean;
13
19
  }
14
20
  /** Parse only structural text and currently insertable rich-text nodes. */
15
- export declare function readKnowledgeHtmlResult(html: string, schema: Schema, capabilities: readonly PasteCapability[], files?: readonly File[]): KnowledgeHtmlReadResult;
21
+ export declare function readKnowledgeHtmlResult(html: string, schema: Schema, capabilities: readonly PasteCapability[], files?: readonly File[], adapter?: KnowledgeClipboardAdapter): KnowledgeHtmlReadResult;
16
22
  export declare function readKnowledgeHtml(html: string, schema: Schema, capabilities: readonly PasteCapability[], files?: readonly File[]): Slice | null;
@@ -0,0 +1,7 @@
1
+ export type MediaSource = 'local' | 'online';
2
+ /** Toolbar sources for each media kind. Omitted kinds default to local upload. */
3
+ export interface MediaSourceOptions {
4
+ image?: readonly MediaSource[];
5
+ video?: readonly MediaSource[];
6
+ }
7
+ export declare function mediaSourcesFor(options: MediaSourceOptions | undefined, kind: 'image' | 'video'): MediaSource[];
@@ -1,6 +1,7 @@
1
1
  import { ResolvedCapability } from '../config/resolve';
2
2
  import { MediaTarget } from './media-target';
3
3
  import { MediaNodeState } from './media-state';
4
+ import { CapabilityLoadResult } from '../plugins/registry';
4
5
  import { PluginPlan } from './operations';
5
6
  import { KnowledgeSceneV1, PortRequestContext, PortResult, RichTextHostPorts } from '../public/types';
6
7
  import { MediaKind } from '../model/node-contract';
@@ -32,6 +33,7 @@ export interface UploadRetention {
32
33
  export interface MediaUploadSessionHost {
33
34
  editor(): MediaEditor | undefined;
34
35
  capability(kind: MediaKind): ResolvedCapability | undefined;
36
+ loadCapability(descriptor: ResolvedCapability): Promise<CapabilityLoadResult>;
35
37
  canUse(kind: MediaKind): boolean;
36
38
  scene(): {
37
39
  scene: KnowledgeSceneV1;
@@ -12,18 +12,18 @@ declare function __VLS_template(): {
12
12
  };
13
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
14
  declare const __VLS_component: import('vue').DefineComponent<FkpKnowledgeTypePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
- create: (request: AddKnowledgeSceneRequest) => any;
16
15
  select: (type: KnowledgeType) => any;
16
+ create: (request: AddKnowledgeSceneRequest) => any;
17
17
  "update:open": (open: boolean, source: "click" | "hover" | "select" | "leave" | "outside" | "escape") => any;
18
18
  }, string, import('vue').PublicProps, Readonly<FkpKnowledgeTypePickerProps> & Readonly<{
19
- onCreate?: ((request: AddKnowledgeSceneRequest) => any) | undefined;
20
19
  onSelect?: ((type: KnowledgeType) => any) | undefined;
20
+ onCreate?: ((request: AddKnowledgeSceneRequest) => any) | undefined;
21
21
  "onUpdate:open"?: ((open: boolean, source: "click" | "hover" | "select" | "leave" | "outside" | "escape") => any) | undefined;
22
22
  }>, {
23
23
  open: boolean | null;
24
24
  disabled: boolean;
25
- currentType: KnowledgeType;
26
25
  mode: "add" | "switch";
26
+ currentType: KnowledgeType;
27
27
  trigger: "button" | "toolbar";
28
28
  buttonLabel: string;
29
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -1,5 +1,6 @@
1
1
  import { JSONContent } from '@tiptap/core';
2
2
  import { KnowledgeSchemaPlan } from '../runtime/schema-plan';
3
+ import { DocumentAdapter } from '../runtime/document-adapter';
3
4
  import { PasteCapability } from '../runtime/knowledge-clipboard';
4
5
  import { ChoiceTokenKind } from '../model/node-contract';
5
6
  import { MediaNodeState } from '../runtime/media-state';
@@ -13,10 +14,14 @@ type __VLS_Props = {
13
14
  schemaPlan: KnowledgeSchemaPlan;
14
15
  pasteCapabilities?: readonly PasteCapability[];
15
16
  activeChoiceId?: string | null;
17
+ documentAdapter: DocumentAdapter;
16
18
  };
17
- declare function insertToken(kind: string, key: string, label: string, token?: string): void;
18
- declare function insertOriginal(): void;
19
- declare function insertSeparator(): void;
19
+ declare function insertToken(kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>): boolean;
20
+ declare function upsertToken(kind: string, key: string, label: string, params: Record<string, unknown>): boolean;
21
+ declare function insertOriginal(): boolean;
22
+ declare function insertSeparator(): boolean;
23
+ declare function insertInlineNode(type: string, attrs: Record<string, unknown>): boolean;
24
+ declare function insertText(text: string, placement?: 'lastCaret' | 'end', selectInserted?: boolean): boolean;
20
25
  declare function insertBatch(content: JSONContent[], target: MediaTarget, refocus: boolean): JSONContent | null;
21
26
  declare function restoreDoc(doc: JSONContent): void;
22
27
  declare function insertMedia(asset: {
@@ -38,6 +43,12 @@ declare function previewPluginNodeOperations(plans: readonly NodeMutationPlan[],
38
43
  declare function applyPluginNodeOperations(plans: readonly NodeMutationPlan[], owner: string): boolean;
39
44
  declare function applyPluginNodeOperation(plan: NodeMutationPlan, owner: string): boolean;
40
45
  declare function failMedia(id: string, message: string, expectedNodeVersion: number): boolean;
46
+ declare function completeMedia(id: string, expectedNodeVersion: number, asset: {
47
+ id?: string;
48
+ url: string;
49
+ kind: 'image' | 'video';
50
+ posterUrl?: string;
51
+ }): boolean;
41
52
  declare function retryMedia(id: string, expectedNodeVersion: number): boolean;
42
53
  declare function reportMediaProgress(id: string, expectedNodeVersion: number, percent: number): boolean;
43
54
  declare function captureSelection(): {
@@ -61,6 +72,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
61
72
  pasteClipboardContent: typeof pasteClipboardContent;
62
73
  isSelectionInsideOriginalReply: () => boolean;
63
74
  insertToken: typeof insertToken;
75
+ upsertToken: typeof upsertToken;
76
+ insertInlineNode: typeof insertInlineNode;
77
+ insertText: typeof insertText;
64
78
  insertOriginal: typeof insertOriginal;
65
79
  insertSeparator: typeof insertSeparator;
66
80
  insertBatch: typeof insertBatch;
@@ -73,6 +87,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
73
87
  applyPluginNodeOperations: typeof applyPluginNodeOperations;
74
88
  previewPluginNodeOperations: typeof previewPluginNodeOperations;
75
89
  failMedia: typeof failMedia;
90
+ completeMedia: typeof completeMedia;
76
91
  retryMedia: typeof retryMedia;
77
92
  getMediaState: typeof getMediaState;
78
93
  reportMediaProgress: typeof reportMediaProgress;
@@ -0,0 +1,190 @@
1
+ import { MediaSource } from '../runtime/media-sources';
2
+ type __VLS_Props = {
3
+ menuKind: 'image' | 'video' | null;
4
+ dialogKind: 'image' | 'video' | null;
5
+ menuStyle?: Record<string, string>;
6
+ sources: readonly MediaSource[];
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ choose: (source: MediaSource) => any;
10
+ submit: (url: string) => any;
11
+ close: () => any;
12
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onChoose?: ((source: MediaSource) => any) | undefined;
14
+ onSubmit?: ((url: string) => any) | undefined;
15
+ onClose?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
17
+ input: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
18
+ modelValue: StringConstructor;
19
+ defaultValue: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ size: {
24
+ type: import('vue').PropType<import('@freecallai/ui').Size>;
25
+ };
26
+ allowClear: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ disabled: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ readonly: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ error: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ placeholder: StringConstructor;
43
+ maxLength: {
44
+ type: import('vue').PropType<number | {
45
+ length: number;
46
+ errorOnly?: boolean;
47
+ }>;
48
+ default: number;
49
+ };
50
+ showWordLimit: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ wordLength: {
55
+ type: import('vue').PropType<(value: string) => number>;
56
+ };
57
+ wordSlice: {
58
+ type: import('vue').PropType<(value: string, maxLength: number) => string>;
59
+ };
60
+ inputAttrs: {
61
+ type: ObjectConstructor;
62
+ };
63
+ type: {
64
+ type: import('vue').PropType<"text" | "password">;
65
+ default: string;
66
+ };
67
+ prepend: StringConstructor;
68
+ append: StringConstructor;
69
+ }>> & Readonly<{
70
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
71
+ onClear?: ((ev: MouseEvent) => any) | undefined;
72
+ onInput?: ((value: string, ev: Event) => any) | undefined;
73
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
74
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
75
+ onChange?: ((value: string, ev: Event) => any) | undefined;
76
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
77
+ }>, {
78
+ inputRef: import('vue').Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
79
+ render: () => import("vue/jsx-runtime").JSX.Element;
80
+ }, {}, {}, {
81
+ focus(): void;
82
+ blur(): void;
83
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
84
+ 'update:modelValue': (value: string) => true;
85
+ input: (value: string, ev: Event) => true;
86
+ change: (value: string, ev: Event) => true;
87
+ pressEnter: (ev: KeyboardEvent) => true;
88
+ clear: (ev: MouseEvent) => true;
89
+ focus: (ev: FocusEvent) => true;
90
+ blur: (ev: FocusEvent) => true;
91
+ }, import('vue').PublicProps, {
92
+ type: "text" | "password";
93
+ disabled: boolean;
94
+ error: boolean;
95
+ defaultValue: string;
96
+ readonly: boolean;
97
+ allowClear: boolean;
98
+ maxLength: number | {
99
+ length: number;
100
+ errorOnly?: boolean;
101
+ };
102
+ showWordLimit: boolean;
103
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
104
+ P: {};
105
+ B: {};
106
+ D: {};
107
+ C: {};
108
+ M: {};
109
+ Defaults: {};
110
+ }, Readonly<import('vue').ExtractPropTypes<{
111
+ modelValue: StringConstructor;
112
+ defaultValue: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ size: {
117
+ type: import('vue').PropType<import('@freecallai/ui').Size>;
118
+ };
119
+ allowClear: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ disabled: {
124
+ type: BooleanConstructor;
125
+ default: boolean;
126
+ };
127
+ readonly: {
128
+ type: BooleanConstructor;
129
+ default: boolean;
130
+ };
131
+ error: {
132
+ type: BooleanConstructor;
133
+ default: boolean;
134
+ };
135
+ placeholder: StringConstructor;
136
+ maxLength: {
137
+ type: import('vue').PropType<number | {
138
+ length: number;
139
+ errorOnly?: boolean;
140
+ }>;
141
+ default: number;
142
+ };
143
+ showWordLimit: {
144
+ type: BooleanConstructor;
145
+ default: boolean;
146
+ };
147
+ wordLength: {
148
+ type: import('vue').PropType<(value: string) => number>;
149
+ };
150
+ wordSlice: {
151
+ type: import('vue').PropType<(value: string, maxLength: number) => string>;
152
+ };
153
+ inputAttrs: {
154
+ type: ObjectConstructor;
155
+ };
156
+ type: {
157
+ type: import('vue').PropType<"text" | "password">;
158
+ default: string;
159
+ };
160
+ prepend: StringConstructor;
161
+ append: StringConstructor;
162
+ }>> & Readonly<{
163
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
164
+ onClear?: ((ev: MouseEvent) => any) | undefined;
165
+ onInput?: ((value: string, ev: Event) => any) | undefined;
166
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
167
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
168
+ onChange?: ((value: string, ev: Event) => any) | undefined;
169
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
170
+ }>, {
171
+ inputRef: import('vue').Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
172
+ render: () => import("vue/jsx-runtime").JSX.Element;
173
+ }, {}, {}, {
174
+ focus(): void;
175
+ blur(): void;
176
+ }, {
177
+ type: "text" | "password";
178
+ disabled: boolean;
179
+ error: boolean;
180
+ defaultValue: string;
181
+ readonly: boolean;
182
+ allowClear: boolean;
183
+ maxLength: number | {
184
+ length: number;
185
+ errorOnly?: boolean;
186
+ };
187
+ showWordLimit: boolean;
188
+ }> | null;
189
+ }, any>;
190
+ export default _default;
@@ -5,10 +5,10 @@ type __VLS_Props = {
5
5
  submitLabel: string;
6
6
  };
7
7
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
- cancel: () => any;
9
8
  submit: (params: Record<string, string | boolean>, focusTrigger: EventTarget | null) => any;
9
+ cancel: () => any;
10
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onCancel?: (() => any) | undefined;
12
11
  onSubmit?: ((params: Record<string, string | boolean>, focusTrigger: EventTarget | null) => any) | undefined;
12
+ onCancel?: (() => any) | undefined;
13
13
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
14
  export default _default;
@@ -1,5 +1,8 @@
1
1
  import { DOMOutputSpec } from '@tiptap/pm/model';
2
+ import { FkpIconName } from '@freecallai/icons';
2
3
  import { TokenAttrs } from '../plugins/token-definition';
4
+ /** SVG namespace is explicit so ProseMirror also serializes real SVG elements. */
5
+ export declare function renderIcon(name: FkpIconName, className: string): DOMOutputSpec;
3
6
  /** Structural templates shared across plugins; no capability IDs are enumerated. */
4
7
  export declare function renderBusinessToken(attrs: TokenAttrs): DOMOutputSpec;
5
8
  export declare function serializeBusinessToken(attrs: TokenAttrs): string;
@@ -0,0 +1,6 @@
1
+ import { MediaKind } from '../model/node-contract';
2
+ export declare function useMediaHint(): {
3
+ suppressedMediaHint: import('vue').Ref<"image" | "video" | null, "image" | "video" | null>;
4
+ suppressMediaHint: (kind: MediaKind) => void;
5
+ resumeMediaHintOnHover: (id: string, pickerOpen: boolean) => void;
6
+ };
@@ -27,11 +27,11 @@ declare function __VLS_template(): {
27
27
  };
28
28
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
29
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
- change: (value: SwitcherValue, option: SwitcherOption) => any;
31
30
  "update:modelValue": (value: SwitcherValue) => any;
31
+ change: (value: SwitcherValue, option: SwitcherOption) => any;
32
32
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
33
- onChange?: ((value: SwitcherValue, option: SwitcherOption) => any) | undefined;
34
33
  "onUpdate:modelValue"?: ((value: SwitcherValue) => any) | undefined;
34
+ onChange?: ((value: SwitcherValue, option: SwitcherOption) => any) | undefined;
35
35
  }>, {
36
36
  options: SwitcherOption[];
37
37
  disabled: boolean;
@@ -0,0 +1,14 @@
1
+ const t = () => ({
2
+ type: "doc",
3
+ content: [{ type: "paragraph" }]
4
+ }), n = (e = "normal") => ({
5
+ schemaVersion: 1,
6
+ type: e,
7
+ question: { text: "" },
8
+ knowledge: { doc: e === "agent" ? null : t(), agentRef: null },
9
+ extensionState: {}
10
+ });
11
+ export {
12
+ n as a,
13
+ t as e
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freecallai/pro",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "福客AI业务组件库",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,6 +21,14 @@
21
21
  "types": "./dist/types/rich-text/index.d.ts",
22
22
  "import": "./dist/rich-text/index.js"
23
23
  },
24
+ "./agent-prompt-editor": {
25
+ "types": "./dist/types/agent-prompt-editor/index.d.ts",
26
+ "import": "./dist/agent-prompt-editor/index.js"
27
+ },
28
+ "./agent-prompt-editor/legacy-converter": {
29
+ "types": "./dist/types/agent-prompt-editor/legacy-converter-index.d.ts",
30
+ "import": "./dist/agent-prompt-editor/legacy-converter/index.js"
31
+ },
24
32
  "./knowledge-type-picker": {
25
33
  "types": "./dist/types/knowledge-type-picker/index.d.ts",
26
34
  "import": "./dist/knowledge-type-picker/index.js"
@@ -55,7 +63,7 @@
55
63
  "**/*.css"
56
64
  ],
57
65
  "peerDependencies": {
58
- "@freecallai/ui": "^0.0.3",
66
+ "@freecallai/ui": "^0.0.4",
59
67
  "vue": "^3.5.13"
60
68
  },
61
69
  "dependencies": {
@@ -64,7 +72,7 @@
64
72
  "@tiptap/pm": "^3.0.0",
65
73
  "@tiptap/starter-kit": "^3.0.0",
66
74
  "@tiptap/vue-3": "^3.0.0",
67
- "@freecallai/icons": "0.0.2"
75
+ "@freecallai/icons": "0.0.3"
68
76
  },
69
77
  "devDependencies": {
70
78
  "@types/node": "^22.0.0",
@@ -76,8 +84,8 @@
76
84
  "vitest": "^3.2.0",
77
85
  "vue": "^3.5.13",
78
86
  "vue-tsc": "^2.2.0",
79
- "@arco-design/arco-vue-scripts": "0.2.10",
80
- "@freecallai/ui": "0.0.3"
87
+ "@freecallai/ui": "0.0.4",
88
+ "@arco-design/arco-vue-scripts": "0.2.10"
81
89
  },
82
90
  "publishConfig": {
83
91
  "registry": "https://registry.npmjs.org/",