@dataverse-kit/agent-kit 0.2.1 → 0.3.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 +42 -2
- package/dist/index.cjs +776 -370
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +153 -1
- package/dist/index.d.ts +153 -1
- package/dist/index.mjs +772 -361
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -325,6 +325,129 @@ interface AgentOpsPanelProps {
|
|
|
325
325
|
/** The composed ops surface: is it available, which agent, what has it done. */
|
|
326
326
|
declare function AgentOpsPanel(props: AgentOpsPanelProps): React$1.ReactElement;
|
|
327
327
|
|
|
328
|
+
/** One pill on the docked launcher. */
|
|
329
|
+
interface LauncherItem {
|
|
330
|
+
id: string;
|
|
331
|
+
/** The accessible name, and the text revealed on expand. Always present to AT. */
|
|
332
|
+
label: string;
|
|
333
|
+
icon: React$1.ReactElement;
|
|
334
|
+
/** Rendered as a count badge; omit or 0 for none. */
|
|
335
|
+
badgeCount?: number;
|
|
336
|
+
}
|
|
337
|
+
/** A tab in the assistant panel's strip. Two or three; this is not a general TabList. */
|
|
338
|
+
interface AssistantTab {
|
|
339
|
+
id: string;
|
|
340
|
+
label: string;
|
|
341
|
+
icon?: React$1.ReactElement;
|
|
342
|
+
}
|
|
343
|
+
interface FeedbackValue {
|
|
344
|
+
/** 1..5, or 0 for "not rated". Submit is blocked until it is > 0. */
|
|
345
|
+
rating: number;
|
|
346
|
+
comment: string;
|
|
347
|
+
/** REQUIRED by the reference surface — submit stays disabled until answered. */
|
|
348
|
+
mayContact?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
interface AgentLauncherProps {
|
|
352
|
+
items: readonly LauncherItem[];
|
|
353
|
+
onSelect: (id: string) => void;
|
|
354
|
+
/** Which edge it docks to. Default 'right'. */
|
|
355
|
+
side?: 'left' | 'right';
|
|
356
|
+
/** Accessible name for the group. */
|
|
357
|
+
label?: string;
|
|
358
|
+
/** Hide it without unmounting, so a host can keep its state. */
|
|
359
|
+
hidden?: boolean;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* The edge-docked entry point — the collapsed pills that expand on hover, as the M365 admin
|
|
363
|
+
* centre presents "Help & support" and "Give Feedback".
|
|
364
|
+
*
|
|
365
|
+
* ★★ IN-TREE, and that is a measured decision rather than a stylistic one. A Fluent `Menu` costs
|
|
366
|
+
* **+185 KB and 2 `attrHandlers.set` calls** in a PCF bundle (measured 2026-09-25 against
|
|
367
|
+
* `ConversationHeader`), which is the whole tabster-singleton hazard. A stack of buttons needs
|
|
368
|
+
* none of it, so a host that embeds only the launcher needs no `targetDocument` isolation.
|
|
369
|
+
*
|
|
370
|
+
* ★★ THE LABEL IS ALWAYS RENDERED, never swapped in on hover. Collapsing is done with `max-width`
|
|
371
|
+
* and `overflow: hidden`, so the accessible name is identical collapsed and expanded. Revealing
|
|
372
|
+
* text on hover only — the reference behaviour — would leave a screen-reader user with an
|
|
373
|
+
* unnamed button, and `title` is not a substitute.
|
|
374
|
+
*/
|
|
375
|
+
declare function AgentLauncher({ items, onSelect, side, label, hidden, }: AgentLauncherProps): React$1.ReactElement | null;
|
|
376
|
+
|
|
377
|
+
interface AssistantPanelProps {
|
|
378
|
+
title: string;
|
|
379
|
+
tabs: readonly AssistantTab[];
|
|
380
|
+
activeTabId: string;
|
|
381
|
+
onTabChange: (id: string) => void;
|
|
382
|
+
onClose?: () => void;
|
|
383
|
+
/** The on/off switch in the header. Omit both to hide it. */
|
|
384
|
+
enabled?: boolean;
|
|
385
|
+
onEnabledChange?: (enabled: boolean) => void;
|
|
386
|
+
/**
|
|
387
|
+
* The pre-arrival line ("Support Assistant will be with you in a moment").
|
|
388
|
+
* ★ Chrome, not transcript content — it is never announced as a message.
|
|
389
|
+
*/
|
|
390
|
+
status?: string;
|
|
391
|
+
onDownloadTranscript?: () => void;
|
|
392
|
+
muted?: boolean;
|
|
393
|
+
onMutedChange?: (muted: boolean) => void;
|
|
394
|
+
/** The transcript + composer. Slot in `MessageList` and `Composer`. */
|
|
395
|
+
children?: React$1.ReactNode;
|
|
396
|
+
/**
|
|
397
|
+
* Drives the slide-in and focus handling. Defaults to `true` — a panel a host simply places
|
|
398
|
+
* stays open and unanimated, which is the behaviour that shipped in 0.3.0.
|
|
399
|
+
*/
|
|
400
|
+
open?: boolean;
|
|
401
|
+
/** Called on Escape. Omit and Escape does nothing — the panel never closes itself silently. */
|
|
402
|
+
onDismiss?: () => void;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* The docked assistant drawer, as the M365 admin centre presents Support Assistant: a small tab
|
|
406
|
+
* strip, a title, an on/off switch, the transcript, a pre-arrival status line, and a footer with
|
|
407
|
+
* transcript-download and mute.
|
|
408
|
+
*
|
|
409
|
+
* ★★ THE TAB STRIP IS IN-TREE, not Fluent's `TabList`, and the reason is measured: one Fluent
|
|
410
|
+
* `Menu` cost **+185 KB and 2 `attrHandlers.set` calls** in a PCF bundle (2026-09-25). For a
|
|
411
|
+
* two- or three-tab strip the APG pattern is small — roving tabindex, `aria-selected`,
|
|
412
|
+
* `aria-controls` — and the kit already owns `useRovingTabindex`. Paying the tabster-singleton
|
|
413
|
+
* hazard for that would be a bad trade. `TabList` remains the right call where the strip is
|
|
414
|
+
* large, RTL-aware and needs Home/End/PgUp/PgDn.
|
|
415
|
+
*
|
|
416
|
+
* ★ `status` is CHROME. It renders outside the transcript and is not routed through
|
|
417
|
+
* `LiveAnnouncer`, because "will be with you in a moment" is not a message and announcing it
|
|
418
|
+
* would interleave with the reply the user is waiting for.
|
|
419
|
+
*/
|
|
420
|
+
declare function AssistantPanel(props: AssistantPanelProps): React$1.ReactElement;
|
|
421
|
+
|
|
422
|
+
interface FeedbackPanelProps {
|
|
423
|
+
value: FeedbackValue;
|
|
424
|
+
onChange: (value: FeedbackValue) => void;
|
|
425
|
+
onSubmit: (value: FeedbackValue) => void;
|
|
426
|
+
onCancel?: () => void;
|
|
427
|
+
heading?: string;
|
|
428
|
+
ratingLabel?: string;
|
|
429
|
+
/** Rendered under "Add more details" — a host's screenshot/attachment affordance. */
|
|
430
|
+
attachments?: React$1.ReactNode;
|
|
431
|
+
/** Shown above the buttons. The reference names the signed-in user and links its policy. */
|
|
432
|
+
privacyNote?: React$1.ReactNode;
|
|
433
|
+
busy?: boolean;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Structured feedback capture, as the M365 admin centre's "Submit feedback to Microsoft": a star
|
|
437
|
+
* rating, free text, a host attachment slot, a REQUIRED contact-consent choice, and a privacy note.
|
|
438
|
+
*
|
|
439
|
+
* ★★ THE RATING IS AN APG RADIOGROUP, in-tree. Five buttons with roving tabindex and
|
|
440
|
+
* `aria-checked` is the whole pattern; reaching for a Fluent component here would buy the
|
|
441
|
+
* tabster-singleton hazard (measured: one Fluent `Menu` = +185 KB and 2 `attrHandlers.set`) for
|
|
442
|
+
* nothing. `RadioGroup` IS used for the consent pair, which is a genuine native radio group.
|
|
443
|
+
*
|
|
444
|
+
* ★★ SUBMIT IS DISABLED UNTIL BOTH A RATING AND A CONSENT ANSWER EXIST, and the reason is not
|
|
445
|
+
* tidiness: the reference marks consent required, and a feedback record submitted without it
|
|
446
|
+
* cannot lawfully be followed up. `mayContact === undefined` is "not answered" and is NOT the
|
|
447
|
+
* same as `false` — collapsing the two would silently record a refusal the user never gave.
|
|
448
|
+
*/
|
|
449
|
+
declare function FeedbackPanel(props: FeedbackPanelProps): React$1.ReactElement;
|
|
450
|
+
|
|
328
451
|
interface AgentAppShellProps {
|
|
329
452
|
/** The left icon rail. Hidden below `sm`. */
|
|
330
453
|
rail?: React$1.ReactNode;
|
|
@@ -818,6 +941,35 @@ interface RovingTabindex {
|
|
|
818
941
|
*/
|
|
819
942
|
declare function useRovingTabindex(options: RovingTabindexOptions): RovingTabindex;
|
|
820
943
|
|
|
944
|
+
interface ReturnFocusOptions {
|
|
945
|
+
/** When this goes true the surface is open; false returns focus to whatever opened it. */
|
|
946
|
+
open: boolean;
|
|
947
|
+
/** The surface. Focus moves to its first focusable node on open. */
|
|
948
|
+
containerRef: React$1.RefObject<HTMLElement>;
|
|
949
|
+
/** Skip moving focus IN on open. Focus is still returned on close. */
|
|
950
|
+
manageInitialFocus?: boolean;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Move focus into a surface when it opens, and put it back where it came from when it closes.
|
|
954
|
+
*
|
|
955
|
+
* ★★ THIS IS NOT A FOCUS TRAP, DELIBERATELY. A docked assistant drawer is NON-MODAL — the page
|
|
956
|
+
* behind it stays readable and usable, which is the whole point of docking rather than
|
|
957
|
+
* dialoging. Trapping focus in a surface that does not claim modality strands a keyboard user
|
|
958
|
+
* with no way out, and the page carries no `aria-modal` or inert backdrop to justify it. A host
|
|
959
|
+
* that genuinely wants modal behaviour should wrap in a real dialog and get the trap, the
|
|
960
|
+
* backdrop and the `aria-modal` together rather than half of them here.
|
|
961
|
+
*
|
|
962
|
+
* ★★ THE OPENER IS CAPTURED ON THE OPENING TRANSITION, not on every render. Reading
|
|
963
|
+
* `document.activeElement` at close time would return something inside the drawer — which is
|
|
964
|
+
* exactly where focus is — so the return target has to be remembered before focus moves.
|
|
965
|
+
*
|
|
966
|
+
* ★ Returning focus is guarded on the element still being connected. A trigger can be unmounted
|
|
967
|
+
* while the surface is open (a toolbar collapsing, a row removed); calling `.focus()` on a
|
|
968
|
+
* detached node silently does nothing and leaves focus on `<body>`, so fall back to the body
|
|
969
|
+
* check rather than pretending it worked.
|
|
970
|
+
*/
|
|
971
|
+
declare function useReturnFocus({ open, containerRef, manageInitialFocus }: ReturnFocusOptions): void;
|
|
972
|
+
|
|
821
973
|
interface StickyScroll {
|
|
822
974
|
/** Put on the scrolling element. */
|
|
823
975
|
onScroll: () => void;
|
|
@@ -873,4 +1025,4 @@ interface Conversation {
|
|
|
873
1025
|
*/
|
|
874
1026
|
declare function useConversation(options: UseConversationOptions): Conversation;
|
|
875
1027
|
|
|
876
|
-
export { ActionCard, type ActionCardProps, ActionResult, type ActionResultProps, AgentAppShell, type AgentAppShellProps, AgentAttachment, AgentAvailability, AgentAvatar, type AgentAvatarProps, AgentCitation, type AgentDescriptor, AgentFailure, AgentMessage, AgentOpsPanel, type AgentOpsPanelProps, AgentParticipant, AgentPicker, type AgentPickerProps, type AgentRunRecord, AgentRunStatus, AgentSource, AgentStatusBadge, type AgentStatusBadgeProps, AgentToolCall, AgentUsage, Announcement, AnswerWithCitations, type AnswerWithCitationsProps, AppRail, type AppRailProps, ApprovalCard, type ApprovalCardProps, AvailabilityBanner, type AvailabilityBannerProps, CitationChip, type CitationChipProps, CitationList, type CitationListProps, Composer, type ComposerProps, ConfirmInline, type ConfirmInlineProps, type Conversation, ConversationHeader, type ConversationHeaderProps, ConversationList, ConversationListItem, type ConversationListItemProps, type ConversationListProps, ConversationState, type ConversationSummary, type ConversationTab, DayDivider, DayDividerLabel, type DayDividerProps, EmptyConversation, type EmptyConversationProps, GlobalSearchBar, type GlobalSearchBarProps, GroundingPanel, type GroundingPanelProps, type HeaderAction, IAgentService, LiveAnnouncer, type LiveAnnouncerProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageList, type MessageListProps, ModelBadge, type ModelBadgeProps, ParameterReview, type ParameterReviewProps, type PresenceState, ProviderAttribution, type ProviderAttributionProps, type RailItem, RightPane, type RightPaneProps, type RovingTabindex, type RovingTabindexOptions, RunHistoryPanel, type RunHistoryPanelProps, RunTimeline, type RunTimelineProps, SourceCard, type SourceCardProps, type StickyScroll, StreamingText, type StreamingTextProps, SuggestedPrompts, type SuggestedPromptsProps, SystemNotice, type SystemNoticeProps, ThrottleNotice, type ThrottleNoticeProps, ToolCallCard, type ToolCallCardProps, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseConversationOptions, conversationAccessibleName, formatDayLabel, messageAttribution, runStatusLabel, useConversation, useFocusRestore, useRovingTabindex, useStickyScroll, useVisuallyHiddenStyles };
|
|
1028
|
+
export { ActionCard, type ActionCardProps, ActionResult, type ActionResultProps, AgentAppShell, type AgentAppShellProps, AgentAttachment, AgentAvailability, AgentAvatar, type AgentAvatarProps, AgentCitation, type AgentDescriptor, AgentFailure, AgentLauncher, type AgentLauncherProps, AgentMessage, AgentOpsPanel, type AgentOpsPanelProps, AgentParticipant, AgentPicker, type AgentPickerProps, type AgentRunRecord, AgentRunStatus, AgentSource, AgentStatusBadge, type AgentStatusBadgeProps, AgentToolCall, AgentUsage, Announcement, AnswerWithCitations, type AnswerWithCitationsProps, AppRail, type AppRailProps, ApprovalCard, type ApprovalCardProps, AssistantPanel, type AssistantPanelProps, type AssistantTab, AvailabilityBanner, type AvailabilityBannerProps, CitationChip, type CitationChipProps, CitationList, type CitationListProps, Composer, type ComposerProps, ConfirmInline, type ConfirmInlineProps, type Conversation, ConversationHeader, type ConversationHeaderProps, ConversationList, ConversationListItem, type ConversationListItemProps, type ConversationListProps, ConversationState, type ConversationSummary, type ConversationTab, DayDivider, DayDividerLabel, type DayDividerProps, EmptyConversation, type EmptyConversationProps, FeedbackPanel, type FeedbackPanelProps, type FeedbackValue, GlobalSearchBar, type GlobalSearchBarProps, GroundingPanel, type GroundingPanelProps, type HeaderAction, IAgentService, type LauncherItem, LiveAnnouncer, type LiveAnnouncerProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageList, type MessageListProps, ModelBadge, type ModelBadgeProps, ParameterReview, type ParameterReviewProps, type PresenceState, ProviderAttribution, type ProviderAttributionProps, type RailItem, type ReturnFocusOptions, RightPane, type RightPaneProps, type RovingTabindex, type RovingTabindexOptions, RunHistoryPanel, type RunHistoryPanelProps, RunTimeline, type RunTimelineProps, SourceCard, type SourceCardProps, type StickyScroll, StreamingText, type StreamingTextProps, SuggestedPrompts, type SuggestedPromptsProps, SystemNotice, type SystemNoticeProps, ThrottleNotice, type ThrottleNoticeProps, ToolCallCard, type ToolCallCardProps, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseConversationOptions, conversationAccessibleName, formatDayLabel, messageAttribution, runStatusLabel, useConversation, useFocusRestore, useReturnFocus, useRovingTabindex, useStickyScroll, useVisuallyHiddenStyles };
|
package/dist/index.d.ts
CHANGED
|
@@ -325,6 +325,129 @@ interface AgentOpsPanelProps {
|
|
|
325
325
|
/** The composed ops surface: is it available, which agent, what has it done. */
|
|
326
326
|
declare function AgentOpsPanel(props: AgentOpsPanelProps): React$1.ReactElement;
|
|
327
327
|
|
|
328
|
+
/** One pill on the docked launcher. */
|
|
329
|
+
interface LauncherItem {
|
|
330
|
+
id: string;
|
|
331
|
+
/** The accessible name, and the text revealed on expand. Always present to AT. */
|
|
332
|
+
label: string;
|
|
333
|
+
icon: React$1.ReactElement;
|
|
334
|
+
/** Rendered as a count badge; omit or 0 for none. */
|
|
335
|
+
badgeCount?: number;
|
|
336
|
+
}
|
|
337
|
+
/** A tab in the assistant panel's strip. Two or three; this is not a general TabList. */
|
|
338
|
+
interface AssistantTab {
|
|
339
|
+
id: string;
|
|
340
|
+
label: string;
|
|
341
|
+
icon?: React$1.ReactElement;
|
|
342
|
+
}
|
|
343
|
+
interface FeedbackValue {
|
|
344
|
+
/** 1..5, or 0 for "not rated". Submit is blocked until it is > 0. */
|
|
345
|
+
rating: number;
|
|
346
|
+
comment: string;
|
|
347
|
+
/** REQUIRED by the reference surface — submit stays disabled until answered. */
|
|
348
|
+
mayContact?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
interface AgentLauncherProps {
|
|
352
|
+
items: readonly LauncherItem[];
|
|
353
|
+
onSelect: (id: string) => void;
|
|
354
|
+
/** Which edge it docks to. Default 'right'. */
|
|
355
|
+
side?: 'left' | 'right';
|
|
356
|
+
/** Accessible name for the group. */
|
|
357
|
+
label?: string;
|
|
358
|
+
/** Hide it without unmounting, so a host can keep its state. */
|
|
359
|
+
hidden?: boolean;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* The edge-docked entry point — the collapsed pills that expand on hover, as the M365 admin
|
|
363
|
+
* centre presents "Help & support" and "Give Feedback".
|
|
364
|
+
*
|
|
365
|
+
* ★★ IN-TREE, and that is a measured decision rather than a stylistic one. A Fluent `Menu` costs
|
|
366
|
+
* **+185 KB and 2 `attrHandlers.set` calls** in a PCF bundle (measured 2026-09-25 against
|
|
367
|
+
* `ConversationHeader`), which is the whole tabster-singleton hazard. A stack of buttons needs
|
|
368
|
+
* none of it, so a host that embeds only the launcher needs no `targetDocument` isolation.
|
|
369
|
+
*
|
|
370
|
+
* ★★ THE LABEL IS ALWAYS RENDERED, never swapped in on hover. Collapsing is done with `max-width`
|
|
371
|
+
* and `overflow: hidden`, so the accessible name is identical collapsed and expanded. Revealing
|
|
372
|
+
* text on hover only — the reference behaviour — would leave a screen-reader user with an
|
|
373
|
+
* unnamed button, and `title` is not a substitute.
|
|
374
|
+
*/
|
|
375
|
+
declare function AgentLauncher({ items, onSelect, side, label, hidden, }: AgentLauncherProps): React$1.ReactElement | null;
|
|
376
|
+
|
|
377
|
+
interface AssistantPanelProps {
|
|
378
|
+
title: string;
|
|
379
|
+
tabs: readonly AssistantTab[];
|
|
380
|
+
activeTabId: string;
|
|
381
|
+
onTabChange: (id: string) => void;
|
|
382
|
+
onClose?: () => void;
|
|
383
|
+
/** The on/off switch in the header. Omit both to hide it. */
|
|
384
|
+
enabled?: boolean;
|
|
385
|
+
onEnabledChange?: (enabled: boolean) => void;
|
|
386
|
+
/**
|
|
387
|
+
* The pre-arrival line ("Support Assistant will be with you in a moment").
|
|
388
|
+
* ★ Chrome, not transcript content — it is never announced as a message.
|
|
389
|
+
*/
|
|
390
|
+
status?: string;
|
|
391
|
+
onDownloadTranscript?: () => void;
|
|
392
|
+
muted?: boolean;
|
|
393
|
+
onMutedChange?: (muted: boolean) => void;
|
|
394
|
+
/** The transcript + composer. Slot in `MessageList` and `Composer`. */
|
|
395
|
+
children?: React$1.ReactNode;
|
|
396
|
+
/**
|
|
397
|
+
* Drives the slide-in and focus handling. Defaults to `true` — a panel a host simply places
|
|
398
|
+
* stays open and unanimated, which is the behaviour that shipped in 0.3.0.
|
|
399
|
+
*/
|
|
400
|
+
open?: boolean;
|
|
401
|
+
/** Called on Escape. Omit and Escape does nothing — the panel never closes itself silently. */
|
|
402
|
+
onDismiss?: () => void;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* The docked assistant drawer, as the M365 admin centre presents Support Assistant: a small tab
|
|
406
|
+
* strip, a title, an on/off switch, the transcript, a pre-arrival status line, and a footer with
|
|
407
|
+
* transcript-download and mute.
|
|
408
|
+
*
|
|
409
|
+
* ★★ THE TAB STRIP IS IN-TREE, not Fluent's `TabList`, and the reason is measured: one Fluent
|
|
410
|
+
* `Menu` cost **+185 KB and 2 `attrHandlers.set` calls** in a PCF bundle (2026-09-25). For a
|
|
411
|
+
* two- or three-tab strip the APG pattern is small — roving tabindex, `aria-selected`,
|
|
412
|
+
* `aria-controls` — and the kit already owns `useRovingTabindex`. Paying the tabster-singleton
|
|
413
|
+
* hazard for that would be a bad trade. `TabList` remains the right call where the strip is
|
|
414
|
+
* large, RTL-aware and needs Home/End/PgUp/PgDn.
|
|
415
|
+
*
|
|
416
|
+
* ★ `status` is CHROME. It renders outside the transcript and is not routed through
|
|
417
|
+
* `LiveAnnouncer`, because "will be with you in a moment" is not a message and announcing it
|
|
418
|
+
* would interleave with the reply the user is waiting for.
|
|
419
|
+
*/
|
|
420
|
+
declare function AssistantPanel(props: AssistantPanelProps): React$1.ReactElement;
|
|
421
|
+
|
|
422
|
+
interface FeedbackPanelProps {
|
|
423
|
+
value: FeedbackValue;
|
|
424
|
+
onChange: (value: FeedbackValue) => void;
|
|
425
|
+
onSubmit: (value: FeedbackValue) => void;
|
|
426
|
+
onCancel?: () => void;
|
|
427
|
+
heading?: string;
|
|
428
|
+
ratingLabel?: string;
|
|
429
|
+
/** Rendered under "Add more details" — a host's screenshot/attachment affordance. */
|
|
430
|
+
attachments?: React$1.ReactNode;
|
|
431
|
+
/** Shown above the buttons. The reference names the signed-in user and links its policy. */
|
|
432
|
+
privacyNote?: React$1.ReactNode;
|
|
433
|
+
busy?: boolean;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Structured feedback capture, as the M365 admin centre's "Submit feedback to Microsoft": a star
|
|
437
|
+
* rating, free text, a host attachment slot, a REQUIRED contact-consent choice, and a privacy note.
|
|
438
|
+
*
|
|
439
|
+
* ★★ THE RATING IS AN APG RADIOGROUP, in-tree. Five buttons with roving tabindex and
|
|
440
|
+
* `aria-checked` is the whole pattern; reaching for a Fluent component here would buy the
|
|
441
|
+
* tabster-singleton hazard (measured: one Fluent `Menu` = +185 KB and 2 `attrHandlers.set`) for
|
|
442
|
+
* nothing. `RadioGroup` IS used for the consent pair, which is a genuine native radio group.
|
|
443
|
+
*
|
|
444
|
+
* ★★ SUBMIT IS DISABLED UNTIL BOTH A RATING AND A CONSENT ANSWER EXIST, and the reason is not
|
|
445
|
+
* tidiness: the reference marks consent required, and a feedback record submitted without it
|
|
446
|
+
* cannot lawfully be followed up. `mayContact === undefined` is "not answered" and is NOT the
|
|
447
|
+
* same as `false` — collapsing the two would silently record a refusal the user never gave.
|
|
448
|
+
*/
|
|
449
|
+
declare function FeedbackPanel(props: FeedbackPanelProps): React$1.ReactElement;
|
|
450
|
+
|
|
328
451
|
interface AgentAppShellProps {
|
|
329
452
|
/** The left icon rail. Hidden below `sm`. */
|
|
330
453
|
rail?: React$1.ReactNode;
|
|
@@ -818,6 +941,35 @@ interface RovingTabindex {
|
|
|
818
941
|
*/
|
|
819
942
|
declare function useRovingTabindex(options: RovingTabindexOptions): RovingTabindex;
|
|
820
943
|
|
|
944
|
+
interface ReturnFocusOptions {
|
|
945
|
+
/** When this goes true the surface is open; false returns focus to whatever opened it. */
|
|
946
|
+
open: boolean;
|
|
947
|
+
/** The surface. Focus moves to its first focusable node on open. */
|
|
948
|
+
containerRef: React$1.RefObject<HTMLElement>;
|
|
949
|
+
/** Skip moving focus IN on open. Focus is still returned on close. */
|
|
950
|
+
manageInitialFocus?: boolean;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Move focus into a surface when it opens, and put it back where it came from when it closes.
|
|
954
|
+
*
|
|
955
|
+
* ★★ THIS IS NOT A FOCUS TRAP, DELIBERATELY. A docked assistant drawer is NON-MODAL — the page
|
|
956
|
+
* behind it stays readable and usable, which is the whole point of docking rather than
|
|
957
|
+
* dialoging. Trapping focus in a surface that does not claim modality strands a keyboard user
|
|
958
|
+
* with no way out, and the page carries no `aria-modal` or inert backdrop to justify it. A host
|
|
959
|
+
* that genuinely wants modal behaviour should wrap in a real dialog and get the trap, the
|
|
960
|
+
* backdrop and the `aria-modal` together rather than half of them here.
|
|
961
|
+
*
|
|
962
|
+
* ★★ THE OPENER IS CAPTURED ON THE OPENING TRANSITION, not on every render. Reading
|
|
963
|
+
* `document.activeElement` at close time would return something inside the drawer — which is
|
|
964
|
+
* exactly where focus is — so the return target has to be remembered before focus moves.
|
|
965
|
+
*
|
|
966
|
+
* ★ Returning focus is guarded on the element still being connected. A trigger can be unmounted
|
|
967
|
+
* while the surface is open (a toolbar collapsing, a row removed); calling `.focus()` on a
|
|
968
|
+
* detached node silently does nothing and leaves focus on `<body>`, so fall back to the body
|
|
969
|
+
* check rather than pretending it worked.
|
|
970
|
+
*/
|
|
971
|
+
declare function useReturnFocus({ open, containerRef, manageInitialFocus }: ReturnFocusOptions): void;
|
|
972
|
+
|
|
821
973
|
interface StickyScroll {
|
|
822
974
|
/** Put on the scrolling element. */
|
|
823
975
|
onScroll: () => void;
|
|
@@ -873,4 +1025,4 @@ interface Conversation {
|
|
|
873
1025
|
*/
|
|
874
1026
|
declare function useConversation(options: UseConversationOptions): Conversation;
|
|
875
1027
|
|
|
876
|
-
export { ActionCard, type ActionCardProps, ActionResult, type ActionResultProps, AgentAppShell, type AgentAppShellProps, AgentAttachment, AgentAvailability, AgentAvatar, type AgentAvatarProps, AgentCitation, type AgentDescriptor, AgentFailure, AgentMessage, AgentOpsPanel, type AgentOpsPanelProps, AgentParticipant, AgentPicker, type AgentPickerProps, type AgentRunRecord, AgentRunStatus, AgentSource, AgentStatusBadge, type AgentStatusBadgeProps, AgentToolCall, AgentUsage, Announcement, AnswerWithCitations, type AnswerWithCitationsProps, AppRail, type AppRailProps, ApprovalCard, type ApprovalCardProps, AvailabilityBanner, type AvailabilityBannerProps, CitationChip, type CitationChipProps, CitationList, type CitationListProps, Composer, type ComposerProps, ConfirmInline, type ConfirmInlineProps, type Conversation, ConversationHeader, type ConversationHeaderProps, ConversationList, ConversationListItem, type ConversationListItemProps, type ConversationListProps, ConversationState, type ConversationSummary, type ConversationTab, DayDivider, DayDividerLabel, type DayDividerProps, EmptyConversation, type EmptyConversationProps, GlobalSearchBar, type GlobalSearchBarProps, GroundingPanel, type GroundingPanelProps, type HeaderAction, IAgentService, LiveAnnouncer, type LiveAnnouncerProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageList, type MessageListProps, ModelBadge, type ModelBadgeProps, ParameterReview, type ParameterReviewProps, type PresenceState, ProviderAttribution, type ProviderAttributionProps, type RailItem, RightPane, type RightPaneProps, type RovingTabindex, type RovingTabindexOptions, RunHistoryPanel, type RunHistoryPanelProps, RunTimeline, type RunTimelineProps, SourceCard, type SourceCardProps, type StickyScroll, StreamingText, type StreamingTextProps, SuggestedPrompts, type SuggestedPromptsProps, SystemNotice, type SystemNoticeProps, ThrottleNotice, type ThrottleNoticeProps, ToolCallCard, type ToolCallCardProps, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseConversationOptions, conversationAccessibleName, formatDayLabel, messageAttribution, runStatusLabel, useConversation, useFocusRestore, useRovingTabindex, useStickyScroll, useVisuallyHiddenStyles };
|
|
1028
|
+
export { ActionCard, type ActionCardProps, ActionResult, type ActionResultProps, AgentAppShell, type AgentAppShellProps, AgentAttachment, AgentAvailability, AgentAvatar, type AgentAvatarProps, AgentCitation, type AgentDescriptor, AgentFailure, AgentLauncher, type AgentLauncherProps, AgentMessage, AgentOpsPanel, type AgentOpsPanelProps, AgentParticipant, AgentPicker, type AgentPickerProps, type AgentRunRecord, AgentRunStatus, AgentSource, AgentStatusBadge, type AgentStatusBadgeProps, AgentToolCall, AgentUsage, Announcement, AnswerWithCitations, type AnswerWithCitationsProps, AppRail, type AppRailProps, ApprovalCard, type ApprovalCardProps, AssistantPanel, type AssistantPanelProps, type AssistantTab, AvailabilityBanner, type AvailabilityBannerProps, CitationChip, type CitationChipProps, CitationList, type CitationListProps, Composer, type ComposerProps, ConfirmInline, type ConfirmInlineProps, type Conversation, ConversationHeader, type ConversationHeaderProps, ConversationList, ConversationListItem, type ConversationListItemProps, type ConversationListProps, ConversationState, type ConversationSummary, type ConversationTab, DayDivider, DayDividerLabel, type DayDividerProps, EmptyConversation, type EmptyConversationProps, FeedbackPanel, type FeedbackPanelProps, type FeedbackValue, GlobalSearchBar, type GlobalSearchBarProps, GroundingPanel, type GroundingPanelProps, type HeaderAction, IAgentService, type LauncherItem, LiveAnnouncer, type LiveAnnouncerProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageList, type MessageListProps, ModelBadge, type ModelBadgeProps, ParameterReview, type ParameterReviewProps, type PresenceState, ProviderAttribution, type ProviderAttributionProps, type RailItem, type ReturnFocusOptions, RightPane, type RightPaneProps, type RovingTabindex, type RovingTabindexOptions, RunHistoryPanel, type RunHistoryPanelProps, RunTimeline, type RunTimelineProps, SourceCard, type SourceCardProps, type StickyScroll, StreamingText, type StreamingTextProps, SuggestedPrompts, type SuggestedPromptsProps, SystemNotice, type SystemNoticeProps, ThrottleNotice, type ThrottleNoticeProps, ToolCallCard, type ToolCallCardProps, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseConversationOptions, conversationAccessibleName, formatDayLabel, messageAttribution, runStatusLabel, useConversation, useFocusRestore, useReturnFocus, useRovingTabindex, useStickyScroll, useVisuallyHiddenStyles };
|