@flytedan/flytebot-design-system 0.14.0 → 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/dist/index.d.ts CHANGED
@@ -2088,20 +2088,30 @@ declare const MarkdownEditor: React.ForwardRefExoticComponent<MarkdownEditorProp
2088
2088
  interface AccountMenuLink {
2089
2089
  id: string;
2090
2090
  label: string;
2091
- icon: string;
2091
+ icon?: string;
2092
2092
  href?: string;
2093
2093
  /** Hidden unless the signed-in user holds this permission. */
2094
2094
  perm?: string;
2095
2095
  badge?: string;
2096
2096
  onSelect?: () => void;
2097
2097
  }
2098
+ /** A named, permission-filtered section of links rendered below the top-level (ungrouped)
2099
+ * `links` — e.g. "Administration", "Architecture", "Raw Data". A group is hidden entirely
2100
+ * once every one of its links is filtered out by `perm`. */
2101
+ interface AccountMenuGroup {
2102
+ label: string;
2103
+ links: AccountMenuLink[];
2104
+ }
2098
2105
  interface AccountMenuProps {
2099
2106
  links?: AccountMenuLink[];
2100
- /** Administration section. Each entry is filtered by its own `perm`. */
2101
- adminLinks?: AccountMenuLink[];
2107
+ /** Named sections below `links`, e.g. Administration. Each entry is filtered by its own
2108
+ * `perm`; a group with no visible links renders nothing. */
2109
+ groups?: AccountMenuGroup[];
2102
2110
  /** Preferred over href navigation — lets an SPA route without a page load. */
2103
2111
  onNavigate?: (href: string | undefined, item: AccountMenuLink) => void;
2104
- onSignOut?: () => void;
2112
+ /** May return a Promise — the sign-out item shows a spinner and disables itself until it
2113
+ * settles, then closes the menu. Falls back to the injected session's own `signOut`. */
2114
+ onSignOut?: () => void | Promise<void>;
2105
2115
  showRoles?: boolean;
2106
2116
  /** Demo affordance: impersonate another member to see their UI. Default true. */
2107
2117
  allowUserSwitch?: boolean;
@@ -2109,9 +2119,210 @@ interface AccountMenuProps {
2109
2119
  }
2110
2120
  /**
2111
2121
  * The avatar button + popover every flytedesk app puts in its top right.
2112
- * Reads the signed-in user from SessionKit; shows Administration only to those who can use it.
2122
+ * Reads the signed-in user from the nearest SessionProvider; shows each `groups` section
2123
+ * only to those who can use at least one of its links.
2113
2124
  */
2114
- declare function AccountMenu({ links, adminLinks, onNavigate, onSignOut, showRoles, allowUserSwitch, className, ...rest }: AccountMenuProps): React.JSX.Element;
2125
+ declare function AccountMenu({ links, groups, onNavigate, onSignOut, showRoles, allowUserSwitch, className, ...rest }: AccountMenuProps): React.JSX.Element;
2126
+
2127
+ /** Whatever a session-aware component asks of the signed-in user, independent of any specific
2128
+ * identity provider. `kits/session.ts`'s own demo `User` extends this with fixture-only
2129
+ * bookkeeping (status, lastActive, …) that a real integration is never expected to supply. */
2130
+ interface SessionUser {
2131
+ id: string;
2132
+ name: string;
2133
+ email: string;
2134
+ title?: string;
2135
+ team?: string;
2136
+ phone?: string;
2137
+ bio?: string;
2138
+ timezone?: string;
2139
+ /** Identity is managed by an SSO provider — ProfilePage disables the email field with a
2140
+ * different help string when true. */
2141
+ sso?: boolean;
2142
+ joined?: string;
2143
+ notify?: Record<string, boolean>;
2144
+ /** Display-only role names — used by the demo "View as another member" list. Not read
2145
+ * anywhere permissions are actually decided; `SessionContextValue.roles`/`can`/`hasRole`
2146
+ * are the source of truth for the SIGNED-IN user. */
2147
+ roles?: string[];
2148
+ }
2149
+ interface SessionRole {
2150
+ id: string;
2151
+ name: string;
2152
+ }
2153
+ /** One flytedesk app the signed-in user can reach — the "All flytedesk apps" switcher's row
2154
+ * shape. The design system never fetches this list; it is supplied via `AppSwitcher`'s own
2155
+ * `apps` prop or via `SessionContextValue.apps`. */
2156
+ interface AppEntry {
2157
+ key: string;
2158
+ name: string;
2159
+ url: string;
2160
+ icon?: string;
2161
+ /** True for the app the switcher itself is currently rendered inside. */
2162
+ current?: boolean;
2163
+ }
2164
+ /** Demo-only affordance: impersonate another member to see their UI. Present ONLY on the demo
2165
+ * provider — a real, injected session must never populate this — so AccountMenu can key its
2166
+ * "View as another member" row on this field simply existing, rather than on a separate
2167
+ * boolean prop a real integration could forget to turn off. */
2168
+ interface DemoSessionControls {
2169
+ allUsers: SessionUser[];
2170
+ setActiveUser: (userId: string) => void;
2171
+ }
2172
+ interface SessionContextValue {
2173
+ user: SessionUser;
2174
+ /** The signed-in user's roles, for display (AccountMenu's/ProfilePage's role badges). */
2175
+ roles: SessionRole[];
2176
+ /** Every permission key the signed-in user holds. */
2177
+ permissions: string[];
2178
+ /** All of `permission` must be held. */
2179
+ can: (permission: string | string[]) => boolean;
2180
+ /** At least one of `permissions` must be held. */
2181
+ canAny: (permissions: string[]) => boolean;
2182
+ hasRole: (roleId: string) => boolean;
2183
+ /** The app's real sign-out handler. AccountMenu's `onSignOut` prop, when supplied, still
2184
+ * wins over this — this is the fallback every app gets for free. May return a Promise —
2185
+ * AccountMenu shows a pending state on its sign-out item until it settles. */
2186
+ signOut: () => void | Promise<void>;
2187
+ /** Persists a profile edit. Omit on a session that does not support self-service profile
2188
+ * edits; ProfilePage then relies solely on its own `onSave` prop. */
2189
+ saveProfile?: (patch: Partial<SessionUser>) => void | Promise<void>;
2190
+ /** The flytedesk apps this user can reach, for `AppSwitcher`. Omit if the app instead
2191
+ * passes `AppSwitcher`'s own `apps` prop directly. */
2192
+ apps?: AppEntry[];
2193
+ demo?: DemoSessionControls;
2194
+ }
2195
+ interface SessionProviderProps {
2196
+ value: SessionContextValue;
2197
+ children?: React.ReactNode;
2198
+ }
2199
+ /** Mount once near the app root with the real, signed-in session. Every session-aware
2200
+ * component in this package reads from this provider and nothing else. */
2201
+ declare function SessionProvider({ value, children }: SessionProviderProps): React.FunctionComponentElement<React.ProviderProps<SessionContextValue | null>>;
2202
+ /** Reads the nearest `SessionProvider`. Throws when none is mounted — a session-aware
2203
+ * component with nothing to read from is a wiring bug to surface immediately, not a state to
2204
+ * silently render through. */
2205
+ declare function useSessionContext(): SessionContextValue;
2206
+
2207
+ interface AppSwitcherProps {
2208
+ /**
2209
+ * The flytedesk apps this user can reach. Defaults to the injected session's own `apps`
2210
+ * (`SessionContextValue.apps`) when omitted — this package never fetches the list itself;
2211
+ * an app either passes it here or wires it into its `SessionProvider` value.
2212
+ */
2213
+ apps?: AppEntry[];
2214
+ /** Preferred over `url` navigation — lets an SPA route without a page load. */
2215
+ onNavigate?: (app: AppEntry) => void;
2216
+ className?: string;
2217
+ }
2218
+ /**
2219
+ * The "All flytedesk apps" switcher every flytedesk app puts in its topbar, beside
2220
+ * `AccountMenu`: a grid-icon trigger anchoring a list of the apps the signed-in user can
2221
+ * reach, the current app marked and not selectable. Reuses `Popover`/`Menu` — the same
2222
+ * keyboard-complete, ARIA-correct list every other menu-shaped control in this package is
2223
+ * built on — rather than a bespoke list, so Home/End/type-ahead/arrow-key behavior is
2224
+ * identical everywhere.
2225
+ *
2226
+ * Renders nothing when there are no apps to switch to (an empty switcher is not a control,
2227
+ * it's a dead button), so a Topbar can render it unconditionally.
2228
+ */
2229
+ declare function AppSwitcher({ apps: appsProp, onNavigate, className }: AppSwitcherProps): React.JSX.Element | null;
2230
+
2231
+ type ThemeMode = "light" | "dark" | "system";
2232
+ type TextScale = "sm" | "md" | "lg" | "xl";
2233
+ interface AppearancePrefs {
2234
+ theme: ThemeMode;
2235
+ textScale: TextScale;
2236
+ highContrast: boolean;
2237
+ /** Can only ever ADD reduced motion on top of the `prefers-reduced-motion` OS floor
2238
+ * tokens.css already respects — turning this off never re-enables motion the OS
2239
+ * itself asked to reduce. */
2240
+ reduceMotion: boolean;
2241
+ }
2242
+ declare const DEFAULT_STORAGE_KEY = "fd-appearance";
2243
+ declare const DEFAULT_PREFS: AppearancePrefs;
2244
+ /** An app-supplied external store for `AppearancePrefs` — the same read/subscribe shape
2245
+ * `React.useSyncExternalStore` expects, plus a `write`. Implement this over whatever a
2246
+ * consuming app already has (a server-synced prefs cache, a Redux/Zustand store, …) to
2247
+ * drive `AppearanceMenu` from that state instead of the default localStorage store. */
2248
+ interface AppearanceStore {
2249
+ /** Synchronous current value. Called on every render that might have changed it —
2250
+ * must be cheap and must not allocate a new object unless the value actually changed
2251
+ * (React compares by reference to decide whether to re-render). */
2252
+ getSnapshot: () => AppearancePrefs;
2253
+ /** Persist a full prefs object. `AppearanceMenu` always calls this with the complete,
2254
+ * merged record — never a partial patch — so a store never needs to merge itself. */
2255
+ write: (prefs: AppearancePrefs) => void;
2256
+ /** Register a callback fired whenever the snapshot changes for a reason other than this
2257
+ * store's own `write` call returning (e.g. another tab, or an app's async server
2258
+ * hydration completing after mount). Returns its own unsubscribe. */
2259
+ subscribe: (onChange: () => void) => () => void;
2260
+ }
2261
+ interface AppearanceStoreOptions {
2262
+ /** localStorage (or `storage`) key these prefs are read from / written to. Default
2263
+ * "fd-appearance". Namespace this per consuming app. */
2264
+ storageKey?: string;
2265
+ /** Swappable for tests or a non-browser environment. Default `window.localStorage`
2266
+ * (read lazily — safe to import this module where `window` doesn't exist yet). */
2267
+ storage?: Pick<Storage, "getItem" | "setItem">;
2268
+ /** Overrides the built-in defaults (`system` / `md` / off / off) per field. */
2269
+ defaults?: Partial<AppearancePrefs>;
2270
+ }
2271
+ /** "system" resolved against the OS's current setting. Pure aside from reading
2272
+ * `matchMedia` — never throws in an environment without it (SSR, some test runners). */
2273
+ declare function resolveTheme(mode: ThemeMode): "light" | "dark";
2274
+ /** Reads stored prefs, falling back field-by-field to defaults — a missing key, a
2275
+ * malformed JSON blob, or a value of the wrong shape/type each fall back individually
2276
+ * rather than discarding the whole record (a bad stored value degrades, it never
2277
+ * crashes the caller). Used internally by `createLocalStorageAppearanceStore`; exported
2278
+ * as a low-level primitive for a caller building its own store on top of a similar
2279
+ * key/value backend. */
2280
+ declare function loadPrefs(opts?: AppearanceStoreOptions): AppearancePrefs;
2281
+ declare function savePrefs(prefs: AppearancePrefs, opts?: AppearanceStoreOptions): void;
2282
+ /** The default `AppearanceStore`: backed by `storage` (default `window.localStorage`)
2283
+ * under `storageKey` (default `"fd-appearance"`). Same-tab writes notify this store's
2284
+ * own subscribers synchronously; the browser's `storage` event keeps every OTHER tab
2285
+ * in sync too (a tab never gets its own `storage` event for its own write, which is
2286
+ * exactly why same-tab notification is handled separately here). The window listener is
2287
+ * attached only while at least one subscriber is registered, and removed once the last
2288
+ * one unsubscribes — a store an app creates per-mount never leaks a listener. */
2289
+ declare function createLocalStorageAppearanceStore(opts?: AppearanceStoreOptions): AppearanceStore;
2290
+ /** Sets every attribute this kit's tokens.css rules read: `[data-theme]` (resolved,
2291
+ * never "system" itself — nothing downstream re-resolves it), `[data-text-scale]`,
2292
+ * `[data-contrast="high"]` (present only when on — absent, not "normal", is the "off"
2293
+ * state so a plain `[data-contrast]` selector alone is meaningless) and
2294
+ * `[data-motion="reduce"]` (same absent-is-off shape). No inline styles: every visual
2295
+ * effect is a CSS rule in this package's own styles, driven by these attributes alone. */
2296
+ declare function applyPrefs(prefs: AppearancePrefs, root?: HTMLElement): void;
2297
+ /** [prefs, update] over an app-supplied `AppearanceStore`. Reads through
2298
+ * `React.useSyncExternalStore`, so a snapshot that changes for ANY reason — this hook's
2299
+ * own `update`, another tab, or an app's async server hydration landing after mount —
2300
+ * re-renders with the new value and re-applies it to the DOM. Any number of independent
2301
+ * instances may run at once as long as each is given its own store (or its own
2302
+ * `storageKey`, for the default store) — nothing here is a module-level singleton. */
2303
+ declare function useAppearancePrefs(store: AppearanceStore): [AppearancePrefs, (patch: Partial<AppearancePrefs>) => void];
2304
+
2305
+ interface AppearanceMenuProps extends AppearanceStoreOptions {
2306
+ /** An app-supplied external store (read/write/subscribe) — e.g. an adapter over a
2307
+ * server-synced prefs cache, so a value that arrives after mount still reaches this
2308
+ * menu and the DOM. Omit to get the default localStorage-backed store, configured by
2309
+ * `storageKey`/`storage`/`defaults`. */
2310
+ store?: AppearanceStore;
2311
+ className?: string;
2312
+ }
2313
+ /**
2314
+ * The appearance popover every flytedesk app puts in its topbar: theme, text size, high
2315
+ * contrast, and a reduced-motion override on top of the OS's own `prefers-reduced-
2316
+ * motion`. Fits `Topbar`'s `actions`/`overflowActions` slot (see Topbar.tsx) the same
2317
+ * way `AccountMenu` does — an `IconButton` trigger anchoring a `Popover`.
2318
+ *
2319
+ * Persistence is caller-configurable (`storageKey`/`storage`, see kits/appearance.ts) —
2320
+ * pass a `storageKey` to namespace it per app; nothing here is a shared/global key.
2321
+ * Every visual effect is a CSS rule in this package's own styles (tokens.css) driven by
2322
+ * the `[data-theme]`/`[data-text-scale]`/`[data-contrast]`/`[data-motion]` attributes
2323
+ * this component sets on `document.documentElement` — no inline styles, no app-side CSS.
2324
+ */
2325
+ declare function AppearanceMenu({ className, store: storeProp, storageKey, storage, defaults }: AppearanceMenuProps): React.JSX.Element;
2115
2326
 
2116
2327
  interface EndpointSpec {
2117
2328
  id: string;
@@ -2158,202 +2369,42 @@ declare function Json({ obj }: {
2158
2369
  /** Drop-in browser for a simulated API contract. Takes the spec as data. */
2159
2370
  declare function ApiSpecBrowser({ spec, onRequest, modules, groups, title, kicker, lede, sourceNote, conventions, openQuestions, className, ...rest }: ApiSpecBrowserProps): React.JSX.Element;
2160
2371
 
2161
- interface PermissionItem {
2162
- key: string;
2163
- label: string;
2164
- detail: string;
2165
- }
2166
- interface PermissionGroup {
2167
- group: string;
2168
- items: PermissionItem[];
2169
- }
2170
- interface Role {
2171
- id: string;
2172
- name: string;
2173
- system: boolean;
2174
- description: string;
2175
- permissions: string[];
2176
- }
2177
- interface Flag {
2372
+ type ProfileFieldType = "text" | "textarea" | "select" | "readonly";
2373
+ interface ProfileFieldDef {
2374
+ /** Draft/patch key. Also the key `onSave`'s draft carries this value under. */
2178
2375
  key: string;
2179
- project: string;
2180
2376
  label: string;
2181
- description: string;
2182
- /** Kill switch. False means off for everyone, whatever the targeting says. */
2183
- enabled: boolean;
2184
- /** 0-100. Bucketed on a stable hash of the user id so answers never flicker. */
2185
- rollout: number;
2186
- /** Role ids the flag is forced on for. */
2187
- roles: string[];
2188
- /** Per-user overrides, highest precedence: { userId: true | false } */
2189
- users: Record<string, boolean>;
2190
- owner?: string;
2191
- updated?: string;
2192
- /** Which screen this flag gates, if any. */
2193
- screen?: string;
2194
- /** Target ship date for an unshipped feature. */
2195
- eta?: string | null;
2196
- /** Date this shipped — set instead of `eta` once it's done. */
2197
- shippedAt?: string;
2198
- /** Build phase index into PHASES. */
2199
- phase?: number;
2200
- /** Human estimate, e.g. "4 days". */
2201
- effort?: string;
2202
- /** What has to be built for this to be real. */
2203
- backend?: string;
2204
- /** Other flag keys this depends on. */
2205
- dependsOn?: string[];
2206
- }
2207
- interface User {
2208
- id: string;
2209
- name: string;
2210
- email: string;
2211
- title?: string;
2212
- team?: string;
2213
- roles: string[];
2214
- status: "active" | "invited" | "suspended";
2215
- lastActive?: string;
2216
- joined?: string;
2217
- sso?: boolean;
2218
- timezone?: string;
2219
- phone?: string;
2220
- bio?: string;
2221
- notify?: Record<string, boolean>;
2222
- }
2223
- interface Session {
2224
- user: User;
2225
- roles: Role[];
2226
- permissions: string[];
2227
- /** Resolved flag key → on/off for THIS user. */
2228
- flags: Record<string, boolean>;
2229
- allRoles: Role[];
2230
- allFlags: Flag[];
2231
- allUsers: User[];
2232
- }
2233
- interface FlagExplanation {
2234
- on: boolean;
2235
- reason: string;
2236
- detail: string;
2237
- }
2238
- /** roadmap()'s per-flag result row. Not declared in session.d.ts (roadmap() itself is one of
2239
- * the six SessionKit members missing from that file) — inferred from what roadmap() actually
2240
- * builds and returns for each flag. */
2241
- interface RoadmapItem {
2377
+ /** Default "text". "readonly" renders like "text" but is never editable, regardless
2378
+ * of any `onChange`. */
2379
+ type?: ProfileFieldType;
2380
+ /** Groups fields sharing the same value into one Card, titled by this group's name.
2381
+ * Default group: "Identity". Fields are rendered in the order their group first
2382
+ * appears, then in the order given within that group. */
2383
+ group?: string;
2384
+ /** Shown under the group's title — the first field in a group with one supplies it. */
2385
+ groupDescription?: React.ReactNode;
2386
+ placeholder?: string;
2387
+ /** Static help text, or computed from the signed-in user (e.g. a different string for
2388
+ * an SSO- vs. password-managed account). */
2389
+ help?: string | ((user: SessionUser) => string);
2390
+ /** Required for `type: "select"`. */
2391
+ options?: string[];
2392
+ /** For `type: "textarea"`. Default 3. */
2393
+ rows?: number;
2394
+ /** Forces read-only regardless of `type`. */
2395
+ readOnly?: boolean;
2396
+ /** Computes this field's initial value from the signed-in user. Default: the user
2397
+ * property of the same name, coerced to a string (`String(user[key] ?? "")`) — set
2398
+ * this when the field's key doesn't match a `SessionUser` property, or needs
2399
+ * formatting. */
2400
+ value?: (user: SessionUser) => string;
2401
+ }
2402
+ interface ProfileNotificationDef {
2403
+ /** Draft key, read from/written into `notify: Record<string, boolean>`. */
2242
2404
  key: string;
2243
2405
  label: string;
2244
- project: string;
2245
- description: string;
2246
- backend?: string;
2247
- effort?: string;
2248
- owner?: string;
2249
- dependsOn: string[];
2250
- screen: string | null;
2251
- enabled: boolean;
2252
- /** Which build phase this sits in, and why that phase comes where it does. */
2253
- phase?: number;
2254
- phaseName: string;
2255
- phaseWhy: string | null;
2256
- phaseStart: string | null;
2257
- /** Derived, not stored: whether every endpoint the feature needs is wired. */
2258
- implemented: boolean;
2259
- date: string | null;
2260
- /** True when the only date on record is when the UI was designed, not when it ships. */
2261
- dateIsDesign: boolean;
2262
- status: "shipped" | "next" | "planned";
2263
- }
2264
- /** roadmap()'s return shape. */
2265
- interface RoadmapResult {
2266
- items: RoadmapItem[];
2267
- /** Index of the first unshipped item — everything above it is history. */
2268
- nextIndex: number;
2269
- shipped: number;
2270
- remaining: number;
2271
- }
2272
- /** Stable 0–99 bucket from a string, so rollout answers never flicker between reloads. */
2273
- declare function bucket(seed: string): number;
2274
- /** Build the session document a real GET /me would return. */
2275
- declare function buildSession(userId: string, overrides?: {
2276
- users?: User[];
2277
- roles?: Role[];
2278
- flags?: Flag[];
2279
- }): Session;
2280
- /** The precedence rule, in one place so the admin UI and the app can never disagree. */
2281
- declare function evaluateFlag(flag: Flag, user: User): boolean;
2282
- /** Why a flag resolved the way it did — shown in the admin UI, invaluable in support. */
2283
- declare function explainFlag(flag: Flag, user: User): FlagExplanation;
2284
- declare global {
2285
- interface Window {
2286
- /** Admin-app-injected overrides for the demo dataset, read by loadSession(). */
2287
- __FD_ADMIN_OVERRIDES?: {
2288
- users?: User[];
2289
- roles?: Role[];
2290
- flags?: Flag[];
2291
- };
2292
- }
2406
+ description?: string;
2293
2407
  }
2294
- /** Replace this with `fetch(API + "/me")` to go live. */
2295
- declare function loadSession(userId?: string): Session;
2296
- declare function getSession(): Session;
2297
- declare function setActiveUser(userId: string): Session;
2298
- /** Local profile edits persist so the demo keeps them across reloads. */
2299
- declare function saveProfile(patch: Partial<User>): User;
2300
- /** Recompute after the admin app mutates users/roles/flags. */
2301
- declare function refresh(): Session;
2302
- declare function subscribe(fn: (s: Session) => void): () => void;
2303
- declare function can(permission: string | string[]): boolean;
2304
- declare function canAny(permissions: string[]): boolean;
2305
- declare function hasRole(roleId: string): boolean;
2306
- declare function flagOn(key: string): boolean;
2307
- /** The flag registry entry, whatever the session shape.
2308
- * Not declared in session.d.ts — see the module doc comment on SessionKit below. */
2309
- declare function findFlag(key: string): Flag | null;
2310
- declare function flagState(key: string): "on" | "off";
2311
- declare function isEnabled(key: string): boolean;
2312
- declare function flagVisible(key: string): boolean;
2313
- declare function flagLive(key: string): boolean;
2314
- declare function roadmap(overrides?: {
2315
- flags?: Flag[];
2316
- isComplete?: (key: string) => boolean;
2317
- }): RoadmapResult;
2318
- /** React binding. Re-renders on user switch, profile save, or admin mutation. */
2319
- declare function useSession(): Session;
2320
- /**
2321
- * Session, RBAC and feature flags for every flytedesk app.
2322
- *
2323
- * Not a security boundary: permissions gate the UI so people aren't shown affordances they
2324
- * cannot use. The server must re-check all of it.
2325
- *
2326
- * To go live, replace loadSession() with a fetch of GET /me → { user, roles, permissions, flags }.
2327
- */
2328
- declare const SessionKit: {
2329
- PERMISSION_CATALOG: PermissionGroup[];
2330
- ALL_PERMISSIONS: string[];
2331
- ROLES: Role[];
2332
- FLAGS: Flag[];
2333
- USERS: User[];
2334
- loadSession: typeof loadSession;
2335
- getSession: typeof getSession;
2336
- setActiveUser: typeof setActiveUser;
2337
- saveProfile: typeof saveProfile;
2338
- refresh: typeof refresh;
2339
- subscribe: typeof subscribe;
2340
- can: typeof can;
2341
- canAny: typeof canAny;
2342
- hasRole: typeof hasRole;
2343
- flagOn: typeof flagOn;
2344
- useSession: typeof useSession;
2345
- findFlag: typeof findFlag;
2346
- flagState: typeof flagState;
2347
- isEnabled: typeof isEnabled;
2348
- flagVisible: typeof flagVisible;
2349
- flagLive: typeof flagLive;
2350
- roadmap: typeof roadmap;
2351
- evaluateFlag: typeof evaluateFlag;
2352
- explainFlag: typeof explainFlag;
2353
- bucket: typeof bucket;
2354
- buildSession: typeof buildSession;
2355
- };
2356
-
2357
2408
  interface DeviceSession {
2358
2409
  id: string;
2359
2410
  device: string;
@@ -2362,20 +2413,40 @@ interface DeviceSession {
2362
2413
  current?: boolean;
2363
2414
  }
2364
2415
  interface ProfilePageProps {
2365
- /** Defaults to the signed-in user from SessionKit. */
2366
- user?: User;
2367
- /** Persist through your own endpoint. Defaults to SessionKit.saveProfile. */
2368
- onSave?: (draft: Partial<User>) => void | Promise<void>;
2416
+ /** Defaults to the signed-in user from the injected session. */
2417
+ user?: SessionUser;
2418
+ /** The editable fields this app's profile has. Omit (or pass none) and no field cards
2419
+ * render at all — only the avatar header and the Access card remain. */
2420
+ fields?: ProfileFieldDef[];
2421
+ /** The notification toggles this app has. Omit and the Notifications card doesn't
2422
+ * render. */
2423
+ notifications?: ProfileNotificationDef[];
2424
+ /** Rendered after the field cards and before Notifications — for app-specific content
2425
+ * that isn't a plain field, e.g. a link out to another app's own profile page for
2426
+ * fields that live there instead. */
2427
+ extra?: React.ReactNode;
2428
+ /** Renders the "Change photo" button when supplied; omitted entirely otherwise. */
2429
+ onChangePhoto?: () => void;
2430
+ /** Persist edited fields/notifications through your own endpoint. Defaults to the
2431
+ * injected session's `saveProfile` (the demo provider wires this to
2432
+ * SessionKit.saveProfile); if neither is available, Save is disabled. Receives every
2433
+ * field's current value under its `key`, plus `notify` when `notifications` is set. */
2434
+ onSave?: (draft: Record<string, string> & {
2435
+ notify?: Record<string, boolean>;
2436
+ }) => void | Promise<void>;
2369
2437
  onNavigate?: (href: string) => void;
2438
+ /** Renders the "Signed-in devices" card when supplied (an empty array still renders
2439
+ * the card, showing none); omitted entirely otherwise — no fabricated device list. */
2370
2440
  sessions?: DeviceSession[];
2371
- showSessions?: boolean;
2441
+ onSignOutEverywhere?: () => void | Promise<void>;
2372
2442
  className?: string;
2373
2443
  }
2374
2444
  /**
2375
- * The shared profile page: identity, working preferences, notifications, devices.
2376
- * Roles are shown but never editable — self-promotion is the reason RBAC exists.
2445
+ * The shared profile page: identity, working preferences, notifications, devices — all
2446
+ * driven entirely by the `fields`/`notifications`/`sessions` this app supplies. Roles are
2447
+ * shown but never editable — self-promotion is the reason RBAC exists.
2377
2448
  */
2378
- declare function ProfilePage({ user: userProp, onSave, onNavigate, sessions, showSessions, className, ...rest }: ProfilePageProps): React.JSX.Element;
2449
+ declare function ProfilePage({ user: userProp, fields, notifications, extra, onChangePhoto, onSave, onNavigate, sessions, onSignOutEverywhere, className, }: ProfilePageProps): React.JSX.Element;
2379
2450
 
2380
2451
  interface RoadmapTimelineProps {
2381
2452
  /** Called with a flag key when the reader clicks one — route it to your flag admin. */
@@ -2419,7 +2490,9 @@ interface GateProps {
2419
2490
  compact?: boolean;
2420
2491
  children?: React.ReactNode;
2421
2492
  }
2422
- /** Permission gate. Denied by default shows PermissionDenied. */
2493
+ /** Permission gate. Denied by default shows PermissionDenied. Reads the injected session
2494
+ * (see kits/sessionContext.tsx) — re-renders whenever that context's value changes, so no
2495
+ * separate subscription is needed here. */
2423
2496
  declare function Gate({ perm, anyOf, role, silent, fallback, compact, children }: GateProps): React.ReactNode;
2424
2497
  interface FeatureGateProps {
2425
2498
  flag: string;
@@ -3497,6 +3570,207 @@ interface FileBrowserProps {
3497
3570
  */
3498
3571
  declare function FileBrowser({ folders, files, currentFolderId, onNavigate, onCreateFolder, onRenameFolder, onMoveFolder, onMoveFile, onOpenFile, onRemoveFile, onDeleteFolder, onUpload, loading, permissions, className, }: FileBrowserProps): React.JSX.Element;
3499
3572
 
3573
+ interface PermissionItem {
3574
+ key: string;
3575
+ label: string;
3576
+ detail: string;
3577
+ }
3578
+ interface PermissionGroup {
3579
+ group: string;
3580
+ items: PermissionItem[];
3581
+ }
3582
+ interface Role {
3583
+ id: string;
3584
+ name: string;
3585
+ system: boolean;
3586
+ description: string;
3587
+ permissions: string[];
3588
+ }
3589
+ interface Flag {
3590
+ key: string;
3591
+ project: string;
3592
+ label: string;
3593
+ description: string;
3594
+ /** Kill switch. False means off for everyone, whatever the targeting says. */
3595
+ enabled: boolean;
3596
+ /** 0-100. Bucketed on a stable hash of the user id so answers never flicker. */
3597
+ rollout: number;
3598
+ /** Role ids the flag is forced on for. */
3599
+ roles: string[];
3600
+ /** Per-user overrides, highest precedence: { userId: true | false } */
3601
+ users: Record<string, boolean>;
3602
+ owner?: string;
3603
+ updated?: string;
3604
+ /** Which screen this flag gates, if any. */
3605
+ screen?: string;
3606
+ /** Target ship date for an unshipped feature. */
3607
+ eta?: string | null;
3608
+ /** Date this shipped — set instead of `eta` once it's done. */
3609
+ shippedAt?: string;
3610
+ /** Build phase index into PHASES. */
3611
+ phase?: number;
3612
+ /** Human estimate, e.g. "4 days". */
3613
+ effort?: string;
3614
+ /** What has to be built for this to be real. */
3615
+ backend?: string;
3616
+ /** Other flag keys this depends on. */
3617
+ dependsOn?: string[];
3618
+ }
3619
+ /** The demo fixture's user record. Extends the provider-agnostic `SessionUser` (see
3620
+ * `kits/sessionContext.tsx`) with bookkeeping fields only this in-memory fixture needs — a
3621
+ * real, injected session is never expected to supply `status`/`lastActive`. */
3622
+ interface User extends SessionUser {
3623
+ roles: string[];
3624
+ status: "active" | "invited" | "suspended";
3625
+ lastActive?: string;
3626
+ }
3627
+ interface Session {
3628
+ user: User;
3629
+ roles: Role[];
3630
+ permissions: string[];
3631
+ /** Resolved flag key → on/off for THIS user. */
3632
+ flags: Record<string, boolean>;
3633
+ allRoles: Role[];
3634
+ allFlags: Flag[];
3635
+ allUsers: User[];
3636
+ }
3637
+ interface FlagExplanation {
3638
+ on: boolean;
3639
+ reason: string;
3640
+ detail: string;
3641
+ }
3642
+ /** roadmap()'s per-flag result row. Not declared in session.d.ts (roadmap() itself is one of
3643
+ * the six SessionKit members missing from that file) — inferred from what roadmap() actually
3644
+ * builds and returns for each flag. */
3645
+ interface RoadmapItem {
3646
+ key: string;
3647
+ label: string;
3648
+ project: string;
3649
+ description: string;
3650
+ backend?: string;
3651
+ effort?: string;
3652
+ owner?: string;
3653
+ dependsOn: string[];
3654
+ screen: string | null;
3655
+ enabled: boolean;
3656
+ /** Which build phase this sits in, and why that phase comes where it does. */
3657
+ phase?: number;
3658
+ phaseName: string;
3659
+ phaseWhy: string | null;
3660
+ phaseStart: string | null;
3661
+ /** Derived, not stored: whether every endpoint the feature needs is wired. */
3662
+ implemented: boolean;
3663
+ date: string | null;
3664
+ /** True when the only date on record is when the UI was designed, not when it ships. */
3665
+ dateIsDesign: boolean;
3666
+ status: "shipped" | "next" | "planned";
3667
+ }
3668
+ /** roadmap()'s return shape. */
3669
+ interface RoadmapResult {
3670
+ items: RoadmapItem[];
3671
+ /** Index of the first unshipped item — everything above it is history. */
3672
+ nextIndex: number;
3673
+ shipped: number;
3674
+ remaining: number;
3675
+ }
3676
+ /** Stable 0–99 bucket from a string, so rollout answers never flicker between reloads. */
3677
+ declare function bucket(seed: string): number;
3678
+ /** Build the session document a real GET /me would return. */
3679
+ declare function buildSession(userId: string, overrides?: {
3680
+ users?: User[];
3681
+ roles?: Role[];
3682
+ flags?: Flag[];
3683
+ }): Session;
3684
+ /** The precedence rule, in one place so the admin UI and the app can never disagree. */
3685
+ declare function evaluateFlag(flag: Flag, user: User): boolean;
3686
+ /** Why a flag resolved the way it did — shown in the admin UI, invaluable in support. */
3687
+ declare function explainFlag(flag: Flag, user: User): FlagExplanation;
3688
+ declare global {
3689
+ interface Window {
3690
+ /** Admin-app-injected overrides for the demo dataset, read by loadSession(). */
3691
+ __FD_ADMIN_OVERRIDES?: {
3692
+ users?: User[];
3693
+ roles?: Role[];
3694
+ flags?: Flag[];
3695
+ };
3696
+ }
3697
+ }
3698
+ /** Replace this with `fetch(API + "/me")` to go live. */
3699
+ declare function loadSession(userId?: string): Session;
3700
+ declare function getSession(): Session;
3701
+ declare function setActiveUser(userId: string): Session;
3702
+ /** Local profile edits persist so the demo keeps them across reloads. */
3703
+ declare function saveProfile(patch: Partial<User>): User;
3704
+ /** Recompute after the admin app mutates users/roles/flags. */
3705
+ declare function refresh(): Session;
3706
+ declare function subscribe(fn: (s: Session) => void): () => void;
3707
+ declare function can(permission: string | string[]): boolean;
3708
+ declare function canAny(permissions: string[]): boolean;
3709
+ declare function hasRole(roleId: string): boolean;
3710
+ declare function flagOn(key: string): boolean;
3711
+ /** The flag registry entry, whatever the session shape.
3712
+ * Not declared in session.d.ts — see the module doc comment on SessionKit below. */
3713
+ declare function findFlag(key: string): Flag | null;
3714
+ declare function flagState(key: string): "on" | "off";
3715
+ declare function isEnabled(key: string): boolean;
3716
+ declare function flagVisible(key: string): boolean;
3717
+ declare function flagLive(key: string): boolean;
3718
+ declare function roadmap(overrides?: {
3719
+ flags?: Flag[];
3720
+ isComplete?: (key: string) => boolean;
3721
+ }): RoadmapResult;
3722
+ /** React binding. Re-renders on user switch, profile save, or admin mutation. */
3723
+ declare function useSession(): Session;
3724
+ /**
3725
+ * Session, RBAC and feature flags for every flytedesk app.
3726
+ *
3727
+ * Not a security boundary: permissions gate the UI so people aren't shown affordances they
3728
+ * cannot use. The server must re-check all of it.
3729
+ *
3730
+ * To go live, replace loadSession() with a fetch of GET /me → { user, roles, permissions, flags }.
3731
+ */
3732
+ declare const SessionKit: {
3733
+ PERMISSION_CATALOG: PermissionGroup[];
3734
+ ALL_PERMISSIONS: string[];
3735
+ ROLES: Role[];
3736
+ FLAGS: Flag[];
3737
+ USERS: User[];
3738
+ loadSession: typeof loadSession;
3739
+ getSession: typeof getSession;
3740
+ setActiveUser: typeof setActiveUser;
3741
+ saveProfile: typeof saveProfile;
3742
+ refresh: typeof refresh;
3743
+ subscribe: typeof subscribe;
3744
+ can: typeof can;
3745
+ canAny: typeof canAny;
3746
+ hasRole: typeof hasRole;
3747
+ flagOn: typeof flagOn;
3748
+ useSession: typeof useSession;
3749
+ findFlag: typeof findFlag;
3750
+ flagState: typeof flagState;
3751
+ isEnabled: typeof isEnabled;
3752
+ flagVisible: typeof flagVisible;
3753
+ flagLive: typeof flagLive;
3754
+ roadmap: typeof roadmap;
3755
+ evaluateFlag: typeof evaluateFlag;
3756
+ explainFlag: typeof explainFlag;
3757
+ bucket: typeof bucket;
3758
+ buildSession: typeof buildSession;
3759
+ };
3760
+ /**
3761
+ * Mounts the built-in fixture `SessionKit` behind the same `SessionProvider` contract every
3762
+ * session-aware component reads (see `kits/sessionContext.tsx`). This is the ONLY place the
3763
+ * demo fixture is wired to that contract — AccountMenu/Gate/ProfilePage/AppSwitcher never
3764
+ * import `SessionKit` directly, so a real app supplying its own `<SessionProvider value={...}>`
3765
+ * gets identical behavior with no demo-only code path left running underneath it.
3766
+ *
3767
+ * `demo` is populated on the resulting context value, which is what lets AccountMenu show
3768
+ * "View as another member" here and nowhere else: a real session simply never sets it.
3769
+ */
3770
+ declare function DemoSessionProvider({ children }: {
3771
+ children?: React.ReactNode;
3772
+ }): React.FunctionComponentElement<SessionProviderProps>;
3773
+
3500
3774
  interface TableQuery {
3501
3775
  /** 1-indexed. */
3502
3776
  page: number;
@@ -3769,4 +4043,4 @@ interface VersionStore<TState, TDiff = unknown> {
3769
4043
  }
3770
4044
  declare function createVersionStore<TState, TDiff = unknown>(initialState: TState, options?: CreateVersionStoreOptions<TState, TDiff>): VersionStore<TState, TDiff>;
3771
4045
 
3772
- export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type Flag as SessionFlag, SessionKit, type SessionStats, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, Textarea, type TextareaProps, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, channelWeightOf, computeNeedMore, computeVirtualWindow, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, revokeAttachment, toAttachment, tokenize, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useStagedFiles, visibleMessages };
4046
+ export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, Calendar, type CalendarProps, Card, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterField, type FilterFieldOption, type FilterFieldSelect, type FilterFieldText, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, Gate, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type JobStatus, Json, KeyHint, type KeyHintProps, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueuedTurn, QuotaRow, type QuotaRowProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, type UsageLimit, UseFeatureStatus, UseRuntimeMode, type UseServerTableOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, acceptMatches, anyOfFilter, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDuration, formatEta, formatRelative, groupMessages, hasModifier, iconForMime, importanceLevel, importanceTokens, isImage, isSystemMessage, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useChatEngine, useFeatureStatus, usePopoverPosition, useRuntimeMode, useServerTable, useSessionContext, useStagedFiles, visibleMessages };