@danxbot/ui 15.25.0 → 15.26.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.
@@ -1,8 +1,10 @@
1
1
  import type { IconName } from "../Icon";
2
2
  import type { ChatFile } from "./types";
3
+ /** What a file is, before anyone decides what it looks like. */
4
+ export type FileKind = "image" | "video" | "audio" | "code" | "text" | "archive" | "table" | "file";
3
5
  export type FileIdentity = Pick<ChatFile, "name" | "mimeType">;
4
6
  /**
5
- * The icon for a file, from its mime type and, when that says nothing, its
7
+ * What a file is, from its mime type and, when that says nothing, its
6
8
  * extension.
7
9
  *
8
10
  * No mime type is normal — a file dragged from some sources arrives without
@@ -10,8 +12,10 @@ export type FileIdentity = Pick<ChatFile, "name" | "mimeType">;
10
12
  * The extension is the next best signal, and guessing from it beats a generic
11
13
  * icon for the formats people actually attach.
12
14
  */
13
- export declare function fileIconFor(file: FileIdentity): IconName;
14
- /** An image by mime type or extension. */
15
+ export declare function fileKindOf(file: FileIdentity): FileKind;
16
+ /** The icon a kind of file wears when it has no picture. */
17
+ export declare const fileKindIcon: (kind: FileKind) => IconName;
18
+ /** The icon for a file. */
19
+ export declare const fileIconFor: (file: FileIdentity) => IconName;
15
20
  export declare const isImageFile: (file: FileIdentity) => boolean;
16
- /** A video by mime type or extension — `circle-play` is the video kind's icon alone. */
17
21
  export declare const isVideoFile: (file: FileIdentity) => boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A ref callback that reports a media element which had ALREADY failed when
3
+ * React committed it. DX-3982.
4
+ *
5
+ * A source the browser rejects at once fails BEFORE React commits the element,
6
+ * and React drops an event for an uncommitted node — so `onError` never runs
7
+ * and the element sits at 0:00 forever. The element's own `error` is the
8
+ * record of that, read at commit. Pair it with `onError` for failures that
9
+ * arrive after.
10
+ */
11
+ export declare const reportCommittedError: (onFailed: () => void) => (el: HTMLMediaElement | null) => void;
@@ -1,8 +1,10 @@
1
1
  export interface AccountMenuProps {
2
2
  onNavigateProfile?: () => void;
3
3
  onNavigateRoles?: () => void;
4
+ /** Where the role line leads — the page listing every granted permission. Omitted → the line is plain text. */
5
+ onNavigateAccess?: () => void;
4
6
  onSwitchTeam?: (teamId: string) => void;
5
7
  onSignOut?: () => void;
6
8
  className?: string;
7
9
  }
8
- export declare function AccountMenu({ onNavigateProfile, onNavigateRoles, onSwitchTeam, onSignOut, className, }: AccountMenuProps): import("react").JSX.Element;
10
+ export declare function AccountMenu({ onNavigateProfile, onNavigateRoles, onNavigateAccess, onSwitchTeam, onSignOut, className, }: AccountMenuProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "15.25.0",
3
+ "version": "15.26.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",