@campfire-interactive/shell-header 0.15.3 → 0.17.1

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/index.d.ts CHANGED
@@ -67,8 +67,16 @@ interface ShellUser {
67
67
  interface TenantOption {
68
68
  id: string;
69
69
  name: string;
70
- /** Human-readable role label ("owner", "admin", "member"). Optional. */
71
- role?: string;
70
+ /**
71
+ * Human-readable role label ("owner", "admin", "member"). Optional.
72
+ *
73
+ * No longer rendered — the switcher's role chip was removed (see UserMenu).
74
+ * Kept so hosts that still pass it compile, and `null` is accepted because
75
+ * identity-client types the active tenant's `role` as `string | null`
76
+ * (absent on tokens minted before the claim existed). Without the null,
77
+ * every host passing `user.tenant` straight through fails to typecheck.
78
+ */
79
+ role?: string | null;
72
80
  }
73
81
  /**
74
82
  * A host-supplied action rendered in the user (avatar) menu, above Sign out.
@@ -245,8 +253,19 @@ interface ShellHeaderProps {
245
253
  /**
246
254
  * The user's role in their currently-active tenant (e.g. "admin", "owner",
247
255
  * "member"). Apps in the catalog with `requiresRole` are shown only when
248
- * this matches one of the allowed roles. Hosts typically derive this from
249
- * `user.tenants.find(t => t.id === user.tenant.id)?.role`.
256
+ * this matches one of the allowed roles.
257
+ *
258
+ * Derive this from the JWT's `data.tenant.role` — the active tenant's own
259
+ * claim. The old recipe, `user.tenants.find(t => t.id === user.tenant.id)?.role`,
260
+ * still works but reads the `data.tenants[]` array that is being removed from
261
+ * the token (nextgen docs/plans/2026-08-07-slim-identity-jwt-tenants.md); once
262
+ * it is gone that lookup silently yields `undefined` and every `requiresRole`
263
+ * app disappears from the switcher. Prefer `tenant.role`, fall back to the
264
+ * array while both exist.
265
+ *
266
+ * NOTE this is distinct from the role that used to render beside each row in
267
+ * the tenant switcher — that chip has been removed. This one still gates the
268
+ * app catalog and is unaffected.
250
269
  */
251
270
  currentTenantRole?: string;
252
271
  /** Unread count for the bell badge. */
package/dist/index.js CHANGED
@@ -133,6 +133,17 @@ var appCatalog = [
133
133
  requiresRole: ["admin", "owner"],
134
134
  localPort: 3600,
135
135
  path: "/admin/users"
136
+ },
137
+ {
138
+ id: "integrations",
139
+ name: "Integrations",
140
+ icon: "Cable",
141
+ letter: "I",
142
+ color: "#0891b2",
143
+ byline: "Connect Campfire to your ERP, PLM, and data-lake systems \u2014 inbound feeds and outbound extracts.",
144
+ group: "admin",
145
+ requiresRole: ["admin", "owner"],
146
+ localPort: 3110
136
147
  }
137
148
  ];
138
149
  var BASE_DOMAIN = "campfiresuite.com";
@@ -164,6 +175,7 @@ import {
164
175
  TrendingUp,
165
176
  BarChart3,
166
177
  Calculator,
178
+ Cable,
167
179
  FileText,
168
180
  Files,
169
181
  Shield,
@@ -183,6 +195,7 @@ var iconMap = {
183
195
  TrendingUp,
184
196
  BarChart3,
185
197
  Calculator,
198
+ Cable,
186
199
  FileText,
187
200
  Files,
188
201
  Shield
@@ -512,7 +525,7 @@ function UserMenu({
512
525
  disabled: updating || active,
513
526
  children: [
514
527
  /* @__PURE__ */ jsx4("span", { className: "cfi-sh-locale-item-label", children: t.name }),
515
- active ? /* @__PURE__ */ jsx4(Check, { size: 14, className: "cfi-sh-tenant-check" }) : t.role ? /* @__PURE__ */ jsx4("span", { className: "cfi-sh-locale-item-code", children: t.role }) : null
528
+ active ? /* @__PURE__ */ jsx4(Check, { size: 14, className: "cfi-sh-tenant-check" }) : null
516
529
  ]
517
530
  },
518
531
  t.id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campfire-interactive/shell-header",
3
- "version": "0.15.3",
3
+ "version": "0.17.1",
4
4
  "description": "Shared shell header with app switcher for Campfire Suite",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",