@burdenoff/fe-libs 2026.1021.5 → 2026.1021.7
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 +35 -0
- package/dist/chrome/AccountSwitcher.js +7 -7
- package/dist/chrome/AutoBreadcrumbs.js +3 -3
- package/dist/chrome/Breadcrumbs.js +24 -24
- package/dist/chrome/ContextSwitcher.js +7 -7
- package/dist/chrome/DynamicFooter.js +3 -3
- package/dist/chrome/HeaderThemeSwitcher.js +14 -14
- package/dist/chrome/LanguagePickerSheet.js +7 -7
- package/dist/chrome/NativeTopBar.js +4 -4
- package/dist/chrome/NavCustomizeDialog.js +12 -12
- package/dist/chrome/ProductPickerSheet.js +7 -7
- package/dist/chrome/SideNavigation.js +17 -17
- package/dist/chrome/Sidebar.js +34 -34
- package/dist/chrome/Tabs.js +20 -20
- package/dist/chrome/ThemePreferences.js +188 -188
- package/dist/shared/assistant/ui/AssistantChatArea.js +4 -4
- package/dist/shared/components/ContextConversationWidget.js +7 -7
- package/dist/shared/components/QuotaUpgradeBridge.js +13 -13
- package/dist/shared/pages/AiPage.js +6 -6
- package/dist/shared/providers/shell/ProfileI18nBridge.js +11 -11
- package/dist/shared/utils/canvasTokens.d.ts +65 -0
- package/dist/shared/utils/canvasTokens.js +159 -0
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared-hooks-shell.js +7 -7
- package/dist/shared-providers-shell.js +6 -6
- package/dist/shared-utils.js +19 -18
- package/dist/shared.js +135 -134
- package/dist/ui/branded-splash.d.ts +25 -2
- package/dist/ui/branded-splash.js +48 -31
- package/dist/ui/cta-overflow-menu.js +17 -17
- package/dist/ui/guidance.js +19 -19
- package/dist/ui/index.d.ts +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +6 -2
- package/shared/config/eslint.config.d.mts +21 -0
- package/shared/config/eslint.config.mjs +80 -18
- package/src/shared/styles/app-shell.css +3 -0
- package/src/shared/styles/canvas-theme.css +82 -0
- package/src/shared/tokens/build/semantic.css +83 -0
- package/src/shared/tokens/build/tailwind.preset.js +65 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useI18n as e } from "../../providers/shell/I18nProvider.js";
|
|
2
|
+
import { useThemeOrNull as t } from "../../providers/shell/ThemeProvider.js";
|
|
3
3
|
import { useAuthToken as n } from "../../providers/shell/AuthTokenProvider.js";
|
|
4
4
|
import "../../../shared-providers-shell.js";
|
|
5
5
|
import { useAssistantControl as r } from "../appControls/useAssistantControl.js";
|
|
@@ -130,7 +130,7 @@ var Ti = () => () => {}, Ei = () => "off", Di = ({ visible: Di = !0, writeAccess
|
|
|
130
130
|
productWriteApproval: F,
|
|
131
131
|
capabilities: r ? n.sandboxWriteCapabilities[r] : null
|
|
132
132
|
});
|
|
133
|
-
}, [F]), { getAccessToken: I, getWorkspaceToken: Fi, userId: L } = n(), { locale: R, isLocaleLoading: Ii } =
|
|
133
|
+
}, [F]), { getAccessToken: I, getWorkspaceToken: Fi, userId: L } = n(), { locale: R, isLocaleLoading: Ii } = e(), Li = g((e) => e.voiceGraceMs), Ri = g((e) => e.handsFreeInterrupt), zi = g((e) => e.handsFreeStreamNoticeAccepted), Bi = g((e) => e.acceptHandsFreeStreamNotice), Vi = g((e) => e.assistantLanguage), Hi = g((e) => e.replyLanguage), Ui = D(() => S(Vi, Hi, R), [
|
|
134
134
|
Vi,
|
|
135
135
|
Hi,
|
|
136
136
|
R
|
|
@@ -535,7 +535,7 @@ var Ti = () => () => {}, Ei = () => "off", Di = ({ visible: Di = !0, writeAccess
|
|
|
535
535
|
V,
|
|
536
536
|
ta,
|
|
537
537
|
M
|
|
538
|
-
]), jo =
|
|
538
|
+
]), jo = t(), { speakFinishedReply: Mo, speakingMessageId: No, stop: Po } = hn(), Fo = O(null), Io = T((e, t) => {
|
|
539
539
|
let n = Fo.current;
|
|
540
540
|
n?.token === e && n.exchange === null && (n.exchange = t);
|
|
541
541
|
}, []), Lo = T((e) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useGatewayClient as e } from "../graphql/GatewayContext.js";
|
|
2
2
|
import "../../shared-graphql.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useI18n as t } from "../providers/shell/I18nProvider.js";
|
|
4
|
+
import { useAuth as n } from "../providers/shell/AuthProvider.js";
|
|
5
|
+
import { useActiveContext as r } from "../providers/shell/ActiveContextProvider.js";
|
|
6
|
+
import { Card as ee, CardContent as te } from "../../ui/card.js";
|
|
7
7
|
import "../../ui.js";
|
|
8
8
|
import { usePageConversationContext as ne } from "../providers/shell/PageConversationContextProvider.js";
|
|
9
9
|
import "../../shared-providers-shell.js";
|
|
@@ -26,7 +26,7 @@ import { useQuery as h } from "@apollo/client/react";
|
|
|
26
26
|
import { useNavigate as ge } from "react-router";
|
|
27
27
|
//#region src/shared/components/ContextConversationWidget.tsx
|
|
28
28
|
function g({ className: g, widgetKey: _ }) {
|
|
29
|
-
let { t: v } =
|
|
29
|
+
let { t: v } = t(), { workspaceId: y } = r(), b = n(), x = ne(), S = e("workspace"), C = ge(), [w, T] = f(null), [E, D] = f(null), [O, k] = f(""), [A, _e] = f(() => typeof window < "u" ? window.innerWidth < 768 : !1), [j, M] = f(null), [N, P] = f(null), [F, I] = f(""), [L, R] = f(null), [z, B] = f([]), V = he(null), H = d(() => (e, t) => {
|
|
30
30
|
let n = v(e);
|
|
31
31
|
return n === e ? t : n;
|
|
32
32
|
}, [v]), U = b.user?.id ?? null, W = _ ?? x.widgetKey ?? "default", G = d(() => {
|
|
@@ -139,7 +139,7 @@ function g({ className: g, widgetKey: _ }) {
|
|
|
139
139
|
}, Se = async () => {
|
|
140
140
|
!N || !F.trim() || (await X.saveEdit(N, F.trim()), P(null), I(""));
|
|
141
141
|
};
|
|
142
|
-
return /* @__PURE__ */ m(
|
|
142
|
+
return /* @__PURE__ */ m(ee, {
|
|
143
143
|
className: g,
|
|
144
144
|
children: [/* @__PURE__ */ p(me, {
|
|
145
145
|
conversationTitle: K.data?.conversation?.title,
|
|
@@ -159,7 +159,7 @@ function g({ className: g, widgetKey: _ }) {
|
|
|
159
159
|
},
|
|
160
160
|
onOpenInbox: () => w && C(`/conversations/${w}`),
|
|
161
161
|
tr: H
|
|
162
|
-
}), !A && /* @__PURE__ */ m(
|
|
162
|
+
}), !A && /* @__PURE__ */ m(te, {
|
|
163
163
|
className: "space-y-4",
|
|
164
164
|
children: [
|
|
165
165
|
L && /* @__PURE__ */ p("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useOptionalI18n as e } from "../providers/shell/I18nProvider.js";
|
|
2
|
+
import { QUOTA_EXHAUSTED_CODE as t } from "../utils/quotaErrors.js";
|
|
3
3
|
import { dispatchUpgradePrompt as n } from "./UpgradePromptModal.js";
|
|
4
4
|
import { quotaExhaustedEventName as r } from "../assistant/quota.js";
|
|
5
5
|
import { useEffect as i, useRef as a } from "react";
|
|
@@ -61,7 +61,7 @@ function v(e, t) {
|
|
|
61
61
|
return n.displayName = `withQuotaDialogOwnership(${e.displayName ?? e.name ?? "Component"})`, n;
|
|
62
62
|
}
|
|
63
63
|
function y({ product: o, copy: s }) {
|
|
64
|
-
let d =
|
|
64
|
+
let d = e()?.t, f = a({
|
|
65
65
|
copy: s,
|
|
66
66
|
translate: d
|
|
67
67
|
});
|
|
@@ -72,28 +72,28 @@ function y({ product: o, copy: s }) {
|
|
|
72
72
|
};
|
|
73
73
|
}, [s, d]), i(() => {
|
|
74
74
|
if (!o || typeof window > "u") return;
|
|
75
|
-
let
|
|
75
|
+
let e = r(o), i = /* @__PURE__ */ new Set(), a = (e, t) => {
|
|
76
76
|
let n = f.current.translate;
|
|
77
77
|
if (!e || !n) return t;
|
|
78
78
|
let r = n(e, t);
|
|
79
79
|
return r && r !== e ? r : t;
|
|
80
|
-
}, s = (
|
|
81
|
-
let r = c(
|
|
80
|
+
}, s = (e) => {
|
|
81
|
+
let r = c(e), s = l(e), d = g(o), p = setTimeout(() => {
|
|
82
82
|
if (i.delete(p), d()) return;
|
|
83
|
-
let
|
|
83
|
+
let e = u(f.current.copy, r);
|
|
84
84
|
n({
|
|
85
85
|
extensions: s ? {
|
|
86
|
-
code:
|
|
86
|
+
code: t,
|
|
87
87
|
quotaName: s
|
|
88
|
-
} : { code:
|
|
89
|
-
title: a(
|
|
90
|
-
description: a(
|
|
88
|
+
} : { code: t },
|
|
89
|
+
title: a(e.titleKey, e.title),
|
|
90
|
+
description: a(e.messageKey, e.message)
|
|
91
91
|
});
|
|
92
92
|
}, 0);
|
|
93
93
|
i.add(p);
|
|
94
94
|
};
|
|
95
|
-
return window.addEventListener(
|
|
96
|
-
window.removeEventListener(
|
|
95
|
+
return window.addEventListener(e, s), () => {
|
|
96
|
+
window.removeEventListener(e, s);
|
|
97
97
|
for (let e of i) clearTimeout(e);
|
|
98
98
|
i.clear();
|
|
99
99
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSafeGatewayClient as e } from "../graphql/GatewayContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useI18n as t } from "../providers/shell/I18nProvider.js";
|
|
3
|
+
import { useAuth as n } from "../providers/shell/AuthProvider.js";
|
|
4
|
+
import { useActiveContext as r } from "../providers/shell/ActiveContextProvider.js";
|
|
5
5
|
import { PermissionProvider as i, usePermissions as a, useSafePermissions as o } from "../providers/shell/PermissionProvider.js";
|
|
6
6
|
import { MODELS as s, PROVIDERS as c, SUMMARY as l, catalog as u, sevenDays as d, summary as f } from "./ai/contracts.js";
|
|
7
7
|
import { useAiTr as p } from "./ai/i18n.js";
|
|
@@ -35,15 +35,15 @@ function C({ productName: t, productId: n }) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
function w({ children: e }) {
|
|
38
|
-
let t = o(), { workspaceId:
|
|
38
|
+
let t = o(), { workspaceId: n } = r();
|
|
39
39
|
return t ? e : /* @__PURE__ */ x(i, {
|
|
40
|
-
scopeId:
|
|
40
|
+
scopeId: n ?? null,
|
|
41
41
|
gateway: "workspace",
|
|
42
42
|
children: e
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
function T({ productId: e, client: i }) {
|
|
46
|
-
let o =
|
|
46
|
+
let o = n(), { workspaceId: C } = r(), w = a(), { locale: T } = t(), E = p(), D = v(() => ({
|
|
47
47
|
workspaceId: C ?? "",
|
|
48
48
|
actorId: o.user?.id ?? "",
|
|
49
49
|
profileId: o.activeProfileId,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { graphqlFetch as e } from "../../graphql/fetch.js";
|
|
2
2
|
import "../../../shared-graphql.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { getDefaultTranslationPersistence as t } from "./translationStore.js";
|
|
4
|
+
import { I18nProvider as n, useI18n as r } from "./I18nProvider.js";
|
|
5
|
+
import { useAuth as i } from "./AuthProvider.js";
|
|
6
6
|
import { DEFAULT_PLATFORM_I18N_PRODUCT_ID as a, createLayeredTranslationLoader as o, effectivePlatformId as s, translationCacheScope as c } from "./translationLayers.js";
|
|
7
7
|
import { useCallback as l, useMemo as u } from "react";
|
|
8
8
|
import { jsx as d } from "react/jsx-runtime";
|
|
@@ -29,24 +29,24 @@ async function m(t, n) {
|
|
|
29
29
|
return JSON.parse(a);
|
|
30
30
|
}
|
|
31
31
|
function h({ children: e }) {
|
|
32
|
-
let { dir: t } =
|
|
32
|
+
let { dir: t } = r();
|
|
33
33
|
return /* @__PURE__ */ d(f, {
|
|
34
34
|
dir: t,
|
|
35
35
|
children: e
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function g({ children: e, i18nProductId:
|
|
39
|
-
let { user: b } =
|
|
40
|
-
productId:
|
|
38
|
+
function g({ children: e, i18nProductId: r, platformI18nProductId: f = a, defaultLocale: p = "en", fallbackTranslations: g, disableDynamicFetch: _ = !1, persistTranslations: v = !0, directionMode: y = "off" }) {
|
|
39
|
+
let { user: b } = i(), x = b?.id ?? null, S = !_, C = s(r, f), w = l((e) => g?.[e] ?? {}, [g]), T = u(() => o({
|
|
40
|
+
productId: r,
|
|
41
41
|
platformId: C,
|
|
42
42
|
fallback: w,
|
|
43
43
|
fetchDictionary: m
|
|
44
44
|
}), [
|
|
45
45
|
w,
|
|
46
|
-
|
|
46
|
+
r,
|
|
47
47
|
C
|
|
48
|
-
]), E = u(() => S && v ?
|
|
49
|
-
return /* @__PURE__ */ d(
|
|
48
|
+
]), E = u(() => S && v ? t() : null, [v, S]);
|
|
49
|
+
return /* @__PURE__ */ d(n, {
|
|
50
50
|
defaultLocale: p,
|
|
51
51
|
translations: u(() => g ?? {
|
|
52
52
|
en: {},
|
|
@@ -60,7 +60,7 @@ function g({ children: e, i18nProductId: i, platformI18nProductId: f = a, defaul
|
|
|
60
60
|
ar: {}
|
|
61
61
|
}, [g]),
|
|
62
62
|
loadTranslations: S ? T : void 0,
|
|
63
|
-
cacheScope: c(
|
|
63
|
+
cacheScope: c(r, C),
|
|
64
64
|
persistence: E,
|
|
65
65
|
firstPaintHoldMs: E ? 150 : 0,
|
|
66
66
|
directionMode: y,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas / node / edge / data-type design tokens (G19).
|
|
3
|
+
*
|
|
4
|
+
* TypeScript handles for the builder tokens in fe-libs/shared/tokens
|
|
5
|
+
* (`--color-node-*`, `--color-edge-*`, `--color-canvas-*`,
|
|
6
|
+
* `--color-datatype-*`). Every token aliases an existing chart-* / status-* /
|
|
7
|
+
* surface token, so values follow light/dark mode, the brand and the
|
|
8
|
+
* expressive / high-contrast themes.
|
|
9
|
+
*
|
|
10
|
+
* Use the `var(--…)` helpers where a value goes outside Tailwind (React Flow
|
|
11
|
+
* props, SVG attributes, inline styles), and the class records for className
|
|
12
|
+
* strings. The class records are written out literally on purpose: Tailwind
|
|
13
|
+
* only generates utilities for class names it can find verbatim in source.
|
|
14
|
+
*/
|
|
15
|
+
/** What a workflow node does, for colouring its accent / header / icon well. */
|
|
16
|
+
export declare const NODE_CATEGORIES: readonly ["trigger", "action", "logic", "loop", "data", "integration", "ai", "human", "utility", "end", "default"];
|
|
17
|
+
export type NodeCategory = (typeof NODE_CATEGORIES)[number];
|
|
18
|
+
/** Execution state of a node in a run (ring / badge / status dot). */
|
|
19
|
+
export declare const NODE_STATES: readonly ["idle", "queued", "running", "success", "warning", "error", "skipped"];
|
|
20
|
+
export type NodeState = (typeof NODE_STATES)[number];
|
|
21
|
+
export declare const EDGE_KINDS: readonly ["default", "hover", "selected", "active", "success", "error", "compatible", "incompatible"];
|
|
22
|
+
export type EdgeKind = (typeof EDGE_KINDS)[number];
|
|
23
|
+
/** Data types carried by ports and shown in mappers. */
|
|
24
|
+
export declare const DATA_TYPES: readonly ["string", "number", "boolean", "object", "array", "date", "binary", "any"];
|
|
25
|
+
export type DataType = (typeof DATA_TYPES)[number];
|
|
26
|
+
/** Number of categorical chart-* series in the token set. */
|
|
27
|
+
export declare const CHART_SERIES_COUNT = 12;
|
|
28
|
+
/** Narrows any string to a known category, falling back to `'default'`. */
|
|
29
|
+
export declare function toNodeCategory(value: string | null | undefined): NodeCategory;
|
|
30
|
+
/** Narrows any string to a known data type, falling back to `'any'`. */
|
|
31
|
+
export declare function toDataType(value: string | null | undefined): DataType;
|
|
32
|
+
/** `var(--color-node-<category>)` — the solid category accent. */
|
|
33
|
+
export declare function nodeCategoryColor(category: NodeCategory): string;
|
|
34
|
+
/** `var(--color-node-<category>-subtle)` — a translucent tint of the accent. */
|
|
35
|
+
export declare function nodeCategorySubtleColor(category: NodeCategory): string;
|
|
36
|
+
/** `var(--color-node-state-<state>)`. */
|
|
37
|
+
export declare function nodeStateColor(state: NodeState): string;
|
|
38
|
+
/** `var(--color-edge-<kind>)`. */
|
|
39
|
+
export declare function edgeColor(kind: EdgeKind): string;
|
|
40
|
+
/** `var(--color-datatype-<type>)`. */
|
|
41
|
+
export declare function dataTypeColor(type: DataType): string;
|
|
42
|
+
/**
|
|
43
|
+
* `var(--color-chart-N)` for a stable categorical series — e.g. to give each
|
|
44
|
+
* integration a distinct accent from a hash of its key. Any integer works;
|
|
45
|
+
* it wraps onto chart-1 … chart-12.
|
|
46
|
+
*/
|
|
47
|
+
export declare function chartSeriesColor(index: number): string;
|
|
48
|
+
/** A stable chart series index for a string key (FNV-1a), for `chartSeriesColor`. */
|
|
49
|
+
export declare function chartSeriesIndex(key: string): number;
|
|
50
|
+
export interface NodeCategoryClasses {
|
|
51
|
+
/** Solid accent fill, e.g. an icon well or a header stripe. */
|
|
52
|
+
accent: string;
|
|
53
|
+
/** Translucent tint, e.g. a header background. */
|
|
54
|
+
subtle: string;
|
|
55
|
+
/** Accent-coloured text or icon. */
|
|
56
|
+
text: string;
|
|
57
|
+
/** Accent-coloured border. */
|
|
58
|
+
border: string;
|
|
59
|
+
}
|
|
60
|
+
/** Tailwind classes per node category (needs canvas-theme.css or app-shell.css). */
|
|
61
|
+
export declare const nodeCategoryClasses: Record<NodeCategory, NodeCategoryClasses>;
|
|
62
|
+
/** Ring classes per execution state (needs canvas-theme.css or app-shell.css). */
|
|
63
|
+
export declare const nodeStateRingClasses: Record<NodeState, string>;
|
|
64
|
+
/** Text classes per data type (needs canvas-theme.css or app-shell.css). */
|
|
65
|
+
export declare const dataTypeTextClasses: Record<DataType, string>;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//#region src/shared/utils/canvasTokens.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"trigger",
|
|
4
|
+
"action",
|
|
5
|
+
"logic",
|
|
6
|
+
"loop",
|
|
7
|
+
"data",
|
|
8
|
+
"integration",
|
|
9
|
+
"ai",
|
|
10
|
+
"human",
|
|
11
|
+
"utility",
|
|
12
|
+
"end",
|
|
13
|
+
"default"
|
|
14
|
+
], t = [
|
|
15
|
+
"idle",
|
|
16
|
+
"queued",
|
|
17
|
+
"running",
|
|
18
|
+
"success",
|
|
19
|
+
"warning",
|
|
20
|
+
"error",
|
|
21
|
+
"skipped"
|
|
22
|
+
], n = [
|
|
23
|
+
"default",
|
|
24
|
+
"hover",
|
|
25
|
+
"selected",
|
|
26
|
+
"active",
|
|
27
|
+
"success",
|
|
28
|
+
"error",
|
|
29
|
+
"compatible",
|
|
30
|
+
"incompatible"
|
|
31
|
+
], r = [
|
|
32
|
+
"string",
|
|
33
|
+
"number",
|
|
34
|
+
"boolean",
|
|
35
|
+
"object",
|
|
36
|
+
"array",
|
|
37
|
+
"date",
|
|
38
|
+
"binary",
|
|
39
|
+
"any"
|
|
40
|
+
], i = 12;
|
|
41
|
+
function a(e, t) {
|
|
42
|
+
return e.includes(t);
|
|
43
|
+
}
|
|
44
|
+
function o(t) {
|
|
45
|
+
return t && a(e, t) ? t : "default";
|
|
46
|
+
}
|
|
47
|
+
function s(e) {
|
|
48
|
+
return e && a(r, e) ? e : "any";
|
|
49
|
+
}
|
|
50
|
+
function c(e) {
|
|
51
|
+
return `var(--color-node-${e})`;
|
|
52
|
+
}
|
|
53
|
+
function l(e) {
|
|
54
|
+
return `var(--color-node-${e}-subtle)`;
|
|
55
|
+
}
|
|
56
|
+
function u(e) {
|
|
57
|
+
return `var(--color-node-state-${e})`;
|
|
58
|
+
}
|
|
59
|
+
function d(e) {
|
|
60
|
+
return `var(--color-edge-${e})`;
|
|
61
|
+
}
|
|
62
|
+
function f(e) {
|
|
63
|
+
return `var(--color-datatype-${e})`;
|
|
64
|
+
}
|
|
65
|
+
function p(e) {
|
|
66
|
+
return `var(--color-chart-${(Number.isFinite(e) ? Math.trunc(Math.abs(e)) : 0) % 12 + 1})`;
|
|
67
|
+
}
|
|
68
|
+
function m(e) {
|
|
69
|
+
let t = 2166136261;
|
|
70
|
+
for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
71
|
+
return (t >>> 0) % 12;
|
|
72
|
+
}
|
|
73
|
+
var h = {
|
|
74
|
+
trigger: {
|
|
75
|
+
accent: "bg-node-trigger",
|
|
76
|
+
subtle: "bg-node-trigger-subtle",
|
|
77
|
+
text: "text-node-trigger",
|
|
78
|
+
border: "border-node-trigger"
|
|
79
|
+
},
|
|
80
|
+
action: {
|
|
81
|
+
accent: "bg-node-action",
|
|
82
|
+
subtle: "bg-node-action-subtle",
|
|
83
|
+
text: "text-node-action",
|
|
84
|
+
border: "border-node-action"
|
|
85
|
+
},
|
|
86
|
+
logic: {
|
|
87
|
+
accent: "bg-node-logic",
|
|
88
|
+
subtle: "bg-node-logic-subtle",
|
|
89
|
+
text: "text-node-logic",
|
|
90
|
+
border: "border-node-logic"
|
|
91
|
+
},
|
|
92
|
+
loop: {
|
|
93
|
+
accent: "bg-node-loop",
|
|
94
|
+
subtle: "bg-node-loop-subtle",
|
|
95
|
+
text: "text-node-loop",
|
|
96
|
+
border: "border-node-loop"
|
|
97
|
+
},
|
|
98
|
+
data: {
|
|
99
|
+
accent: "bg-node-data",
|
|
100
|
+
subtle: "bg-node-data-subtle",
|
|
101
|
+
text: "text-node-data",
|
|
102
|
+
border: "border-node-data"
|
|
103
|
+
},
|
|
104
|
+
integration: {
|
|
105
|
+
accent: "bg-node-integration",
|
|
106
|
+
subtle: "bg-node-integration-subtle",
|
|
107
|
+
text: "text-node-integration",
|
|
108
|
+
border: "border-node-integration"
|
|
109
|
+
},
|
|
110
|
+
ai: {
|
|
111
|
+
accent: "bg-node-ai",
|
|
112
|
+
subtle: "bg-node-ai-subtle",
|
|
113
|
+
text: "text-node-ai",
|
|
114
|
+
border: "border-node-ai"
|
|
115
|
+
},
|
|
116
|
+
human: {
|
|
117
|
+
accent: "bg-node-human",
|
|
118
|
+
subtle: "bg-node-human-subtle",
|
|
119
|
+
text: "text-node-human",
|
|
120
|
+
border: "border-node-human"
|
|
121
|
+
},
|
|
122
|
+
utility: {
|
|
123
|
+
accent: "bg-node-utility",
|
|
124
|
+
subtle: "bg-node-utility-subtle",
|
|
125
|
+
text: "text-node-utility",
|
|
126
|
+
border: "border-node-utility"
|
|
127
|
+
},
|
|
128
|
+
end: {
|
|
129
|
+
accent: "bg-node-end",
|
|
130
|
+
subtle: "bg-node-end-subtle",
|
|
131
|
+
text: "text-node-end",
|
|
132
|
+
border: "border-node-end"
|
|
133
|
+
},
|
|
134
|
+
default: {
|
|
135
|
+
accent: "bg-node-default",
|
|
136
|
+
subtle: "bg-node-default-subtle",
|
|
137
|
+
text: "text-node-default",
|
|
138
|
+
border: "border-node-default"
|
|
139
|
+
}
|
|
140
|
+
}, g = {
|
|
141
|
+
idle: "ring-node-state-idle",
|
|
142
|
+
queued: "ring-node-state-queued",
|
|
143
|
+
running: "ring-node-state-running",
|
|
144
|
+
success: "ring-node-state-success",
|
|
145
|
+
warning: "ring-node-state-warning",
|
|
146
|
+
error: "ring-node-state-error",
|
|
147
|
+
skipped: "ring-node-state-skipped"
|
|
148
|
+
}, _ = {
|
|
149
|
+
string: "text-datatype-string",
|
|
150
|
+
number: "text-datatype-number",
|
|
151
|
+
boolean: "text-datatype-boolean",
|
|
152
|
+
object: "text-datatype-object",
|
|
153
|
+
array: "text-datatype-array",
|
|
154
|
+
date: "text-datatype-date",
|
|
155
|
+
binary: "text-datatype-binary",
|
|
156
|
+
any: "text-datatype-any"
|
|
157
|
+
};
|
|
158
|
+
//#endregion
|
|
159
|
+
export { i as CHART_SERIES_COUNT, r as DATA_TYPES, n as EDGE_KINDS, e as NODE_CATEGORIES, t as NODE_STATES, p as chartSeriesColor, m as chartSeriesIndex, f as dataTypeColor, _ as dataTypeTextClasses, d as edgeColor, h as nodeCategoryClasses, c as nodeCategoryColor, l as nodeCategorySubtleColor, u as nodeStateColor, g as nodeStateRingClasses, s as toDataType, o as toNodeCategory };
|
|
@@ -8,6 +8,8 @@ export { createApolloClient } from './apollo';
|
|
|
8
8
|
export type { CreateApolloClientOptions } from './apollo';
|
|
9
9
|
export { statusTokens, trendTokens, progressTokens, categoryTokens, alertTokens, getStatusTokens, getStatusBadgeTokens, getTrendTokens, getProgressTokens, getCategoryTokens, getAlertTokens, } from './tokens';
|
|
10
10
|
export type { SemanticStatus } from './tokens';
|
|
11
|
+
export { NODE_CATEGORIES, NODE_STATES, EDGE_KINDS, DATA_TYPES, CHART_SERIES_COUNT, toNodeCategory, toDataType, nodeCategoryColor, nodeCategorySubtleColor, nodeStateColor, edgeColor, dataTypeColor, chartSeriesColor, chartSeriesIndex, nodeCategoryClasses, nodeStateRingClasses, dataTypeTextClasses, } from './canvasTokens';
|
|
12
|
+
export type { NodeCategory, NodeState, EdgeKind, DataType, NodeCategoryClasses, } from './canvasTokens';
|
|
11
13
|
export { formatCurrency, formatCurrencyCompact, formatDate, formatDateTime, formatRelativeTime, formatDuration, formatTime, formatNumber, formatPercentage, formatBytes, formatCompactNumber, formatOrdinal, truncateText, capitalizeFirst, capitalizeWords, slugify, toCamelCase, toPascalCase, pluralize, formatList, } from './format';
|
|
12
14
|
export { lazyWithRetry, isChunkLoadError } from './lazyWithRetry';
|
|
13
15
|
export { resolveGatewayBases, installGatewayFetchRewrite, suppressConsole, } from './gatewayFetchRewrite';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useI18n as e } from "./shared/providers/shell/I18nProvider.js";
|
|
2
|
+
import { useAuth as t } from "./shared/providers/shell/AuthProvider.js";
|
|
3
|
+
import { useActiveContext as n } from "./shared/providers/shell/ActiveContextProvider.js";
|
|
4
|
+
import { useNavRegistryStore as r } from "./shared/hooks/shell/useNavRegistry.js";
|
|
5
|
+
import { useFooterRegistryStore as i } from "./shared/hooks/shell/useFooterRegistry.js";
|
|
6
|
+
import { useTheme as a, useThemeOrNull as o } from "./shared/providers/shell/ThemeProvider.js";
|
|
7
7
|
import { useFeatureFlags as s } from "./shared/feature-flags/FeatureFlagProvider.js";
|
|
8
8
|
import { useGlobalUi as c } from "./shared/providers/shell/GlobalUiProvider.js";
|
|
9
9
|
import { useShellUi as l } from "./shared/providers/shell/ShellUiProvider.js";
|
|
@@ -13,4 +13,4 @@ import { useEffectiveContext as f, useEffectiveWorkspaceId as p } from "./shared
|
|
|
13
13
|
import { useGlobalSearch as m } from "./shared/hooks/shell/useGlobalSearch.js";
|
|
14
14
|
import { useProducts as h } from "./shared/hooks/shell/useProducts.js";
|
|
15
15
|
import { useLanguages as g } from "./shared/hooks/shell/useLanguages.js";
|
|
16
|
-
export {
|
|
16
|
+
export { n as useActiveContext, t as useAuth, u as useContextManager, f as useEffectiveContext, p as useEffectiveWorkspaceId, s as useFeatureFlags, i as useFooterRegistryStore, d as useGeography, m as useGlobalSearch, c as useGlobalUi, e as useI18n, g as useLanguages, r as useNavRegistryStore, h as useProducts, l as useShellUi, a as useTheme, o as useThemeOrNull };
|
|
@@ -2,11 +2,11 @@ import { ProfileStorageManager_exports as e, clearActiveProfileId as t, getActiv
|
|
|
2
2
|
import { clearWorkspaceWideSelection as u, isWorkspaceWideSelection as d, selectWorkspaceWide as f } from "./shared/providers/shell/WorkspaceWideSelection.js";
|
|
3
3
|
import { AuthBridgeClient as p, destroyAuthBridge as m, getAuthBridge as h, initAuthBridge as g, isAuthBridgeInitialized as _ } from "./shared/providers/shell/AuthBridgeClient.js";
|
|
4
4
|
import { AppShellContextProvider as v, useAppShell as y } from "./shared/providers/shell/AppShellContext.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { I18nProvider as b, LOCALE_DIRECTION as x, clearTranslationCache as S, isTranslationAttempted as C, localeDirection as w, useI18n as T, useOptionalI18n as E } from "./shared/providers/shell/I18nProvider.js";
|
|
6
|
+
import { useShellLabel as D } from "./shared/providers/shell/useShellLabel.js";
|
|
7
|
+
import { AuthProvider as O, useAuth as k } from "./shared/providers/shell/AuthProvider.js";
|
|
8
|
+
import { ActiveContextProvider as A, useActiveContext as j } from "./shared/providers/shell/ActiveContextProvider.js";
|
|
9
|
+
import { ThemeProvider as M, useTheme as N } from "./shared/providers/shell/ThemeProvider.js";
|
|
10
10
|
import { PermissionProvider as P, SUPER_ADMIN_ACTOR_TYPE as F, SUPER_ADMIN_ROLE as I, hasMatchingPermission as L, isSuperAdminBypass as R, matchPermission as z, usePermission as B, usePermissionLoading as V, usePermissions as H, useRole as U, useSafePermissions as W } from "./shared/providers/shell/PermissionProvider.js";
|
|
11
11
|
import { FeatureFlagsProvider as G, useFeatureFlags as K } from "./shared/providers/shell/FeatureFlagsProvider.js";
|
|
12
12
|
import { FeatureFlagProvider as q } from "./shared/feature-flags/FeatureFlagProvider.js";
|
|
@@ -25,4 +25,4 @@ import { GatewayRoute as ge, getMicrofrontendGateway as _e, withGateway as ve }
|
|
|
25
25
|
import { ProfileI18nBridge as ye } from "./shared/providers/shell/ProfileI18nBridge.js";
|
|
26
26
|
import { ProfileGeographyBridge as be } from "./shared/providers/shell/ProfileGeographyBridge.js";
|
|
27
27
|
import { PageConversationContextProvider as xe, usePageConversationContext as Se, useRegisterPageConversationContext as Ce } from "./shared/providers/shell/PageConversationContextProvider.js";
|
|
28
|
-
export {
|
|
28
|
+
export { A as ActiveContextProvider, v as AppShellContextProvider, p as AuthBridgeClient, O as AuthProvider, fe as AuthTokenProvider, ne as ContextManagerProvider, oe as EVERYTHING_SURFACE_ID, q as FeatureFlagProvider, G as FeatureFlagsProvider, Z as FeatureGate, ge as GatewayRoute, ie as GeographyProvider, Q as GlobalUiProvider, b as I18nProvider, x as LOCALE_DIRECTION, me as MultiGatewayProvider, he as ObservabilityProvider, xe as PageConversationContextProvider, P as PermissionProvider, se as PersonaSurfaceProvider, be as ProfileGeographyBridge, ye as ProfileI18nBridge, e as ProfileStorage, F as SUPER_ADMIN_ACTOR_TYPE, I as SUPER_ADMIN_ROLE, ee as ShellUiProvider, M as ThemeProvider, t as clearActiveProfileId, S as clearTranslationCache, u as clearWorkspaceWideSelection, m as destroyAuthBridge, n as getActiveContext, r as getActiveTokens, i as getActiveUser, h as getAuthBridge, _e as getMicrofrontendGateway, a as getProfileLocale, L as hasMatchingPermission, g as initAuthBridge, _ as isAuthBridgeInitialized, R as isSuperAdminBypass, C as isTranslationAttempted, d as isWorkspaceWideSelection, w as localeDirection, o as logoutActiveProfile, z as matchPermission, s as removeAllProfiles, ce as resolveSurfaceForRoles, f as selectWorkspaceWide, c as setProfileLocale, l as setProfiles, le as synthesizeSimulatedPermissionStrings, j as useActiveContext, y as useAppShell, k as useAuth, pe as useAuthToken, re as useContextManager, J as useFeatureFlag, Y as useFeatureFlagDetails, X as useFeatureFlagValue, K as useFeatureFlags, ae as useGeography, $ as useGlobalUi, T as useI18n, E as useOptionalI18n, Se as usePageConversationContext, B as usePermission, V as usePermissionLoading, H as usePermissions, ue as usePersonaSurface, Ce as useRegisterPageConversationContext, U as useRole, W as useSafePermissions, de as useSafePersonaSurface, D as useShellLabel, te as useShellUi, N as useTheme, ve as withGateway };
|
package/dist/shared-utils.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { createApolloClient as e } from "./shared/utils/apollo.js";
|
|
2
2
|
import { alertTokens as t, categoryTokens as n, getAlertTokens as r, getCategoryTokens as i, getProgressTokens as a, getStatusBadgeTokens as o, getStatusTokens as s, getTrendTokens as c, progressTokens as l, statusTokens as u, trendTokens as d } from "./shared/utils/tokens.js";
|
|
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 {
|
|
3
|
+
import { CHART_SERIES_COUNT as f, DATA_TYPES as p, EDGE_KINDS as m, NODE_CATEGORIES as h, NODE_STATES as g, chartSeriesColor as _, chartSeriesIndex as v, dataTypeColor as y, dataTypeTextClasses as b, edgeColor as x, nodeCategoryClasses as S, nodeCategoryColor as C, nodeCategorySubtleColor as w, nodeStateColor as T, nodeStateRingClasses as E, toDataType as D, toNodeCategory as O } from "./shared/utils/canvasTokens.js";
|
|
4
|
+
import { capitalizeFirst as k, capitalizeWords as A, formatBytes as j, formatCompactNumber as M, formatCurrency as N, formatCurrencyCompact as P, formatDate as F, formatDateTime as I, formatDuration as L, formatList as R, formatNumber as z, formatOrdinal as B, formatPercentage as V, formatRelativeTime as H, formatTime as U, pluralize as W, slugify as G, toCamelCase as K, toPascalCase as q, truncateText as J } from "./shared/utils/format.js";
|
|
5
|
+
import { isChunkLoadError as Y, lazyWithRetry as X } from "./shared/utils/lazyWithRetry.js";
|
|
6
|
+
import { installGatewayFetchRewrite as Z, resolveGatewayBases as Q, suppressConsole as $ } from "./shared/utils/gatewayFetchRewrite.js";
|
|
7
|
+
import { BACKEND_ERROR_EVENT as ee, CONNECTION_STATUS_EVENT as te, dispatchBackendErrorEvent as ne, extractBackendError as re, isAbortError as ie, isBackendErrorDisplay as ae, isTransportError as oe, markConnectionHealthy as se, shouldToastBackendError as ce } from "./shared/utils/backendErrors.js";
|
|
8
|
+
import { attemptTokenRefresh as le, clearAuthSessionStorage as ue, hasAuthGraphQLErrors as de, isAuthGraphQLError as fe, isAuthNetworkError as pe, redirectToLogin as me } from "./shared/utils/authErrorHandling.js";
|
|
9
|
+
import { clearSSoCookie as he, clearShellSsoCookies as ge, getSSoCookie as _e, isSharedSsoCookieDomain as ve, isTrustedSsoOrigin as ye, readShellSsoCookie as be, setSSoCookie as xe, setShellSsoCookies as Se } from "./shared/utils/authCookie.js";
|
|
10
|
+
import { assignLocationWithAllowlist as Ce, isAllowedRedirectUrl as we, openUrlInNewTabWithAllowlist as Te, replaceLocationWithAllowlist as Ee } from "./shared/utils/redirectAllowlist.js";
|
|
11
|
+
import { SSO_DEPOSITED_PARAM as De, beginSsoNavigation as Oe, buildSsoDepositUrl as ke, clearSsoDepositState as Ae, clearSsoNavigation as je, consumeSsoDepositMarker as Me, isSsoNavigationPending as Ne, markSsoDepositDone as Pe, markSsoDepositPending as Fe, mintSsoSessionTokens as Ie, readSsoDepositState as Le, shouldAttemptSsoDeposit as Re } from "./shared/utils/ssoDeposit.js";
|
|
12
|
+
import { AppInitializer as ze, useRegistryHelpers as Be, useShellNavigate as Ve } from "./shared/utils/appHelpers.js";
|
|
13
|
+
import { clearUserContext as He, initializeLogger as Ue, setUserContext as We } from "./shared/utils/loggerInit.js";
|
|
14
|
+
import { createProfileScopedStorage as Ge, getProfileScopedKey as Ke } from "./shared/utils/profileScopedStorage.js";
|
|
15
|
+
import { QUOTA_EXHAUSTED_CODE as qe, RESOURCE_CAP_EXCEEDED_CODE as Je, STORAGE_QUOTA_EXCEEDED_CODE as Ye, UPGRADE_ERROR_CODES as Xe, buildQuotaExhaustedMessage as Ze, extractQuotaExhaustedExtensions as Qe, extractUpgradeErrorExtensions as $e, isQuotaExhaustedError as et, isUpgradeError as tt } from "./shared/utils/quotaErrors.js";
|
|
16
|
+
import { INLINE_ENCODE as nt, downscaleImage as rt, selectInlineBase64 as it } from "./shared/utils/imageDownscale.js";
|
|
17
|
+
import { clsx as at } from "clsx";
|
|
18
|
+
import { twMerge as ot } from "tailwind-merge";
|
|
18
19
|
//#region src/shared/utils/index.ts
|
|
19
|
-
function
|
|
20
|
-
return
|
|
20
|
+
function st(...e) {
|
|
21
|
+
return ot(at(e));
|
|
21
22
|
}
|
|
22
23
|
//#endregion
|
|
23
|
-
export {
|
|
24
|
+
export { ze as AppInitializer, ee as BACKEND_ERROR_EVENT, f as CHART_SERIES_COUNT, te as CONNECTION_STATUS_EVENT, p as DATA_TYPES, m as EDGE_KINDS, nt as INLINE_ENCODE, h as NODE_CATEGORIES, g as NODE_STATES, qe as QUOTA_EXHAUSTED_CODE, Je as RESOURCE_CAP_EXCEEDED_CODE, De as SSO_DEPOSITED_PARAM, Ye as STORAGE_QUOTA_EXCEEDED_CODE, Xe as UPGRADE_ERROR_CODES, t as alertTokens, Ce as assignLocationWithAllowlist, le as attemptTokenRefresh, Oe as beginSsoNavigation, Ze as buildQuotaExhaustedMessage, ke as buildSsoDepositUrl, k as capitalizeFirst, A as capitalizeWords, n as categoryTokens, _ as chartSeriesColor, v as chartSeriesIndex, ue as clearAuthSessionStorage, he as clearSSoCookie, ge as clearShellSsoCookies, Ae as clearSsoDepositState, je as clearSsoNavigation, He as clearUserContext, st as cn, Me as consumeSsoDepositMarker, e as createApolloClient, Ge as createProfileScopedStorage, y as dataTypeColor, b as dataTypeTextClasses, ne as dispatchBackendErrorEvent, rt as downscaleImage, x as edgeColor, re as extractBackendError, Qe as extractQuotaExhaustedExtensions, $e as extractUpgradeErrorExtensions, j as formatBytes, M as formatCompactNumber, N as formatCurrency, P as formatCurrencyCompact, F as formatDate, I as formatDateTime, L as formatDuration, R as formatList, z as formatNumber, B as formatOrdinal, V as formatPercentage, H as formatRelativeTime, U as formatTime, r as getAlertTokens, i as getCategoryTokens, Ke as getProfileScopedKey, a as getProgressTokens, _e as getSSoCookie, o as getStatusBadgeTokens, s as getStatusTokens, c as getTrendTokens, de as hasAuthGraphQLErrors, Ue as initializeLogger, Z as installGatewayFetchRewrite, ie as isAbortError, we as isAllowedRedirectUrl, fe as isAuthGraphQLError, pe as isAuthNetworkError, ae as isBackendErrorDisplay, Y as isChunkLoadError, et as isQuotaExhaustedError, ve as isSharedSsoCookieDomain, Ne as isSsoNavigationPending, oe as isTransportError, ye as isTrustedSsoOrigin, tt as isUpgradeError, X as lazyWithRetry, se as markConnectionHealthy, Pe as markSsoDepositDone, Fe as markSsoDepositPending, Ie as mintSsoSessionTokens, S as nodeCategoryClasses, C as nodeCategoryColor, w as nodeCategorySubtleColor, T as nodeStateColor, E as nodeStateRingClasses, Te as openUrlInNewTabWithAllowlist, W as pluralize, l as progressTokens, be as readShellSsoCookie, Le as readSsoDepositState, me as redirectToLogin, Ee as replaceLocationWithAllowlist, Q as resolveGatewayBases, it as selectInlineBase64, xe as setSSoCookie, Se as setShellSsoCookies, We as setUserContext, Re as shouldAttemptSsoDeposit, ce as shouldToastBackendError, G as slugify, u as statusTokens, $ as suppressConsole, K as toCamelCase, D as toDataType, O as toNodeCategory, q as toPascalCase, d as trendTokens, J as truncateText, Be as useRegistryHelpers, Ve as useShellNavigate };
|