@flytedan/flytebot-design-system 0.13.0 → 0.15.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 +44 -0
- package/dist/index.cjs +2145 -1781
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +407 -209
- package/dist/index.d.ts +407 -209
- package/dist/index.js +2133 -1781
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/tokens.css +44 -0
package/dist/index.d.cts
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
|
|
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
|
-
/**
|
|
2101
|
-
|
|
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
|
-
|
|
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,177 @@ 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
|
|
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,
|
|
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
|
+
interface AppearanceStoreOptions {
|
|
2243
|
+
/** localStorage (or `storage`) key these prefs are read from / written to. Default
|
|
2244
|
+
* "fd-appearance". Namespace this per consuming app. */
|
|
2245
|
+
storageKey?: string;
|
|
2246
|
+
/** Swappable for tests or a non-browser environment. Default `window.localStorage`
|
|
2247
|
+
* (read lazily — safe to import this module where `window` doesn't exist yet). */
|
|
2248
|
+
storage?: Pick<Storage, "getItem" | "setItem">;
|
|
2249
|
+
/** Overrides the built-in defaults (`system` / `md` / off / off) per field. */
|
|
2250
|
+
defaults?: Partial<AppearancePrefs>;
|
|
2251
|
+
}
|
|
2252
|
+
declare const DEFAULT_STORAGE_KEY = "fd-appearance";
|
|
2253
|
+
declare const DEFAULT_PREFS: AppearancePrefs;
|
|
2254
|
+
/** "system" resolved against the OS's current setting. Pure aside from reading
|
|
2255
|
+
* `matchMedia` — never throws in an environment without it (SSR, some test runners). */
|
|
2256
|
+
declare function resolveTheme(mode: ThemeMode): "light" | "dark";
|
|
2257
|
+
/** Reads stored prefs, falling back field-by-field to defaults — a missing key, a
|
|
2258
|
+
* malformed JSON blob, or a value of the wrong shape/type each fall back individually
|
|
2259
|
+
* rather than discarding the whole record (a bad stored value degrades, it never
|
|
2260
|
+
* crashes the caller). */
|
|
2261
|
+
declare function loadPrefs(opts?: AppearanceStoreOptions): AppearancePrefs;
|
|
2262
|
+
declare function savePrefs(prefs: AppearancePrefs, opts?: AppearanceStoreOptions): void;
|
|
2263
|
+
/** Sets every attribute this kit's tokens.css rules read: `[data-theme]` (resolved,
|
|
2264
|
+
* never "system" itself — nothing downstream re-resolves it), `[data-text-scale]`,
|
|
2265
|
+
* `[data-contrast="high"]` (present only when on — absent, not "normal", is the "off"
|
|
2266
|
+
* state so a plain `[data-contrast]` selector alone is meaningless) and
|
|
2267
|
+
* `[data-motion="reduce"]` (same absent-is-off shape). No inline styles: every visual
|
|
2268
|
+
* effect is a CSS rule in this package's own styles, driven by these attributes alone. */
|
|
2269
|
+
declare function applyPrefs(prefs: AppearancePrefs, root?: HTMLElement): void;
|
|
2270
|
+
/** [prefs, update] — loads once (lazy initial state, so there's no flash of defaults
|
|
2271
|
+
* before localStorage is read), applies + persists on every change, and re-resolves
|
|
2272
|
+
* "system" live while it's selected (the OS setting can change without this tab
|
|
2273
|
+
* reloading). Any number of independent instances may run at once as long as each is
|
|
2274
|
+
* given its own `storageKey` — nothing here is a module-level singleton. */
|
|
2275
|
+
declare function useAppearancePrefs(opts?: AppearanceStoreOptions): [AppearancePrefs, (patch: Partial<AppearancePrefs>) => void];
|
|
2276
|
+
|
|
2277
|
+
interface AppearanceMenuProps extends AppearanceStoreOptions {
|
|
2278
|
+
className?: string;
|
|
2279
|
+
}
|
|
2280
|
+
/**
|
|
2281
|
+
* The appearance popover every flytedesk app puts in its topbar: theme, text size, high
|
|
2282
|
+
* contrast, and a reduced-motion override on top of the OS's own `prefers-reduced-
|
|
2283
|
+
* motion`. Fits `Topbar`'s `actions`/`overflowActions` slot (see Topbar.tsx) the same
|
|
2284
|
+
* way `AccountMenu` does — an `IconButton` trigger anchoring a `Popover`.
|
|
2285
|
+
*
|
|
2286
|
+
* Persistence is caller-configurable (`storageKey`/`storage`, see kits/appearance.ts) —
|
|
2287
|
+
* pass a `storageKey` to namespace it per app; nothing here is a shared/global key.
|
|
2288
|
+
* Every visual effect is a CSS rule in this package's own styles (tokens.css) driven by
|
|
2289
|
+
* the `[data-theme]`/`[data-text-scale]`/`[data-contrast]`/`[data-motion]` attributes
|
|
2290
|
+
* this component sets on `document.documentElement` — no inline styles, no app-side CSS.
|
|
2291
|
+
*/
|
|
2292
|
+
declare function AppearanceMenu({ className, ...storeOptions }: AppearanceMenuProps): React.JSX.Element;
|
|
2115
2293
|
|
|
2116
2294
|
interface EndpointSpec {
|
|
2117
2295
|
id: string;
|
|
@@ -2158,202 +2336,6 @@ declare function Json({ obj }: {
|
|
|
2158
2336
|
/** Drop-in browser for a simulated API contract. Takes the spec as data. */
|
|
2159
2337
|
declare function ApiSpecBrowser({ spec, onRequest, modules, groups, title, kicker, lede, sourceNote, conventions, openQuestions, className, ...rest }: ApiSpecBrowserProps): React.JSX.Element;
|
|
2160
2338
|
|
|
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 {
|
|
2178
|
-
key: string;
|
|
2179
|
-
project: string;
|
|
2180
|
-
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 {
|
|
2242
|
-
key: string;
|
|
2243
|
-
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
|
-
}
|
|
2293
|
-
}
|
|
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
2339
|
interface DeviceSession {
|
|
2358
2340
|
id: string;
|
|
2359
2341
|
device: string;
|
|
@@ -2362,10 +2344,12 @@ interface DeviceSession {
|
|
|
2362
2344
|
current?: boolean;
|
|
2363
2345
|
}
|
|
2364
2346
|
interface ProfilePageProps {
|
|
2365
|
-
/** Defaults to the signed-in user from
|
|
2366
|
-
user?:
|
|
2367
|
-
/** Persist through your own endpoint. Defaults to
|
|
2368
|
-
|
|
2347
|
+
/** Defaults to the signed-in user from the injected session. */
|
|
2348
|
+
user?: SessionUser;
|
|
2349
|
+
/** Persist through your own endpoint. Defaults to the injected session's `saveProfile`
|
|
2350
|
+
* (the demo provider wires this to SessionKit.saveProfile); if neither is available, Save
|
|
2351
|
+
* is disabled. */
|
|
2352
|
+
onSave?: (draft: Partial<SessionUser>) => void | Promise<void>;
|
|
2369
2353
|
onNavigate?: (href: string) => void;
|
|
2370
2354
|
sessions?: DeviceSession[];
|
|
2371
2355
|
showSessions?: boolean;
|
|
@@ -2419,7 +2403,9 @@ interface GateProps {
|
|
|
2419
2403
|
compact?: boolean;
|
|
2420
2404
|
children?: React.ReactNode;
|
|
2421
2405
|
}
|
|
2422
|
-
/** Permission gate. Denied by default shows PermissionDenied.
|
|
2406
|
+
/** Permission gate. Denied by default shows PermissionDenied. Reads the injected session
|
|
2407
|
+
* (see kits/sessionContext.tsx) — re-renders whenever that context's value changes, so no
|
|
2408
|
+
* separate subscription is needed here. */
|
|
2423
2409
|
declare function Gate({ perm, anyOf, role, silent, fallback, compact, children }: GateProps): React.ReactNode;
|
|
2424
2410
|
interface FeatureGateProps {
|
|
2425
2411
|
flag: string;
|
|
@@ -3441,6 +3427,7 @@ interface FileBrowserPermissions {
|
|
|
3441
3427
|
canMove?: boolean;
|
|
3442
3428
|
canUpload?: boolean;
|
|
3443
3429
|
canRemoveFile?: boolean;
|
|
3430
|
+
canDeleteFolder?: boolean;
|
|
3444
3431
|
}
|
|
3445
3432
|
interface FileBrowserProps {
|
|
3446
3433
|
folders: FileBrowserFolder[];
|
|
@@ -3454,6 +3441,16 @@ interface FileBrowserProps {
|
|
|
3454
3441
|
onMoveFile?: (fileId: string, targetFolderId: string | null) => void;
|
|
3455
3442
|
onOpenFile?: (file: FileBrowserFile) => void;
|
|
3456
3443
|
onRemoveFile?: (file: FileBrowserFile) => void;
|
|
3444
|
+
/** MP-190: same contract as `onRenameFolder`/`onMoveFolder` — no fetching, no emptiness
|
|
3445
|
+
* pre-check (the host's server is the one source of truth for "empty"; see the folder
|
|
3446
|
+
* kit doc comment above), fired only once the confirm dialog is accepted. Sibling
|
|
3447
|
+
* callbacks (`onRenameFolder`, `onMoveFolder`, `onRemoveFile`) are all plain, synchronous,
|
|
3448
|
+
* void callbacks with no promise/rejection handling anywhere in this component, so this
|
|
3449
|
+
* one is void too rather than inventing an async contract none of its siblings have — a
|
|
3450
|
+
* host that needs to show the server's `folder_not_empty` refusal does so the same way it
|
|
3451
|
+
* already must for a failed rename/move/remove: by feeding the error back through its own
|
|
3452
|
+
* state, outside this component. */
|
|
3453
|
+
onDeleteFolder?: (folder: FileBrowserFolder) => void;
|
|
3457
3454
|
/** Fired with the raw picked/dropped files and the folder they landed in — FileBrowser
|
|
3458
3455
|
* does no fetching and stages nothing itself (R-8/"generic, controlled" — see MP-135):
|
|
3459
3456
|
* the host runs its own `useStagedFiles`/`FileUploadHandler` and feeds the result back
|
|
@@ -3484,7 +3481,208 @@ interface FileBrowserProps {
|
|
|
3484
3481
|
* region per pane either way (R-8): the tree pane and the main pane each own their own
|
|
3485
3482
|
* `overflow`, the head/breadcrumb bar never scrolls.
|
|
3486
3483
|
*/
|
|
3487
|
-
declare function FileBrowser({ folders, files, currentFolderId, onNavigate, onCreateFolder, onRenameFolder, onMoveFolder, onMoveFile, onOpenFile, onRemoveFile, onUpload, loading, permissions, className, }: FileBrowserProps): React.JSX.Element;
|
|
3484
|
+
declare function FileBrowser({ folders, files, currentFolderId, onNavigate, onCreateFolder, onRenameFolder, onMoveFolder, onMoveFile, onOpenFile, onRemoveFile, onDeleteFolder, onUpload, loading, permissions, className, }: FileBrowserProps): React.JSX.Element;
|
|
3485
|
+
|
|
3486
|
+
interface PermissionItem {
|
|
3487
|
+
key: string;
|
|
3488
|
+
label: string;
|
|
3489
|
+
detail: string;
|
|
3490
|
+
}
|
|
3491
|
+
interface PermissionGroup {
|
|
3492
|
+
group: string;
|
|
3493
|
+
items: PermissionItem[];
|
|
3494
|
+
}
|
|
3495
|
+
interface Role {
|
|
3496
|
+
id: string;
|
|
3497
|
+
name: string;
|
|
3498
|
+
system: boolean;
|
|
3499
|
+
description: string;
|
|
3500
|
+
permissions: string[];
|
|
3501
|
+
}
|
|
3502
|
+
interface Flag {
|
|
3503
|
+
key: string;
|
|
3504
|
+
project: string;
|
|
3505
|
+
label: string;
|
|
3506
|
+
description: string;
|
|
3507
|
+
/** Kill switch. False means off for everyone, whatever the targeting says. */
|
|
3508
|
+
enabled: boolean;
|
|
3509
|
+
/** 0-100. Bucketed on a stable hash of the user id so answers never flicker. */
|
|
3510
|
+
rollout: number;
|
|
3511
|
+
/** Role ids the flag is forced on for. */
|
|
3512
|
+
roles: string[];
|
|
3513
|
+
/** Per-user overrides, highest precedence: { userId: true | false } */
|
|
3514
|
+
users: Record<string, boolean>;
|
|
3515
|
+
owner?: string;
|
|
3516
|
+
updated?: string;
|
|
3517
|
+
/** Which screen this flag gates, if any. */
|
|
3518
|
+
screen?: string;
|
|
3519
|
+
/** Target ship date for an unshipped feature. */
|
|
3520
|
+
eta?: string | null;
|
|
3521
|
+
/** Date this shipped — set instead of `eta` once it's done. */
|
|
3522
|
+
shippedAt?: string;
|
|
3523
|
+
/** Build phase index into PHASES. */
|
|
3524
|
+
phase?: number;
|
|
3525
|
+
/** Human estimate, e.g. "4 days". */
|
|
3526
|
+
effort?: string;
|
|
3527
|
+
/** What has to be built for this to be real. */
|
|
3528
|
+
backend?: string;
|
|
3529
|
+
/** Other flag keys this depends on. */
|
|
3530
|
+
dependsOn?: string[];
|
|
3531
|
+
}
|
|
3532
|
+
/** The demo fixture's user record. Extends the provider-agnostic `SessionUser` (see
|
|
3533
|
+
* `kits/sessionContext.tsx`) with bookkeeping fields only this in-memory fixture needs — a
|
|
3534
|
+
* real, injected session is never expected to supply `status`/`lastActive`. */
|
|
3535
|
+
interface User extends SessionUser {
|
|
3536
|
+
roles: string[];
|
|
3537
|
+
status: "active" | "invited" | "suspended";
|
|
3538
|
+
lastActive?: string;
|
|
3539
|
+
}
|
|
3540
|
+
interface Session {
|
|
3541
|
+
user: User;
|
|
3542
|
+
roles: Role[];
|
|
3543
|
+
permissions: string[];
|
|
3544
|
+
/** Resolved flag key → on/off for THIS user. */
|
|
3545
|
+
flags: Record<string, boolean>;
|
|
3546
|
+
allRoles: Role[];
|
|
3547
|
+
allFlags: Flag[];
|
|
3548
|
+
allUsers: User[];
|
|
3549
|
+
}
|
|
3550
|
+
interface FlagExplanation {
|
|
3551
|
+
on: boolean;
|
|
3552
|
+
reason: string;
|
|
3553
|
+
detail: string;
|
|
3554
|
+
}
|
|
3555
|
+
/** roadmap()'s per-flag result row. Not declared in session.d.ts (roadmap() itself is one of
|
|
3556
|
+
* the six SessionKit members missing from that file) — inferred from what roadmap() actually
|
|
3557
|
+
* builds and returns for each flag. */
|
|
3558
|
+
interface RoadmapItem {
|
|
3559
|
+
key: string;
|
|
3560
|
+
label: string;
|
|
3561
|
+
project: string;
|
|
3562
|
+
description: string;
|
|
3563
|
+
backend?: string;
|
|
3564
|
+
effort?: string;
|
|
3565
|
+
owner?: string;
|
|
3566
|
+
dependsOn: string[];
|
|
3567
|
+
screen: string | null;
|
|
3568
|
+
enabled: boolean;
|
|
3569
|
+
/** Which build phase this sits in, and why that phase comes where it does. */
|
|
3570
|
+
phase?: number;
|
|
3571
|
+
phaseName: string;
|
|
3572
|
+
phaseWhy: string | null;
|
|
3573
|
+
phaseStart: string | null;
|
|
3574
|
+
/** Derived, not stored: whether every endpoint the feature needs is wired. */
|
|
3575
|
+
implemented: boolean;
|
|
3576
|
+
date: string | null;
|
|
3577
|
+
/** True when the only date on record is when the UI was designed, not when it ships. */
|
|
3578
|
+
dateIsDesign: boolean;
|
|
3579
|
+
status: "shipped" | "next" | "planned";
|
|
3580
|
+
}
|
|
3581
|
+
/** roadmap()'s return shape. */
|
|
3582
|
+
interface RoadmapResult {
|
|
3583
|
+
items: RoadmapItem[];
|
|
3584
|
+
/** Index of the first unshipped item — everything above it is history. */
|
|
3585
|
+
nextIndex: number;
|
|
3586
|
+
shipped: number;
|
|
3587
|
+
remaining: number;
|
|
3588
|
+
}
|
|
3589
|
+
/** Stable 0–99 bucket from a string, so rollout answers never flicker between reloads. */
|
|
3590
|
+
declare function bucket(seed: string): number;
|
|
3591
|
+
/** Build the session document a real GET /me would return. */
|
|
3592
|
+
declare function buildSession(userId: string, overrides?: {
|
|
3593
|
+
users?: User[];
|
|
3594
|
+
roles?: Role[];
|
|
3595
|
+
flags?: Flag[];
|
|
3596
|
+
}): Session;
|
|
3597
|
+
/** The precedence rule, in one place so the admin UI and the app can never disagree. */
|
|
3598
|
+
declare function evaluateFlag(flag: Flag, user: User): boolean;
|
|
3599
|
+
/** Why a flag resolved the way it did — shown in the admin UI, invaluable in support. */
|
|
3600
|
+
declare function explainFlag(flag: Flag, user: User): FlagExplanation;
|
|
3601
|
+
declare global {
|
|
3602
|
+
interface Window {
|
|
3603
|
+
/** Admin-app-injected overrides for the demo dataset, read by loadSession(). */
|
|
3604
|
+
__FD_ADMIN_OVERRIDES?: {
|
|
3605
|
+
users?: User[];
|
|
3606
|
+
roles?: Role[];
|
|
3607
|
+
flags?: Flag[];
|
|
3608
|
+
};
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
/** Replace this with `fetch(API + "/me")` to go live. */
|
|
3612
|
+
declare function loadSession(userId?: string): Session;
|
|
3613
|
+
declare function getSession(): Session;
|
|
3614
|
+
declare function setActiveUser(userId: string): Session;
|
|
3615
|
+
/** Local profile edits persist so the demo keeps them across reloads. */
|
|
3616
|
+
declare function saveProfile(patch: Partial<User>): User;
|
|
3617
|
+
/** Recompute after the admin app mutates users/roles/flags. */
|
|
3618
|
+
declare function refresh(): Session;
|
|
3619
|
+
declare function subscribe(fn: (s: Session) => void): () => void;
|
|
3620
|
+
declare function can(permission: string | string[]): boolean;
|
|
3621
|
+
declare function canAny(permissions: string[]): boolean;
|
|
3622
|
+
declare function hasRole(roleId: string): boolean;
|
|
3623
|
+
declare function flagOn(key: string): boolean;
|
|
3624
|
+
/** The flag registry entry, whatever the session shape.
|
|
3625
|
+
* Not declared in session.d.ts — see the module doc comment on SessionKit below. */
|
|
3626
|
+
declare function findFlag(key: string): Flag | null;
|
|
3627
|
+
declare function flagState(key: string): "on" | "off";
|
|
3628
|
+
declare function isEnabled(key: string): boolean;
|
|
3629
|
+
declare function flagVisible(key: string): boolean;
|
|
3630
|
+
declare function flagLive(key: string): boolean;
|
|
3631
|
+
declare function roadmap(overrides?: {
|
|
3632
|
+
flags?: Flag[];
|
|
3633
|
+
isComplete?: (key: string) => boolean;
|
|
3634
|
+
}): RoadmapResult;
|
|
3635
|
+
/** React binding. Re-renders on user switch, profile save, or admin mutation. */
|
|
3636
|
+
declare function useSession(): Session;
|
|
3637
|
+
/**
|
|
3638
|
+
* Session, RBAC and feature flags for every flytedesk app.
|
|
3639
|
+
*
|
|
3640
|
+
* Not a security boundary: permissions gate the UI so people aren't shown affordances they
|
|
3641
|
+
* cannot use. The server must re-check all of it.
|
|
3642
|
+
*
|
|
3643
|
+
* To go live, replace loadSession() with a fetch of GET /me → { user, roles, permissions, flags }.
|
|
3644
|
+
*/
|
|
3645
|
+
declare const SessionKit: {
|
|
3646
|
+
PERMISSION_CATALOG: PermissionGroup[];
|
|
3647
|
+
ALL_PERMISSIONS: string[];
|
|
3648
|
+
ROLES: Role[];
|
|
3649
|
+
FLAGS: Flag[];
|
|
3650
|
+
USERS: User[];
|
|
3651
|
+
loadSession: typeof loadSession;
|
|
3652
|
+
getSession: typeof getSession;
|
|
3653
|
+
setActiveUser: typeof setActiveUser;
|
|
3654
|
+
saveProfile: typeof saveProfile;
|
|
3655
|
+
refresh: typeof refresh;
|
|
3656
|
+
subscribe: typeof subscribe;
|
|
3657
|
+
can: typeof can;
|
|
3658
|
+
canAny: typeof canAny;
|
|
3659
|
+
hasRole: typeof hasRole;
|
|
3660
|
+
flagOn: typeof flagOn;
|
|
3661
|
+
useSession: typeof useSession;
|
|
3662
|
+
findFlag: typeof findFlag;
|
|
3663
|
+
flagState: typeof flagState;
|
|
3664
|
+
isEnabled: typeof isEnabled;
|
|
3665
|
+
flagVisible: typeof flagVisible;
|
|
3666
|
+
flagLive: typeof flagLive;
|
|
3667
|
+
roadmap: typeof roadmap;
|
|
3668
|
+
evaluateFlag: typeof evaluateFlag;
|
|
3669
|
+
explainFlag: typeof explainFlag;
|
|
3670
|
+
bucket: typeof bucket;
|
|
3671
|
+
buildSession: typeof buildSession;
|
|
3672
|
+
};
|
|
3673
|
+
/**
|
|
3674
|
+
* Mounts the built-in fixture `SessionKit` behind the same `SessionProvider` contract every
|
|
3675
|
+
* session-aware component reads (see `kits/sessionContext.tsx`). This is the ONLY place the
|
|
3676
|
+
* demo fixture is wired to that contract — AccountMenu/Gate/ProfilePage/AppSwitcher never
|
|
3677
|
+
* import `SessionKit` directly, so a real app supplying its own `<SessionProvider value={...}>`
|
|
3678
|
+
* gets identical behavior with no demo-only code path left running underneath it.
|
|
3679
|
+
*
|
|
3680
|
+
* `demo` is populated on the resulting context value, which is what lets AccountMenu show
|
|
3681
|
+
* "View as another member" here and nowhere else: a real session simply never sets it.
|
|
3682
|
+
*/
|
|
3683
|
+
declare function DemoSessionProvider({ children }: {
|
|
3684
|
+
children?: React.ReactNode;
|
|
3685
|
+
}): React.FunctionComponentElement<SessionProviderProps>;
|
|
3488
3686
|
|
|
3489
3687
|
interface TableQuery {
|
|
3490
3688
|
/** 1-indexed. */
|
|
@@ -3758,4 +3956,4 @@ interface VersionStore<TState, TDiff = unknown> {
|
|
|
3758
3956
|
}
|
|
3759
3957
|
declare function createVersionStore<TState, TDiff = unknown>(initialState: TState, options?: CreateVersionStoreOptions<TState, TDiff>): VersionStore<TState, TDiff>;
|
|
3760
3958
|
|
|
3761
|
-
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 };
|
|
3959
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, 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, 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, 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 };
|