@runtypelabs/persona 4.33.0 → 4.34.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/dist/activity-ui.d.cts +3 -15
- package/dist/activity-ui.d.ts +3 -15
- package/dist/animations/glyph-cycle.d.cts +1 -3
- package/dist/animations/glyph-cycle.d.ts +1 -3
- package/dist/animations/wipe.d.cts +1 -3
- package/dist/animations/wipe.d.ts +1 -3
- package/dist/approval-ui.cjs +2 -2
- package/dist/approval-ui.d.cts +3 -15
- package/dist/approval-ui.d.ts +3 -15
- package/dist/approval-ui.js +1 -1
- package/dist/artifacts-ui.cjs +1 -1
- package/dist/artifacts-ui.d.cts +3 -21
- package/dist/artifacts-ui.d.ts +3 -21
- package/dist/background-runtime.d.cts +2 -3
- package/dist/background-runtime.d.ts +2 -3
- package/dist/{chunk-gu34lr-P.js → chunk-Brdx4NCz.js} +1 -1
- package/dist/{chunk-dLJWKfOb.js → chunk-C-rux8Q9.js} +1 -1
- package/dist/{chunk-Ds_twaZn.js → chunk-C4v-HNhS.js} +1 -1
- package/dist/{chunk-Bkma5hIU.js → chunk-CE4seJxF.js} +1 -1
- package/dist/{chunk-D6U0E82p.js → chunk-CV8EPIhT.js} +1 -1
- package/dist/{chunk-ql5N2I_t.js → chunk-CWzHNuVK.js} +1 -1
- package/dist/{chunk-DbGLjU2P.js → chunk-CYpt7PsO.js} +1 -1
- package/dist/{chunk-DOZmcve8.js → chunk-Csr59G5V.js} +1 -1
- package/dist/{chunk-DW7Vg_l2.js → chunk-CxNPSY-b.js} +1 -1
- package/dist/chunk-Dqa_GOcj.js +1 -0
- package/dist/chunk-DsWv3EGF.js +1 -0
- package/dist/{chunk-C7-m0EmI.js → chunk-NUNdcnAZ.js} +1 -1
- package/dist/{chunk-CXQJG7pb.js → chunk-YMkMvAsa.js} +2 -2
- package/dist/{chunk-C-EHtpbB.js → chunk-h5aOI_Pa.js} +1 -1
- package/dist/chunk-kizhspe5.js +1 -0
- package/dist/client-dispatch.js +1 -1
- package/dist/client-history.js +1 -1
- package/dist/client-stream.js +1 -1
- package/dist/{code-generators-DqauYyfX.d.cts → code-generators-DPAqTcAz.d.cts} +0 -2
- package/dist/{code-generators-DqauYyfX.d.ts → code-generators-DPAqTcAz.d.ts} +0 -2
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.d.cts +1 -1
- package/dist/codegen.d.ts +1 -1
- package/dist/codegen.js +1 -1
- package/dist/composer-actions-runtime.cjs +1 -1
- package/dist/composer-actions-runtime.d.cts +4 -20
- package/dist/composer-actions-runtime.d.ts +4 -20
- package/dist/composer-actions-runtime.js +1 -1
- package/dist/{composer-input-DnqGCXZz.d.ts → composer-input-i_FiUp6J.d.cts} +1 -7
- package/dist/{composer-input-DnqGCXZz.d.cts → composer-input-i_FiUp6J.d.ts} +1 -7
- package/dist/{composer-store-6Iwy6WLI.d.ts → composer-store-DhGNgG7Z.d.cts} +1 -3
- package/dist/{composer-store-6Iwy6WLI.d.cts → composer-store-DhGNgG7Z.d.ts} +1 -3
- package/dist/config-diagnostics.d.cts +0 -2
- package/dist/config-diagnostics.d.ts +0 -2
- package/dist/{context-mention-manager-B-rHF98n.d.ts → context-mention-manager-DL-xwGfL.d.cts} +2 -6
- package/dist/{context-mention-manager-B-rHF98n.d.cts → context-mention-manager-DL-xwGfL.d.ts} +2 -6
- package/dist/context-mentions-inline.cjs +1 -1
- package/dist/context-mentions-inline.d.cts +2 -4
- package/dist/context-mentions-inline.d.ts +2 -4
- package/dist/context-mentions-inline.js +1 -1
- package/dist/context-mentions.cjs +1 -1
- package/dist/context-mentions.d.cts +3 -9
- package/dist/context-mentions.d.ts +3 -9
- package/dist/{defaults-BuOjqUAG.d.ts → defaults-Bga2Xrsp.d.cts} +1 -5
- package/dist/{defaults-BuOjqUAG.d.cts → defaults-Bga2Xrsp.d.ts} +1 -5
- package/dist/dictation-runtime.cjs +1 -1
- package/dist/dictation-runtime.d.cts +4 -13
- package/dist/dictation-runtime.d.ts +4 -13
- package/dist/dictation-runtime.js +1 -1
- package/dist/{dom-context-DHTabIn7.d.cts → dom-context-Bw-_9Evh.d.cts} +0 -2
- package/dist/{dom-context-DHTabIn7.d.ts → dom-context-Bw-_9Evh.d.ts} +0 -2
- package/dist/event-stream-view.cjs +1 -1
- package/dist/event-stream-view.d.cts +3 -16
- package/dist/event-stream-view.d.ts +3 -16
- package/dist/{fallback-speech-engine-SqEfkGda.d.ts → fallback-speech-engine-kLdyPcmk.d.cts} +1 -3
- package/dist/{fallback-speech-engine-SqEfkGda.d.cts → fallback-speech-engine-kLdyPcmk.d.ts} +1 -3
- package/dist/{feature-preferences-DqAmje-2.d.ts → feature-preferences-CmwZGKrf.d.cts} +1 -5
- package/dist/{feature-preferences-DqAmje-2.d.cts → feature-preferences-CmwZGKrf.d.ts} +1 -5
- package/dist/forms-ui.d.cts +2 -4
- package/dist/forms-ui.d.ts +2 -4
- package/dist/{history-confirm-dialog-B3L7QNcO.d.cts → history-confirm-dialog-i46-lPN_.d.cts} +2 -14
- package/dist/{history-confirm-dialog-B3L7QNcO.d.ts → history-confirm-dialog-i46-lPN_.d.ts} +2 -14
- package/dist/history-shell.cjs +1 -1
- package/dist/history-shell.d.cts +8 -27
- package/dist/history-shell.d.ts +8 -27
- package/dist/history-shell.js +1 -1
- package/dist/history-view.d.cts +1 -1
- package/dist/history-view.d.ts +1 -1
- package/dist/icons-extra.cjs +1 -1
- package/dist/icons-extra.d.cts +0 -2
- package/dist/icons-extra.d.ts +0 -2
- package/dist/index.cjs +45 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/install.global.js +1 -1
- package/dist/install.global.js.map +1 -1
- package/dist/launcher.global.js +2 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/{loading-label-runtime-loader-JecjOfJS.d.ts → loading-label-runtime-loader-Ccr3ETd3.d.cts} +1 -3
- package/dist/{loading-label-runtime-loader-JecjOfJS.d.cts → loading-label-runtime-loader-Ccr3ETd3.d.ts} +1 -3
- package/dist/loading-label-runtime.cjs +1 -1
- package/dist/loading-label-runtime.d.cts +1 -1
- package/dist/loading-label-runtime.d.ts +1 -1
- package/dist/loading-label-runtime.js +1 -1
- package/dist/markdown-parsers.js +1 -1
- package/dist/{message-bubble-CBYtpDsT.d.ts → message-bubble-C6AVaH7f.d.cts} +20 -3
- package/dist/{message-bubble-CBYtpDsT.d.cts → message-bubble-C6AVaH7f.d.ts} +20 -3
- package/dist/{plugin-kit-C1mRjLgW.d.cts → plugin-kit-BVggqE3C.d.cts} +0 -2
- package/dist/{plugin-kit-C1mRjLgW.d.ts → plugin-kit-BVggqE3C.d.ts} +0 -2
- package/dist/plugin-kit.d.cts +1 -1
- package/dist/plugin-kit.d.ts +1 -1
- package/dist/preferences-runtime.cjs +1 -1
- package/dist/preferences-runtime.d.cts +1 -1
- package/dist/preferences-runtime.d.ts +1 -1
- package/dist/preferences-runtime.js +1 -1
- package/dist/{preview-_UJwwt2L.d.cts → preview-BMdRffo4.d.cts} +2 -6
- package/dist/{preview-_UJwwt2L.d.ts → preview-BMdRffo4.d.ts} +2 -6
- package/dist/{registry-B5ZV3K-h.d.ts → registry-B16l8s1b.d.cts} +1 -8
- package/dist/{registry-B5ZV3K-h.d.cts → registry-B16l8s1b.d.ts} +1 -8
- package/dist/{session-Bys8_XuB.d.cts → session-CtZHe7fc.d.cts} +8 -92
- package/dist/{session-Bys8_XuB.d.ts → session-CtZHe7fc.d.ts} +8 -92
- package/dist/session-reconnect.d.cts +2 -4
- package/dist/session-reconnect.d.ts +2 -4
- package/dist/smart-dom-reader.d.cts +2 -8
- package/dist/smart-dom-reader.d.ts +2 -8
- package/dist/testing.d.cts +0 -2
- package/dist/testing.d.ts +0 -2
- package/dist/theme-editor-preview.cjs +42 -42
- package/dist/theme-editor-preview.d.cts +1 -1
- package/dist/theme-editor-preview.d.ts +1 -1
- package/dist/theme-editor-preview.js +25 -25
- package/dist/theme-editor.cjs +25 -5
- package/dist/theme-editor.d.cts +2 -22
- package/dist/theme-editor.d.ts +2 -22
- package/dist/theme-editor.js +1 -1
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +2 -4
- package/dist/theme-reference.d.ts +2 -4
- package/dist/theme-reference.js +1 -1
- package/dist/{tool-loading-animation-d5qAQcwv.d.ts → tool-loading-animation-D2cyFvmM.d.cts} +1 -7
- package/dist/{tool-loading-animation-d5qAQcwv.d.cts → tool-loading-animation-D2cyFvmM.d.ts} +1 -7
- package/dist/{tooltip-BkW-8MnD.d.cts → tooltip-DbXkAuJL.d.cts} +0 -2
- package/dist/{tooltip-BkW-8MnD.d.ts → tooltip-DbXkAuJL.d.ts} +0 -2
- package/dist/{turn-activity-ui-q6fHVnx-.d.cts → turn-activity-ui-Do1Nd-Ow.d.cts} +2 -12
- package/dist/{turn-activity-ui-q6fHVnx-.d.ts → turn-activity-ui-Do1Nd-Ow.d.ts} +2 -12
- package/dist/turn-activity-ui.d.cts +1 -1
- package/dist/turn-activity-ui.d.ts +1 -1
- package/dist/{types-B_mj21jg.d.cts → types-BC7MRxO5.d.cts} +76 -29
- package/dist/{types-B_mj21jg.d.ts → types-BC7MRxO5.d.ts} +76 -29
- package/dist/ui-extras.js +3 -3
- package/dist/voice-client-tools.d.cts +1 -3
- package/dist/voice-client-tools.d.ts +1 -3
- package/dist/voice-runtime.cjs +1 -1
- package/dist/voice-runtime.d.cts +2 -12
- package/dist/voice-runtime.d.ts +2 -12
- package/dist/voice-runtime.js +2 -2
- package/dist/voice-worklet-player.d.cts +2 -6
- package/dist/voice-worklet-player.d.ts +2 -6
- package/dist/{webmcp-runtime-entry-ClEO3qdI.d.ts → webmcp-runtime-entry-B8g46vS0.d.cts} +1 -5
- package/dist/{webmcp-runtime-entry-ClEO3qdI.d.cts → webmcp-runtime-entry-B8g46vS0.d.ts} +1 -5
- package/dist/webmcp-runtime.d.cts +1 -1
- package/dist/webmcp-runtime.d.ts +1 -1
- package/dist/widget.css +1 -1
- package/package.json +4 -4
- package/src/components/event-stream-view.test.ts +5 -0
- package/src/components/message-bubble.ts +26 -6
- package/src/components/scroll-to-bottom.test.ts +135 -0
- package/src/components/scroll-to-bottom.ts +50 -13
- package/src/components/user-message-collapse.ts +117 -0
- package/src/defaults.ts +6 -0
- package/src/styles/widget.css +56 -0
- package/src/theme-reference.ts +2 -2
- package/src/types/theme.ts +29 -0
- package/src/types.ts +49 -5
- package/src/ui.scroll-additive.test.ts +219 -117
- package/src/ui.scroll.test.ts +176 -13
- package/src/ui.ts +230 -107
- package/src/ui.turn-activity.test.ts +7 -7
- package/src/ui.user-message-collapse.test.ts +540 -0
- package/src/utils/auto-follow.test.ts +0 -38
- package/src/utils/auto-follow.ts +0 -35
- package/src/utils/theme.test.ts +23 -0
- package/src/utils/tokens.ts +16 -0
- package/dist/chunk-CVMIncEY.js +0 -1
- package/dist/chunk-DVgzoVCB.js +0 -1
- package/dist/chunk-d54BJdKd.js +0 -1
package/src/types/theme.ts
CHANGED
|
@@ -530,6 +530,22 @@ export interface MessageActionsTokens {
|
|
|
530
530
|
borderRadius?: TokenReference<'radius'>;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
+
/**
|
|
534
|
+
* Long user message collapse (`features.userMessageCollapse`). Every key is
|
|
535
|
+
* optional; unset, the fade and the toggle follow the user bubble's own text
|
|
536
|
+
* color and type, so they already work on any fill in light and dark schemes.
|
|
537
|
+
*/
|
|
538
|
+
export interface UserMessageCollapseTokens {
|
|
539
|
+
/** Height of the bottom fade on a collapsed bubble. @default "48px" */
|
|
540
|
+
fadeHeight?: string;
|
|
541
|
+
/** "Show more" / "Show less" text color. Defaults to the user bubble text color. */
|
|
542
|
+
toggleForeground?: TokenReference<'color'>;
|
|
543
|
+
/** Toggle label type size. @default "0.8125rem" */
|
|
544
|
+
toggleFontSize?: string;
|
|
545
|
+
/** Toggle label weight. @default "600" */
|
|
546
|
+
toggleFontWeight?: string;
|
|
547
|
+
}
|
|
548
|
+
|
|
533
549
|
/**
|
|
534
550
|
* Bubble geometry and type, per role. Every key is unset by default and each
|
|
535
551
|
* one falls back to the value the message layout preset already produced, so
|
|
@@ -1307,6 +1323,17 @@ export interface ScrollToBottomTokens extends ComponentTokenSet {
|
|
|
1307
1323
|
fontSize?: string;
|
|
1308
1324
|
fontWeight?: string;
|
|
1309
1325
|
};
|
|
1326
|
+
/**
|
|
1327
|
+
* The labelled "Approval needed" state shown while a pending approval is
|
|
1328
|
+
* below the fold. Omitted values follow the control's own colors, so it
|
|
1329
|
+
* matches the theme until you give it an accent.
|
|
1330
|
+
*/
|
|
1331
|
+
approval?: {
|
|
1332
|
+
background?: TokenReference<'color'>;
|
|
1333
|
+
foreground?: TokenReference<'color'>;
|
|
1334
|
+
border?: TokenReference<'color'>;
|
|
1335
|
+
fontWeight?: string;
|
|
1336
|
+
};
|
|
1310
1337
|
}
|
|
1311
1338
|
|
|
1312
1339
|
/** Visual tokens shared by one suggestion presentation variant. */
|
|
@@ -1357,6 +1384,8 @@ export interface ComponentTokens {
|
|
|
1357
1384
|
message: MessageTokens;
|
|
1358
1385
|
/** Hover-revealed per-message action row (copy, vote, read aloud). */
|
|
1359
1386
|
messageActions?: MessageActionsTokens;
|
|
1387
|
+
/** Fade and "Show more" toggle on collapsed long user messages. */
|
|
1388
|
+
userMessageCollapse?: UserMessageCollapseTokens;
|
|
1360
1389
|
/** Welcome / intro card shown above the message list. */
|
|
1361
1390
|
introCard?: IntroCardTokens;
|
|
1362
1391
|
/** Markdown surfaces (chat + artifact pane). */
|
package/src/types.ts
CHANGED
|
@@ -2228,10 +2228,13 @@ export type AgentWidgetArtifactsFeature = {
|
|
|
2228
2228
|
*
|
|
2229
2229
|
* - `"anchor-top"` (default): on send, scroll the user's message near the top
|
|
2230
2230
|
* of the viewport and hold it there while the response streams in beneath it
|
|
2231
|
-
* (ChatGPT-style).
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2234
|
-
*
|
|
2231
|
+
* (ChatGPT-style). The anchor holds for the whole reply, even when the
|
|
2232
|
+
* message is taller than the viewport or tool calls push the answer below
|
|
2233
|
+
* the fold, until the reader scrolls away, jumps to the latest content with
|
|
2234
|
+
* the scroll-to-bottom control, or sends again. When a turn has no user send
|
|
2235
|
+
* to anchor to (a proactive greeting, an injected assistant message, a
|
|
2236
|
+
* resubmit, or first-load streaming), it falls back to `"follow"` for that
|
|
2237
|
+
* turn so content never streams in off-screen.
|
|
2235
2238
|
* - `"follow"`: keep the newest content pinned to the bottom of the viewport,
|
|
2236
2239
|
* pausing when the user scrolls up and resuming when they return to the
|
|
2237
2240
|
* bottom. This was the default before 4.x.
|
|
@@ -2320,7 +2323,8 @@ export type AgentWidgetScrollBehaviorFeature = {
|
|
|
2320
2323
|
|
|
2321
2324
|
/** Decorative glyph state. Hidden glyphs should pause host-owned animation. */
|
|
2322
2325
|
export type AgentWidgetScrollToBottomIconState = {
|
|
2323
|
-
|
|
2326
|
+
/** `"approval-below"`: a pending approval is below the fold and the turn waits on it. */
|
|
2327
|
+
activity: "idle" | "generating-below" | "approval-below";
|
|
2324
2328
|
visible: boolean;
|
|
2325
2329
|
hovered: boolean;
|
|
2326
2330
|
focused: boolean;
|
|
@@ -2360,6 +2364,15 @@ export type AgentWidgetScrollToBottomFeature = {
|
|
|
2360
2364
|
* @default ""
|
|
2361
2365
|
*/
|
|
2362
2366
|
label?: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* Label shown while a pending approval sits below the fold. The control
|
|
2369
|
+
* widens to a labelled pill with the approval's shield glyph, and the turn
|
|
2370
|
+
* stays put until the reader jumps (anchor-top never scrolls them to it).
|
|
2371
|
+
* Styled by `theme.components.scrollToBottom.approval`. Set to an empty
|
|
2372
|
+
* string to keep the regular control.
|
|
2373
|
+
* @default "Approval needed"
|
|
2374
|
+
*/
|
|
2375
|
+
approvalLabel?: string;
|
|
2363
2376
|
/** Glyph while a live response is arriving below. V4 defaults to arrow; V5 to dots. */
|
|
2364
2377
|
streamingIndicator?: "dots" | "arrow";
|
|
2365
2378
|
/** Visibility transition. V4 defaults to none; V5 to fade. Honors reduced motion. */
|
|
@@ -2788,6 +2801,31 @@ export type AgentWidgetStreamAnimationFeature = {
|
|
|
2788
2801
|
plugins?: Record<string, StreamAnimationPlugin>;
|
|
2789
2802
|
};
|
|
2790
2803
|
|
|
2804
|
+
/**
|
|
2805
|
+
* Collapse long user messages behind a "Show more" / "Show less" toggle.
|
|
2806
|
+
* Only the built-in user bubble collapses; `layout.messages.renderUserMessage`
|
|
2807
|
+
* and plugin `renderMessage` output is left untouched.
|
|
2808
|
+
*/
|
|
2809
|
+
export type AgentWidgetUserMessageCollapseFeature = {
|
|
2810
|
+
/**
|
|
2811
|
+
* Clip a user bubble whose rendered content (text, markdown, code,
|
|
2812
|
+
* attachments) is taller than `maxHeight`, with a bottom fade and a real
|
|
2813
|
+
* toggle button. The full message stays in the DOM, so find-in-page, copy,
|
|
2814
|
+
* selection and screen readers still reach it. Interim voice transcripts
|
|
2815
|
+
* stay expanded and collapse once final. A reader's toggle is remembered
|
|
2816
|
+
* per message for the life of the widget.
|
|
2817
|
+
* @default false (`true` under `future.v5Defaults`)
|
|
2818
|
+
*/
|
|
2819
|
+
enabled?: boolean;
|
|
2820
|
+
/**
|
|
2821
|
+
* Collapsed height in px. Content within about two lines (48px) of the
|
|
2822
|
+
* limit is left expanded, so the toggle never hides just a line or two.
|
|
2823
|
+
* The default shows about ten lines of bubble text.
|
|
2824
|
+
* @default 240
|
|
2825
|
+
*/
|
|
2826
|
+
maxHeight?: number;
|
|
2827
|
+
};
|
|
2828
|
+
|
|
2791
2829
|
export type AgentWidgetFeatureFlags = {
|
|
2792
2830
|
showReasoning?: boolean;
|
|
2793
2831
|
showToolCalls?: boolean;
|
|
@@ -2804,6 +2842,8 @@ export type AgentWidgetFeatureFlags = {
|
|
|
2804
2842
|
scrollToBottom?: AgentWidgetScrollToBottomFeature;
|
|
2805
2843
|
/** Transcript scroll behavior during streamed responses. */
|
|
2806
2844
|
scrollBehavior?: AgentWidgetScrollBehaviorFeature;
|
|
2845
|
+
/** "Show more" collapse for long user messages. Off by default; on under `future.v5Defaults`. */
|
|
2846
|
+
userMessageCollapse?: AgentWidgetUserMessageCollapseFeature;
|
|
2807
2847
|
/** Collapsed transcript behavior for tool call rows. */
|
|
2808
2848
|
toolCallDisplay?: AgentWidgetToolCallDisplayFeature;
|
|
2809
2849
|
/** Collapsed transcript behavior for reasoning rows. */
|
|
@@ -8433,6 +8473,10 @@ export type AgentWidgetConfig = {
|
|
|
8433
8473
|
sendButtonLabel?: string;
|
|
8434
8474
|
/** Button label shown in text mode while a response is streaming. Default: "Stop". */
|
|
8435
8475
|
stopButtonLabel?: string;
|
|
8476
|
+
/** Toggle label on a collapsed long user message (`features.userMessageCollapse`). @default "Show more" */
|
|
8477
|
+
showMoreLabel?: string;
|
|
8478
|
+
/** Toggle label on an expanded long user message (`features.userMessageCollapse`). @default "Show less" */
|
|
8479
|
+
showLessLabel?: string;
|
|
8436
8480
|
/**
|
|
8437
8481
|
* When false, the welcome / intro card is not shown above the message list.
|
|
8438
8482
|
* @deprecated Use `welcome.variant: "none"`.
|