@burdenoff/fe-libs 2026.927.3 → 2026.928.2
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/chrome/SideNavigation.d.ts.map +1 -1
- package/dist/chrome/SideNavigation.js +71 -68
- package/dist/chrome/sideNavigation/sideNavEscape.d.ts +41 -0
- package/dist/chrome/sideNavigation/sideNavEscape.d.ts.map +1 -0
- package/dist/chrome/sideNavigation/sideNavEscape.js +8 -0
- package/dist/chrome/sideNavigation/useSideNavigationState.d.ts +8 -1
- package/dist/chrome/sideNavigation/useSideNavigationState.d.ts.map +1 -1
- package/dist/chrome/sideNavigation/useSideNavigationState.js +35 -23
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +82 -79
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantOverlay.js +98 -96
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +31 -8
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.js +22 -16
- package/dist/shared/assistant/ui/panelOverlays.d.ts +31 -0
- package/dist/shared/assistant/ui/panelOverlays.d.ts.map +1 -1
- package/dist/shared/assistant/ui/panelOverlays.js +11 -8
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +82 -72
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.js +40 -39
- package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts +57 -0
- package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts.map +1 -0
- package/dist/shared/assistant/ui/voice/voiceSessionEscape.js +19 -0
- package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts +3 -1
- package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts.map +1 -1
- package/dist/shared/assistant/useAssistantKeyboardShortcuts.js +25 -25
- package/dist/shared/hooks/index.d.ts +1 -0
- package/dist/shared/hooks/index.d.ts.map +1 -1
- package/dist/shared/hooks/useReturnFocus.d.ts +56 -0
- package/dist/shared/hooks/useReturnFocus.d.ts.map +1 -0
- package/dist/shared/hooks/useReturnFocus.js +41 -0
- package/dist/shared/providers/AppShellProvider.d.ts +12 -1
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +175 -161
- package/dist/shared-assistant.js +76 -75
- package/dist/shared-hooks.js +34 -33
- package/dist/shared.js +89 -88
- package/dist/ui/modal-shell.d.ts.map +1 -1
- package/dist/ui/modal-shell.js +23 -13
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/** The slice of a document this reads. */
|
|
3
|
+
export type FocusReturnDocument = Pick<Document, 'activeElement' | 'body'>;
|
|
4
|
+
type Focusable = Element & {
|
|
5
|
+
focus(options?: FocusOptions): void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Was focus dropped, rather than moved somewhere on purpose?
|
|
9
|
+
*
|
|
10
|
+
* Yes when nothing is focused, `<body>` is (where the browser puts it when the
|
|
11
|
+
* focused element is removed), the focused element is no longer in the
|
|
12
|
+
* document, or it is inside `layer`, the layer that is closing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function focusWasDropped(doc: FocusReturnDocument, layer?: Pick<Node, 'contains'> | null): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Is `candidate` worth trying: still in the document, able to take focus at
|
|
17
|
+
* all, and not disabled?
|
|
18
|
+
*/
|
|
19
|
+
export declare function canReturnFocusTo(candidate: Element | null | undefined): candidate is Focusable;
|
|
20
|
+
/**
|
|
21
|
+
* Focus the first candidate that takes it, and return it; null when none did.
|
|
22
|
+
*
|
|
23
|
+
* ★ Checked by reading focus back. `focus()` fails silently on an element that
|
|
24
|
+
* is hidden (`display: none`, such as the launcher on a phone while the panel
|
|
25
|
+
* is open) or inside an `inert` subtree (the composer behind a live voice
|
|
26
|
+
* session), so "it did not throw" says nothing. The next candidate gets its
|
|
27
|
+
* turn instead.
|
|
28
|
+
*/
|
|
29
|
+
export declare function returnFocusTo(doc: FocusReturnDocument, candidates: ReadonlyArray<Element | null | undefined>): Element | null;
|
|
30
|
+
/** What is focused, when it is a real control rather than `<body>`. */
|
|
31
|
+
export declare function focusedControl(doc: FocusReturnDocument): Element | null;
|
|
32
|
+
export interface UseReturnFocusOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Where focus goes when the opener is gone: the nearest ancestor of the
|
|
35
|
+
* layer matching this selector, found while the layer is still mounted.
|
|
36
|
+
* The assistant's layers pass the panel root, which is focusable
|
|
37
|
+
* (`tabIndex=-1`) and keeps focus inside the assistant.
|
|
38
|
+
*/
|
|
39
|
+
fallbackSelector?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Return focus to this layer's opener when it closes.
|
|
43
|
+
*
|
|
44
|
+
* The opener is what had focus when the layer first RENDERED, before any
|
|
45
|
+
* effect of its own (the voice session focuses End on open) moves focus into
|
|
46
|
+
* it. If that element is gone by the time the layer mounts, what focus fell
|
|
47
|
+
* back to then is used instead: the post-session transcript drawer renders
|
|
48
|
+
* while End still has focus, End is removed in that same commit, and by the
|
|
49
|
+
* time the drawer's effects run the voice session has handed focus back to
|
|
50
|
+
* the voice button.
|
|
51
|
+
*
|
|
52
|
+
* @param layerRef the layer's root element.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useReturnFocus(layerRef: RefObject<Element | null>, { fallbackSelector }?: UseReturnFocusOptions): void;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=useReturnFocus.d.ts.map
|
|
@@ -0,0 +1 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ffect as e, useState as t } from "react";
|
|
2
|
+
//#region src/shared/hooks/useReturnFocus.ts
|
|
3
|
+
function n(e) {
|
|
4
|
+
return "focus" in e && typeof e.focus == "function";
|
|
5
|
+
}
|
|
6
|
+
function r(e, t) {
|
|
7
|
+
let n = e.activeElement;
|
|
8
|
+
return !n || n === e.body || !n.isConnected ? !0 : !!(t && t.contains(n));
|
|
9
|
+
}
|
|
10
|
+
function i(e) {
|
|
11
|
+
return !e || !e.isConnected || !n(e) ? !1 : !("disabled" in e && e.disabled === !0);
|
|
12
|
+
}
|
|
13
|
+
function a(e, t) {
|
|
14
|
+
for (let n of t) if (i(n) && (n.focus(), e.activeElement === n)) return n;
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
function o(e) {
|
|
18
|
+
let t = e.activeElement;
|
|
19
|
+
return t && t !== e.body ? t : null;
|
|
20
|
+
}
|
|
21
|
+
var s = () => typeof document > "u" ? null : document;
|
|
22
|
+
function c(n, { fallbackSelector: i } = {}) {
|
|
23
|
+
let [c] = t(() => {
|
|
24
|
+
let e = s();
|
|
25
|
+
return e ? o(e) : null;
|
|
26
|
+
});
|
|
27
|
+
e(() => {
|
|
28
|
+
let e = s(), t = n.current;
|
|
29
|
+
if (!e || !t) return;
|
|
30
|
+
let l = i ? t.closest(i) : null, u = o(e), d = c?.isConnected ? c : u && !t.contains(u) ? u : null;
|
|
31
|
+
return () => {
|
|
32
|
+
t.isConnected || r(e, t) && a(e, [d, l]);
|
|
33
|
+
};
|
|
34
|
+
}, [
|
|
35
|
+
n,
|
|
36
|
+
c,
|
|
37
|
+
i
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { r as focusWasDropped, o as focusedControl, a as returnFocusTo, c as useReturnFocus };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Brand, ThemeMode, Density, Typography, GlassIntensity } from './shell/ThemeProvider';
|
|
3
3
|
import { TranslationDictionary } from './shell/I18nProvider';
|
|
4
4
|
import { BurdenoffEventName } from '../events';
|
|
@@ -116,6 +116,17 @@ export interface AppShellObservabilityEnv {
|
|
|
116
116
|
VITE_OTEL_HTTP_ENDPOINT?: string;
|
|
117
117
|
VITE_BACKEND_AUDIT_ENDPOINT?: string;
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* sonner's `richColors` palette, mapped onto the semantic status tokens.
|
|
121
|
+
*
|
|
122
|
+
* Left to itself sonner paints rich toasts with its own hard-coded colours, and
|
|
123
|
+
* its error pair measures 4.35:1 — under the WCAG AA 4.5:1 floor for the
|
|
124
|
+
* toast's 13px text (BOFF-8074). The status tokens clear AA in the light, dark
|
|
125
|
+
* and high-contrast themes, and they follow the app's theme, which sonner's own
|
|
126
|
+
* `data-sonner-theme` (always `light` here) does not. Set inline on the toaster
|
|
127
|
+
* element, they override sonner's stylesheet defaults.
|
|
128
|
+
*/
|
|
129
|
+
export declare const RICH_TOAST_TOKEN_STYLE: CSSProperties;
|
|
119
130
|
export declare function resolveAppShellObservabilityConfig(productSlug: string, env: AppShellObservabilityEnv): AppShellObservabilityConfig;
|
|
120
131
|
export interface AppShellProviderProps {
|
|
121
132
|
config: AppShellConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellProvider.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/AppShellProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"AppShellProvider.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/AppShellProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,EAEL,KAAK,KAAK,EACV,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