@burdenoff/fe-libs 2026.1115.8 → 2026.1115.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.
Files changed (48) hide show
  1. package/dist/chrome/globalSearch/ResultsList.js +39 -33
  2. package/dist/chrome/index.d.ts +1 -0
  3. package/dist/chrome/shell/ShellSidebar.js +287 -281
  4. package/dist/chrome/shell/shellSidebarWidth.d.ts +16 -0
  5. package/dist/chrome/shell/shellSidebarWidth.js +26 -0
  6. package/dist/chrome/shellLabelManifest.d.ts +8 -0
  7. package/dist/chrome.js +65 -63
  8. package/dist/shared/assistant/i18nManifest.d.ts +6 -4
  9. package/dist/shared/assistant/i18nManifest.js +6 -4
  10. package/dist/shared/assistant/index.d.ts +1 -0
  11. package/dist/shared/assistant/ui/AssistantChatArea.js +1108 -1107
  12. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +16 -6
  13. package/dist/shared/assistant/voice/phraseGate.js +2 -0
  14. package/dist/shared/assistant/voice/revealSpoken.d.ts +14 -0
  15. package/dist/shared/assistant/voice/revealSpoken.js +28 -0
  16. package/dist/shared/assistant/voice/speakableText.d.ts +27 -3
  17. package/dist/shared/assistant/voice/speakableText.js +149 -120
  18. package/dist/shared/assistant/voice/speechLabels.js +28 -16
  19. package/dist/shared/constants/shellCssVars.d.ts +9 -0
  20. package/dist/shared/constants/shellCssVars.js +3 -0
  21. package/dist/shared/events/sinks/RybbitSink.d.ts +13 -1
  22. package/dist/shared/events/sinks/RybbitSink.js +129 -121
  23. package/dist/shared/events/sinks/index.d.ts +1 -1
  24. package/dist/shared/pages/SearchPage.d.ts +17 -1
  25. package/dist/shared/pages/SearchPage.js +284 -243
  26. package/dist/shared/pages/searchPage/PageResultsGroup.d.ts +16 -0
  27. package/dist/shared/pages/searchPage/PageResultsGroup.js +29 -0
  28. package/dist/shared/pages/searchPage/ResultsList.d.ts +6 -1
  29. package/dist/shared/pages/searchPage/ResultsList.js +9 -53
  30. package/dist/shared/pages/searchPage/SearchResultCard.d.ts +14 -0
  31. package/dist/shared/pages/searchPage/SearchResultCard.js +57 -0
  32. package/dist/shared/providers/AppShellProvider.d.ts +8 -0
  33. package/dist/shared/providers/AppShellProvider.js +91 -89
  34. package/dist/shared/providers/shell/PersonaSurfaceProvider.d.ts +27 -1
  35. package/dist/shared/providers/shell/PersonaSurfaceProvider.js +214 -179
  36. package/dist/shared/providers/shell/index.d.ts +2 -0
  37. package/dist/shared/providers/shell/navIdMigration.d.ts +29 -0
  38. package/dist/shared/providers/shell/navIdMigration.js +57 -0
  39. package/dist/shared/providers/shell/personaSurfaceRemote.d.ts +7 -0
  40. package/dist/shared/providers/shell/personaSurfaceRemote.js +1 -1
  41. package/dist/shared/types/index.d.ts +11 -0
  42. package/dist/shared-assistant.js +396 -395
  43. package/dist/shared-providers-shell.js +13 -12
  44. package/dist/ui/access-needed-chip.d.ts +16 -0
  45. package/dist/ui/access-needed-chip.js +17 -0
  46. package/dist/ui/index.d.ts +1 -0
  47. package/dist/ui.js +50 -49
  48. package/package.json +1 -1
@@ -1,60 +1,72 @@
1
1
  // src/shared/assistant/voice/speechLabels.ts
