@opengeni/react 0.44.4 → 0.45.0
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 +3 -0
- package/dist/{chunk-LYRJUU5V.js → chunk-FD72GJMK.js} +533 -190
- package/dist/chunk-FD72GJMK.js.map +1 -0
- package/dist/components/user-message-body.d.ts +36 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/session-ui.d.ts +2 -0
- package/dist/session-ui.js +7 -3
- package/package.json +2 -2
- package/src/components/markdown.tsx +1 -1
- package/src/components/message-timeline.tsx +129 -20
- package/src/components/user-message-body.tsx +341 -0
- package/src/hooks/use-codex-accounts.ts +1 -1
- package/src/index.ts +2 -0
- package/src/session-ui.ts +2 -0
- package/dist/chunk-LYRJUU5V.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
type RestoreDisclosureAnchor = (() => void) | null;
|
|
3
|
+
export type UserMessageDisclosureContextValue = {
|
|
4
|
+
expandedByMessageId: Map<string, boolean>;
|
|
5
|
+
beginChange: (messageBody: HTMLElement, disclosureControl: HTMLElement) => RestoreDisclosureAnchor;
|
|
6
|
+
};
|
|
7
|
+
export declare function UserMessageDisclosureProvider({ value, children, }: {
|
|
8
|
+
value: UserMessageDisclosureContextValue;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Deterministic first-paint fallback for runtimes without layout measurement.
|
|
13
|
+
* Real browsers replace this estimate with the rendered-height decision in the
|
|
14
|
+
* first layout effect. The complete text always remains mounted either way.
|
|
15
|
+
*/
|
|
16
|
+
export declare function userMessageLikelyNeedsDisclosure(text: string): boolean;
|
|
17
|
+
export type UserMessageBodyProps = {
|
|
18
|
+
/** Durable timeline item id. Expansion memory is keyed by this value. */
|
|
19
|
+
messageId: string;
|
|
20
|
+
/** Complete source text. Used only for the deterministic measurement fallback. */
|
|
21
|
+
text: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Lossless disclosure boundary for already-sent user-message text.
|
|
27
|
+
*
|
|
28
|
+
* The full rendered subtree always remains in the DOM. A real browser decides
|
|
29
|
+
* whether disclosure is needed from rendered height (including Markdown
|
|
30
|
+
* structure and wrapping); the source-text heuristic is only a deterministic
|
|
31
|
+
* fallback for SSR/test environments without layout. Timeline-owned context
|
|
32
|
+
* remembers expansion per durable message id and preserves the reader's scroll
|
|
33
|
+
* anchor when height changes.
|
|
34
|
+
*/
|
|
35
|
+
export declare function UserMessageBody({ messageId, text, children, className }: UserMessageBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ export { advancedSourceSummary, availabilityReasonLabel, billingClassForModel, b
|
|
|
113
113
|
export type { LatencyModeId, PickerBillingClass, PickerModelRow } from "./model-policy";
|
|
114
114
|
export { MessageTimeline, TimelineRow } from "./components/message-timeline";
|
|
115
115
|
export type { MessageTimelineProps } from "./components/message-timeline";
|
|
116
|
+
export { UserMessageBody, userMessageLikelyNeedsDisclosure } from "./components/user-message-body";
|
|
117
|
+
export type { UserMessageBodyProps } from "./components/user-message-body";
|
|
116
118
|
export { Markdown } from "./components/markdown";
|
|
117
119
|
export { CopyButton, CopyHoverFrame } from "./components/copy-button";
|
|
118
120
|
export { copyTextToClipboard, tableElementToTsv } from "./lib/clipboard";
|
package/dist/index.js
CHANGED
|
@@ -80,6 +80,7 @@ import {
|
|
|
80
80
|
Thumbnail,
|
|
81
81
|
TimelineRow,
|
|
82
82
|
TurnSummary,
|
|
83
|
+
UserMessageBody,
|
|
83
84
|
answersFromDrafts,
|
|
84
85
|
applyPatchOps,
|
|
85
86
|
applyPatchOpsFromToolItem,
|
|
@@ -108,8 +109,9 @@ import {
|
|
|
108
109
|
useLightbox,
|
|
109
110
|
useLightboxOptional,
|
|
110
111
|
useThemeType,
|
|
112
|
+
userMessageLikelyNeedsDisclosure,
|
|
111
113
|
v4aToGitFileDiff
|
|
112
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-FD72GJMK.js";
|
|
113
115
|
import "./chunk-VCBFUSUZ.js";
|
|
114
116
|
import {
|
|
115
117
|
buildTimeline,
|
|
@@ -8358,7 +8360,7 @@ function isCodexAccountEvent(event) {
|
|
|
8358
8360
|
}
|
|
8359
8361
|
var EMPTY_SETTINGS = {
|
|
8360
8362
|
rotationEnabled: false,
|
|
8361
|
-
rotationStrategy: "
|
|
8363
|
+
rotationStrategy: "sharded",
|
|
8362
8364
|
activeCredentialId: null
|
|
8363
8365
|
};
|
|
8364
8366
|
var EMPTY_STATE = {
|
|
@@ -8537,6 +8539,7 @@ export {
|
|
|
8537
8539
|
TooltipProvider,
|
|
8538
8540
|
TooltipTrigger,
|
|
8539
8541
|
TurnSummary,
|
|
8542
|
+
UserMessageBody,
|
|
8540
8543
|
VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS,
|
|
8541
8544
|
VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS,
|
|
8542
8545
|
VOICE_RECORDING_OWNER_STALE_MILLISECONDS,
|
|
@@ -8695,6 +8698,7 @@ export {
|
|
|
8695
8698
|
useWorkspaceModelCatalog,
|
|
8696
8699
|
useWorkspaceSessions,
|
|
8697
8700
|
useWorkspaces,
|
|
8701
|
+
userMessageLikelyNeedsDisclosure,
|
|
8698
8702
|
v4aToGitFileDiff,
|
|
8699
8703
|
xtermThemeFromTokens
|
|
8700
8704
|
};
|