@danxbot/ui 20.8.1 → 20.9.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,7 +1,7 @@
1
- import { type AccessRequestState } from "./approvalPanelParts";
1
+ import { type ExpiredNote, type AccessRequestState } from "./approvalPanelParts";
2
2
  import type { Permission, Role } from "./types";
3
3
  export type AccessRequestKind = "session" | "worker";
4
- export type { AccessRequestState };
4
+ export type { AccessRequestState, ExpiredNote };
5
5
  export interface AccessRequest {
6
6
  kind: AccessRequestKind;
7
7
  /** The session title or the worker id: what the requester calls itself. */
@@ -36,6 +36,11 @@ export interface AccessRequestPanelProps {
36
36
  defaultRoleId?: string;
37
37
  onApprove: (roleId: string) => Promise<void>;
38
38
  onDeny: () => Promise<void>;
39
+ /**
40
+ * Why an expired request expired and what its requester does next. Used only in the `expired` state; without it the readout says only
41
+ * that nothing was granted.
42
+ */
43
+ expiredNote?: ExpiredNote;
39
44
  className?: string;
40
45
  }
41
- export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, className, }: AccessRequestPanelProps): import("react").JSX.Element;
46
+ export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, className, }: AccessRequestPanelProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type AccessRequestState } from "./approvalPanelParts";
1
+ import { type AccessRequestState, type ExpiredNote } from "./approvalPanelParts";
2
2
  import type { Permission } from "./types";