2
2
  var e = {
3
3
  en: {
4
- codeBlock: "Code block",
5
- image: "image",
6
- link: "link",
7
- largeTable: "Table with {{rows}} rows and {{columns}} columns",
4
+ codeBlock: "There’s a code example on screen",
5
+ codeBlockAgain: "There’s another code example on screen",
6
+ image: "an image",
7
+ link: "a link",
8
+ linkTo: "a link to {{site}}",
9
+ largeTable: "There’s a table on screen with {{rows}} rows: {{headers}}",
8
10
  truncated: "The rest of this message is not read aloud",
9
11
  nestedItem: "Sub-item {{ordinal}}",
10
12
  emailAt: "at",
11
13
  emailDot: "dot"
12
14
  },
13
15
  ta: {
14
- codeBlock: "நிரல் தொகுதி",
16
+ codeBlock: "திரையில் ஒரு நிரல் எடுத்துக்காட்டு உள்ளது",
17
+ codeBlockAgain: "திரையில் மற்றொரு நிரல் எடுத்துக்காட்டு உள்ளது",
15
18
  image: "படம்",
16
19
  link: "இணைப்பு",
17
- largeTable: "{{rows}} வரிசைகள் மற்றும் {{columns}} நெடுவரிசைகள் கொண்ட அட்டவணை",
20
+ linkTo: "{{site}} இணைப்பு",
21
+ largeTable: "திரையில் {{rows}} வரிசைகள் கொண்ட அட்டவணை உள்ளது: {{headers}}",
18
22
  truncated: "இந்தச் செய்தியின் மீதமுள்ள பகுதி வாசிக்கப்படவில்லை",
19
23
  nestedItem: "துணை உருப்படி {{ordinal}}",
20
24
  emailAt: "அட்",
21
25
  emailDot: "புள்ளி"
22
26
  },
23
27
  hi: {
24
- codeBlock: "कोड ब्लॉक",
28
+ codeBlock: "स्क्रीन पर एक कोड उदाहरण है",
29
+ codeBlockAgain: "स्क्रीन पर एक और कोड उदाहरण है",
25
30
  image: "छवि",
26
31
  link: "लिंक",
27
- largeTable: "{{rows}} पंक्तियों और {{columns}} स्तंभों वाली तालिका",
32
+ linkTo: "{{site}} का लिंक",
33
+ largeTable: "स्क्रीन पर {{rows}} पंक्तियों वाली एक तालिका है: {{headers}}",
28
34
  truncated: "इस संदेश का शेष भाग नहीं पढ़ा जाता",
29
35
  nestedItem: "उप-आइटम {{ordinal}}",
30
36
  emailAt: "ऐट",
31
37
  emailDot: "डॉट"
32
38
  },
33
39
  ar: {
34
- codeBlock: "كتلة برمجية",
40
+ codeBlock: "يوجد مثال برمجي على الشاشة",
41
+ codeBlockAgain: "يوجد مثال برمجي آخر على الشاشة",
35
42
  image: "صورة",
36
43
  link: "رابط",
37
- largeTable: "جدول من {{rows}} صفوف و {{columns}} أعمدة",
44
+ linkTo: "رابط إلى {{site}}",
45
+ largeTable: "يوجد على الشاشة جدول من {{rows}} صفوف: {{headers}}",
38
46
  truncated: "لا تتم قراءة بقية هذه الرسالة بصوت عالٍ",
39
47
  nestedItem: "عنصر فرعي {{ordinal}}",
40
48
  emailAt: "أت",
41
49
  emailDot: "نقطة"
42
50
  },
43
51
  es: {
44
- codeBlock: "Bloque de código",
45
- image: "imagen",
46
- link: "enlace",
47
- largeTable: "Tabla con {{rows}} filas y {{columns}} columnas",
52
+ codeBlock: "Hay un ejemplo de código en pantalla",
53
+ codeBlockAgain: "Hay otro ejemplo de código en pantalla",
54
+ image: "una imagen",
55
+ link: "un enlace",
56
+ linkTo: "un enlace a {{site}}",
57
+ largeTable: "En pantalla hay una tabla con {{rows}} filas: {{headers}}",
48
58
  truncated: "El resto de este mensaje no se lee en voz alta",
49
59
  nestedItem: "Subelemento {{ordinal}}",
50
60
  emailAt: "arroba",
51
61
  emailDot: "punto"
52
62
  },
53
63
  zh: {
54
- codeBlock: "代码块",
64
+ codeBlock: "屏幕上有一个代码示例",
65
+ codeBlockAgain: "屏幕上还有一个代码示例",
55
66
  image: "图片",
56
67
  link: "链接",
57
- largeTable: "包含 {{rows}} 行 {{columns}} 列的表格",
68
+ linkTo: "指向 {{site}} 的链接",
69
+ largeTable: "屏幕上有一个 {{rows}} 行的表格:{{headers}}",
58
70
  truncated: "此消息的其余部分不会朗读",
59
71
  nestedItem: "子项 {{ordinal}}",
60
72
  emailAt: "at",
@@ -0,0 +1,9 @@
1
+ /**
2
+ * CSS custom properties the app shell publishes on `<html>`.
3
+ *
4
+ * They live in `shared` so code below the shell (for example the analytics
5
+ * consent banner in `shared/events`) can read them without importing from
6
+ * `chrome`, which sits above `shared` in the layering.
7
+ */
8
+ /** The shell sidebar's current width; see `chrome/shell/shellSidebarWidth`. */
9
+ export declare const SHELL_SIDEBAR_WIDTH_VAR = "--bf-shell-sidebar-width";
@@ -0,0 +1,3 @@
1
+ // src/shared/constants/shellCssVars.ts
2
+ var e = "--bf-shell-sidebar-width";
3
+ export { e as SHELL_SIDEBAR_WIDTH_VAR };
@@ -89,6 +89,16 @@ type ResizeObserverConstructor = new (callback: () => void) => {
89
89
  * the last one goes.
90
90
  */
91
91
  export declare function publishConsentBannerOffset(banner: Element, root: HTMLElement, ResizeObserverImpl?: ResizeObserverConstructor | undefined): () => void;
92
+ /**
93
+ * Where the consent banner (and its reopen button) sits along the bottom edge.
94
+ * - 'start' (default): 1rem from the viewport's inline-start edge, as always.
95
+ * - 'after-sidebar' (opt-in, BOFF-11842): 1rem after the shell sidebar, read
96
+ * from `--bf-shell-sidebar-width` (published by `ShellSidebar` and
97
+ * `ShellSidebarRail`), so it never covers the sidebar's profile button, the
98
+ * rail's bell or an open drill-down. With no sidebar mounted (phones) the
99
+ * property is unset and the banner sits where 'start' puts it.
100
+ */
101
+ export type ConsentBannerPlacement = 'start' | 'after-sidebar';
92
102
  /**
93
103
  * The optional-analytics prompt.
94
104
  *
@@ -96,8 +106,10 @@ export declare function publishConsentBannerOffset(banner: Element, root: HTMLEl
96
106
  * calling `useLocation()` here would crash outside a Router. Route suppression is the MOUNT
97
107
  * SITE's job — see `ShellTelemetrySinks` in AppShellProvider, a direct child of `<BrowserRouter>`.
98
108
  */
99
- export declare function AnalyticsConsentBanner({ productName, reopenable, }: {
109
+ export declare function AnalyticsConsentBanner({ productName, reopenable, placement, }: {
100
110
  productName?: string;
101
111
  reopenable?: boolean;
112
+ /** Where along the bottom edge it sits; see `ConsentBannerPlacement`. */
113
+ placement?: ConsentBannerPlacement;
102
114
  }): import('react').JSX.Element | null;
103
115
  export {};
@@ -2,19 +2,21 @@
2
2
  import { semanticfedAnalyticsProperties as e } from "../semanticfed.js";
3
3
  import { useEventBus as t } from "../../../shared-events.js";
4
4
  import { useShellLabel as n } from "../../providers/shell/useShellLabel.js";
5
- import { isRybbitSkippedRoute as r } from "./rybbitRoutes.js";
6
- import { maskRoute as i, scrubTelemetryText as a } from "./telemetryScrub.js";
7
- import { useEffect as o, useRef as s, useState as c } from "react";
8
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { SHELL_SIDEBAR_WIDTH_VAR as r } from "../../constants/shellCssVars.js";
6
+ import { isRybbitSkippedRoute as i } from "./rybbitRoutes.js";
7
+ import { maskRoute as a, scrubTelemetryText as o } from "./telemetryScrub.js";
8
+ import { cn as s } from "../../utils/cn.js";
9
+ import { useEffect as c, useRef as l, useState as u } from "react";
10
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
11
  // src/shared/events/sinks/RybbitSink.tsx
10
- var d = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,bigconsole.dashboard.import_clicked,bigconsole.dashboard.imported,bigconsole.dashboard.share_clicked,bigconsole.dashboard.shared,bigconsole.data_sink.import_clicked,bigconsole.data_sink.imported,bigconsole.widget.create_clicked,bigconsole.widget.created,bigconsole.widget.duplicate_clicked,bigconsole.widget.duplicated,bigconsole.ai.generate_clicked,bigconsole.ai.dashboard_generated,bigconsole.ai.create_dashboard_clicked,bigconsole.ai.dashboard_created".split(","), f = /(token|password|secret|authorization|cookie|session|email|name|stack|message|subject|description|query|search|prompt|formula|reason|body|content)/i, p = /(^id$|Id$|_id$|_ID$)/, m = [
12
+ var p = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,bigconsole.dashboard.import_clicked,bigconsole.dashboard.imported,bigconsole.dashboard.share_clicked,bigconsole.dashboard.shared,bigconsole.data_sink.import_clicked,bigconsole.data_sink.imported,bigconsole.widget.create_clicked,bigconsole.widget.created,bigconsole.widget.duplicate_clicked,bigconsole.widget.duplicated,bigconsole.ai.generate_clicked,bigconsole.ai.dashboard_generated,bigconsole.ai.create_dashboard_clicked,bigconsole.ai.dashboard_created".split(","), m = /(token|password|secret|authorization|cookie|session|email|name|stack|message|subject|description|query|search|prompt|formula|reason|body|content)/i, h = /(^id$|Id$|_id$|_ID$)/, g = [
11
13
  "ticketId",
12
14
  "categoryId",
13
15
  "workspaceId"
14
- ], h = ["workspaceId"], g = ["workspaceId"], _ = {
15
- "support.ticket.created": m,
16
- "support.ticket.closed": m,
17
- "support.ticket.reopened": m,
16
+ ], _ = ["workspaceId"], v = ["workspaceId"], y = {
17
+ "support.ticket.created": g,
18
+ "support.ticket.closed": g,
19
+ "support.ticket.reopened": g,
18
20
  "support.kb.article_rated": ["articleId"],
19
21
  "bigconsole.dashboard.imported": ["dashboardId"],
20
22
  "bigconsole.dashboard.share_clicked": ["dashboardId"],
@@ -40,25 +42,25 @@ var d = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,suppor
40
42
  "bigconsole.ai.dashboard_generated": ["generationId"],
41
43
  "bigconsole.ai.create_dashboard_clicked": ["generationId"],
42
44
  "bigconsole.ai.dashboard_created": ["dashboardId", "generationId"],
43
- "healthybowl.farm.created": h,
44
- "healthybowl.crop.created": h,
45
- "healthybowl.crop.updated": h,
46
- "healthybowl.harvest.recorded": h,
47
- "kadaikodi.page.viewed": g,
48
- "kadaikodi.discover.viewed": g,
49
- "kadaikodi.discover.searched": g,
50
- "kadaikodi.cart.item_added": g,
51
- "kadaikodi.cart.item_removed": g,
52
- "kadaikodi.checkout.viewed": g,
53
- "kadaikodi.order.placed": g,
54
- "kadaikodi.fulfillment.status_updated": g,
55
- "kadaikodi.review.submitted": g,
56
- "kadaikodi.investment.committed": g
57
- }, v = {
45
+ "healthybowl.farm.created": _,
46
+ "healthybowl.crop.created": _,
47
+ "healthybowl.crop.updated": _,
48
+ "healthybowl.harvest.recorded": _,
49
+ "kadaikodi.page.viewed": v,
50
+ "kadaikodi.discover.viewed": v,
51
+ "kadaikodi.discover.searched": v,
52
+ "kadaikodi.cart.item_added": v,
53
+ "kadaikodi.cart.item_removed": v,
54
+ "kadaikodi.checkout.viewed": v,
55
+ "kadaikodi.order.placed": v,
56
+ "kadaikodi.fulfillment.status_updated": v,
57
+ "kadaikodi.review.submitted": v,
58
+ "kadaikodi.investment.committed": v
59
+ }, b = {
58
60
  "auth.signed_out": ["reason"],
59
61
  "psw.search.performed": ["queryLength"]
60
- }, y = {}, b = [];
61
- function x(e, t) {
62
+ }, x = {}, S = [];
63
+ function C(e, t) {
62
64
  if (!e.startsWith("/") || /[?#]/.test(e)) return;
63
65
  let n = e.replace(/\/$/, "").split("/");
64
66
  return t.find((e) => {
@@ -66,59 +68,59 @@ function x(e, t) {
66
68
  return t.length === n.length && t.every((e, t) => e.startsWith(":") ? !!n[t] : e === n[t]);
67
69
  });
68
70
  }
69
- var S = "bf-analytics-consent", C = "burdenoff:analytics-consent";
70
- function w() {
71
+ var w = "bf-analytics-consent", T = "burdenoff:analytics-consent";
72
+ function E() {
71
73
  return navigator.globalPrivacyControl === !0;
72
74
  }
73
- function T() {
75
+ function D() {
74
76
  if (typeof window > "u") return null;
75
- let e = window.localStorage.getItem(S);
77
+ let e = window.localStorage.getItem(w);
76
78
  return e === "granted" || e === "denied" ? e : null;
77
79
  }
78
- function E() {
79
- return typeof window > "u" || w() ? !1 : T() === "granted";
80
+ function O() {
81
+ return typeof window > "u" || E() ? !1 : D() === "granted";
80
82
  }
81
- function D(e) {
82
- typeof window < "u" && (window.localStorage.setItem(S, e ? "granted" : "denied"), window.dispatchEvent(new CustomEvent(C, { detail: { granted: e } })));
83
+ function k(e) {
84
+ typeof window < "u" && (window.localStorage.setItem(w, e ? "granted" : "denied"), window.dispatchEvent(new CustomEvent(T, { detail: { granted: e } })));
83
85
  }
84
- function O() {
86
+ function A() {
85
87
  let e = window;
86
88
  return navigator.doNotTrack === "1" || e.doNotTrack === "1";
87
89
  }
88
- function k(e) {
90
+ function j(e) {
89
91
  let t = 2166136261;
90
92
  for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
91
93
  return `u_${(t >>> 0).toString(16).padStart(8, "0")}`;
92
94
  }
93
- async function A(e) {
95
+ async function M(e) {
94
96
  if (crypto.subtle) {
95
97
  let t = new TextEncoder().encode(e), n = await crypto.subtle.digest("SHA-256", t);
96
98
  return Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("");
97
99
  }
98
- return k(e);
100
+ return j(e);
99
101
  }
100
- function j(e, t) {
101
- return f.test(e) ? !(v[t] ?? []).includes(e) : p.test(e) ? !(_[t] ?? []).includes(e) : !1;
102
+ function N(e, t) {
103
+ return m.test(e) ? !(b[t] ?? []).includes(e) : h.test(e) ? !(y[t] ?? []).includes(e) : !1;
102
104
  }
103
- function M(e, t) {
105
+ function P(e, t) {
104
106
  if (!e || typeof e != "object" || Array.isArray(e)) return {};
105
107
  let n = {};
106
- for (let [r, i] of Object.entries(e)) j(r, t) || (typeof i == "string" || typeof i == "number" || typeof i == "boolean") && (n[r] = i);
108
+ for (let [r, i] of Object.entries(e)) N(r, t) || (typeof i == "string" || typeof i == "number" || typeof i == "boolean") && (n[r] = i);
107
109
  return n;
108
110
  }
109
- function N(e) {
111
+ function F(e) {
110
112
  let t = {};
111
113
  for (let [n, r] of Object.entries(e)) {
112
114
  if (typeof r != "string") {
113
115
  t[n] = r;
114
116
  continue;
115
117
  }
116
- let e = r.includes("/") ? i(r) : r;
117
- t[n] = a(e, 200);
118
+ let e = r.includes("/") ? a(r) : r;
119
+ t[n] = o(e, 200);
118
120
  }
119
121
  return t;
120
122
  }
121
- function P(e) {
123
+ function I(e) {
122
124
  let t = {};
123
125
  for (let [n, r] of Object.entries(e)) {
124
126
  let e = {
@@ -130,59 +132,59 @@ function P(e) {
130
132
  }
131
133
  return t;
132
134
  }
133
- function F({ siteId: n, scriptUrl: i = "https://app.rybbit.io/api/script.js", eventEndpoint: a, routeTemplates: l = b, rename: u = y, allowlist: f = d, identifyOn: p = "auth.signed_in", skipRoutes: m = b, pathname: h }) {
134
- let g = t(), _ = s(!1), v = s(null), T = s(/* @__PURE__ */ new Set()), [D, k] = c(E), j = h ?? (typeof window > "u" ? void 0 : window.location.pathname), F = r(j, m);
135
- return o(() => {
136
- let e = T.current, t = () => {
137
- let t = E() && !O();
135
+ function L({ siteId: n, scriptUrl: r = "https://app.rybbit.io/api/script.js", eventEndpoint: a, routeTemplates: o = S, rename: s = x, allowlist: d = p, identifyOn: f = "auth.signed_in", skipRoutes: m = S, pathname: h }) {
136
+ let g = t(), _ = l(!1), v = l(null), y = l(/* @__PURE__ */ new Set()), [b, D] = u(O), k = h ?? (typeof window > "u" ? void 0 : window.location.pathname), j = i(k, m);
137
+ return c(() => {
138
+ let e = y.current, t = () => {
139
+ let t = O() && !A();
138
140
  if (!t) {
139
141
  for (let t of e) t.abort();
140
142
  e.clear();
141
143
  }
142
- k(t);
144
+ D(t);
143
145
  }, n = (e) => {
144
- (e.key === S || e.key === null) && t();
146
+ (e.key === w || e.key === null) && t();
145
147
  };
146
- return window.addEventListener(C, t), window.addEventListener("storage", n), () => {
147
- window.removeEventListener(C, t), window.removeEventListener("storage", n);
148
+ return window.addEventListener(T, t), window.addEventListener("storage", n), () => {
149
+ window.removeEventListener(T, t), window.removeEventListener("storage", n);
148
150
  for (let t of e) t.abort();
149
151
  e.clear();
150
152
  };
151
- }, []), o(() => {
152
- if (a || !n || !D || F || w() || _.current) return;
153
+ }, []), c(() => {
154
+ if (a || !n || !b || j || E() || _.current) return;
153
155
  _.current = !0;
154
156
  let e = document.createElement("script");
155
- e.src = i, e.defer = !0, e.dataset.siteId = n, m.length > 0 && (e.dataset.skipPatterns = JSON.stringify(m)), document.head.appendChild(e), v.current = e;
157
+ e.src = r, e.defer = !0, e.dataset.siteId = n, m.length > 0 && (e.dataset.skipPatterns = JSON.stringify(m)), document.head.appendChild(e), v.current = e;
156
158
  }, [
157
159
  n,
158
- i,
159
- D,
160
- F,
160
+ r,
161
+ b,
162
+ j,
161
163
  m,
162
164
  a
163
- ]), o(() => () => {
165
+ ]), c(() => () => {
164
166
  v.current?.remove(), v.current = null;
165
- }, []), o(() => {
166
- if (n && D && !w()) return g.onAny((t) => {
167
- if (!E() || O() || !f.includes(t.name)) return;
168
- let i = t.name.startsWith("semanticfed.") ? e(t.name, t.payload) : void 0;
169
- if (i && Object.keys(i).length === 0 || r(t.metadata.route.pathname, m)) return;
167
+ }, []), c(() => {
168
+ if (n && b && !E()) return g.onAny((t) => {
169
+ if (!O() || A() || !d.includes(t.name)) return;
170
+ let r = t.name.startsWith("semanticfed.") ? e(t.name, t.payload) : void 0;
171
+ if (r && Object.keys(r).length === 0 || i(t.metadata.route.pathname, m)) return;
170
172
  if (a) {
171
- let e = x(t.metadata.route.pathname, l);
173
+ let e = C(t.metadata.route.pathname, o);
172
174
  if (!e) return;
173
- let r = P({
174
- ...N(i ?? M(t.payload, t.name)),
175
+ let i = I({
176
+ ...F(r ?? P(t.payload, t.name)),
175
177
  route: e,
176
178
  env: t.metadata.app.env
177
- }), o = new AbortController();
178
- T.current.add(o);
179
- let s = window.setTimeout(() => o.abort(), 5e3);
179
+ }), s = new AbortController();
180
+ y.current.add(s);
181
+ let c = window.setTimeout(() => s.abort(), 5e3);
180
182
  fetch(a, {
181
183
  method: "POST",
182
184
  headers: { "Content-Type": "application/json" },
183
185
  credentials: "omit",
184
186
  referrerPolicy: "no-referrer",
185
- signal: o.signal,
187
+ signal: s.signal,
186
188
  body: JSON.stringify({
187
189
  site_id: n,
188
190
  hostname: window.location.hostname,
@@ -195,98 +197,104 @@ function F({ siteId: n, scriptUrl: i = "https://app.rybbit.io/api/script.js", ev
195
197
  language: navigator.language,
196
198
  type: "custom_event",
197
199
  event_name: t.name,
198
- properties: JSON.stringify(r)
200
+ properties: JSON.stringify(i)
199
201
  })
200
202
  }).catch(() => {}).finally(() => {
201
- window.clearTimeout(s), T.current.delete(o);
203
+ window.clearTimeout(c), y.current.delete(s);
202
204
  });
203
205
  return;
204
206
  }
205
- let o = window;
206
- if (!o.rybbit) return;
207
- let s = P({
207
+ let c = window;
208
+ if (!c.rybbit) return;
209
+ let l = I({
208
210
  route: t.metadata.route.pathname,
209
211
  env: t.metadata.app.env,
210
- ...i ?? M(t.payload, t.name)
212
+ ...r ?? P(t.payload, t.name)
211
213
  });
212
- if (t.name === p) {
214
+ if (t.name === f) {
213
215
  let e = t.payload, n = e?.userId ?? e?.actorId ?? e?.id;
214
- n && A(n).then((e) => {
215
- o.rybbit?.identify(e, s);
216
+ n && M(n).then((e) => {
217
+ c.rybbit?.identify(e, l);
216
218
  });
217
219
  }
218
220
  if (t.name === "nav.route.changed") {
219
- o.rybbit.pageview();
221
+ c.rybbit.pageview();
220
222
  return;
221
223
  }
222
- let c = u[t.name] ?? t.name;
223
- o.rybbit.event(c, s);
224
+ let u = s[t.name] ?? t.name;
225
+ c.rybbit.event(u, l);
224
226
  });
225
227
  }, [
226
228
  g,
227
229
  n,
230
+ d,
228
231
  f,
229
- p,
230
- u,
231
- D,
232
+ s,
233
+ b,
232
234
  m,
233
235
  a,
234
- l
236
+ o
235
237
  ]), null;
236
238
  }
237
- var I = "--bf-consent-banner-offset", L = 24, R = /* @__PURE__ */ new WeakMap();
238
- function z(e, t) {
239
- t.size === 0 ? e.style.removeProperty(I) : e.style.setProperty(I, `${Math.max(...t.values())}px`);
239
+ var R = "--bf-consent-banner-offset", z = 24, B = /* @__PURE__ */ new WeakMap();
240
+ function V(e, t) {
241
+ t.size === 0 ? e.style.removeProperty(R) : e.style.setProperty(R, `${Math.max(...t.values())}px`);
240
242
  }
241
- function B(e, t, n = typeof ResizeObserver > "u" ? void 0 : ResizeObserver) {
242
- let r = R.get(t);
243
- r || (r = /* @__PURE__ */ new Map(), R.set(t, r));
243
+ function H(e, t, n = typeof ResizeObserver > "u" ? void 0 : ResizeObserver) {
244
+ let r = B.get(t);
245
+ r || (r = /* @__PURE__ */ new Map(), B.set(t, r));
244
246
  let i = r, a = () => {
245
247
  let n = Math.ceil(e.getBoundingClientRect().height);
246
- i.set(e, n + L), z(t, i);
248
+ i.set(e, n + z), V(t, i);
247
249
  };
248
250
  a();
249
251
  let o = n ? new n(a) : null;
250
252
  return o?.observe(e), () => {
251
- o?.disconnect(), i.delete(e), z(t, i);
253
+ o?.disconnect(), i.delete(e), V(t, i);
252
254
  };
253
255
  }
254
- function V({ productName: e, reopenable: t = !1 }) {
255
- let [r, i] = c(() => T() === null), a = n(), d = r && !w(), f = s(null);
256
- return o(() => {
257
- let e = f.current;
258
- if (d && e) return B(e, document.documentElement);
259
- }, [d]), d ? /* @__PURE__ */ u("aside", {
260
- ref: f,
261
- className: "fixed bottom-4 start-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",
262
- "aria-label": a("privacyConsent.ariaLabel", "Privacy choices"),
256
+ var U = `calc(var(${r}, 0px) + 1rem)`, W = { insetInlineStart: U }, G = {
257
+ insetInlineStart: U,
258
+ width: `calc(100% - var(${r}, 0px) - 2rem)`
259
+ };
260
+ function K({ productName: e, reopenable: t = !1, placement: r = "start" }) {
261
+ let i = r === "after-sidebar", [a, o] = u(() => D() === null), p = n(), m = a && !E(), h = l(null);
262
+ return c(() => {
263
+ let e = h.current;
264
+ if (m && e) return H(e, document.documentElement);
265
+ }, [m]), m ? /* @__PURE__ */ f("aside", {
266
+ ref: h,
267
+ className: s("fixed bottom-4", !i && "start-4", "z-[100]", !i && "w-[calc(100%-2rem)]", "max-w-sm rounded-xl border border-border-seam bg-bg-surface p-4 text-text-primary shadow-pop"),
268
+ style: i ? G : void 0,
269
+ "aria-label": p("privacyConsent.ariaLabel", "Privacy choices"),
263
270
  "data-testid": "analytics-consent-banner",
264
- children: [/* @__PURE__ */ l("p", {
271
+ children: [/* @__PURE__ */ d("p", {
265
272
  className: "text-sm",
266
- children: a("privacyConsent.message", "Allow optional analytics to help improve {{productName}}? Essential product operation works either way.", { productName: e ?? a("privacyConsent.productFallback", "this product") })
267
- }), /* @__PURE__ */ u("div", {
273
+ children: p("privacyConsent.message", "Allow optional analytics to help improve {{productName}}? Essential product operation works either way.", { productName: e ?? p("privacyConsent.productFallback", "this product") })
274
+ }), /* @__PURE__ */ f("div", {
268
275
  className: "mt-3 flex gap-2",
269
- children: [/* @__PURE__ */ l("button", {
276
+ children: [/* @__PURE__ */ d("button", {
270
277
  type: "button",
271
278
  className: "rounded-md border border-border-seam px-3 py-2 text-sm",
272
279
  onClick: () => {
273
- D(!1), i(!1);
280
+ k(!1), o(!1);
274
281
  },
275
- children: a("privacyConsent.reject", "Reject optional")
276
- }), /* @__PURE__ */ l("button", {
282
+ children: p("privacyConsent.reject", "Reject optional")
283
+ }), /* @__PURE__ */ d("button", {
277
284
  type: "button",
278
285
  className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm text-action-primary-text",
279
286
  onClick: () => {
280
- D(!0), i(!1);
287
+ k(!0), o(!1);
281
288
  },
282
- children: a("privacyConsent.allow", "Allow analytics")
289
+ children: p("privacyConsent.allow", "Allow analytics")
283
290
  })]
284
291
  })]
285
- }) : !t || w() ? null : /* @__PURE__ */ l("button", {
292
+ }) : !t || E() ? null : /* @__PURE__ */ d("button", {
286
293
  type: "button",
287
- className: "fixed bottom-4 start-4 z-50 rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
288
- onClick: () => i(!0),
289
- children: a("privacyConsent.ariaLabel", "Privacy choices")
294
+ className: s("fixed bottom-4", !i && "start-4", "z-50 rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),
295
+ style: i ? W : void 0,
296
+ onClick: () => o(!0),
297
+ children: p("privacyConsent.ariaLabel", "Privacy choices")
290
298
  });
291
299
  }
292
- export { V as AnalyticsConsentBanner, I as CONSENT_BANNER_OFFSET_VAR, d as DEFAULT_RYBBIT_ALLOWLIST, F as RybbitSink, B as publishConsentBannerOffset, E as readAnalyticsConsent, T as readAnalyticsConsentChoice, x as resolveAnalyticsRoute, N as scrubEventOnlyProps, D as setAnalyticsConsent, j as shouldDropAnalyticsKey };
300
+ export { K as AnalyticsConsentBanner, R as CONSENT_BANNER_OFFSET_VAR, p as DEFAULT_RYBBIT_ALLOWLIST, L as RybbitSink, H as publishConsentBannerOffset, O as readAnalyticsConsent, D as readAnalyticsConsentChoice, C as resolveAnalyticsRoute, F as scrubEventOnlyProps, k as setAnalyticsConsent, N as shouldDropAnalyticsKey };
@@ -2,6 +2,6 @@ export { DevtoolsSink } from './DevtoolsSink';
2
2
  export { BroadcastChannelSink } from './BroadcastChannelSink';
3
3
  export { BackendAuditSink } from './BackendAuditSink';
4
4
  export { RybbitSink, AnalyticsConsentBanner, CONSENT_BANNER_OFFSET_VAR, publishConsentBannerOffset, readAnalyticsConsent, readAnalyticsConsentChoice, setAnalyticsConsent, } from './RybbitSink';
5
- export type { AnalyticsConsentChoice } from './RybbitSink';
5
+ export type { AnalyticsConsentChoice, ConsentBannerPlacement } from './RybbitSink';
6
6
  export { compileRybbitRoutePattern, isRybbitSkippedRoute } from './rybbitRoutes';
7
7
  export { OtelBrowserSink } from './OtelBrowserSink';
@@ -23,5 +23,21 @@ export interface SearchPageProps {
23
23
  subtitle?: string;
24
24
  /** Optional host-supplied supplemental search provider */
25
25
  supplementalSearch?: (query: string, filters: SearchFilters) => Promise<SearchResult[]>;
26
+ /**
27
+ * Opt-in (BOFF-11842): the host's page destinations matching a query, e.g.
28
+ * from the same page index its Ctrl K palette reads. They are listed in a
29
+ * "Pages" group ABOVE the record results, whether or not records match, on
30
+ * the first page of results. A result with `access: 'denied'` shows a lock
31
+ * and "You need access". Independent of the workspace and the record
32
+ * filters. Without it the page behaves exactly as before.
33
+ */
34
+ searchPages?: (query: string) => readonly SearchResult[] | Promise<readonly SearchResult[]>;
35
+ /**
36
+ * Opt-in: a value the host changes whenever the index behind `searchPages`
37
+ * changes (for example once permissions load and pages are marked denied,
38
+ * or a page registers late). A new key re-runs the page search for the
39
+ * current query. Without it the page results refresh only on a new query.
40
+ */
41
+ searchPagesKey?: string | number;
26
42
  }
27
- export declare function SearchPage({ entityTypeOptions, entityTypeIcons, productOptions, defaultProductSources, placeholder, subtitle, supplementalSearch, }?: SearchPageProps): import('react').JSX.Element;
43
+ export declare function SearchPage({ entityTypeOptions, entityTypeIcons, productOptions, defaultProductSources, placeholder, subtitle, supplementalSearch, searchPages, searchPagesKey, }?: SearchPageProps): import('react').JSX.Element;