@opengeni/react-native 1.4.5-canary.37615713321001

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 (132) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +74 -0
  3. package/dist/adapters.d.ts +53 -0
  4. package/dist/adapters.js +3 -0
  5. package/dist/adapters.js.map +1 -0
  6. package/dist/attachments.d.ts +75 -0
  7. package/dist/chunk-3VSZAQ7G.js +391 -0
  8. package/dist/chunk-3VSZAQ7G.js.map +1 -0
  9. package/dist/chunk-5ZVK7WKA.js +88 -0
  10. package/dist/chunk-5ZVK7WKA.js.map +1 -0
  11. package/dist/chunk-EEDIMY3L.js +240 -0
  12. package/dist/chunk-EEDIMY3L.js.map +1 -0
  13. package/dist/chunk-M23SDI4R.js +83 -0
  14. package/dist/chunk-M23SDI4R.js.map +1 -0
  15. package/dist/chunk-PHJBSAR3.js +2006 -0
  16. package/dist/chunk-PHJBSAR3.js.map +1 -0
  17. package/dist/environment.d.ts +19 -0
  18. package/dist/expo.d.ts +25 -0
  19. package/dist/expo.js +267 -0
  20. package/dist/expo.js.map +1 -0
  21. package/dist/index.d.ts +13 -0
  22. package/dist/index.js +3345 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/presentation.d.ts +262 -0
  25. package/dist/read-acknowledgement.d.ts +39 -0
  26. package/dist/realtime/call-events.d.ts +11 -0
  27. package/dist/realtime/call-view.d.ts +26 -0
  28. package/dist/realtime/expo-call.d.ts +11 -0
  29. package/dist/realtime/native-call.d.ts +104 -0
  30. package/dist/realtime/native-realtime.d.ts +35 -0
  31. package/dist/realtime/use-native-session-realtime.d.ts +25 -0
  32. package/dist/session-view.d.ts +87 -0
  33. package/dist/timeline/activity.d.ts +34 -0
  34. package/dist/timeline/composer.d.ts +86 -0
  35. package/dist/timeline/controls.d.ts +27 -0
  36. package/dist/timeline/decisions.d.ts +29 -0
  37. package/dist/timeline/feedback.d.ts +26 -0
  38. package/dist/timeline/icon-nodes.generated.d.ts +738 -0
  39. package/dist/timeline/icon.d.ts +11 -0
  40. package/dist/timeline/index.d.ts +32 -0
  41. package/dist/timeline/index.js +5419 -0
  42. package/dist/timeline/index.js.map +1 -0
  43. package/dist/timeline/markdown.d.ts +11 -0
  44. package/dist/timeline/markdown.js +415 -0
  45. package/dist/timeline/markdown.js.map +1 -0
  46. package/dist/timeline/message-attachments.d.ts +13 -0
  47. package/dist/timeline/message-timeline.d.ts +36 -0
  48. package/dist/timeline/model-picker.d.ts +17 -0
  49. package/dist/timeline/primitives.d.ts +85 -0
  50. package/dist/timeline/queue-dock.d.ts +19 -0
  51. package/dist/timeline/session-actions.d.ts +34 -0
  52. package/dist/timeline/session-list.d.ts +50 -0
  53. package/dist/timeline/session-screen.d.ts +35 -0
  54. package/dist/timeline/session-signals.d.ts +37 -0
  55. package/dist/timeline/sheet.d.ts +14 -0
  56. package/dist/timeline/theme.d.ts +58 -0
  57. package/dist/timeline/thinking-orb.d.ts +13 -0
  58. package/dist/timeline/turn.d.ts +80 -0
  59. package/dist/ui/attention.d.ts +14 -0
  60. package/dist/ui/cards.d.ts +21 -0
  61. package/dist/ui/composer.d.ts +21 -0
  62. package/dist/ui/format.d.ts +13 -0
  63. package/dist/ui/icons.d.ts +9 -0
  64. package/dist/ui/index.d.ts +12 -0
  65. package/dist/ui/index.js +1757 -0
  66. package/dist/ui/index.js.map +1 -0
  67. package/dist/ui/steps-sheet.d.ts +10 -0
  68. package/dist/ui/theme.d.ts +63 -0
  69. package/dist/ui/timeline.d.ts +48 -0
  70. package/dist/ui/web-tokens.gen.d.ts +90 -0
  71. package/dist/use-native-session.d.ts +40 -0
  72. package/dist/view-model.d.ts +52 -0
  73. package/dist/voice-input.d.ts +102 -0
  74. package/dist/webrtc.d.ts +9 -0
  75. package/dist/webrtc.js +19 -0
  76. package/dist/webrtc.js.map +1 -0
  77. package/expo-module.config.json +7 -0
  78. package/ios/OpenGeniCall.podspec +22 -0
  79. package/ios/OpenGeniCallAppDelegateSubscriber.swift +29 -0
  80. package/ios/OpenGeniCallCenter.swift +189 -0
  81. package/ios/OpenGeniCallModule.swift +64 -0
  82. package/package.json +93 -0
  83. package/src/adapters.ts +150 -0
  84. package/src/attachments.ts +396 -0
  85. package/src/environment.tsx +214 -0
  86. package/src/expo.ts +295 -0
  87. package/src/index.ts +98 -0
  88. package/src/presentation.ts +285 -0
  89. package/src/read-acknowledgement.ts +72 -0
  90. package/src/realtime/call-events.ts +41 -0
  91. package/src/realtime/call-view.tsx +220 -0
  92. package/src/realtime/expo-call.ts +49 -0
  93. package/src/realtime/native-call.ts +266 -0
  94. package/src/realtime/native-realtime.ts +115 -0
  95. package/src/realtime/use-native-session-realtime.ts +29 -0
  96. package/src/session-view.tsx +2251 -0
  97. package/src/timeline/activity.tsx +736 -0
  98. package/src/timeline/composer.tsx +686 -0
  99. package/src/timeline/controls.tsx +151 -0
  100. package/src/timeline/decisions.tsx +651 -0
  101. package/src/timeline/feedback.tsx +251 -0
  102. package/src/timeline/icon-nodes.generated.ts +1830 -0
  103. package/src/timeline/icon.tsx +44 -0
  104. package/src/timeline/index.ts +67 -0
  105. package/src/timeline/markdown.tsx +510 -0
  106. package/src/timeline/message-attachments.tsx +155 -0
  107. package/src/timeline/message-timeline.tsx +1042 -0
  108. package/src/timeline/model-picker.tsx +450 -0
  109. package/src/timeline/primitives.tsx +561 -0
  110. package/src/timeline/queue-dock.tsx +331 -0
  111. package/src/timeline/session-actions.tsx +379 -0
  112. package/src/timeline/session-list.tsx +338 -0
  113. package/src/timeline/session-screen.tsx +488 -0
  114. package/src/timeline/session-signals.tsx +312 -0
  115. package/src/timeline/sheet.tsx +153 -0
  116. package/src/timeline/theme.tsx +128 -0
  117. package/src/timeline/thinking-orb.tsx +93 -0
  118. package/src/timeline/turn.tsx +569 -0
  119. package/src/ui/attention.tsx +220 -0
  120. package/src/ui/cards.tsx +267 -0
  121. package/src/ui/composer.tsx +296 -0
  122. package/src/ui/format.ts +86 -0
  123. package/src/ui/icons.tsx +131 -0
  124. package/src/ui/index.ts +18 -0
  125. package/src/ui/steps-sheet.tsx +71 -0
  126. package/src/ui/theme.ts +261 -0
  127. package/src/ui/timeline.tsx +837 -0
  128. package/src/ui/web-tokens.gen.ts +94 -0
  129. package/src/use-native-session.ts +219 -0
  130. package/src/view-model.ts +485 -0
  131. package/src/voice-input.ts +382 -0
  132. package/src/webrtc.ts +30 -0
@@ -0,0 +1,86 @@
1
+ import { type ChatComposerMessages } from "@opengeni/react/composer-messages";
2
+ import { type ComponentRef, type ReactNode, type Ref } from "react";
3
+ import { TextInput, type ViewStyle } from "react-native";
4
+ import { type NativeIconName } from "./icon.js";
5
+ import type { NativeVoiceInput } from "../voice-input.js";
6
+ export interface SessionComposerProps {
7
+ value: string;
8
+ onChangeText: (value: string) => void;
9
+ onSend: () => void;
10
+ canSend: boolean;
11
+ sending?: boolean | undefined;
12
+ placeholder?: string | undefined;
13
+ /** Run state drives the trailing action: pause while running, resume when paused. */
14
+ running?: boolean | undefined;
15
+ paused?: boolean | undefined;
16
+ onPause?: (() => void) | undefined;
17
+ onResume?: (() => void) | undefined;
18
+ pauseBusy?: boolean | undefined;
19
+ /** Leading toolbar content; defaults to an attach button when `onAttach` is set. */
20
+ renderLeading?: (() => ReactNode) | undefined;
21
+ onAttach?: (() => void) | undefined;
22
+ /** Content between leading actions and the trailing action (model/options pill). */
23
+ options?: ReactNode;
24
+ /** Rendered inside the surface above the field (attachment chips, annotations). */
25
+ header?: ReactNode;
26
+ /** Rendered above the surface (queue, approvals, status dock). */
27
+ above?: ReactNode;
28
+ bottomInset?: number | undefined;
29
+ /** Distance from the composer's container bottom to the window bottom (tab bars). */
30
+ keyboardBottomOffset?: number | undefined;
31
+ autoFocus?: boolean | undefined;
32
+ /** Horizontal page inset around the surface (default 12). */
33
+ inset?: number | undefined;
34
+ /** Lift above the keyboard (bottom-docked composer). Off for an inline card. */
35
+ liftWithKeyboard?: boolean | undefined;
36
+ /**
37
+ * Float over the conversation (absolute, transparent around the surface) so
38
+ * content scrolls beneath it. The host reads the occupied height from
39
+ * `onHeightChange` to inset its scroll content.
40
+ */
41
+ floating?: boolean | undefined;
42
+ onHeightChange?: ((height: number) => void) | undefined;
43
+ /** Rendered inside the surface under the header (draft conflict, notices). */
44
+ below?: ReactNode;
45
+ /** The message field, for hosts that focus it (queue Edit, replies). */
46
+ inputRef?: Ref<ComponentRef<typeof TextInput>> | undefined;
47
+ /** The shared composer catalog; hosts translate by overriding entries. */
48
+ messages?: Partial<ChatComposerMessages> | undefined;
49
+ /** Called when the trailing action fires (host haptics). */
50
+ onActionFeedback?: (() => void) | undefined;
51
+ /** Dictation: a mic beside the leading actions, and the recording strip while it runs. */
52
+ voice?: NativeVoiceInput | undefined;
53
+ }
54
+ /** Whether to draw Liquid Glass: iOS 26+, the native module present, transparency allowed. */
55
+ export declare function useLiquidGlass(): boolean;
56
+ /**
57
+ * A floating surface for composer-adjacent chrome: glass on iOS 26, a solid
58
+ * raised surface elsewhere.
59
+ */
60
+ export declare function ComposerSurface({ children, radius, style, }: {
61
+ children: ReactNode;
62
+ radius: number;
63
+ style?: ViewStyle | undefined;
64
+ }): import("react").JSX.Element;
65
+ export declare function SessionComposer(props: SessionComposerProps): import("react").JSX.Element;
66
+ /** A quiet round toolbar button (the web composer's leading actions). */
67
+ export declare function ToolbarButton({ icon, accessibilityLabel, onPress, }: {
68
+ icon: NativeIconName;
69
+ accessibilityLabel: string;
70
+ onPress: () => void;
71
+ }): import("react").JSX.Element;
72
+ /**
73
+ * The web model pill ("6 Luna High ⌄"): a quiet toolbar chip that opens host
74
+ * options. As on web, the muted detail (reasoning effort) gives way first, so a
75
+ * long name never pushes it into a clipped "Ext…".
76
+ */
77
+ export declare function ComposerPill({ label, detail, onPress, leading, fast, }: {
78
+ label: string;
79
+ /** Secondary text after the label (the reasoning effort); truncates before the label. */
80
+ detail?: string | null | undefined;
81
+ /** Fast latency is on: a filled bolt after the name, as on the web pill. */
82
+ fast?: boolean | undefined;
83
+ onPress?: (() => void) | undefined;
84
+ /** Shown before the label (the web picker's maker mark). */
85
+ leading?: ReactNode;
86
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from "react";
2
+ import { type ViewStyle } from "react-native";
3
+ import { type NativeIconName } from "./icon.js";
4
+ export type ButtonVariant = "primary" | "secondary" | "destructive" | "ghost";
5
+ /** `sm`: web Button size="sm" (h-8, text 14). `form`: the question-form action (h-9, text 12). */
6
+ export type ButtonSize = "sm" | "form";
7
+ export declare function Button({ label, icon, onPress, variant, size, disabled, busy, style, accessibilityLabel, }: {
8
+ label?: string | undefined;
9
+ icon?: NativeIconName | undefined;
10
+ onPress?: (() => void) | undefined;
11
+ variant?: ButtonVariant;
12
+ size?: ButtonSize;
13
+ disabled?: boolean | undefined;
14
+ busy?: boolean | undefined;
15
+ style?: ViewStyle | undefined;
16
+ accessibilityLabel?: string | undefined;
17
+ }): import("react").JSX.Element;
18
+ /** A 44pt square icon control (composer toolbar buttons). */
19
+ export declare function IconButton({ icon, onPress, accessibilityLabel, tone, disabled, busy, children, }: {
20
+ icon: NativeIconName;
21
+ onPress?: (() => void) | undefined;
22
+ accessibilityLabel: string;
23
+ tone?: "plain" | "primary" | "secondary";
24
+ disabled?: boolean | undefined;
25
+ busy?: boolean | undefined;
26
+ children?: ReactNode;
27
+ }): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import type { SessionHumanInputRequest, SubmitHumanInputResponseRequest } from "@opengeni/sdk";
2
+ import type { PendingApproval } from "@opengeni/react/session";
3
+ import { type HumanInputFormMessages } from "@opengeni/react/timeline-model";
4
+ export interface HumanInputCardProps {
5
+ requests: SessionHumanInputRequest[];
6
+ onSubmit: (requestId: string, response: SubmitHumanInputResponseRequest) => void | Promise<void>;
7
+ respondingRequestId?: string | null | undefined;
8
+ error?: string | null | undefined;
9
+ /** The shared question-form catalog; hosts translate by overriding entries. */
10
+ messages?: Partial<HumanInputFormMessages> | undefined;
11
+ }
12
+ /** One decision shell for pending requests, oldest first, "N of M" when stepping. */
13
+ export declare function HumanInputCard({ requests, onSubmit, respondingRequestId, error, messages, }: HumanInputCardProps): import("react").JSX.Element | null;
14
+ export interface ApprovalStripMessages {
15
+ approve: string;
16
+ reject: string;
17
+ approved: string;
18
+ rejected: string;
19
+ /** The tool's display name; the web live strip shows the raw name. */
20
+ formatToolName: (name: string) => string;
21
+ }
22
+ export declare const defaultApprovalStripMessages: ApprovalStripMessages;
23
+ export interface ApprovalStripProps {
24
+ approvals: PendingApproval[];
25
+ onDecide: (approvalId: string, decision: "approve" | "reject") => void | Promise<void>;
26
+ messages?: Partial<ApprovalStripMessages> | undefined;
27
+ }
28
+ /** The web live decision strip: one waiting Notice per pending tool approval. */
29
+ export declare function ApprovalStrip({ approvals, onDecide, messages: overrides }: ApprovalStripProps): import("react").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ import type { FeedbackSentiment } from "@opengeni/sdk";
2
+ import { type FeedbackClient } from "@opengeni/react/session-feedback-model";
3
+ export interface TurnFeedbackTarget {
4
+ client: FeedbackClient;
5
+ workspaceId: string;
6
+ sessionId: string;
7
+ }
8
+ /** Saved reply ratings for a session, loaded once with recovery. */
9
+ export declare function useTurnRatings(target: TurnFeedbackTarget | null | undefined): {
10
+ ratings: Record<string, FeedbackSentiment>;
11
+ rate: (turnId: string, sentiment: FeedbackSentiment) => void;
12
+ };
13
+ export declare function TurnFeedbackButtons(props: {
14
+ target: TurnFeedbackTarget;
15
+ turnId: string;
16
+ saved: FeedbackSentiment | undefined;
17
+ onRated: (sentiment: FeedbackSentiment) => void;
18
+ }): import("react").JSX.Element;
19
+ /** The web feedback dialog as a native page sheet. */
20
+ export declare function FeedbackSheet(props: {
21
+ target: TurnFeedbackTarget;
22
+ turnId?: string | undefined;
23
+ sentiment: FeedbackSentiment | null;
24
+ onClose: () => void;
25
+ onSubmitted: (sentiment: FeedbackSentiment) => void;
26
+ }): import("react").JSX.Element;