@brendanbank/atrium-host-types 0.15.2 → 0.16.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 +2 -2
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
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.
|
|
36
|
-
"compatible with atrium 0.
|
|
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
|
|
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
|
@@ -99,6 +99,13 @@ export interface NavItem {
|
|
|
99
99
|
condition?: (ctx: {
|
|
100
100
|
me: UserContext | null;
|
|
101
101
|
}) => boolean;
|
|
102
|
+
/** Optional sort key. Lower values render higher in the sidebar.
|
|
103
|
+
* Items without `order` keep insertion order, sorted **after** every
|
|
104
|
+
* item that has one. Atrium's built-in nav items use 100/200/300
|
|
105
|
+
* (Home, Notifications, Admin) so a host can pick a number to
|
|
106
|
+
* interleave with them — e.g. `order: 250` to land between
|
|
107
|
+
* Notifications and Admin. Available since atrium 0.16. */
|
|
108
|
+
order?: number;
|
|
102
109
|
}
|
|
103
110
|
export interface AdminTab {
|
|
104
111
|
key: string;
|
|
@@ -113,6 +120,12 @@ export interface AdminTab {
|
|
|
113
120
|
render?: () => ReactElement;
|
|
114
121
|
/** @deprecated Pass `render: () => element` instead. */
|
|
115
122
|
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. */
|
|
128
|
+
order?: number;
|
|
116
129
|
}
|
|
117
130
|
/** Insertion slot inside `ProfilePage`'s vertical card stack. Default
|
|
118
131
|
* `'after-roles'` — the natural place for extra preferences. */
|
|
@@ -127,6 +140,11 @@ export interface ProfileItem {
|
|
|
127
140
|
me: UserContext;
|
|
128
141
|
}) => boolean;
|
|
129
142
|
render: () => ReactElement;
|
|
143
|
+
/** Optional sort key within the chosen slot. Lower values render
|
|
144
|
+
* earlier; items without `order` keep registration order and land
|
|
145
|
+
* after items that have one. Slots are independent — the sort runs
|
|
146
|
+
* per-slot. Available since atrium 0.16. */
|
|
147
|
+
order?: number;
|
|
130
148
|
}
|
|
131
149
|
/** Per-kind renderer for a notification row. Atrium emits `{kind,
|
|
132
150
|
* payload}` rows but ships no built-in formatting — host apps register
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brendanbank/atrium-host-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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",
|