@burdenoff/fe-libs 2026.1021.9 → 2026.1021.10
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/AppShellLayout.d.ts +14 -0
- package/dist/chrome/AppShellLayout.js +40 -34
- package/dist/shared/components/SkipToContent.d.ts +95 -0
- package/dist/shared/components/SkipToContent.js +61 -0
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/pages/AiPage.js +49 -48
- package/dist/shared-components.js +23 -22
- package/dist/shared.js +98 -97
- package/dist/ui/modern-landing.d.ts +4 -0
- package/dist/ui/modern-landing.js +129 -125
- package/dist/ui/native-welcome.js +56 -55
- package/package.json +1 -1
|
@@ -52,6 +52,18 @@ export interface AppShellLayoutProps {
|
|
|
52
52
|
* `bottomBar` + `NativeTopBar`.
|
|
53
53
|
*/
|
|
54
54
|
nativeCompact?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Id of the `<main>` landmark, which the skip link targets.
|
|
57
|
+
* Default `'main-content'` (`MAIN_CONTENT_ID`).
|
|
58
|
+
*/
|
|
59
|
+
mainId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Render the visually-hidden "Skip to content" link as the first focusable
|
|
62
|
+
* element of the shell (WCAG 2.4.1). Default `true`.
|
|
63
|
+
*/
|
|
64
|
+
skipLink?: boolean;
|
|
65
|
+
/** Overrides the skip link text (default: the `appShell.skipToContent` shell label). */
|
|
66
|
+
skipLinkLabel?: string;
|
|
55
67
|
}
|
|
56
68
|
/**
|
|
57
69
|
* AppShellLayout Component
|
|
@@ -64,6 +76,8 @@ export interface AppShellLayoutProps {
|
|
|
64
76
|
* - Visibility controls for each section
|
|
65
77
|
* - Responsive layout: overlay on mobile, push on desktop
|
|
66
78
|
* - Custom content styling
|
|
79
|
+
* - One `<main id="main-content">` landmark plus a "Skip to content" link
|
|
80
|
+
* ahead of the header (keyboard users bypass the header and nav)
|
|
67
81
|
*
|
|
68
82
|
* Responsive Behavior:
|
|
69
83
|
* - Mobile (< md): Sidebar as overlay drawer with backdrop
|
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MAIN_CONTENT_ID as e, MainLandmark as t, SkipToContentLink as n } from "../shared/components/SkipToContent.js";
|
|
2
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
3
|
//#region src/chrome/AppShellLayout.tsx
|
|
3
|
-
var
|
|
4
|
-
let
|
|
5
|
-
paddingTop:
|
|
6
|
-
paddingBottom:
|
|
4
|
+
var o = ({ header: o, sidebar: s, footer: c, bottomPanel: l, rightPanel: u, statusBar: d, children: f, headerVisible: p = !0, footerVisible: m = !0, sidebarVisible: h = !0, contentClassName: g, contentPadding: _ = "px-6 lg:px-8 py-6", footerInContent: v = !1, safeArea: y = !0, bottomBar: b, nativeCompact: x = !1, mainId: S = e, skipLink: C = !0, skipLinkLabel: w }) => {
|
|
5
|
+
let T = x ? "p-0" : _, E = v ? `flex-1 overflow-auto bg-bg-canvas flex flex-col ${T}` : `flex-1 overflow-auto bg-bg-canvas ${T}`, D = g || E, O = "max(var(--safe-top, 0px), env(safe-area-inset-top, 0px))", k = "max(var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px))", A = "max(var(--safe-left, 0px), env(safe-area-inset-left, 0px))", j = "max(var(--safe-right, 0px), env(safe-area-inset-right, 0px))", M = y ? x ? {
|
|
6
|
+
paddingTop: x && p && o ? void 0 : O,
|
|
7
|
+
paddingBottom: b ? void 0 : k
|
|
7
8
|
} : {
|
|
8
|
-
paddingTop:
|
|
9
|
-
paddingBottom:
|
|
10
|
-
paddingLeft:
|
|
11
|
-
paddingRight:
|
|
12
|
-
} : {},
|
|
13
|
-
...
|
|
14
|
-
...
|
|
15
|
-
paddingLeft:
|
|
16
|
-
paddingRight:
|
|
9
|
+
paddingTop: O,
|
|
10
|
+
paddingBottom: k,
|
|
11
|
+
paddingLeft: A,
|
|
12
|
+
paddingRight: j
|
|
13
|
+
} : {}, N = b || x && y ? {
|
|
14
|
+
...b ? { paddingBottom: "var(--mobile-tabbar-height, 0px)" } : {},
|
|
15
|
+
...x && y ? {
|
|
16
|
+
paddingLeft: A,
|
|
17
|
+
paddingRight: j
|
|
17
18
|
} : {}
|
|
18
19
|
} : void 0;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ a("div", {
|
|
20
21
|
className: "flex flex-col h-screen bg-bg-canvas",
|
|
21
|
-
style:
|
|
22
|
-
"data-native-shell":
|
|
22
|
+
style: M,
|
|
23
|
+
"data-native-shell": x ? "" : void 0,
|
|
23
24
|
children: [
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
C && /* @__PURE__ */ i(n, {
|
|
26
|
+
targetId: S,
|
|
27
|
+
label: w
|
|
28
|
+
}),
|
|
29
|
+
p && o,
|
|
30
|
+
/* @__PURE__ */ a("div", {
|
|
26
31
|
className: "flex flex-1 overflow-hidden relative",
|
|
27
|
-
children: [
|
|
32
|
+
children: [h && s, /* @__PURE__ */ a("div", {
|
|
28
33
|
className: "flex flex-1 overflow-hidden",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ a("div", {
|
|
30
35
|
className: "flex flex-col flex-1 overflow-hidden",
|
|
31
|
-
children: [/* @__PURE__ */ t
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
children: [/* @__PURE__ */ i(t, {
|
|
37
|
+
id: S,
|
|
38
|
+
className: `scrollbar-slim ${D}`,
|
|
39
|
+
style: N,
|
|
34
40
|
"data-shell-scroll-container": !0,
|
|
35
|
-
children:
|
|
36
|
-
className:
|
|
37
|
-
children:
|
|
38
|
-
}),
|
|
39
|
-
}),
|
|
40
|
-
}),
|
|
41
|
+
children: v ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
|
|
42
|
+
className: m ? "flex-1" : "flex-1 min-h-0",
|
|
43
|
+
children: f
|
|
44
|
+
}), m && c] }) : f
|
|
45
|
+
}), l]
|
|
46
|
+
}), u]
|
|
41
47
|
})]
|
|
42
48
|
}),
|
|
43
|
-
!
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
!v && m && c,
|
|
50
|
+
d,
|
|
51
|
+
b
|
|
46
52
|
]
|
|
47
53
|
});
|
|
48
54
|
};
|
|
49
55
|
//#endregion
|
|
50
|
-
export {
|
|
56
|
+
export { o as AppShellLayout };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Skip link + `<main>` landmark primitives (WCAG 2.4.1 "Bypass Blocks").
|
|
4
|
+
*
|
|
5
|
+
* Every product page needs exactly ONE `<main>` landmark, and a keyboard user
|
|
6
|
+
* needs a way past the header/nav to reach it. The signed-in shell
|
|
7
|
+
* (`AppShellLayout`) and the public landing/auth pages (`PublicLayout`,
|
|
8
|
+
* `ModernLanding`, `NativeWelcome`) all build on these, so the id, the label
|
|
9
|
+
* and the focus behaviour are the same on every product.
|
|
10
|
+
*
|
|
11
|
+
* ★ One `<main>` per page, whatever the nesting. `MainLandmark` marks its
|
|
12
|
+
* subtree; a `MainLandmark` rendered inside another one (a public page
|
|
13
|
+
* mounted inside the signed-in shell, `ModernLanding` wrapped in
|
|
14
|
+
* `PublicLayout`) renders a plain `<div>` instead of a second `<main>`, and
|
|
15
|
+
* a nested `SkipToContentLink` renders nothing, because the outer layout
|
|
16
|
+
* already owns both.
|
|
17
|
+
*/
|
|
18
|
+
/** The id every shared layout gives its `<main>`; the skip link's default target. */
|
|
19
|
+
export declare const MAIN_CONTENT_ID = "main-content";
|
|
20
|
+
/** True inside a `MainLandmark` (so a page-level `<main>` already exists). */
|
|
21
|
+
export declare function useInsideMainLandmark(): boolean;
|
|
22
|
+
/** The minimal element surface `focusSkipTarget` needs (a DOM `HTMLElement` fits). */
|
|
23
|
+
export interface SkipTarget {
|
|
24
|
+
hasAttribute(name: string): boolean;
|
|
25
|
+
setAttribute(name: string, value: string): void;
|
|
26
|
+
focus(options?: FocusOptions): void;
|
|
27
|
+
scrollIntoView?(arg?: boolean | ScrollIntoViewOptions): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Move focus (and the viewport) to the skip-link target.
|
|
31
|
+
*
|
|
32
|
+
* Returns false when there is no target, so the caller can leave the native
|
|
33
|
+
* `#hash` jump alone. A target that is not focusable on its own gets
|
|
34
|
+
* `tabindex="-1"` first: an element that cannot take focus would leave the
|
|
35
|
+
* sequential focus point where it was, and the next Tab would land back in
|
|
36
|
+
* the header.
|
|
37
|
+
*/
|
|
38
|
+
export declare function focusSkipTarget(target: SkipTarget | null): boolean;
|
|
39
|
+
export interface SkipToContentLinkProps {
|
|
40
|
+
/** Id of the element to jump to. Default `MAIN_CONTENT_ID`. */
|
|
41
|
+
targetId?: string;
|
|
42
|
+
/** Visible text when focused. Default: the `appShell.skipToContent` shell label. */
|
|
43
|
+
label?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* "Skip to content" link: visually hidden until it takes keyboard focus, then
|
|
48
|
+
* pinned to the top-left above all chrome. Render it as the FIRST focusable
|
|
49
|
+
* element of the page, before the header.
|
|
50
|
+
*
|
|
51
|
+
* The click is handled in script rather than left to the `#hash`: under a
|
|
52
|
+
* `HashRouter` (installed apps) a hash change is a route change, and in every
|
|
53
|
+
* router the native jump scrolls without reliably moving focus.
|
|
54
|
+
*/
|
|
55
|
+
export declare function SkipToContentLink({ targetId, label, className, }: SkipToContentLinkProps): import('react/jsx-runtime').JSX.Element | null;
|
|
56
|
+
export interface MainLandmarkProps extends Omit<HTMLAttributes<HTMLElement>, 'id' | 'tabIndex'> {
|
|
57
|
+
/** Element id, the skip link's target. Default `MAIN_CONTENT_ID`. */
|
|
58
|
+
id?: string;
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The page's `<main>` landmark: `id` for the skip link and `tabIndex={-1}` so
|
|
63
|
+
* focus can land on it (programmatic only; it never joins the Tab order).
|
|
64
|
+
* Inside another `MainLandmark` it renders a `<div>` with no id, so a page
|
|
65
|
+
* never has two `<main>`s or two `#main-content`s.
|
|
66
|
+
*/
|
|
67
|
+
export declare function MainLandmark({ id, className, children, ...rest }: MainLandmarkProps): import('react/jsx-runtime').JSX.Element;
|
|
68
|
+
export interface PublicLayoutProps {
|
|
69
|
+
/** Page header (brand, sign-in button). Rendered between the skip link and `<main>`. */
|
|
70
|
+
header?: ReactNode;
|
|
71
|
+
/** Page footer. Rendered after `<main>`. */
|
|
72
|
+
footer?: ReactNode;
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
/** `<main>` id. Default `MAIN_CONTENT_ID`. */
|
|
75
|
+
mainId?: string;
|
|
76
|
+
/** Overrides the skip link text. */
|
|
77
|
+
skipLinkLabel?: string;
|
|
78
|
+
/** Classes for the outer wrapper. */
|
|
79
|
+
className?: string;
|
|
80
|
+
/** Classes for `<main>` (it already grows to fill the page). */
|
|
81
|
+
mainClassName?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Landmark frame for public (signed-out) routes: the landing page and the
|
|
85
|
+
* `/auth/*` pages, which render outside `AppShellLayout` and so had no
|
|
86
|
+
* `<main>` and no skip link.
|
|
87
|
+
*
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <PublicLayout header={<LandingHeader />} footer={<LandingFooter />}>
|
|
90
|
+
* <Hero />
|
|
91
|
+
* <Features />
|
|
92
|
+
* </PublicLayout>
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare function PublicLayout({ header, footer, children, mainId, skipLinkLabel, className, mainClassName, }: PublicLayoutProps): import('react/jsx-runtime').JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useShellLabel as e } from "../providers/shell/useShellLabel.js";
|
|
2
|
+
import { cn as t } from "../../shared-utils.js";
|
|
3
|
+
import { createContext as n, useContext as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/shared/components/SkipToContent.tsx
|
|
6
|
+
var o = "main-content", s = n(!1);
|
|
7
|
+
function c() {
|
|
8
|
+
return r(s);
|
|
9
|
+
}
|
|
10
|
+
function l(e) {
|
|
11
|
+
return e ? (e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1"), e.focus({ preventScroll: !0 }), e.scrollIntoView?.({ block: "start" }), !0) : !1;
|
|
12
|
+
}
|
|
13
|
+
function u({ targetId: n = o, label: r, className: a }) {
|
|
14
|
+
let s = e();
|
|
15
|
+
return c() ? null : /* @__PURE__ */ i("a", {
|
|
16
|
+
href: `#${n}`,
|
|
17
|
+
onClick: (e) => {
|
|
18
|
+
l(document.getElementById(n)) && e.preventDefault();
|
|
19
|
+
},
|
|
20
|
+
"data-skip-link": "",
|
|
21
|
+
className: t("sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[var(--z-toast,1400)]", "focus:rounded-lg focus:border focus:border-border-subtle focus:bg-bg-surface focus:px-4 focus:py-2", "focus:text-sm focus:font-medium focus:text-text-primary focus:shadow-elevation-3", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", a),
|
|
22
|
+
children: r ?? s("appShell.skipToContent", "Skip to content")
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function d({ id: e = o, className: n, children: r, ...a }) {
|
|
26
|
+
return c() ? /* @__PURE__ */ i("div", {
|
|
27
|
+
className: n,
|
|
28
|
+
...a,
|
|
29
|
+
children: r
|
|
30
|
+
}) : /* @__PURE__ */ i(s.Provider, {
|
|
31
|
+
value: !0,
|
|
32
|
+
children: /* @__PURE__ */ i("main", {
|
|
33
|
+
id: e,
|
|
34
|
+
tabIndex: -1,
|
|
35
|
+
className: t("focus:outline-none", n),
|
|
36
|
+
...a,
|
|
37
|
+
children: r
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function f({ header: e, footer: n, children: r, mainId: s = o, skipLinkLabel: c, className: l, mainClassName: f }) {
|
|
42
|
+
return /* @__PURE__ */ a("div", {
|
|
43
|
+
className: t("flex min-h-[100dvh] flex-col", l),
|
|
44
|
+
"data-public-layout": "",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ i(u, {
|
|
47
|
+
targetId: s,
|
|
48
|
+
label: c
|
|
49
|
+
}),
|
|
50
|
+
e,
|
|
51
|
+
/* @__PURE__ */ i(d, {
|
|
52
|
+
id: s,
|
|
53
|
+
className: t("flex-1", f),
|
|
54
|
+
children: r
|
|
55
|
+
}),
|
|
56
|
+
n
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { o as MAIN_CONTENT_ID, d as MainLandmark, f as PublicLayout, u as SkipToContentLink, l as focusSkipTarget, c as useInsideMainLandmark };
|
|
@@ -28,6 +28,8 @@ export type { UpgradeInlineBannerProps } from './UpgradeInlineBanner';
|
|
|
28
28
|
export { QuotaUpgradeBridge, useQuotaUpgradeBridge, dispatchProductQuotaExhausted, resolveQuotaUpgradeCopy, quotaEventKind, claimQuotaDialog, captureQuotaDialogOwners, useQuotaDialogOwnership, withQuotaDialogOwnership, DEFAULT_QUOTA_UPGRADE_COPY, } from './QuotaUpgradeBridge';
|
|
29
29
|
export type { QuotaUpgradeBridgeProps, QuotaUpgradeBridgeOptions, QuotaUpgradeCopy, QuotaUpgradeCopyByKind, ProductQuotaExhaustedDetail, } from './QuotaUpgradeBridge';
|
|
30
30
|
export { getSSORedirectUrl, redirectToSSO, SSORedirectSpinner, checkSLO, checkRemoteSLO, clearLocalAuthState, } from './SSORedirectGuard';
|
|
31
|
+
export { MAIN_CONTENT_ID, MainLandmark, PublicLayout, SkipToContentLink, focusSkipTarget, useInsideMainLandmark, } from './SkipToContent';
|
|
32
|
+
export type { MainLandmarkProps, PublicLayoutProps, SkipTarget, SkipToContentLinkProps, } from './SkipToContent';
|
|
31
33
|
export { LandingOrDashboardRedirect, LandingGateView, resolveLandingGate, hasStoredValidSession, } from './LandingOrDashboardRedirect';
|
|
32
34
|
export type { LandingOrDashboardRedirectProps, LandingGateViewProps, LandingGateDecision, LandingGateInput, } from './LandingOrDashboardRedirect';
|
|
33
35
|
export { AssistantWidget, ASSISTANT_WIDGET_TOGGLE_EVENT } from './assistantWidget/AssistantWidget';
|
|
@@ -2,107 +2,108 @@ import { useSafeGatewayClient as e } from "../graphql/GatewayContext.js";
|
|
|
2
2
|
import { useI18n as t } from "../providers/shell/I18nProvider.js";
|
|
3
3
|
import { useAuth as n } from "../providers/shell/AuthProvider.js";
|
|
4
4
|
import { useActiveContext as r } from "../providers/shell/ActiveContextProvider.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { MainLandmark as i } from "../components/SkipToContent.js";
|
|
6
|
+
import { PermissionProvider as a, usePermissions as o, useSafePermissions as s } from "../providers/shell/PermissionProvider.js";
|
|
7
|
+
import { MODELS as c, PROVIDERS as l, SUMMARY as u, catalog as d, sevenDays as f, summary as p } from "./ai/contracts.js";
|
|
8
|
+
import { useAiTr as m } from "./ai/i18n.js";
|
|
9
|
+
import { CatalogPanel as h } from "./ai/CatalogPanel.js";
|
|
10
|
+
import { SummaryPanel as g } from "./ai/SummaryPanel.js";
|
|
11
|
+
import { useAiRead as _ } from "./ai/useAiRead.js";
|
|
12
|
+
import { useCallback as v, useMemo as y, useState as b } from "react";
|
|
13
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
13
14
|
//#region src/shared/pages/AiPage.tsx
|
|
14
|
-
function
|
|
15
|
-
let r =
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
function w({ productName: t, productId: n }) {
|
|
16
|
+
let r = m(), a = e("workspace");
|
|
17
|
+
return /* @__PURE__ */ C(i, {
|
|
17
18
|
className: "mx-auto w-full max-w-6xl space-y-6 px-4 py-6 sm:px-6",
|
|
18
19
|
"data-product-id": n,
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ C("header", {
|
|
20
21
|
className: "space-y-2",
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ S("h1", {
|
|
22
23
|
className: "text-2xl font-semibold text-foreground",
|
|
23
24
|
children: r("title", "{product} AI operations", { product: t })
|
|
24
|
-
}), /* @__PURE__ */
|
|
25
|
+
}), /* @__PURE__ */ S("p", {
|
|
25
26
|
className: "max-w-3xl text-sm text-muted-foreground",
|
|
26
27
|
children: r("intro", "Review the workspace model catalog and recorded AI usage.")
|
|
27
28
|
})]
|
|
28
|
-
}),
|
|
29
|
+
}), a ? /* @__PURE__ */ S(T, { children: /* @__PURE__ */ S(E, {
|
|
29
30
|
productId: n,
|
|
30
|
-
client:
|
|
31
|
-
}) }) : /* @__PURE__ */
|
|
31
|
+
client: a
|
|
32
|
+
}) }) : /* @__PURE__ */ S("p", {
|
|
32
33
|
role: "status",
|
|
33
34
|
children: r("unavailable", "AI operations are unavailable in this context.")
|
|
34
35
|
})]
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
let t =
|
|
39
|
-
return t ? e : /* @__PURE__ */
|
|
38
|
+
function T({ children: e }) {
|
|
39
|
+
let t = s(), { workspaceId: n } = r();
|
|
40
|
+
return t ? e : /* @__PURE__ */ S(a, {
|
|
40
41
|
scopeId: n ?? null,
|
|
41
42
|
gateway: "workspace",
|
|
42
43
|
children: e
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let
|
|
47
|
-
workspaceId:
|
|
48
|
-
actorId:
|
|
49
|
-
profileId:
|
|
50
|
-
accessToken:
|
|
51
|
-
workspaceToken:
|
|
46
|
+
function E({ productId: e, client: i }) {
|
|
47
|
+
let a = n(), { workspaceId: s } = r(), w = o(), { locale: T } = t(), E = m(), D = y(() => ({
|
|
48
|
+
workspaceId: s ?? "",
|
|
49
|
+
actorId: a.user?.id ?? "",
|
|
50
|
+
profileId: a.activeProfileId,
|
|
51
|
+
accessToken: a.tokens?.accessToken ?? null,
|
|
52
|
+
workspaceToken: a.workspaceToken
|
|
52
53
|
}), [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]), [O, k] =
|
|
54
|
+
s,
|
|
55
|
+
a.user?.id,
|
|
56
|
+
a.activeProfileId,
|
|
57
|
+
a.tokens?.accessToken,
|
|
58
|
+
a.workspaceToken
|
|
59
|
+
]), [O, k] = b(f), [A, j] = b({
|
|
59
60
|
scope: D,
|
|
60
61
|
models: 0,
|
|
61
62
|
providers: 0,
|
|
62
63
|
revision: 0
|
|
63
|
-
}), M = A.scope === D ? A.models : 0, N = A.scope === D ? A.providers : 0, P = A.scope === D ? A.revision : 0, F = (e) =>
|
|
64
|
+
}), M = A.scope === D ? A.models : 0, N = A.scope === D ? A.providers : 0, P = A.scope === D ? A.revision : 0, F = (e) => a.isLoading ? "loading" : !a.isAuthenticated || !D.workspaceId || !D.actorId || !D.accessToken ? "unavailable" : w.isLoading || w.scopeId !== D.workspaceId ? "loading" : w.error ? "unavailable" : !w.isSuperAdmin && w.permissions?.actorId !== D.actorId ? "loading" : w.hasPermission(e) ? "ready" : "denied", I = y(() => ({ pagination: {
|
|
64
65
|
limit: 20,
|
|
65
66
|
offset: M
|
|
66
|
-
} }), [M]), L =
|
|
67
|
+
} }), [M]), L = y(() => ({ pagination: {
|
|
67
68
|
limit: 20,
|
|
68
69
|
offset: N
|
|
69
|
-
} }), [N]), R =
|
|
70
|
+
} }), [N]), R = y(() => ({
|
|
70
71
|
...O,
|
|
71
72
|
productKey: e
|
|
72
|
-
}), [O, e]), z =
|
|
73
|
+
}), [O, e]), z = v((e) => d(e, "models"), []), B = v((e) => d(e, "providers"), []), V = v((t) => p(t, D.workspaceId, e, O), [
|
|
73
74
|
D.workspaceId,
|
|
74
75
|
e,
|
|
75
76
|
O
|
|
76
|
-
]), H =
|
|
77
|
+
]), H = _(i, D, F("prompt-model:read"), c, I, z, P), U = _(i, D, F("prompt-provider:read"), l, L, B, P), W = _(i, D, F("prompt-invocation:read"), u, R, V, P);
|
|
77
78
|
function G() {
|
|
78
|
-
k(
|
|
79
|
+
k(f()), j({
|
|
79
80
|
scope: D,
|
|
80
81
|
models: M,
|
|
81
82
|
providers: N,
|
|
82
83
|
revision: P + 1
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
87
|
+
/* @__PURE__ */ C("div", {
|
|
87
88
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
88
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ S("p", {
|
|
89
90
|
className: "text-sm text-muted-foreground",
|
|
90
91
|
children: E("readonly", "Read-only workspace view")
|
|
91
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ S("button", {
|
|
92
93
|
type: "button",
|
|
93
94
|
onClick: G,
|
|
94
95
|
className: "rounded-md border border-border px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
95
96
|
children: E("refresh", "Refresh")
|
|
96
97
|
})]
|
|
97
98
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ S(g, {
|
|
99
100
|
state: W,
|
|
100
101
|
window: O,
|
|
101
102
|
locale: T
|
|
102
103
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ C("div", {
|
|
104
105
|
className: "grid gap-6 lg:grid-cols-2",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ S(h, {
|
|
106
107
|
kind: "models",
|
|
107
108
|
state: H,
|
|
108
109
|
offset: M,
|
|
@@ -113,7 +114,7 @@ function T({ productId: e, client: i }) {
|
|
|
113
114
|
providers: N,
|
|
114
115
|
revision: P
|
|
115
116
|
})
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ S(h, {
|
|
117
118
|
kind: "providers",
|
|
118
119
|
state: U,
|
|
119
120
|
offset: N,
|
|
@@ -129,4 +130,4 @@ function T({ productId: e, client: i }) {
|
|
|
129
130
|
] });
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
|
-
export {
|
|
133
|
+
export { w as AiPage };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { SSORedirectSpinner as e, checkRemoteSLO as t, checkSLO as n, clearLocalAuthState as r, getSSORedirectUrl as i, redirectToSSO as a } from "./shared/components/SSORedirectGuard.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
2
|
+
import { MAIN_CONTENT_ID as o, MainLandmark as s, PublicLayout as c, SkipToContentLink as l, focusSkipTarget as u, useInsideMainLandmark as d } from "./shared/components/SkipToContent.js";
|
|
3
|
+
import { ErrorBoundary as f } from "./shared/components/ErrorBoundary.js";
|
|
4
|
+
import { RequireAuth as p, RequireGuest as m } from "./shared/components/RequireAuth.js";
|
|
5
|
+
import { PermissionButton as h, PermissionGate as g, PermissionLink as _ } from "./shared/components/PermissionGate.js";
|
|
6
|
+
import { AccessDenied as v, PermissionDenied as y } from "./shared/components/AccessDenied.js";
|
|
7
|
+
import { ErrorFallback as b } from "./shared/components/ErrorFallback.js";
|
|
8
|
+
import { LoadingFallback as x, PageLoadingFallback as S, SectionLoadingFallback as C } from "./shared/components/LoadingFallback.js";
|
|
9
|
+
import { MicrofrontendErrorBoundary as w } from "./shared/components/MicrofrontendErrorBoundary.js";
|
|
10
|
+
import { ConditionalShell as T } from "./shared/components/ConditionalShell.js";
|
|
11
|
+
import { PWAInstallBanner as E } from "./shared/components/PWAInstallBanner.js";
|
|
12
|
+
import { ErrorBoundary as D } from "./shared/components/AppErrorBoundary.js";
|
|
13
|
+
import { ContextConversationWidget as O } from "./shared/components/ContextConversationWidget.js";
|
|
14
|
+
import { KeyboardHelpDialogWrapper as k } from "./shared/components/KeyboardHelpDialogWrapper.js";
|
|
15
|
+
import { QuotaMeter as A } from "./shared/components/QuotaMeter.js";
|
|
16
|
+
import { UPGRADE_PROMPT_EVENT as j, UpgradePromptModal as M, dispatchUpgradePrompt as N } from "./shared/components/UpgradePromptModal.js";
|
|
17
|
+
import { UpgradeInlineBanner as P } from "./shared/components/UpgradeInlineBanner.js";
|
|
18
|
+
import { DEFAULT_QUOTA_UPGRADE_COPY as F, QuotaUpgradeBridge as I, captureQuotaDialogOwners as L, claimQuotaDialog as R, dispatchProductQuotaExhausted as z, quotaEventKind as B, resolveQuotaUpgradeCopy as V, useQuotaDialogOwnership as H, useQuotaUpgradeBridge as U, withQuotaDialogOwnership as W } from "./shared/components/QuotaUpgradeBridge.js";
|
|
19
|
+
import { LandingGateView as G, LandingOrDashboardRedirect as K, hasStoredValidSession as q, resolveLandingGate as J } from "./shared/components/LandingOrDashboardRedirect.js";
|
|
20
|
+
import { useVoiceInput as Y } from "./shared/components/assistantWidget/useVoiceInput.js";
|
|
21
|
+
import { ASSISTANT_WIDGET_TOGGLE_EVENT as X, AssistantWidget as Z } from "./shared/components/assistantWidget/AssistantWidget.js";
|
|
22
|
+
import { Markdown as Q } from "./shared/components/Markdown.js";
|
|
23
|
+
import { DesktopUpdateToast as $ } from "./shared/components/DesktopUpdateToast.js";
|
|
24
|
+
export { X as ASSISTANT_WIDGET_TOGGLE_EVENT, v as AccessDenied, D as AppErrorBoundary, Z as AssistantWidget, T as ConditionalShell, O as ContextConversationWidget, F as DEFAULT_QUOTA_UPGRADE_COPY, $ as DesktopUpdateToast, f as ErrorBoundary, b as ErrorFallback, k as KeyboardHelpDialogWrapper, G as LandingGateView, K as LandingOrDashboardRedirect, x as LoadingFallback, o as MAIN_CONTENT_ID, s as MainLandmark, Q as Markdown, w as MicrofrontendErrorBoundary, E as PWAInstallBanner, S as PageLoadingFallback, h as PermissionButton, y as PermissionDenied, g as PermissionGate, _ as PermissionLink, c as PublicLayout, A as QuotaMeter, I as QuotaUpgradeBridge, p as RequireAuth, m as RequireGuest, e as SSORedirectSpinner, C as SectionLoadingFallback, l as SkipToContentLink, j as UPGRADE_PROMPT_EVENT, P as UpgradeInlineBanner, M as UpgradePromptModal, L as captureQuotaDialogOwners, t as checkRemoteSLO, n as checkSLO, R as claimQuotaDialog, r as clearLocalAuthState, z as dispatchProductQuotaExhausted, N as dispatchUpgradePrompt, u as focusSkipTarget, i as getSSORedirectUrl, q as hasStoredValidSession, B as quotaEventKind, a as redirectToSSO, J as resolveLandingGate, V as resolveQuotaUpgradeCopy, d as useInsideMainLandmark, H as useQuotaDialogOwnership, U as useQuotaUpgradeBridge, Y as useVoiceInput, W as withQuotaDialogOwnership };
|