@brendanbank/atrium-host-types 0.16.1 → 0.17.0

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/README.md CHANGED
@@ -32,8 +32,8 @@ your `.npmrc`, delete it — npmjs.org is the default registry.
32
32
 
33
33
  ## Versioning
34
34
 
35
- The package version tracks atrium's image version. Pin `^0.16` for
36
- "compatible with atrium 0.16.x"; bump together with the atrium image
35
+ The package version tracks atrium's image version. Pin `^0.17` for
36
+ "compatible with atrium 0.17.x"; bump together with the atrium image
37
37
  to pick up new registry slots. New slots land as **optional** members
38
38
  on `AtriumRegistry` first so a host that hasn't bumped yet still
39
39
  type-checks.
package/dist/index.d.ts CHANGED
@@ -107,6 +107,13 @@ export interface NavItem {
107
107
  * Notifications and Admin. Available since atrium 0.16. */
108
108
  order?: number;
109
109
  }
110
+ /** Sidebar bucket an admin tab lives in. `admin` is the default and
111
+ * groups every atrium-shipped admin surface plus host admin tooling.
112
+ * `settings` is a parallel sibling group above Admin reserved for
113
+ * application-level preferences — atrium ships zero items here, so
114
+ * the Settings parent hides entirely until a host registers into it.
115
+ * Available since atrium 0.17. */
116
+ export type AdminSection = 'admin' | 'settings';
110
117
  export interface AdminTab {
111
118
  key: string;
112
119
  label: string;
@@ -114,17 +121,22 @@ export interface AdminTab {
114
121
  /** Permission code; the tab is hidden for users without it. Omit to
115
122
  * show the tab to every viewer with admin access. */
116
123
  perm?: string;
124
+ /** Sidebar bucket. Default `'admin'`. Set `'settings'` to push a
125
+ * host-app preference page into the Settings group instead.
126
+ * Available since atrium 0.17. */
127
+ section?: AdminSection;
117
128
  /** Returns a fresh element each time the tab is selected. Strongly
118
129
  * preferred — see `RouteEntry.render`. Exactly one of `render` /
119
130
  * `element` must be supplied. */
120
131
  render?: () => ReactElement;
121
132
  /** @deprecated Pass `render: () => element` instead. */
122
133
  element?: ReactElement;
123
- /** Optional sort key. Lower values render further left. Items
124
- * without `order` keep registration order, sorted **after** every
125
- * item that has one. Atrium's built-in tabs use 100..900 in steps
126
- * of 100; a host tab with `order: 750` would slot between Email
127
- * templates (700) and Reminders (800). Available since atrium 0.16. */
134
+ /** Optional sort key. Lower values render higher in the sidebar
135
+ * group. Items without `order` keep registration order, sorted
136
+ * **after** every item that has one. Atrium's built-in admin tabs
137
+ * use 100..900 in steps of 100; a host tab with `order: 750`
138
+ * would slot between Email templates (700) and Reminders (800).
139
+ * Available since atrium 0.16. */
128
140
  order?: number;
129
141
  }
130
142
  /** Insertion slot inside `ProfilePage`'s vertical card stack. Default
@@ -188,6 +200,13 @@ export interface AtriumRegistry {
188
200
  registerRoute: (route: RouteEntry) => void;
189
201
  registerNavItem: (item: NavItem) => void;
190
202
  registerAdminTab: (tab: AdminTab) => void;
203
+ /** Relocate one of atrium's built-in admin tabs into a different
204
+ * sidebar group, and optionally re-rank it within that group. Pass
205
+ * the tab's stable atrium key (e.g. `'branding'`, `'emails'`,
206
+ * `'outbox'`, `'reminders'`, `'translations'`); the perm gate the
207
+ * built-in already declares is preserved. Available since atrium
208
+ * 0.17. */
209
+ setBuiltinAdminTabSection?: (key: string, section: AdminSection, order?: number) => void;
191
210
  registerProfileItem: (item: ProfileItem) => void;
192
211
  registerNotificationKind: (renderer: NotificationKindRenderer) => void;
193
212
  registerLocale: (overlay: LocaleOverlay) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brendanbank/atrium-host-types",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "TypeScript declarations for the atrium host-extension contract: AtriumRegistry, UserContext, AdminUserRow, AtriumNotification, AtriumEvent. Source-of-truth shapes a host bundle types against, kept in sync with atrium's published image major.minor.",
5
5
  "license": "BSD-2-Clause",
6
6
  "type": "module",