@burdenoff/fe-libs 2026.1012.1 → 2026.1012.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.
@@ -75,7 +75,7 @@ var y = ({ client: y, onViewAll: b, compact: x = !1, pollInterval: S = 3e4, lazy
75
75
  onDelete: q,
76
76
  onRedirect: J
77
77
  }),
78
- X.length > 0 && /* @__PURE__ */ _(a, {
78
+ /* @__PURE__ */ _(a, {
79
79
  totalCount: V,
80
80
  onViewAll: b ? Y : void 0
81
81
  })
@@ -62,6 +62,7 @@ export { LanguageSwitcher } from './LanguageSwitcher';
62
62
  export { ContextSwitcher } from './ContextSwitcher';
63
63
  export { GeographySwitcher } from './GeographySwitcher';
64
64
  export { NotificationCenter } from './NotificationCenter';
65
+ export { PushOptInToggle } from './notificationCenter/PushOptInToggle';
65
66
  export { LanguagePickerSheet } from './LanguagePickerSheet';
66
67
  export { ProductPickerSheet } from './ProductPickerSheet';
67
68
  export { AccountSwitcher } from './AccountSwitcher';
package/dist/chrome.js CHANGED
@@ -18,30 +18,31 @@ import { ProductSwitcher as S } from "./chrome/ProductSwitcher.js";
18
18
  import { LanguageSwitcher as C } from "./chrome/LanguageSwitcher.js";
19
19
  import { ContextSwitcher as w } from "./chrome/ContextSwitcher.js";
20
20
  import { GeographySwitcher as T } from "./chrome/GeographySwitcher.js";
21
- import { NotificationCenter as E } from "./chrome/NotificationCenter.js";
22
- import { LanguagePickerSheet as D } from "./chrome/LanguagePickerSheet.js";
23
- import { ProductPickerSheet as O } from "./chrome/ProductPickerSheet.js";
24
- import { AccountSwitcher as k } from "./chrome/AccountSwitcher.js";
25
- import { AutoBreadcrumbs as A, registerBreadcrumbName as j, unregisterBreadcrumbName as M } from "./chrome/AutoBreadcrumbs.js";
26
- import { NavCustomizeDialog as N } from "./chrome/NavCustomizeDialog.js";
27
- import { PersonaSimulationPill as P, PersonaSurfaceControls as F } from "./chrome/PersonaSurfaceControls.js";
28
- import { ProductSideNav as I } from "./chrome/ProductSideNav.js";
29
- import { BrandMark as L } from "./chrome/BrandMark.js";
30
- import { DynamicFooter as R } from "./chrome/DynamicFooter.js";
31
- import { PanelTabs as z } from "./chrome/PanelTabs.js";
32
- import { PanelContainer as B } from "./chrome/PanelContainer.js";
33
- import { StatusBar as V } from "./chrome/StatusBar.js";
34
- import { PluginRoutes as H } from "./chrome/PluginRoutes.js";
35
- import { PluginSettingsPage as U } from "./chrome/PluginSettingsPage.js";
36
- import { PluginToolbar as W } from "./chrome/PluginToolbar.js";
37
- import { PluginWidgetGrid as G } from "./chrome/PluginWidgetGrid.js";
38
- import { PluginContextMenuTarget as K } from "./chrome/PluginContextMenuTarget.js";
39
- import { ThemePreferences as q } from "./chrome/ThemePreferences.js";
40
- import { selectMobileTabs as J } from "./chrome/mobileTabBar/selectTabs.js";
41
- import { useMobileTabBarVisible as Y } from "./chrome/mobileTabBar/useMobileTabBarVisible.js";
42
- import { MobileTabBar as X } from "./chrome/MobileTabBar.js";
43
- import { NativeTopBar as Z } from "./chrome/NativeTopBar.js";
44
- import { SwipeNavigation as Q } from "./chrome/SwipeNavigation.js";
45
- import { NativePageTransition as $ } from "./chrome/NativePageTransition.js";
46
- import { findNavTitle as ee, useNativeTopBarTitle as te } from "./chrome/nativeTopBarTitle.js";
47
- export { k as AccountSwitcher, o as AppShellLayout, A as AutoBreadcrumbs, L as BrandMark, _ as Breadcrumbs, g as CommandPalette, w as ContextSwitcher, d as DEFAULT_FOOTER_COLUMNS, f as DEFAULT_SOCIAL_LINKS, R as DynamicFooter, p as Footer, l as FooterBar, T as GeographySwitcher, h as GlobalSearch, c as HeaderBar, D as LanguagePickerSheet, C as LanguageSwitcher, X as MobileTabBar, t as NAV_MORE_ID_PREFIX, $ as NativePageTransition, Z as NativeTopBar, N as NavCustomizeDialog, v as NavLink, E as NotificationCenter, s as PageHeader, B as PanelContainer, z as PanelTabs, P as PersonaSimulationPill, F as PersonaSurfaceControls, K as PluginContextMenuTarget, u as PluginFooterStrip, H as PluginRoutes, U as PluginSettingsPage, W as PluginToolbar, G as PluginWidgetGrid, O as ProductPickerSheet, I as ProductSideNav, S as ProductSwitcher, x as ProfileSwitcher, e as ShortcutHelpDialog, m as SideNavigation, b as Sidebar, V as StatusBar, Q as SwipeNavigation, y as Tabs, q as ThemePreferences, n as applyNavVisibility, r as applyPermissionFilter, i as applySurfaceVisibility, ee as findNavTitle, a as isItemEffectivelyShown, j as registerBreadcrumbName, J as selectMobileTabs, M as unregisterBreadcrumbName, Y as useMobileTabBarVisible, te as useNativeTopBarTitle };
21
+ import { PushOptInToggle as E } from "./chrome/notificationCenter/PushOptInToggle.js";
22
+ import { NotificationCenter as D } from "./chrome/NotificationCenter.js";
23
+ import { LanguagePickerSheet as O } from "./chrome/LanguagePickerSheet.js";
24
+ import { ProductPickerSheet as k } from "./chrome/ProductPickerSheet.js";
25
+ import { AccountSwitcher as A } from "./chrome/AccountSwitcher.js";
26
+ import { AutoBreadcrumbs as j, registerBreadcrumbName as M, unregisterBreadcrumbName as N } from "./chrome/AutoBreadcrumbs.js";
27
+ import { NavCustomizeDialog as P } from "./chrome/NavCustomizeDialog.js";
28
+ import { PersonaSimulationPill as F, PersonaSurfaceControls as I } from "./chrome/PersonaSurfaceControls.js";
29
+ import { ProductSideNav as L } from "./chrome/ProductSideNav.js";
30
+ import { BrandMark as R } from "./chrome/BrandMark.js";
31
+ import { DynamicFooter as z } from "./chrome/DynamicFooter.js";
32
+ import { PanelTabs as B } from "./chrome/PanelTabs.js";
33
+ import { PanelContainer as V } from "./chrome/PanelContainer.js";
34
+ import { StatusBar as H } from "./chrome/StatusBar.js";
35
+ import { PluginRoutes as U } from "./chrome/PluginRoutes.js";
36
+ import { PluginSettingsPage as W } from "./chrome/PluginSettingsPage.js";
37
+ import { PluginToolbar as G } from "./chrome/PluginToolbar.js";
38
+ import { PluginWidgetGrid as K } from "./chrome/PluginWidgetGrid.js";
39
+ import { PluginContextMenuTarget as q } from "./chrome/PluginContextMenuTarget.js";
40
+ import { ThemePreferences as J } from "./chrome/ThemePreferences.js";
41
+ import { selectMobileTabs as Y } from "./chrome/mobileTabBar/selectTabs.js";
42
+ import { useMobileTabBarVisible as X } from "./chrome/mobileTabBar/useMobileTabBarVisible.js";
43
+ import { MobileTabBar as Z } from "./chrome/MobileTabBar.js";
44
+ import { NativeTopBar as Q } from "./chrome/NativeTopBar.js";
45
+ import { SwipeNavigation as $ } from "./chrome/SwipeNavigation.js";
46
+ import { NativePageTransition as ee } from "./chrome/NativePageTransition.js";
47
+ import { findNavTitle as te, useNativeTopBarTitle as ne } from "./chrome/nativeTopBarTitle.js";
48
+ export { A as AccountSwitcher, o as AppShellLayout, j as AutoBreadcrumbs, R as BrandMark, _ as Breadcrumbs, g as CommandPalette, w as ContextSwitcher, d as DEFAULT_FOOTER_COLUMNS, f as DEFAULT_SOCIAL_LINKS, z as DynamicFooter, p as Footer, l as FooterBar, T as GeographySwitcher, h as GlobalSearch, c as HeaderBar, O as LanguagePickerSheet, C as LanguageSwitcher, Z as MobileTabBar, t as NAV_MORE_ID_PREFIX, ee as NativePageTransition, Q as NativeTopBar, P as NavCustomizeDialog, v as NavLink, D as NotificationCenter, s as PageHeader, V as PanelContainer, B as PanelTabs, F as PersonaSimulationPill, I as PersonaSurfaceControls, q as PluginContextMenuTarget, u as PluginFooterStrip, U as PluginRoutes, W as PluginSettingsPage, G as PluginToolbar, K as PluginWidgetGrid, k as ProductPickerSheet, L as ProductSideNav, S as ProductSwitcher, x as ProfileSwitcher, E as PushOptInToggle, e as ShortcutHelpDialog, m as SideNavigation, b as Sidebar, H as StatusBar, $ as SwipeNavigation, y as Tabs, J as ThemePreferences, n as applyNavVisibility, r as applyPermissionFilter, i as applySurfaceVisibility, te as findNavTitle, a as isItemEffectivelyShown, M as registerBreadcrumbName, Y as selectMobileTabs, N as unregisterBreadcrumbName, X as useMobileTabBarVisible, ne as useNativeTopBarTitle };
@@ -71,7 +71,7 @@ function s(t, n = {}) {
71
71
  resize: "body",
72
72
  resizeOnFullScreen: !0
73
73
  },
74
- ...t.push ? { PushNotifications: { presentationOptions: [
74
+ ...t.push ? { FirebaseMessaging: { presentationOptions: [
75
75
  "badge",
76
76
  "sound",
77
77
  "alert"
@@ -15,7 +15,7 @@
15
15
  * appName: 'VibeControls',
16
16
  * plugins: {
17
17
  * updater: () => import('@capgo/capacitor-updater'),
18
- * pushNotifications: () => import('@capacitor/push-notifications'),
18
+ * pushNotifications: () => import('@capacitor-firebase/messaging'),
19
19
  * },
20
20
  * push: { enabled: true },
21
21
  * });
@@ -15,7 +15,7 @@ async function s() {
15
15
  if (a) return a;
16
16
  if (!o || !t()) return null;
17
17
  try {
18
- a = (await o()).PushNotifications ?? null;
18
+ a = (await o()).FirebaseMessaging ?? null;
19
19
  } catch {
20
20
  a = null;
21
21
  }
@@ -41,24 +41,27 @@ async function l(t, r = {}) {
41
41
  if (!l) return;
42
42
  let u = e();
43
43
  if (u !== "web") try {
44
- await l.addListener("registration", (e) => {
45
- i(e.value, u), r.onToken?.(e.value, u);
46
- }), await l.addListener("registrationError", (e) => {
47
- console.debug("[shell-native] Push registration error:", e.error);
48
- }), await l.addListener("pushNotificationReceived", (e) => {
49
- r.onNotificationReceived?.(e);
50
- }), await l.addListener("pushNotificationActionPerformed", (e) => {
44
+ if (await l.addListener("tokenReceived", (e) => {
45
+ i(e.token, u), r.onToken?.(e.token, u);
46
+ }), await l.addListener("notificationReceived", (e) => {
47
+ r.onNotificationReceived?.(e.notification);
48
+ }), await l.addListener("notificationActionPerformed", (e) => {
51
49
  let t = c(e);
52
50
  t && n(t), r.onNotificationAction?.(e);
53
- }), (await l.checkPermissions()).receive === "granted" && await l.register();
51
+ }), (await l.checkPermissions()).receive === "granted") {
52
+ let { token: e } = await l.getToken();
53
+ i(e, u), r.onToken?.(e, u);
54
+ }
54
55
  } catch {}
55
56
  }
56
57
  async function u() {
57
- let e = await s();
58
- if (!e) return !1;
58
+ let t = await s();
59
+ if (!t) return !1;
59
60
  try {
60
- let t = await e.checkPermissions();
61
- return (t.receive === "prompt" || t.receive === "prompt-with-rationale") && (t = await e.requestPermissions()), t.receive === "granted" ? (await e.register(), !0) : !1;
61
+ let n = await t.checkPermissions();
62
+ if ((n.receive === "prompt" || n.receive === "prompt-with-rationale") && (n = await t.requestPermissions()), n.receive !== "granted") return !1;
63
+ let { token: r } = await t.getToken();
64
+ return i(r, e()), !0;
62
65
  } catch {
63
66
  return !1;
64
67
  }
@@ -161,7 +161,7 @@ export interface CapacitorUpdaterLike {
161
161
  notifyAppReady(): Promise<unknown>;
162
162
  }
163
163
  export interface PushTokenLike {
164
- value: string;
164
+ token: string;
165
165
  }
166
166
  export interface PushNotificationSchemaLike {
167
167
  id?: string;
@@ -171,10 +171,19 @@ export interface PushNotificationSchemaLike {
171
171
  }
172
172
  export interface PushActionPerformedLike {
173
173
  actionId?: string;
174
+ inputValue?: string;
174
175
  notification: PushNotificationSchemaLike;
175
176
  }
176
177
  export type PushPermissionStateLike = 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';
177
- /** Structural subset of `@capacitor/push-notifications`' `PushNotifications`. */
178
+ /**
179
+ * Structural subset of `@capacitor-firebase/messaging`'s `FirebaseMessaging`.
180
+ *
181
+ * Not `@capacitor/push-notifications`: on iOS that plugin's `register()` /
182
+ * `'registration'` event yields the raw APNs device token, not an FCM
183
+ * registration token — our backend (Firebase Admin SDK, FCM HTTP v1) needs the
184
+ * latter. `FirebaseMessaging` does the APNs→FCM exchange natively and hands
185
+ * back one consistent token shape on both platforms via `getToken()`.
186
+ */
178
187
  export interface PushNotificationsLike {
179
188
  checkPermissions(): Promise<{
180
189
  receive: PushPermissionStateLike;
@@ -182,24 +191,25 @@ export interface PushNotificationsLike {
182
191
  requestPermissions(): Promise<{
183
192
  receive: PushPermissionStateLike;
184
193
  }>;
185
- register(): Promise<void>;
186
- addListener(eventName: 'registration', listener: (token: PushTokenLike) => void): Promise<CapacitorListenerHandleLike>;
187
- addListener(eventName: 'registrationError', listener: (error: {
188
- error: string;
194
+ getToken(): Promise<{
195
+ token: string;
196
+ }>;
197
+ addListener(eventName: 'tokenReceived', listener: (token: PushTokenLike) => void): Promise<CapacitorListenerHandleLike>;
198
+ addListener(eventName: 'notificationReceived', listener: (event: {
199
+ notification: PushNotificationSchemaLike;
189
200
  }) => void): Promise<CapacitorListenerHandleLike>;
190
- addListener(eventName: 'pushNotificationReceived', listener: (notification: PushNotificationSchemaLike) => void): Promise<CapacitorListenerHandleLike>;
191
- addListener(eventName: 'pushNotificationActionPerformed', listener: (action: PushActionPerformedLike) => void): Promise<CapacitorListenerHandleLike>;
201
+ addListener(eventName: 'notificationActionPerformed', listener: (action: PushActionPerformedLike) => void): Promise<CapacitorListenerHandleLike>;
192
202
  }
193
203
  export type UpdaterLoader = () => Promise<{
194
204
  CapacitorUpdater: CapacitorUpdaterLike;
195
205
  }>;
196
206
  export type PushNotificationsLoader = () => Promise<{
197
- PushNotifications: PushNotificationsLike;
207
+ FirebaseMessaging: PushNotificationsLike;
198
208
  }>;
199
209
  export interface OptionalPluginLoaders {
200
210
  /** `() => import('@capgo/capacitor-updater')` */
201
211
  updater?: UpdaterLoader;
202
- /** `() => import('@capacitor/push-notifications')` */
212
+ /** `() => import('@capacitor-firebase/messaging')` */
203
213
  pushNotifications?: PushNotificationsLoader;
204
214
  }
205
215
  export interface PushOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.1012.1",
3
+ "version": "2026.1012.3",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {