@danxbot/ui 20.16.0 → 20.17.1

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.
@@ -15,7 +15,7 @@ export interface AccessRequest {
15
15
  requestedAt: string;
16
16
  /** ISO instant. Shown while the request is pending. */
17
17
  expiresAt?: string;
18
- /** The short code the requester also displays. Compared by eye, never entered. */
18
+ /** The short code the requester also displays. Compared by eye, or typed back when `confirmCodeEntry` is set. */
19
19
  confirmCode: string;
20
20
  /** The label of the role granted. Shown once the request is approved or claimed. */
21
21
  roleLabel?: string;
@@ -41,6 +41,11 @@ export interface AccessRequestPanelProps {
41
41
  * that nothing was granted.
42
42
  */
43
43
  expiredNote?: ExpiredNote;
44
+ /**
45
+ * Opt in to typing the confirm code instead of comparing it by eye: the code is not rendered, a field takes it, and Approve is
46
+ * disabled until what was typed matches `request.confirmCode`, ignoring case and spaces. Deny stays available.
47
+ */
48
+ confirmCodeEntry?: boolean;
44
49
  className?: string;
45
50
  }
46
- export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, className, }: AccessRequestPanelProps): import("react").JSX.Element;
51
+ export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, confirmCodeEntry, className, }: AccessRequestPanelProps): import("react").JSX.Element;
@@ -15,6 +15,19 @@ export declare function ApprovalHeader({ title, state }: {
15
15
  export declare function ConfirmCodeCallout({ code }: {
16
16
  code: string;
17
17
  }): import("react").JSX.Element;
18
+ /** A typed confirm code is compared in upper case with every space removed; dashes are part of the code. */
19
+ export declare function normalizeConfirmCode(value: string): string;
20
+ /** True when what was typed is the expected code, in either case and ignoring spaces. */
21
+ export declare function confirmCodeMatches(typed: string, expected: string): boolean;
22
+ /**
23
+ * The entry step for a confirm code (DX-4467): the approver types the code the requester shows instead of reading it
24
+ * off this screen, so the code is never rendered here and cannot be copied from the page.
25
+ */
26
+ export declare function ConfirmCodeEntry({ expected, value, onValueChange }: {
27
+ expected: string;
28
+ value: string;
29
+ onValueChange: (next: string) => void;
30
+ }): import("react").JSX.Element;
18
31
  /** The readout for a settled request: the tone and title are shared, the sentence says what it meant for this requester. */
19
32
  export declare function TerminalCallout({ state, children }: {
20
33
  state: Exclude<AccessRequestState, "pending">;
@@ -58,7 +58,15 @@ export declare class DragSession {
58
58
  private emit;
59
59
  registerItem(reg: ItemRegistration): () => void;
60
60
  registerContainer(reg: ContainerRegistration): () => void;
61
- /** Registered order, used by keyboard container stepping. */
61
+ /**
62
+ * Document order, used by keyboard container stepping.
63
+ *
64
+ * DX-4590: NOT registration order. A container re-registers whenever its
65
+ * `total`, `offset` or `axis` changes (a delete + re-add, which moves it to the
66
+ * end of the Map), and a lane or toggle that mounts later registers later, so
67
+ * registration order drifts away from the screen and ArrowLeft/Right skip lanes
68
+ * or reach them out of order. Document order is what the user sees.
69
+ */
62
70
  containerIds(): string[];
63
71
  /**
64
72
  * Re-measure. Called at pickup, and by the sensors on scroll, resize and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "20.16.0",
3
+ "version": "20.17.1",
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",