3
3
  export interface PermissionRequest {
4
4
  /** The name of the key that is asking: what the agent's key is called. */
@@ -26,6 +26,11 @@ export interface PermissionRequestPanelProps {
26
26
  /** Receives exactly the permission keys left checked. */
27
27
  onApprove: (permissionKeys: string[]) => Promise<void>;
28
28
  onDeny: () => Promise<void>;
29
+ /**
30
+ * Why an expired request expired and what its requester does next. Used only in the `expired` state; without it the readout says only
31
+ * that nothing was granted.
32
+ */
33
+ expiredNote?: ExpiredNote;
29
34
  className?: string;
30
35
  }
31
- export declare function PermissionRequestPanel({ request, state, permissions, ownPermissionKeys, onApprove, onDeny, className, }: PermissionRequestPanelProps): import("react").JSX.Element;
36
+ export declare function PermissionRequestPanel({ request, state, permissions, ownPermissionKeys, onApprove, onDeny, expiredNote, className, }: PermissionRequestPanelProps): import("react").JSX.Element;
@@ -1,5 +1,12 @@
1
1
  import { type ReactNode } from "react";
2
2
  export type AccessRequestState = "pending" | "approved" | "denied" | "expired" | "claimed";
3
+ /** Why a request expired and what its requester does next, in the consumer's words; the Expired readout leads with them. */
4
+ export interface ExpiredNote {
5
+ /** Why the request is over, e.g. "The agent's session ended.". */
6
+ reason: string;
7
+ /** What the requester must do to get access, e.g. "The agent must reconnect and ask again.". */
8
+ nextStep: string;
9
+ }
3
10
  export declare function ApprovalHeader({ title, state }: {
4
11
  title: string;
5
12
  state: AccessRequestState;
@@ -40,4 +47,9 @@ export declare function ApprovalButtons({ busy, run, onApprove, onDeny, approveD
40
47
  /** True when there is nothing valid to approve. Deny is never disabled by this. */
41
48
  approveDisabled: boolean;
42
49
  }): import("react").JSX.Element;
50
+ /** The Expired readout: with a note it names the cause and the requester's next step, without one it only says nothing was granted. */
51
+ export declare function ExpiredNotice({ note, fallback }: {
52
+ note: ExpiredNote | undefined;
53
+ fallback: string;
54
+ }): import("react").JSX.Element;
43
55
  export {};
@@ -152,7 +152,7 @@ export { cellLabel, eventLabel, formatDateRange, longDate, monthTitle, timeOfDay
152
152
  export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type GridNavigation, type GridNavigationOptions, } from "./components/calendar/use-grid-navigation";
153
153
  export { AmbiguousTimeError, addDays, addDuration, addMonths, atMidnight, atTime, comparePlainDate, dayFraction, dayLengthMs, dayOfWeek, daysBetween, daysInMonth, endOfMonth, hoursInDay, instantAtFraction, instantToPlainDate, instantToPlainDateTime, isSameDate, isoDateString, isoDateTimeString, monthGridDays, nextDay, offsetAt, parsePlainDate, plainDateTimeToInstant, relativeAge, startOfDay, startOfMonth, startOfWeek, weekDays, type CalendarDuration, type Disambiguation, type Instant, type PlainDate, type PlainDateTime, type TimeZone, } from "./lib/time";
154
154
  export { allDayBandSegment, dayKey, daySlots, isAllDay, packBand, packLanes, snapFractionToInstant, timeSegments, timedBandSegment, type AllDayEvent, type BandInput, type BandOptions, type BandPlacement, type BandResult, type BandSegment, type CalendarEvent, type CalendarEventId, type CalendarView, type DaySlot, type DragKind, type EventDraft, type EventPalette, type LaneInput, type LaneOptions, type LanePlacement, type PaletteEntry, type TimeSegment, type TimedEvent, type VisibleRange, } from "./lib/calendar";
155
- export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, AgentKeysList, AccessRequestPanel, PermissionRequestPanel, RoleKeyPicker, isRoleSelectable, leastPrivilegeRoleId, InvitationsList, InviteMembersDialog, Brand, TeamSettingsForm, DangerZone, type RBACProviderProps, type RBACHookResult, type CanProps, type AccountMenuProps, type TeamSwitcherProps, type DevToolsPopoverProps, type RolePermissionMatrixProps, type RoleEditorDialogProps, type RoleEditorDialogSubmitInput, type ProfileFormProps, type ProfileFormAccount, type ProfileFormSaveInput, type ProfilePageProps, type RolesPermissionsPageProps, type MembersPanelProps, type MembersPanelMember, type ChangePasswordFormProps, type SessionsListProps, type Session, type ApiKeysPanelProps, type AgentKeysListProps, type ApiKey, type KeyGrant, type KeyRoleEditor, type AccessRequestPanelProps, type AccessRequest, type AccessRequestKind, type AccessRequestState, type PermissionRequestPanelProps, type PermissionRequest, type RoleKeyPickerProps, type InvitationsListProps, type InvitationsListItem, type InvitationStatus, type InviteMembersDialogProps, type Permission, type Role, type User, type Team, type TeamMembership, type BrandProps, type TeamSettingsFormProps, type TeamSettingsFormTeam, type TeamSettingsFormSaveInput, type DangerZoneProps, } from "./components/rbac";
155
+ export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, AgentKeysList, AccessRequestPanel, PermissionRequestPanel, RoleKeyPicker, isRoleSelectable, leastPrivilegeRoleId, InvitationsList, InviteMembersDialog, Brand, TeamSettingsForm, DangerZone, type RBACProviderProps, type RBACHookResult, type CanProps, type AccountMenuProps, type TeamSwitcherProps, type DevToolsPopoverProps, type RolePermissionMatrixProps, type RoleEditorDialogProps, type RoleEditorDialogSubmitInput, type ProfileFormProps, type ProfileFormAccount, type ProfileFormSaveInput, type ProfilePageProps, type RolesPermissionsPageProps, type MembersPanelProps, type MembersPanelMember, type ChangePasswordFormProps, type SessionsListProps, type Session, type ApiKeysPanelProps, type AgentKeysListProps, type ApiKey, type KeyGrant, type KeyRoleEditor, type AccessRequestPanelProps, type AccessRequest, type AccessRequestKind, type AccessRequestState, type ExpiredNote, type PermissionRequestPanelProps, type PermissionRequest, type RoleKeyPickerProps, type InvitationsListProps, type InvitationsListItem, type InvitationStatus, type InviteMembersDialogProps, type Permission, type Role, type User, type Team, type TeamMembership, type BrandProps, type TeamSettingsFormProps, type TeamSettingsFormTeam, type TeamSettingsFormSaveInput, type DangerZoneProps, } from "./components/rbac";
156
156
  export { AuthLayout, AcceptInvitationCard, SignupCard, TermsAcceptance, LoginForm, ForgotPasswordForm, ResetPasswordForm, type AuthLayoutProps, type AcceptInvitationCardProps, type SignupCardProps, type TermsAcceptanceProps, type LoginFormProps, type ForgotPasswordFormProps, type ResetPasswordFormProps, } from "./components/auth";
157
157
  export { UseCaseCard, RoadmapItemCard, RoadmapSwimlaneBoard, UseCaseLedgerPage, RoadmapPage, PhaseManager, TrackManager, deriveRoadmapItemStatus, isFullyBuilt, isUnbuilt, trackIds, trackProgress, toneForIndex, CATEGORY_TONES, type Domain, type Phase, type Track, type RoadmapItem, type RoadmapItemStatus, type UseCase, type UseCaseStatus, type UseCaseDecision, type UseCaseCardProps, type RoadmapItemCardProps, type RoadmapSwimlaneBoardProps, type UseCaseLedgerPageProps, type RoadmapPageProps, type PhaseManagerProps, type TrackManagerProps, } from "./components/roadmap";
158
158
  export { ProvenanceDisclosure, ProvenanceDetail, ProvenanceBadge, ConfidenceReadout, ConfidenceMeter, ConfidenceBar, provenanceStateLabel, confidenceBand, confidenceScore, scoredConfidence, ratedConfidence, type ProvenanceRecord, type ProvenanceState, type ProvenanceSource, type ProvenanceCheck, type ProvenanceCall, type ProvenanceSignoff, type ConfidenceBand, type ConfidenceScore, type ProvenanceConfidence, type ConfidenceReadoutProps, type ConfidenceBarProps, type ConfidenceBarSize, type ProvenanceDisclosureProps, type ProvenanceDetailProps, type ProvenanceDetailTitleAs, type ProvenanceTriggerBadge, type ProvenanceBadgeProps, type ProvenanceBadgeAppearance, type ConfidenceMeterProps, } from "./components/provenance";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "20.8.1",
3
+ "version": "20.9.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",