@danxbot/ui 16.2.1 → 17.0.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.
@@ -0,0 +1,39 @@
1
+ import type { ReactNode } from "react";
2
+ import type { Permission, Role } from "./types";
3
+ export interface ApiKey {
4
+ id: number;
5
+ name: string;
6
+ /** The `Role.id` this key acts with. */
7
+ roleId: string;
8
+ /** ISO instant. */
9
+ createdAt: string;
10
+ /** ISO instant, or `null`/omitted if it has never been used. */
11
+ lastUsedAt?: string | null;
12
+ /** ISO instant, or `null`/omitted for a key with no expiry. */
13
+ expiresAt?: string | null;
14
+ }
15
+ export interface ApiKeysPanelProps {
16
+ /** The keys the person made for themselves. */
17
+ keys: ApiKey[];
18
+ /** Keys a worker minted on the person's behalf; listed and revocable, never created here. Omitted or empty hides the group. */
19
+ agentKeys?: ApiKey[];
20
+ /** Every role a key could carry; also resolves each listed key's role label. */
21
+ roles: Role[];
22
+ /** The permission catalog, used to name the permissions that make a role unavailable. */
23
+ permissions: Permission[];
24
+ /** What the key's owner holds. A role holding anything outside this set cannot be chosen. */
25
+ ownPermissionKeys: string[];
26
+ onCreate: (input: {
27
+ name: string;
28
+ roleId: string;
29
+ expiresInDays?: number | null;
30
+ }) => Promise<{
31
+ token: string;
32
+ }>;
33
+ onRevoke: (id: number) => Promise<void>;
34
+ /** The id of a key currently mid-revoke. Disables just that row. */
35
+ busyId?: number | null;
36
+ emptyState?: ReactNode;
37
+ className?: string;
38
+ }
39
+ export declare function ApiKeysPanel({ keys, agentKeys, roles, permissions, ownPermissionKeys, onCreate, onRevoke, busyId, emptyState, className, }: ApiKeysPanelProps): import("react").JSX.Element;
@@ -12,7 +12,7 @@ export * from "./RolesPermissionsPage";
12
12
  export * from "./MembersPanel";
13
13
  export * from "./ChangePasswordForm";
14
14
  export * from "./SessionsList";
15
- export * from "./ApiTokensPanel";
15
+ export * from "./ApiKeysPanel";
16
16
  export * from "./InvitationsList";
17
17
  export * from "./InviteMembersDialog";
18
18
  export * from "./Brand";
@@ -146,7 +146,7 @@ export { cellLabel, eventLabel, formatDateRange, longDate, monthTitle, timeOfDay
146
146
  export { initialFocusDay, isInMonth, nextDayForKey, useGridNavigation, type GridNavigation, type GridNavigationOptions, } from "./components/calendar/use-grid-navigation";
147
147
  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";
148
148
  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";
149
- export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiTokensPanel, 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 ApiTokensPanelProps, type ApiToken, 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";
149
+ export { RBACProvider, useRBAC, Can, useHasPermission, AccountMenu, AccountMenuSection, TeamSwitcher, DevToolsPopover, RolePermissionMatrix, RoleEditorDialog, ProfileForm, ProfilePage, RolesPermissionsPage, MembersPanel, ChangePasswordForm, SessionsList, ApiKeysPanel, 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 ApiKey, 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";
150
150
  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";
151
151
  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";
152
152
  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": "16.2.1",
3
+ "version": "17.0.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",
@@ -1,26 +0,0 @@
1
- import type { ReactNode } from "react";
2
- export interface ApiToken {
3
- id: number;
4
- name: string;
5
- /** ISO instant. */
6
- createdAt: string;
7
- /** ISO instant, or `null`/omitted if it has never been used. */
8
- lastUsedAt?: string | null;
9
- /** ISO instant, or `null`/omitted for a token with no expiry. */
10
- expiresAt?: string | null;
11
- }
12
- export interface ApiTokensPanelProps {
13
- tokens: ApiToken[];
14
- onCreate: (input: {
15
- name: string;
16
- expiresInDays?: number | null;
17
- }) => Promise<{
18
- token: string;
19
- }>;
20
- onRevoke: (id: number) => Promise<void>;
21
- /** The id of a token currently mid-revoke. Disables just that row. */
22
- busyId?: number | null;
23
- emptyState?: ReactNode;
24
- className?: string;
25
- }
26
- export declare function ApiTokensPanel({ tokens, onCreate, onRevoke, busyId, emptyState, className }: ApiTokensPanelProps): import("react").JSX.Element;