@burdenoff/fe-libs 2026.1014.1 → 2026.1014.3
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/notificationCenter/NotificationPanel.js +12 -8
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/ui/AssistantOverlay.js +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +10 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +18 -14
- package/dist/shared/assistant/ui/useAssistantLauncherLift.d.ts +6 -0
- package/dist/shared/assistant/ui/useAssistantLauncherLift.js +17 -0
- package/dist/shared/providers/shell/AuthProvider.js +92 -97
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts +20 -0
- package/dist/shared/providers/shell/ProfileStorageManager.js +88 -71
- package/dist/shared-assistant.js +128 -127
- package/package.json +2 -2
|
@@ -2,33 +2,37 @@ import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
//#region src/shared/providers/shell/ProfileStorageManager.ts
|
|
3
3
|
var t = /* @__PURE__ */ e({
|
|
4
4
|
PROFILE_STORAGE_CHANGE_EVENT: () => s,
|
|
5
|
-
addProfile: () =>
|
|
6
|
-
clearActiveProfileId: () =>
|
|
7
|
-
getActiveContext: () =>
|
|
8
|
-
getActiveProfileId: () =>
|
|
9
|
-
getActiveTokens: () =>
|
|
10
|
-
getActiveUser: () =>
|
|
11
|
-
getActiveWorkspaceToken: () =>
|
|
12
|
-
getProfileContext: () =>
|
|
13
|
-
getProfileLocale: () =>
|
|
14
|
-
getProfileTokens: () =>
|
|
15
|
-
getProfileUser: () =>
|
|
16
|
-
getProfileWorkspaceToken: () =>
|
|
5
|
+
addProfile: () => y,
|
|
6
|
+
clearActiveProfileId: () => w,
|
|
7
|
+
getActiveContext: () => z,
|
|
8
|
+
getActiveProfileId: () => S,
|
|
9
|
+
getActiveTokens: () => L,
|
|
10
|
+
getActiveUser: () => I,
|
|
11
|
+
getActiveWorkspaceToken: () => R,
|
|
12
|
+
getProfileContext: () => M,
|
|
13
|
+
getProfileLocale: () => P,
|
|
14
|
+
getProfileTokens: () => O,
|
|
15
|
+
getProfileUser: () => E,
|
|
16
|
+
getProfileWorkspaceToken: () => A,
|
|
17
17
|
getProfiles: () => p,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
getSelectableProfiles: () => g,
|
|
19
|
+
getSwitchableProfiles: () => _,
|
|
20
|
+
hasProfileCredentials: () => h,
|
|
21
|
+
isPendingVerificationProfile: () => m,
|
|
22
|
+
loginProfile: () => B,
|
|
23
|
+
logoutActiveProfile: () => V,
|
|
24
|
+
logoutAllProfiles: () => H,
|
|
25
|
+
removeAllProfiles: () => x,
|
|
26
|
+
removeProfile: () => b,
|
|
27
|
+
resolveActiveProfileId: () => T,
|
|
28
|
+
setActiveProfileId: () => C,
|
|
29
|
+
setProfileContext: () => N,
|
|
30
|
+
setProfileLocale: () => F,
|
|
31
|
+
setProfileTokens: () => k,
|
|
32
|
+
setProfileUser: () => D,
|
|
33
|
+
setProfileWorkspaceToken: () => j,
|
|
34
|
+
setProfiles: () => v,
|
|
35
|
+
switchProfile: () => U
|
|
32
36
|
}), n = "bf-profiles", r = "bf-active-profile", i = "bf-last-active-profile", a = "bf-p", o = "session", s = "bf-profile-storage-change";
|
|
33
37
|
function c() {
|
|
34
38
|
typeof window < "u" && window.dispatchEvent(new Event(s));
|
|
@@ -54,14 +58,27 @@ function p() {
|
|
|
54
58
|
return d(n) ?? [];
|
|
55
59
|
}
|
|
56
60
|
function m(e) {
|
|
57
|
-
|
|
61
|
+
return E(e)?.emailVerified === !1;
|
|
58
62
|
}
|
|
59
63
|
function h(e) {
|
|
64
|
+
let t = O(e);
|
|
65
|
+
return !!(t?.accessToken || t?.refreshToken);
|
|
66
|
+
}
|
|
67
|
+
function g() {
|
|
68
|
+
return p().filter((e) => !m(e.id));
|
|
69
|
+
}
|
|
70
|
+
function _(e) {
|
|
71
|
+
return g().filter((t) => t.id === e || h(t.id));
|
|
72
|
+
}
|
|
73
|
+
function v(e) {
|
|
74
|
+
f(n, e);
|
|
75
|
+
}
|
|
76
|
+
function y(e) {
|
|
60
77
|
let t = p().filter((t) => t.id !== e.id);
|
|
61
|
-
t.push(e),
|
|
78
|
+
t.push(e), v(t);
|
|
62
79
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
80
|
+
function b(e) {
|
|
81
|
+
v(p().filter((t) => t.id !== e));
|
|
65
82
|
for (let t of [
|
|
66
83
|
"user",
|
|
67
84
|
"tokens",
|
|
@@ -76,25 +93,25 @@ function g(e) {
|
|
|
76
93
|
"sidebar-collapsed"
|
|
77
94
|
]) localStorage.removeItem(l(e, t)), sessionStorage.removeItem(u(e, t));
|
|
78
95
|
}
|
|
79
|
-
function
|
|
96
|
+
function x() {
|
|
80
97
|
let e = p();
|
|
81
|
-
for (let t of e)
|
|
98
|
+
for (let t of e) b(t.id);
|
|
82
99
|
localStorage.removeItem(n), sessionStorage.removeItem(r);
|
|
83
100
|
}
|
|
84
|
-
function
|
|
101
|
+
function S() {
|
|
85
102
|
return sessionStorage.getItem(r);
|
|
86
103
|
}
|
|
87
|
-
function
|
|
104
|
+
function C(e) {
|
|
88
105
|
sessionStorage.setItem(r, e);
|
|
89
106
|
try {
|
|
90
107
|
localStorage.setItem(i, e);
|
|
91
108
|
} catch {}
|
|
92
109
|
}
|
|
93
|
-
function
|
|
110
|
+
function w() {
|
|
94
111
|
sessionStorage.removeItem(r);
|
|
95
112
|
}
|
|
96
|
-
function
|
|
97
|
-
let e =
|
|
113
|
+
function T() {
|
|
114
|
+
let e = g(), t = S();
|
|
98
115
|
if (t && e.some((e) => e.id === t)) return t;
|
|
99
116
|
let n = null;
|
|
100
117
|
try {
|
|
@@ -102,30 +119,30 @@ function x() {
|
|
|
102
119
|
} catch {
|
|
103
120
|
n = null;
|
|
104
121
|
}
|
|
105
|
-
return n && e.some((e) => e.id === n) ? (
|
|
122
|
+
return n && e.some((e) => e.id === n) ? (C(n), n) : e.length > 0 ? (C(e[0].id), e[0].id) : null;
|
|
106
123
|
}
|
|
107
|
-
function
|
|
124
|
+
function E(e) {
|
|
108
125
|
return d(l(e, "user"));
|
|
109
126
|
}
|
|
110
|
-
function
|
|
127
|
+
function D(e, t) {
|
|
111
128
|
let n = l(e, "user");
|
|
112
129
|
t ? f(n, t) : localStorage.removeItem(n);
|
|
113
130
|
}
|
|
114
|
-
function
|
|
131
|
+
function O(e) {
|
|
115
132
|
return d(l(e, "tokens"));
|
|
116
133
|
}
|
|
117
|
-
function
|
|
134
|
+
function k(e, t) {
|
|
118
135
|
let n = l(e, "tokens");
|
|
119
136
|
t ? f(n, t) : localStorage.removeItem(n);
|
|
120
137
|
}
|
|
121
|
-
function
|
|
138
|
+
function A(e) {
|
|
122
139
|
try {
|
|
123
140
|
let t = sessionStorage.getItem(u(e, "workspace-token"));
|
|
124
141
|
if (t) return t;
|
|
125
142
|
} catch {}
|
|
126
143
|
return localStorage.getItem(l(e, "workspace-token"));
|
|
127
144
|
}
|
|
128
|
-
function
|
|
145
|
+
function j(e, t) {
|
|
129
146
|
let n = l(e, "workspace-token"), r = u(e, "workspace-token");
|
|
130
147
|
if (t) {
|
|
131
148
|
try {
|
|
@@ -140,53 +157,53 @@ function D(e, t) {
|
|
|
140
157
|
}
|
|
141
158
|
c();
|
|
142
159
|
}
|
|
143
|
-
function
|
|
160
|
+
function M(e) {
|
|
144
161
|
return d(l(e, "context"));
|
|
145
162
|
}
|
|
146
|
-
function
|
|
163
|
+
function N(e, t) {
|
|
147
164
|
f(l(e, "context"), t);
|
|
148
165
|
}
|
|
149
|
-
function
|
|
166
|
+
function P(e) {
|
|
150
167
|
return localStorage.getItem(l(e, "locale"));
|
|
151
168
|
}
|
|
152
|
-
function
|
|
169
|
+
function F(e, t) {
|
|
153
170
|
localStorage.setItem(l(e, "locale"), t);
|
|
154
171
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
157
|
-
return e ? S(e) : null;
|
|
158
|
-
}
|
|
159
|
-
function N() {
|
|
160
|
-
let e = x();
|
|
161
|
-
return e ? w(e) : null;
|
|
162
|
-
}
|
|
163
|
-
function P() {
|
|
164
|
-
let e = x();
|
|
172
|
+
function I() {
|
|
173
|
+
let e = T();
|
|
165
174
|
return e ? E(e) : null;
|
|
166
175
|
}
|
|
167
|
-
function
|
|
168
|
-
let e =
|
|
176
|
+
function L() {
|
|
177
|
+
let e = T();
|
|
169
178
|
return e ? O(e) : null;
|
|
170
179
|
}
|
|
171
|
-
function
|
|
180
|
+
function R() {
|
|
181
|
+
let e = T();
|
|
182
|
+
return e ? A(e) : null;
|
|
183
|
+
}
|
|
184
|
+
function z() {
|
|
185
|
+
let e = T();
|
|
186
|
+
return e ? M(e) : null;
|
|
187
|
+
}
|
|
188
|
+
function B(e, t) {
|
|
172
189
|
let n = e.id;
|
|
173
|
-
return
|
|
190
|
+
return y({
|
|
174
191
|
id: n,
|
|
175
192
|
email: e.email,
|
|
176
193
|
name: e.name ?? `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim(),
|
|
177
194
|
avatar: e.avatar,
|
|
178
195
|
lastLogin: (/* @__PURE__ */ new Date()).toISOString()
|
|
179
|
-
}),
|
|
196
|
+
}), D(n, e), k(n, t), C(n), c(), n;
|
|
180
197
|
}
|
|
181
|
-
function
|
|
182
|
-
let e =
|
|
183
|
-
e && (
|
|
198
|
+
function V() {
|
|
199
|
+
let e = S();
|
|
200
|
+
e && (b(e), w(), T(), c());
|
|
184
201
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
202
|
+
function H() {
|
|
203
|
+
x(), c();
|
|
187
204
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
205
|
+
function U(e) {
|
|
206
|
+
return g().some((t) => t.id === e) ? (C(e), !0) : !1;
|
|
190
207
|
}
|
|
191
208
|
//#endregion
|
|
192
|
-
export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports,
|
|
209
|
+
export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports, y as addProfile, w as clearActiveProfileId, z as getActiveContext, S as getActiveProfileId, L as getActiveTokens, I as getActiveUser, R as getActiveWorkspaceToken, M as getProfileContext, P as getProfileLocale, O as getProfileTokens, E as getProfileUser, A as getProfileWorkspaceToken, p as getProfiles, _ as getSwitchableProfiles, B as loginProfile, V as logoutActiveProfile, H as logoutAllProfiles, x as removeAllProfiles, b as removeProfile, T as resolveActiveProfileId, C as setActiveProfileId, N as setProfileContext, F as setProfileLocale, k as setProfileTokens, D as setProfileUser, j as setProfileWorkspaceToken, v as setProfiles, U as switchProfile };
|