useyuva 0.0.5 → 0.0.7

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.
@@ -0,0 +1,88 @@
1
+ import { type PropType } from "vue";
2
+ import type { IdentityTokenSource, Layout } from "../../types.js";
3
+ import type { DiscussionDetailEvent, DiscussionPostDetail, PageFeedbackDetail, PageRatingDetail } from "../../docs.js";
4
+ import type { ReaderProfile } from "../../client/api.js";
5
+ export declare const YuvaPageFeedback: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ channel: StringConstructor;
7
+ server: StringConstructor;
8
+ locale: StringConstructor;
9
+ dir: PropType<"ltr" | "rtl">;
10
+ identityToken: PropType<string | IdentityTokenSource | null>;
11
+ page: StringConstructor;
12
+ pageTitle: StringConstructor;
13
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ rating: (_: PageRatingDetail) => true;
17
+ feedback: (_: PageFeedbackDetail) => true;
18
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ channel: StringConstructor;
20
+ server: StringConstructor;
21
+ locale: StringConstructor;
22
+ dir: PropType<"ltr" | "rtl">;
23
+ identityToken: PropType<string | IdentityTokenSource | null>;
24
+ page: StringConstructor;
25
+ pageTitle: StringConstructor;
26
+ }>> & Readonly<{
27
+ onFeedback?: ((_: PageFeedbackDetail) => any) | undefined;
28
+ onRating?: ((_: PageRatingDetail) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
+ export declare const YuvaDiscussions: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
31
+ channel: StringConstructor;
32
+ server: StringConstructor;
33
+ locale: StringConstructor;
34
+ dir: PropType<"ltr" | "rtl">;
35
+ identityToken: PropType<string | IdentityTokenSource | null>;
36
+ page: StringConstructor;
37
+ pageTitle: StringConstructor;
38
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
39
+ [key: string]: any;
40
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
+ discussion: (_: DiscussionDetailEvent) => true;
42
+ post: (_: DiscussionPostDetail) => true;
43
+ reader: (_: ReaderProfile | null) => true;
44
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
+ channel: StringConstructor;
46
+ server: StringConstructor;
47
+ locale: StringConstructor;
48
+ dir: PropType<"ltr" | "rtl">;
49
+ identityToken: PropType<string | IdentityTokenSource | null>;
50
+ page: StringConstructor;
51
+ pageTitle: StringConstructor;
52
+ }>> & Readonly<{
53
+ onDiscussion?: ((_: DiscussionDetailEvent) => any) | undefined;
54
+ onPost?: ((_: DiscussionPostDetail) => any) | undefined;
55
+ onReader?: ((_: {
56
+ name?: string;
57
+ initials: string;
58
+ } | null) => any) | undefined;
59
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
60
+ export declare const YuvaChat: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
61
+ channel: StringConstructor;
62
+ server: StringConstructor;
63
+ locale: StringConstructor;
64
+ dir: PropType<"ltr" | "rtl">;
65
+ identityToken: PropType<string | IdentityTokenSource | null>;
66
+ layout: PropType<Layout>;
67
+ open: BooleanConstructor;
68
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
69
+ [key: string]: any;
70
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
71
+ unread: (_: {
72
+ count: number;
73
+ }) => true;
74
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
75
+ channel: StringConstructor;
76
+ server: StringConstructor;
77
+ locale: StringConstructor;
78
+ dir: PropType<"ltr" | "rtl">;
79
+ identityToken: PropType<string | IdentityTokenSource | null>;
80
+ layout: PropType<Layout>;
81
+ open: BooleanConstructor;
82
+ }>> & Readonly<{
83
+ onUnread?: ((_: {
84
+ count: number;
85
+ }) => any) | undefined;
86
+ }>, {
87
+ open: boolean;
88
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,6 +1,8 @@
1
- import { type ReactElement, type ReactNode } from "react";
1
+ import { type CSSProperties, type ReactElement, type ReactNode } from "react";
2
2
  import type { ClientConversation, ClientMessage } from "./client/api.js";
3
- import type { MessageInput, YuvaClient } from "./client/client.js";
3
+ import type { IdentityTokenSource, MessageInput, YuvaClient } from "./client/client.js";
4
+ import type { DiscussionDetailEvent, DiscussionPostDetail, PageFeedbackDetail, PageRatingDetail } from "./docs.js";
5
+ import type { ReaderProfile } from "./client/api.js";
4
6
  export interface YuvaProviderProps {
5
7
  client: YuvaClient;
6
8
  connect?: boolean;
@@ -27,3 +29,25 @@ export interface MessagesResult {
27
29
  markRead(): Promise<void>;
28
30
  }
29
31
  export declare function useMessages(conversationId: string | null | undefined): MessagesResult;
32
+ export interface YuvaDocsProps {
33
+ channel: string;
34
+ server?: string;
35
+ locale?: string;
36
+ dir?: "ltr" | "rtl";
37
+ page?: string;
38
+ pageTitle?: string;
39
+ identityToken?: string | IdentityTokenSource | null;
40
+ className?: string;
41
+ style?: CSSProperties;
42
+ }
43
+ export interface YuvaPageFeedbackProps extends YuvaDocsProps {
44
+ onRating?: (detail: PageRatingDetail) => void;
45
+ onFeedback?: (detail: PageFeedbackDetail) => void;
46
+ }
47
+ export interface YuvaDiscussionsProps extends YuvaDocsProps {
48
+ onDiscussion?: (detail: DiscussionDetailEvent) => void;
49
+ onPost?: (detail: DiscussionPostDetail) => void;
50
+ onReader?: (detail: ReaderProfile | null) => void;
51
+ }
52
+ export declare function YuvaPageFeedback({ onRating, onFeedback, ...props }: YuvaPageFeedbackProps): ReactElement;
53
+ export declare function YuvaDiscussions({ onDiscussion, onPost, onReader, ...props }: YuvaDiscussionsProps): ReactElement;