@burdenoff/fe-libs 2026.1114.9 → 2026.1114.11
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/DynamicFooter.d.ts +15 -1
- package/dist/chrome/DynamicFooter.js +65 -70
- package/dist/chrome/Footer.d.ts +43 -1
- package/dist/chrome/Footer.js +121 -125
- package/dist/chrome/footerLegalLinks.d.ts +17 -0
- package/dist/chrome/footerLegalLinks.js +23 -0
- package/dist/shared/assistant/index.d.ts +3 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +227 -227
- package/dist/shared/assistant/ui/AssistantPageHost.d.ts +6 -1
- package/dist/shared/assistant/ui/AssistantPageHost.js +20 -17
- package/dist/shared/assistant/ui/assistantPageSettings.d.ts +4 -0
- package/dist/shared/assistant/ui/assistantPageSettings.js +22 -0
- package/dist/shared/assistant/ui/compact/AssistantMenuView.js +119 -144
- package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +1 -5
- package/dist/shared/assistant/ui/compact/AssistantPageBar.js +19 -37
- package/dist/shared/assistant/ui/compact/AssistantPanelLayoutField.d.ts +8 -0
- package/dist/shared/assistant/ui/compact/AssistantPanelLayoutField.js +39 -0
- package/dist/shared/assistant/ui/compact/AssistantSettingsView.d.ts +10 -0
- package/dist/shared/assistant/ui/compact/AssistantSettingsView.js +50 -0
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared/utils/productSiteLinks.d.ts +57 -0
- package/dist/shared/utils/productSiteLinks.js +53 -0
- package/dist/shared-assistant.js +67 -64
- package/dist/shared-utils.js +10 -9
- package/dist/shared.js +116 -115
- package/dist/utils/index.js +6 -5
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
|
+
import { PanelRight as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
// src/shared/assistant/ui/compact/AssistantPanelLayoutField.tsx
|
|
5
|
+
var i = ({ groupName: i, docked: a, onToggleDock: o }) => {
|
|
6
|
+
let s = e();
|
|
7
|
+
return /* @__PURE__ */ r("fieldset", {
|
|
8
|
+
className: "hidden min-w-0 border-0 px-4 py-2 sm:block",
|
|
9
|
+
"data-testid": "assistant-menu-panel-layout",
|
|
10
|
+
children: [/* @__PURE__ */ r("legend", {
|
|
11
|
+
className: "flex items-center gap-3 py-1 text-sm text-text-primary",
|
|
12
|
+
children: [/* @__PURE__ */ n(t, {
|
|
13
|
+
className: "size-5 shrink-0 text-text-secondary",
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}), s("menuView.panelLayout", "Panel layout")]
|
|
16
|
+
}), [[
|
|
17
|
+
!0,
|
|
18
|
+
s("menuView.layoutDocked", "Docked side panel"),
|
|
19
|
+
"docked"
|
|
20
|
+
], [
|
|
21
|
+
!1,
|
|
22
|
+
s("menuView.layoutFloating", "Floating window"),
|
|
23
|
+
"floating"
|
|
24
|
+
]].map(([e, t, s]) => /* @__PURE__ */ r("label", {
|
|
25
|
+
className: "flex min-h-11 cursor-pointer items-center gap-3 ps-8 text-sm text-text-primary focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)]",
|
|
26
|
+
children: [/* @__PURE__ */ n("input", {
|
|
27
|
+
type: "radio",
|
|
28
|
+
name: i,
|
|
29
|
+
checked: !!a === e,
|
|
30
|
+
onChange: () => {
|
|
31
|
+
!!a !== e && o();
|
|
32
|
+
},
|
|
33
|
+
className: "size-4 accent-current",
|
|
34
|
+
"data-testid": `assistant-panel-layout-${s}`
|
|
35
|
+
}), t]
|
|
36
|
+
}, s))]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
export { i as AssistantPanelLayoutField };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType, FC } from 'react';
|
|
2
|
+
import { LiveAvatarSettingsViewProps } from '../assistantLiveAvatarSeam';
|
|
3
|
+
export interface AssistantSettingsViewProps {
|
|
4
|
+
/** The avatar's settings, where the avatar is offered. */
|
|
5
|
+
readonly AvatarSettings?: ComponentType<LiveAvatarSettingsViewProps>;
|
|
6
|
+
/** The side panel's layout, where the product offers a choice. */
|
|
7
|
+
readonly docked?: boolean;
|
|
8
|
+
readonly onToggleDock?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const AssistantSettingsView: FC<AssistantSettingsViewProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
|
+
import { useAssistantNavigate as t } from "../AssistantMarkdownRenderer.js";
|
|
3
|
+
import { PAGE_VIEW_GUTTER as n } from "../assistantPageLayout.js";
|
|
4
|
+
import { AssistantPanelLayoutField as r } from "./AssistantPanelLayoutField.js";
|
|
5
|
+
import { AssistantVoiceLanguageSettings as i } from "./AssistantVoiceLanguageSettings.js";
|
|
6
|
+
import { useId as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
// src/shared/assistant/ui/compact/AssistantSettingsView.tsx
|
|
9
|
+
var c = ({ id: e, title: t, children: n, testId: r }) => /* @__PURE__ */ s("section", {
|
|
10
|
+
"aria-labelledby": e,
|
|
11
|
+
className: "border-b border-border-subtle py-4 last:border-b-0",
|
|
12
|
+
"data-testid": r,
|
|
13
|
+
children: [/* @__PURE__ */ o("h2", {
|
|
14
|
+
id: e,
|
|
15
|
+
className: "px-4 pb-1 text-base font-semibold text-text-primary",
|
|
16
|
+
children: t
|
|
17
|
+
}), n]
|
|
18
|
+
}), l = ({ AvatarSettings: l, docked: u, onToggleDock: d }) => {
|
|
19
|
+
let f = e(), p = t(), m = a();
|
|
20
|
+
return /* @__PURE__ */ s("div", {
|
|
21
|
+
role: "region",
|
|
22
|
+
"aria-label": f("menuView.settings", "Settings"),
|
|
23
|
+
className: `scrollbar-slim absolute inset-0 z-10 flex flex-col overflow-y-auto bg-bg-surface ${n}`,
|
|
24
|
+
"data-testid": "assistant-settings-view",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ o(c, {
|
|
27
|
+
id: `${m}-voice`,
|
|
28
|
+
title: f("menuView.voiceLanguage", "Voice & language"),
|
|
29
|
+
testId: "assistant-settings-voice-language",
|
|
30
|
+
children: /* @__PURE__ */ o(i, {})
|
|
31
|
+
}),
|
|
32
|
+
l ? /* @__PURE__ */ o(c, {
|
|
33
|
+
id: `${m}-avatar`,
|
|
34
|
+
title: f("menuView.avatar", "Avatar"),
|
|
35
|
+
testId: "assistant-settings-avatar",
|
|
36
|
+
children: /* @__PURE__ */ o(l, { navigate: p })
|
|
37
|
+
}) : null,
|
|
38
|
+
d ? /* @__PURE__ */ o("div", {
|
|
39
|
+
className: "py-4",
|
|
40
|
+
"data-testid": "assistant-settings-panel-layout",
|
|
41
|
+
children: /* @__PURE__ */ o(r, {
|
|
42
|
+
groupName: `${m}-layout`,
|
|
43
|
+
docked: u,
|
|
44
|
+
onToggleDock: d
|
|
45
|
+
})
|
|
46
|
+
}) : null
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
export { l as AssistantSettingsView };
|
|
@@ -26,6 +26,8 @@ export { setSSoCookie, getSSoCookie, clearSSoCookie, setShellSsoCookies, readShe
|
|
|
26
26
|
export type { ShellSsoCookieData } from './authCookie';
|
|
27
27
|
export { isAllowedRedirectUrl, replaceLocationWithAllowlist, assignLocationWithAllowlist, openUrlInNewTabWithAllowlist, } from './redirectAllowlist';
|
|
28
28
|
export type { RedirectAllowlistOptions } from './redirectAllowlist';
|
|
29
|
+
export { resolveProductDomain, resolveMarketingOrigin, resolveDocsOrigin, resolveMarketingUrl, resolveDocsUrl, resolveLegalPath, MARKETING_LEGAL_PATHS, } from './productSiteLinks';
|
|
30
|
+
export type { LegalPathOverrides } from './productSiteLinks';
|
|
29
31
|
export { SSO_DEPOSITED_PARAM, beginSsoNavigation, isSsoNavigationPending, clearSsoNavigation, readSsoDepositState, markSsoDepositPending, markSsoDepositDone, clearSsoDepositState, shouldAttemptSsoDeposit, mintSsoSessionTokens, buildSsoDepositUrl, consumeSsoDepositMarker, } from './ssoDeposit';
|
|
30
32
|
export type { MintedSsoTokens, MintSsoSessionResult, SsoDepositPayload, SsoDepositState, } from './ssoDeposit';
|
|
31
33
|
export { createProfileScopedStorage, getProfileScopedKey } from './profileScopedStorage';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public site links for the product the shell is currently serving.
|
|
3
|
+
*
|
|
4
|
+
* fe-libs is mounted by every Burdenoff product shell, so it cannot hardcode
|
|
5
|
+
* one product's marketing or documentation domain: doing so would send every
|
|
6
|
+
* other product's users to the wrong company's terms or docs. Instead the
|
|
7
|
+
* product domain is DERIVED from the shell's own host:
|
|
8
|
+
*
|
|
9
|
+
* app.fluidgrids.ai -> fluidgrids.ai -> https://www.fluidgrids.ai
|
|
10
|
+
* alphaapp.fluidgrids.ai -> fluidgrids.ai -> https://www.fluidgrids.ai
|
|
11
|
+
* admin.burdenoff.com -> burdenoff.com -> https://docs.burdenoff.com
|
|
12
|
+
*
|
|
13
|
+
* Alpha shells link to the production sites on purpose: the alpha twins sit
|
|
14
|
+
* behind Cloudflare Access, and the production sites are the only targets
|
|
15
|
+
* guaranteed to exist for every viewer.
|
|
16
|
+
*
|
|
17
|
+
* Local development (localhost, IP literals, `*.local.burdenoff.com`) has no
|
|
18
|
+
* public site to link to, so every resolver returns `null` there and callers
|
|
19
|
+
* leave the link inert rather than invent a production domain.
|
|
20
|
+
*
|
|
21
|
+
* This is the shared home of the resolver first written for the signup consent
|
|
22
|
+
* links in microfe-auth (`src/auth/utils/legalUrls.ts`, BOFF-7175); the footer
|
|
23
|
+
* uses it for its Resources and Legal links (BOFF-7244).
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The bare product domain (e.g. `fluidgrids.ai`) for the given host, or `null`
|
|
27
|
+
* when it cannot be determined (local development, IP literals, or a host with
|
|
28
|
+
* no registrable domain). Defaults to the current page's host.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveProductDomain(hostname?: string): string | null;
|
|
31
|
+
/** `https://www.<product-domain>`, or `null` when the domain is unknown. */
|
|
32
|
+
export declare function resolveMarketingOrigin(hostname?: string): string | null;
|
|
33
|
+
/** `https://docs.<product-domain>`, or `null` when the domain is unknown. */
|
|
34
|
+
export declare function resolveDocsOrigin(hostname?: string): string | null;
|
|
35
|
+
/** Absolute marketing-site URL for `path`, or `null` when the domain is unknown. */
|
|
36
|
+
export declare function resolveMarketingUrl(path: string, hostname?: string): string | null;
|
|
37
|
+
/** Absolute documentation-site URL for `path`, or `null` when the domain is unknown. */
|
|
38
|
+
export declare function resolveDocsUrl(path: string, hostname?: string): string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Where each global-CMS legal page slug lives on the product marketing sites.
|
|
41
|
+
*
|
|
42
|
+
* These are the route names most product sites use (checked against the live
|
|
43
|
+
* sites on 2026-11-14). A slug that is not listed here has no public page, so
|
|
44
|
+
* the footer leaves it out rather than link to a dead route. Products whose
|
|
45
|
+
* site uses a different route pass an override (`legalPaths` on
|
|
46
|
+
* `DynamicFooter`); for example Workspaces serves its cookie policy at
|
|
47
|
+
* `/cookies`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MARKETING_LEGAL_PATHS: Readonly<Record<string, string>>;
|
|
50
|
+
/**
|
|
51
|
+
* Per-product overrides for `MARKETING_LEGAL_PATHS`. A string replaces the
|
|
52
|
+
* route for that slug; `null` drops the slug from the footer because the
|
|
53
|
+
* product's site does not serve it.
|
|
54
|
+
*/
|
|
55
|
+
export type LegalPathOverrides = Readonly<Record<string, string | null>>;
|
|
56
|
+
/** Marketing-site route for a legal slug, or `null` when it has none. */
|
|
57
|
+
export declare function resolveLegalPath(slug: string, overrides?: LegalPathOverrides): string | null;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/shared/utils/productSiteLinks.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"app.",
|
|
4
|
+
"alphaapp.",
|
|
5
|
+
"admin.",
|
|
6
|
+
"alphaadmin.",
|
|
7
|
+
"www."
|
|
8
|
+
];
|
|
9
|
+
function t() {
|
|
10
|
+
return typeof window < "u" && window.location ? window.location.hostname : "";
|
|
11
|
+
}
|
|
12
|
+
function n(n) {
|
|
13
|
+
let r = (n ?? t()).toLowerCase().trim();
|
|
14
|
+
if (!r || r === "localhost" || r === "127.0.0.1" || r === "0.0.0.0" || r.startsWith("[") || r.endsWith(".local.burdenoff.com") || /^\d+\.\d+\.\d+\.\d+$/.test(r)) return null;
|
|
15
|
+
let i = r;
|
|
16
|
+
for (let t of e) if (i.startsWith(t)) {
|
|
17
|
+
i = i.slice(t.length);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return i.includes(".") ? i : null;
|
|
21
|
+
}
|
|
22
|
+
function r(e) {
|
|
23
|
+
let t = n(e);
|
|
24
|
+
return t ? `https://www.${t}` : null;
|
|
25
|
+
}
|
|
26
|
+
function i(e) {
|
|
27
|
+
let t = n(e);
|
|
28
|
+
return t ? `https://docs.${t}` : null;
|
|
29
|
+
}
|
|
30
|
+
function a(e, t) {
|
|
31
|
+
return e ? !t || t === "/" ? e : `${e}${t.startsWith("/") ? t : `/${t}`}` : null;
|
|
32
|
+
}
|
|
33
|
+
function o(e, t) {
|
|
34
|
+
return a(r(t), e);
|
|
35
|
+
}
|
|
36
|
+
function s(e, t) {
|
|
37
|
+
return a(i(t), e);
|
|
38
|
+
}
|
|
39
|
+
var c = {
|
|
40
|
+
"terms-of-service": "/terms",
|
|
41
|
+
"privacy-policy": "/privacy",
|
|
42
|
+
security: "/security",
|
|
43
|
+
"cookie-policy": "/cookie",
|
|
44
|
+
"acceptable-use-policy": "/aup",
|
|
45
|
+
"refund-policy": "/refund-policy",
|
|
46
|
+
"data-processing-addendum": "/dpa",
|
|
47
|
+
subprocessors: "/subprocessors",
|
|
48
|
+
"ai-product-terms": "/ai-terms"
|
|
49
|
+
};
|
|
50
|
+
function l(e, t) {
|
|
51
|
+
return t && Object.prototype.hasOwnProperty.call(t, e) ? t[e] ?? null : c[e] ?? null;
|
|
52
|
+
}
|
|
53
|
+
export { c as MARKETING_LEGAL_PATHS, i as resolveDocsOrigin, s as resolveDocsUrl, l as resolveLegalPath, r as resolveMarketingOrigin, o as resolveMarketingUrl, n as resolveProductDomain };
|