@burdenoff/fe-libs 2026.1023.7 → 2026.1023.9
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/shared/events/sinks/RybbitSink.d.ts +21 -0
- package/dist/shared/events/sinks/RybbitSink.js +36 -11
- package/dist/shared/events/sinks/index.d.ts +1 -1
- package/dist/shared/graphql/client.d.ts +9 -0
- package/dist/shared/graphql/client.js +241 -201
- package/dist/shared/graphql/fetch.js +135 -123
- package/dist/shared/graphql/index.d.ts +1 -0
- package/dist/shared/graphql/workspaceOperationGuard.d.ts +70 -0
- package/dist/shared/graphql/workspaceOperationGuard.js +62 -0
- package/dist/shared/providers/AppShellProvider.d.ts +16 -0
- package/dist/shared/providers/AppShellProvider.js +232 -226
- package/dist/shared/providers/shell/AuthProvider.d.ts +14 -1
- package/dist/shared/providers/shell/AuthProvider.js +105 -94
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts +8 -1
- package/dist/shared/providers/shell/MultiGatewayProvider.js +115 -119
- package/dist/shared/providers/shell/ProfileStorageManager.js +1 -1
- package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.d.ts +4 -0
- package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.js +23 -0
- package/dist/shared/providers/shell/authProvider/identityChange.d.ts +26 -0
- package/dist/shared/providers/shell/authProvider/identityChange.js +11 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +4 -1
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +105 -92
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts +27 -1
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +82 -62
- package/dist/shared/providers/shell/authProvider/useRemoteSLO.d.ts +4 -1
- package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +16 -14
- package/dist/shared/providers/shell/authProvider/useStorageSync.d.ts +4 -1
- package/dist/shared/providers/shell/authProvider/useStorageSync.js +19 -14
- package/dist/shared/providers/shell/contextSwitchCache.d.ts +4 -0
- package/dist/shared/providers/shell/contextSwitchCache.js +17 -0
- package/dist/shared/providers/shell/identityQueryReset.d.ts +17 -0
- package/dist/shared/providers/shell/identityQueryReset.js +21 -0
- package/dist/shared/providers/shell/identityScopedQueryReset.d.ts +16 -0
- package/dist/shared/providers/shell/identityScopedQueryReset.js +30 -0
- package/dist/shared/providers/shell/index.d.ts +1 -1
- package/dist/shared-events.js +29 -29
- package/dist/shared-graphql.js +11 -10
- package/dist/shared.js +129 -128
- package/package.json +2 -2
|
@@ -51,6 +51,27 @@ export declare function shouldDropAnalyticsKey(key: string, eventName: Burdenoff
|
|
|
51
51
|
* event bus emissions as Rybbit custom events.
|
|
52
52
|
*/
|
|
53
53
|
export declare function RybbitSink({ siteId, scriptUrl, rename, allowlist, identifyOn, skipRoutes, pathname, }: RybbitSinkProps): null;
|
|
54
|
+
/**
|
|
55
|
+
* BOFF-8246: while the consent banner is shown it publishes the space it takes from the bottom of
|
|
56
|
+
* the viewport (its height plus its 16px bottom offset and an 8px gap) as this CSS custom property
|
|
57
|
+
* on `<html>`; it is removed when the banner goes away. Bottom-anchored UI that must stay usable
|
|
58
|
+
* (an assistant launcher, a bottom sheet with a composer) should MOVE its bottom anchor up by it,
|
|
59
|
+
* e.g. `bottom: max(<usual anchor>, var(--bf-consent-banner-offset, 0px))`, and cap any fixed
|
|
60
|
+
* height to the space left, rather than pad inside: padding a fixed-height sheet can clip its
|
|
61
|
+
* composer on short viewports. Scope it to the widths where the banner can overlap the element
|
|
62
|
+
* (the banner is bottom-left, at most 24rem wide). At 390px the banner spans the viewport.
|
|
63
|
+
*/
|
|
64
|
+
export declare const CONSENT_BANNER_OFFSET_VAR = "--bf-consent-banner-offset";
|
|
65
|
+
type ResizeObserverConstructor = new (callback: () => void) => {
|
|
66
|
+
observe: (target: Element) => void;
|
|
67
|
+
disconnect: () => void;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Publishes `banner`'s bottom space on `root` and keeps it current. Returns the cleanup. With more
|
|
71
|
+
* than one banner shown the largest space is published, and the property is removed only when
|
|
72
|
+
* the last one goes.
|
|
73
|
+
*/
|
|
74
|
+
export declare function publishConsentBannerOffset(banner: Element, root: HTMLElement, ResizeObserverImpl?: ResizeObserverConstructor | undefined): () => void;
|
|
54
75
|
/**
|
|
55
76
|
* The optional-analytics prompt.
|
|
56
77
|
*
|
|
@@ -152,34 +152,59 @@ function k({ siteId: e, scriptUrl: o = "https://app.rybbit.io/api/script.js", re
|
|
|
152
152
|
d
|
|
153
153
|
]), null;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
var A = "--bf-consent-banner-offset", j = 24, M = /* @__PURE__ */ new WeakMap();
|
|
156
|
+
function N(e, t) {
|
|
157
|
+
if (t.size === 0) {
|
|
158
|
+
e.style.removeProperty(A);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
e.style.setProperty(A, `${Math.max(...t.values())}px`);
|
|
162
|
+
}
|
|
163
|
+
function P(e, t, n = typeof ResizeObserver > "u" ? void 0 : ResizeObserver) {
|
|
164
|
+
let r = M.get(t);
|
|
165
|
+
r || (r = /* @__PURE__ */ new Map(), M.set(t, r));
|
|
166
|
+
let i = r, a = () => {
|
|
167
|
+
let n = Math.ceil(e.getBoundingClientRect().height);
|
|
168
|
+
i.set(e, n + j), N(t, i);
|
|
169
|
+
};
|
|
170
|
+
a();
|
|
171
|
+
let o = n ? new n(a) : null;
|
|
172
|
+
return o?.observe(e), () => {
|
|
173
|
+
o?.disconnect(), i.delete(e), N(t, i);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function F({ productName: t }) {
|
|
177
|
+
let [n, c] = a(() => b() === null), l = e(), u = n && !y(), d = i(null);
|
|
178
|
+
return r(() => {
|
|
179
|
+
let e = d.current;
|
|
180
|
+
if (!(!u || !e)) return P(e, document.documentElement);
|
|
181
|
+
}, [u]), u ? /* @__PURE__ */ s("aside", {
|
|
182
|
+
ref: d,
|
|
158
183
|
className: "fixed bottom-4 left-4 z-[100] w-[calc(100%-2rem)] max-w-sm rounded-xl border border-border-seam bg-bg-surface p-4 text-text-primary shadow-pop",
|
|
159
|
-
"aria-label":
|
|
184
|
+
"aria-label": l("privacyConsent.ariaLabel", "Privacy choices"),
|
|
160
185
|
"data-testid": "analytics-consent-banner",
|
|
161
186
|
children: [/* @__PURE__ */ o("p", {
|
|
162
187
|
className: "text-sm",
|
|
163
|
-
children:
|
|
188
|
+
children: l("privacyConsent.message", "Allow optional analytics to help improve {{productName}}? Essential product operation works either way.", { productName: t ?? l("privacyConsent.productFallback", "this product") })
|
|
164
189
|
}), /* @__PURE__ */ s("div", {
|
|
165
190
|
className: "mt-3 flex gap-2",
|
|
166
191
|
children: [/* @__PURE__ */ o("button", {
|
|
167
192
|
type: "button",
|
|
168
193
|
className: "rounded-md border border-border-seam px-3 py-2 text-sm",
|
|
169
194
|
onClick: () => {
|
|
170
|
-
S(!1),
|
|
195
|
+
S(!1), c(!1);
|
|
171
196
|
},
|
|
172
|
-
children:
|
|
197
|
+
children: l("privacyConsent.reject", "Reject optional")
|
|
173
198
|
}), /* @__PURE__ */ o("button", {
|
|
174
199
|
type: "button",
|
|
175
200
|
className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm text-action-primary-text",
|
|
176
201
|
onClick: () => {
|
|
177
|
-
S(!0),
|
|
202
|
+
S(!0), c(!1);
|
|
178
203
|
},
|
|
179
|
-
children:
|
|
204
|
+
children: l("privacyConsent.allow", "Allow analytics")
|
|
180
205
|
})]
|
|
181
206
|
})]
|
|
182
|
-
});
|
|
207
|
+
}) : null;
|
|
183
208
|
}
|
|
184
209
|
//#endregion
|
|
185
|
-
export {
|
|
210
|
+
export { F as AnalyticsConsentBanner, A as CONSENT_BANNER_OFFSET_VAR, c as DEFAULT_RYBBIT_ALLOWLIST, k as RybbitSink, P as publishConsentBannerOffset, x as readAnalyticsConsent, b as readAnalyticsConsentChoice, S as setAnalyticsConsent };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { DevtoolsSink } from './DevtoolsSink';
|
|
2
2
|
export { BroadcastChannelSink } from './BroadcastChannelSink';
|
|
3
3
|
export { BackendAuditSink } from './BackendAuditSink';
|
|
4
|
-
export { RybbitSink, AnalyticsConsentBanner, readAnalyticsConsent, readAnalyticsConsentChoice, setAnalyticsConsent, } from './RybbitSink';
|
|
4
|
+
export { RybbitSink, AnalyticsConsentBanner, CONSENT_BANNER_OFFSET_VAR, publishConsentBannerOffset, readAnalyticsConsent, readAnalyticsConsentChoice, setAnalyticsConsent, } from './RybbitSink';
|
|
5
5
|
export type { AnalyticsConsentChoice } from './RybbitSink';
|
|
6
6
|
export { compileRybbitRoutePattern, isRybbitSkippedRoute } from './rybbitRoutes';
|
|
7
7
|
export { OtelBrowserSink } from './OtelBrowserSink';
|
|
@@ -2,6 +2,7 @@ import { ApolloClient, InMemoryCache } from '@apollo/client/core';
|
|
|
2
2
|
import { RetryLink } from '@apollo/client/link/retry';
|
|
3
3
|
import { Gateway } from '../config';
|
|
4
4
|
import { RetryPolicyOperation } from './retryPolicy';
|
|
5
|
+
import { WorkspaceOperationGuardMode } from './workspaceOperationGuard';
|
|
5
6
|
/**
|
|
6
7
|
* Decide whether the transport may retry a failed operation. Pure so it can be
|
|
7
8
|
* unit-tested without a client. Mutations are never retried (an ambiguous
|
|
@@ -92,6 +93,14 @@ export interface CreateClientOptions {
|
|
|
92
93
|
batchInterval?: number;
|
|
93
94
|
/** Enable debug logging */
|
|
94
95
|
debug?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* BOFF-8106: what to do with an operation whose ContextInput names a
|
|
98
|
+
* workspace other than the active one (workspace gateway only). `'off'`
|
|
99
|
+
* (default) sends it as before; `'report'` sends it and dispatches
|
|
100
|
+
* `burdenoff:workspace-context-mismatch`; `'enforce'` does not send it and
|
|
101
|
+
* ends it with a `WorkspaceContextChangedError`. See workspaceOperationGuard.ts.
|
|
102
|
+
*/
|
|
103
|
+
workspaceOperationGuard?: WorkspaceOperationGuardMode;
|
|
95
104
|
}
|
|
96
105
|
export interface MutationSuccessEvent {
|
|
97
106
|
gateway: Gateway;
|