pcm-agents-react 0.0.2 → 0.0.4
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/README.md
ADDED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
3
|
-
import { FloatImage as FloatImageElement, defineCustomElement as defineFloatImage } from "pcm-agents/dist/components/float-image.js";
|
|
4
3
|
import { MyComponent as MyComponentElement, defineCustomElement as defineMyComponent } from "pcm-agents/dist/components/my-component.js";
|
|
4
|
+
import { PcmChatMessage as PcmChatMessageElement, defineCustomElement as definePcmChatMessage } from "pcm-agents/dist/components/pcm-chat-message.js";
|
|
5
|
+
import { PcmChatModal as PcmChatModalElement, defineCustomElement as definePcmChatModal } from "pcm-agents/dist/components/pcm-chat-modal.js";
|
|
6
|
+
import { PcmHrChatModal as PcmHrChatModalElement, defineCustomElement as definePcmHrChatModal } from "pcm-agents/dist/components/pcm-hr-chat-modal.js";
|
|
5
7
|
import React from 'react';
|
|
6
|
-
export const FloatImage = createComponent({
|
|
7
|
-
tagName: 'float-image',
|
|
8
|
-
elementClass: FloatImageElement,
|
|
9
|
-
react: React,
|
|
10
|
-
events: { onFloatImageClick: 'floatImageClick' },
|
|
11
|
-
defineCustomElement: defineFloatImage
|
|
12
|
-
});
|
|
13
8
|
export const MyComponent = createComponent({
|
|
14
9
|
tagName: 'my-component',
|
|
15
10
|
elementClass: MyComponentElement,
|
|
@@ -17,4 +12,35 @@ export const MyComponent = createComponent({
|
|
|
17
12
|
events: {},
|
|
18
13
|
defineCustomElement: defineMyComponent
|
|
19
14
|
});
|
|
15
|
+
export const PcmChatMessage = createComponent({
|
|
16
|
+
tagName: 'pcm-chat-message',
|
|
17
|
+
elementClass: PcmChatMessageElement,
|
|
18
|
+
react: React,
|
|
19
|
+
events: { onMessageChange: 'messageChange' },
|
|
20
|
+
defineCustomElement: definePcmChatMessage
|
|
21
|
+
});
|
|
22
|
+
export const PcmChatModal = createComponent({
|
|
23
|
+
tagName: 'pcm-chat-modal',
|
|
24
|
+
elementClass: PcmChatModalElement,
|
|
25
|
+
react: React,
|
|
26
|
+
events: {
|
|
27
|
+
onMessageSent: 'messageSent',
|
|
28
|
+
onModalClosed: 'modalClosed',
|
|
29
|
+
onStreamComplete: 'streamComplete'
|
|
30
|
+
},
|
|
31
|
+
defineCustomElement: definePcmChatModal
|
|
32
|
+
});
|
|
33
|
+
export const PcmHrChatModal = createComponent({
|
|
34
|
+
tagName: 'pcm-hr-chat-modal',
|
|
35
|
+
elementClass: PcmHrChatModalElement,
|
|
36
|
+
react: React,
|
|
37
|
+
events: {
|
|
38
|
+
onModalClosed: 'modalClosed',
|
|
39
|
+
onStreamComplete: 'streamComplete',
|
|
40
|
+
onInterviewComplete: 'interviewComplete',
|
|
41
|
+
onRecordingError: 'recordingError',
|
|
42
|
+
onRecordingStatusChange: 'recordingStatusChange'
|
|
43
|
+
},
|
|
44
|
+
defineCustomElement: definePcmHrChatModal
|
|
45
|
+
});
|
|
20
46
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/components/stencil-generated/components.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAUb,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/components/stencil-generated/components.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAUb,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACzI,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtJ,OAAO,EAAE,YAAY,IA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oB;CAC5C,CAAC,CAAC"}
|
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { type ChatMessage, type PcmChatMessageCustomEvent } from "pcm-agents";
|
|
3
3
|
import { MyComponent as MyComponentElement } from "pcm-agents/dist/components/my-component.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export declare const FloatImage: StencilReactComponent<FloatImageElement, FloatImageEvents>;
|
|
4
|
+
import { PcmChatMessage as PcmChatMessageElement } from "pcm-agents/dist/components/pcm-chat-message.js";
|
|
5
|
+
import { PcmChatModal as PcmChatModalElement } from "pcm-agents/dist/components/pcm-chat-modal.js";
|
|
6
|
+
import { PcmHrChatModal as PcmHrChatModalElement } from "pcm-agents/dist/components/pcm-hr-chat-modal.js";
|
|
8
7
|
type MyComponentEvents = NonNullable<unknown>;
|
|
9
8
|
export declare const MyComponent: StencilReactComponent<MyComponentElement, MyComponentEvents>;
|
|
9
|
+
type PcmChatMessageEvents = {
|
|
10
|
+
onMessageChange: EventName<PcmChatMessageCustomEvent<Partial<ChatMessage>>>;
|
|
11
|
+
};
|
|
12
|
+
export declare const PcmChatMessage: StencilReactComponent<PcmChatMessageElement, PcmChatMessageEvents>;
|
|
13
|
+
type PcmChatModalEvents = {
|
|
14
|
+
onMessageSent: EventName<CustomEvent<string>>;
|
|
15
|
+
onModalClosed: EventName<CustomEvent<void>>;
|
|
16
|
+
onStreamComplete: EventName<CustomEvent<{
|
|
17
|
+
conversation_id: string;
|
|
18
|
+
event: string;
|
|
19
|
+
message_id: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}>>;
|
|
22
|
+
};
|
|
23
|
+
export declare const PcmChatModal: StencilReactComponent<PcmChatModalElement, PcmChatModalEvents>;
|
|
24
|
+
type PcmHrChatModalEvents = {
|
|
25
|
+
onModalClosed: EventName<CustomEvent<void>>;
|
|
26
|
+
onStreamComplete: EventName<CustomEvent<{
|
|
27
|
+
conversation_id: string;
|
|
28
|
+
event: string;
|
|
29
|
+
message_id: string;
|
|
30
|
+
id: string;
|
|
31
|
+
}>>;
|
|
32
|
+
onInterviewComplete: EventName<CustomEvent<{
|
|
33
|
+
conversation_id: string;
|
|
34
|
+
total_questions: number;
|
|
35
|
+
}>>;
|
|
36
|
+
onRecordingError: EventName<CustomEvent<{
|
|
37
|
+
type: string;
|
|
38
|
+
message: string;
|
|
39
|
+
details?: any;
|
|
40
|
+
}>>;
|
|
41
|
+
onRecordingStatusChange: EventName<CustomEvent<{
|
|
42
|
+
status: 'started' | 'stopped' | 'paused' | 'resumed' | 'failed';
|
|
43
|
+
details?: any;
|
|
44
|
+
}>>;
|
|
45
|
+
};
|
|
46
|
+
export declare const PcmHrChatModal: StencilReactComponent<PcmHrChatModalElement, PcmHrChatModalEvents>;
|
|
10
47
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcm-agents-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "React wrapper components for pcm-agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@stencil/react-output-target": "^0.8.2",
|
|
18
|
-
"pcm-agents": "
|
|
18
|
+
"pcm-agents": "link:../pcm-agents"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^17.0.0 || ^18.0.0",
|