@alfadocs/ui-kit-debug 0.54.0 → 0.56.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.
Files changed (120) hide show
  1. package/dist/_chunks/otp-input-xQ4Ps5VY.js +279 -0
  2. package/dist/_chunks/otp-input-xQ4Ps5VY.js.map +1 -0
  3. package/dist/_chunks/{pdf-viewer-4odMFuFW.js → pdf-viewer-XxWdtKfD.js} +63 -58
  4. package/dist/_chunks/pdf-viewer-XxWdtKfD.js.map +1 -0
  5. package/dist/_chunks/{sign-document-BzHTjMVC.js → sign-document-BmAT0kKD.js} +3 -3
  6. package/dist/_chunks/{sign-document-BzHTjMVC.js.map → sign-document-BmAT0kKD.js.map} +1 -1
  7. package/dist/_chunks/{signature-capture-CHbrKoA_.js → signature-capture-COi0Uiqu.js} +22 -7
  8. package/dist/_chunks/signature-capture-COi0Uiqu.js.map +1 -0
  9. package/dist/_chunks/use-signing-session-CyOZWinp.js +147 -0
  10. package/dist/_chunks/{use-signing-session-C5evzYmo.js.map → use-signing-session-CyOZWinp.js.map} +1 -1
  11. package/dist/agent-catalog.json +1 -1
  12. package/dist/components/otp-input/index.js +1 -1
  13. package/dist/components/otp-input/otp-input.d.ts +13 -1
  14. package/dist/components/otp-input/otp-input.d.ts.map +1 -1
  15. package/dist/components/pdf-viewer/index.js +1 -1
  16. package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
  17. package/dist/components/sign-document/index.js +1 -1
  18. package/dist/components/signature-capture/index.js +1 -1
  19. package/dist/components/signature-capture/signature-capture.d.ts.map +1 -1
  20. package/dist/hooks/index.js +1 -1
  21. package/dist/hooks/use-signing-session.d.ts +8 -0
  22. package/dist/hooks/use-signing-session.d.ts.map +1 -1
  23. package/dist/i18n/locales/ar.d.ts +1 -0
  24. package/dist/i18n/locales/ar.d.ts.map +1 -1
  25. package/dist/i18n/locales/ar.js +2 -1
  26. package/dist/i18n/locales/ar.js.map +1 -1
  27. package/dist/i18n/locales/de.d.ts +1 -0
  28. package/dist/i18n/locales/de.d.ts.map +1 -1
  29. package/dist/i18n/locales/de.js +2 -1
  30. package/dist/i18n/locales/de.js.map +1 -1
  31. package/dist/i18n/locales/el.d.ts +1 -0
  32. package/dist/i18n/locales/el.d.ts.map +1 -1
  33. package/dist/i18n/locales/el.js +2 -1
  34. package/dist/i18n/locales/el.js.map +1 -1
  35. package/dist/i18n/locales/en.d.ts +1 -0
  36. package/dist/i18n/locales/en.d.ts.map +1 -1
  37. package/dist/i18n/locales/en.js +2 -1
  38. package/dist/i18n/locales/en.js.map +1 -1
  39. package/dist/i18n/locales/es.d.ts +1 -0
  40. package/dist/i18n/locales/es.d.ts.map +1 -1
  41. package/dist/i18n/locales/es.js +2 -1
  42. package/dist/i18n/locales/es.js.map +1 -1
  43. package/dist/i18n/locales/fr.d.ts +1 -0
  44. package/dist/i18n/locales/fr.d.ts.map +1 -1
  45. package/dist/i18n/locales/fr.js +2 -1
  46. package/dist/i18n/locales/fr.js.map +1 -1
  47. package/dist/i18n/locales/hi.d.ts +1 -0
  48. package/dist/i18n/locales/hi.d.ts.map +1 -1
  49. package/dist/i18n/locales/hi.js +2 -1
  50. package/dist/i18n/locales/hi.js.map +1 -1
  51. package/dist/i18n/locales/it.d.ts +1 -0
  52. package/dist/i18n/locales/it.d.ts.map +1 -1
  53. package/dist/i18n/locales/it.js +2 -1
  54. package/dist/i18n/locales/it.js.map +1 -1
  55. package/dist/i18n/locales/ja.d.ts +1 -0
  56. package/dist/i18n/locales/ja.d.ts.map +1 -1
  57. package/dist/i18n/locales/ja.js +2 -1
  58. package/dist/i18n/locales/ja.js.map +1 -1
  59. package/dist/i18n/locales/nl.d.ts +1 -0
  60. package/dist/i18n/locales/nl.d.ts.map +1 -1
  61. package/dist/i18n/locales/nl.js +2 -1
  62. package/dist/i18n/locales/nl.js.map +1 -1
  63. package/dist/i18n/locales/pl.d.ts +1 -0
  64. package/dist/i18n/locales/pl.d.ts.map +1 -1
  65. package/dist/i18n/locales/pl.js +2 -1
  66. package/dist/i18n/locales/pl.js.map +1 -1
  67. package/dist/i18n/locales/pt.d.ts +1 -0
  68. package/dist/i18n/locales/pt.d.ts.map +1 -1
  69. package/dist/i18n/locales/pt.js +2 -1
  70. package/dist/i18n/locales/pt.js.map +1 -1
  71. package/dist/i18n/locales/ro.d.ts +1 -0
  72. package/dist/i18n/locales/ro.d.ts.map +1 -1
  73. package/dist/i18n/locales/ro.js +2 -1
  74. package/dist/i18n/locales/ro.js.map +1 -1
  75. package/dist/i18n/locales/ru.d.ts +1 -0
  76. package/dist/i18n/locales/ru.d.ts.map +1 -1
  77. package/dist/i18n/locales/ru.js +2 -1
  78. package/dist/i18n/locales/ru.js.map +1 -1
  79. package/dist/i18n/locales/sq.d.ts +1 -0
  80. package/dist/i18n/locales/sq.d.ts.map +1 -1
  81. package/dist/i18n/locales/sq.js +2 -1
  82. package/dist/i18n/locales/sq.js.map +1 -1
  83. package/dist/i18n/locales/sv.d.ts +1 -0
  84. package/dist/i18n/locales/sv.d.ts.map +1 -1
  85. package/dist/i18n/locales/sv.js +2 -1
  86. package/dist/i18n/locales/sv.js.map +1 -1
  87. package/dist/i18n/locales/tr.d.ts +1 -0
  88. package/dist/i18n/locales/tr.d.ts.map +1 -1
  89. package/dist/i18n/locales/tr.js +2 -1
  90. package/dist/i18n/locales/tr.js.map +1 -1
  91. package/dist/i18n/locales/zh.d.ts +1 -0
  92. package/dist/i18n/locales/zh.d.ts.map +1 -1
  93. package/dist/i18n/locales/zh.js +2 -1
  94. package/dist/i18n/locales/zh.js.map +1 -1
  95. package/dist/index.js +5 -5
  96. package/dist/locales/ar.json +2 -1
  97. package/dist/locales/de.json +2 -1
  98. package/dist/locales/el.json +2 -1
  99. package/dist/locales/en.json +2 -1
  100. package/dist/locales/es.json +2 -1
  101. package/dist/locales/fr.json +2 -1
  102. package/dist/locales/hi.json +2 -1
  103. package/dist/locales/it.json +2 -1
  104. package/dist/locales/ja.json +2 -1
  105. package/dist/locales/nl.json +2 -1
  106. package/dist/locales/pl.json +2 -1
  107. package/dist/locales/pt.json +2 -1
  108. package/dist/locales/ro.json +2 -1
  109. package/dist/locales/ru.json +2 -1
  110. package/dist/locales/sq.json +2 -1
  111. package/dist/locales/sv.json +2 -1
  112. package/dist/locales/tr.json +2 -1
  113. package/dist/locales/zh.json +2 -1
  114. package/dist/tokens.css +1 -1
  115. package/package.json +1 -1
  116. package/dist/_chunks/otp-input-Chb9r5vf.js +0 -268
  117. package/dist/_chunks/otp-input-Chb9r5vf.js.map +0 -1
  118. package/dist/_chunks/pdf-viewer-4odMFuFW.js.map +0 -1
  119. package/dist/_chunks/signature-capture-CHbrKoA_.js.map +0 -1
  120. package/dist/_chunks/use-signing-session-C5evzYmo.js +0 -108
@@ -0,0 +1,147 @@
1
+ import { useRef as E, useEffect as B, useState as h, useMemo as I, useCallback as g } from "react";
2
+ function R(o) {
3
+ return o != null && o.current ? o.current : typeof document > "u" ? null : document;
4
+ }
5
+ function T(o, s) {
6
+ const r = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(o) : (
7
+ // SSR / jsdom fallback — drop every character that's
8
+ // significant in a CSS attribute selector. Conservative but
9
+ // robust enough for the test environment.
10
+ o.replace(/["'\\[\]]/g, "")
11
+ ), c = `[data-error-anchor="${r}"], [name="${r}"], [name$="[${r}]"]`, l = Array.from(s.querySelectorAll(c));
12
+ return l.length === 0 ? null : l.find((f) => f.offsetParent !== null) ?? l[0];
13
+ }
14
+ function q(o, s, r = {}) {
15
+ const {
16
+ scope: c,
17
+ scrollOptions: l = { behavior: "smooth", block: "center" },
18
+ focus: p = !0,
19
+ skipInitialMount: f = !0
20
+ } = r, t = E(!1), a = E(null), i = s.find((m) => !!o[m]) ?? null;
21
+ B(() => {
22
+ if (f && !t.current) {
23
+ t.current = !0, a.current = i;
24
+ return;
25
+ }
26
+ if (!i) {
27
+ a.current = null;
28
+ return;
29
+ }
30
+ if (i === a.current || typeof window > "u") return;
31
+ const m = window.requestAnimationFrame(() => {
32
+ const F = R(c);
33
+ if (!F) return;
34
+ const S = T(i, F);
35
+ S && (S.scrollIntoView(l), p && S.focus({ preventScroll: !0 }), a.current = i);
36
+ });
37
+ return () => window.cancelAnimationFrame(m);
38
+ }, [i]);
39
+ }
40
+ function k(o, s = !1) {
41
+ const r = {};
42
+ for (const c of o)
43
+ r[c.id] = { signed: s ? !1 : !!c.signed };
44
+ return r;
45
+ }
46
+ function M(o) {
47
+ const [s, r] = h(
48
+ () => k(o)
49
+ ), [c, l] = h(null), [p, f] = h(
50
+ () => {
51
+ var n;
52
+ return ((n = o[0]) == null ? void 0 : n.id) ?? null;
53
+ }
54
+ ), t = I(
55
+ () => o.map((n) => {
56
+ const e = s[n.id];
57
+ return {
58
+ ...n,
59
+ signed: e ? e.signed : !!n.signed,
60
+ payload: e == null ? void 0 : e.payload
61
+ };
62
+ }),
63
+ [o, s]
64
+ ), a = I(
65
+ () => t.reduce((n, e) => e.signed ? n + 1 : n, 0),
66
+ [t]
67
+ ), i = t.length, m = i > 0 && a === i, F = g((n) => {
68
+ l(n);
69
+ }, []), S = g(() => {
70
+ l(null);
71
+ }, []), v = g((n, e) => {
72
+ r((u) => ({ ...u, [n]: { signed: !0, payload: e } })), l((u) => u === n ? null : u);
73
+ }, []), w = g(
74
+ (n) => {
75
+ var e;
76
+ return !!((e = s[n]) != null && e.signed);
77
+ },
78
+ [s]
79
+ ), y = g(() => {
80
+ var n;
81
+ r(k(o, !0)), l(null), f(((n = o[0]) == null ? void 0 : n.id) ?? null);
82
+ }, [o]), C = g(() => {
83
+ f((n) => {
84
+ const e = t.length;
85
+ if (e === 0) return null;
86
+ const u = n ? t.findIndex((d) => d.id === n) : -1;
87
+ return t[(u + 1 + e) % e].id;
88
+ });
89
+ }, [t]), x = g(() => {
90
+ f((n) => {
91
+ const e = t.length;
92
+ if (e === 0) return null;
93
+ const u = n ? t.findIndex((d) => d.id === n) : 0;
94
+ return t[(u - 1 + e) % e].id;
95
+ });
96
+ }, [t]), b = g(() => {
97
+ f((n) => {
98
+ const e = t.length;
99
+ if (e === 0) return n;
100
+ const u = n ? t.findIndex((d) => d.id === n) : -1;
101
+ for (let d = 1; d <= e; d += 1) {
102
+ const A = t[(u + d) % e];
103
+ if (!A.signed) return A.id;
104
+ }
105
+ return n;
106
+ });
107
+ }, [t]);
108
+ return I(
109
+ () => ({
110
+ fields: t,
111
+ signedCount: a,
112
+ total: i,
113
+ isComplete: m,
114
+ activeFieldId: c,
115
+ openField: F,
116
+ closeField: S,
117
+ markSigned: v,
118
+ isFieldSigned: w,
119
+ reset: y,
120
+ cursorFieldId: p,
121
+ goToNextField: C,
122
+ goToPreviousField: x,
123
+ goToNextUnsigned: b
124
+ }),
125
+ [
126
+ t,
127
+ a,
128
+ i,
129
+ m,
130
+ c,
131
+ F,
132
+ S,
133
+ v,
134
+ w,
135
+ y,
136
+ p,
137
+ C,
138
+ x,
139
+ b
140
+ ]
141
+ );
142
+ }
143
+ export {
144
+ M as a,
145
+ q as u
146
+ };
147
+ //# sourceMappingURL=use-signing-session-CyOZWinp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-signing-session-C5evzYmo.js","sources":["../../src/hooks/use-scroll-to-first-error.ts","../../src/hooks/use-signing-session.ts"],"sourcesContent":["import { useEffect, useRef, type RefObject } from 'react';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\nexport interface UseScrollToFirstErrorOptions {\n /**\n * Limits the DOM query to this element. Useful when the page renders\n * more than one form, or when an unrelated component happens to share\n * a field name. Defaults to `document`.\n */\n scope?: RefObject<HTMLElement | null>;\n /**\n * Forwarded to `scrollIntoView`. Defaults to\n * `{ behavior: 'smooth', block: 'center' }`. Pass\n * `{ behavior: 'auto' }` (or omit `behavior`) on consumers that\n * respect `prefers-reduced-motion` upstream — the kit doesn't shadow\n * the user's motion preference inside the hook, since some consumers\n * deliberately keep a near-instant snap for power-user form flows.\n */\n scrollOptions?: ScrollIntoViewOptions;\n /**\n * Move keyboard focus to the errored field after scrolling. Default\n * `true`. The focus call uses `preventScroll: true` so the smooth\n * scroll the hook just did isn't replaced by a snap.\n *\n * Setting this `false` defeats the keyboard-user side of WCAG 3.3.1\n * — the viewport will scroll but the active element stays on the\n * submit button, forcing a Shift+Tab back into the form. Only flip\n * this off when an upstream concern (e.g. a custom error summary\n * panel that owns its own focus) is taking responsibility.\n */\n focus?: boolean;\n /**\n * On the very first render, do nothing even if `errors` already has\n * entries. Default `true`. Without this the hook would yank the\n * viewport whenever a form is hydrated with server-rendered errors\n * from a no-JS fallback path — bad UX, since the user landed on the\n * page and hasn't asked for any movement yet. Set `false` only when\n * the consumer explicitly wants the initial-mount scroll (rare).\n */\n skipInitialMount?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction getScopeRoot(\n scope: RefObject<HTMLElement | null> | undefined,\n): ParentNode | null {\n if (scope?.current) return scope.current;\n if (typeof document === 'undefined') return null;\n return document;\n}\n\n/**\n * Resolve the DOM element to scroll/focus for a given errored field\n * name. The match order is:\n *\n * 1. `[data-error-anchor=\"<name>\"]` — the consumer's explicit hook,\n * used for Radix-based fields (Checkbox / Select / Switch) where\n * the named `<input>` is hidden behind a visible `<button>`.\n * Consumers set this on the trigger.\n * 2. `[name=\"<name>\"]` — the literal field name.\n * 3. `[name$=\"[<name>]\"]` — Symfony form-prefixed names like\n * `privacy_generator[fiscal_code]`. Suffix match keeps the hook\n * consumer-agnostic; no need to thread the form prefix through.\n *\n * Returns the first visible element among the matches. \"Visible\" here\n * means `offsetParent !== null` — that's the cheap heuristic Radix's\n * hidden inputs (display:none-equivalent positioning) fail and the\n * visible triggers pass. Falls back to the first match if every match\n * is hidden, so a field can still be scrolled into view even when the\n * trigger uses a non-standard layout.\n */\nfunction findErrorElement(name: string, root: ParentNode): HTMLElement | null {\n // `CSS.escape` is load-bearing here, not cosmetic. The Symfony\n // suffix-match arm embeds `name` inside `[name$=\"[${safe}]\"]`, so a\n // field name containing `]` would otherwise close the attribute\n // selector early and turn the rest of the string into stray\n // selector tokens. We don't expect adversarial input in practice\n // (server-controlled field names), but a server returning a `]`\n // in a 422 payload shouldn't be able to break the query.\n const safe =\n typeof CSS !== 'undefined' && typeof CSS.escape === 'function'\n ? CSS.escape(name)\n : // SSR / jsdom fallback — drop every character that's\n // significant in a CSS attribute selector. Conservative but\n // robust enough for the test environment.\n name.replace(/[\"'\\\\[\\]]/g, '');\n const selector =\n `[data-error-anchor=\"${safe}\"], ` +\n `[name=\"${safe}\"], ` +\n `[name$=\"[${safe}]\"]`;\n\n const matches = Array.from(root.querySelectorAll<HTMLElement>(selector));\n if (matches.length === 0) return null;\n\n const visible = matches.find((el) => el.offsetParent !== null);\n return visible ?? matches[0];\n}\n\n/* -------------------------------------------------------------------- */\n/* Hook */\n/* -------------------------------------------------------------------- */\n\n/**\n * Scrolls the first errored field into view and (by default) focuses\n * it, after `errors` changes. Backs the standard AlfaDocs rebrand\n * validation-error UX: after a 422 with `{ errors: { field: message } }`\n * is rendered inline, the user shouldn't be left staring at red labels\n * they can't see. Implements WCAG 3.3.1 / 3.3.3.\n *\n * The hook is stateless and never mutates the DOM beyond the\n * `scrollIntoView` + `focus` calls.\n *\n * @example\n * const fieldOrder = ['firstName', 'email', 'fiscalCode'] as const;\n * const [errors, setErrors] = useState<Record<string, string>>({});\n * useScrollToFirstError(errors, fieldOrder);\n *\n * @example Radix-based field\n * <Checkbox data-error-anchor=\"consent\" name=\"consent\" />\n * // hook scrolls to the visible <button>, not Radix's hidden input.\n *\n * @example Scoped to one form\n * const formRef = useRef<HTMLFormElement>(null);\n * useScrollToFirstError(errors, fieldOrder, { scope: formRef });\n */\nexport function useScrollToFirstError(\n errors: Readonly<Record<string, string | undefined>>,\n fieldOrder: ReadonlyArray<string>,\n options: UseScrollToFirstErrorOptions = {},\n): void {\n const {\n scope,\n scrollOptions = { behavior: 'smooth', block: 'center' },\n focus = true,\n skipInitialMount = true,\n } = options;\n\n // Single ref guards the initial-mount skip across StrictMode's\n // mount/unmount/remount cycle — flipped inside the effect body, not\n // in cleanup, so the second run sees `true` and stays gated.\n const ranOnceRef = useRef(false);\n\n // Track the previous \"first errored field name\" so a re-render that\n // leaves the same field errored doesn't re-scroll. We intentionally\n // depend on the resolved name (not the whole errors object) — that\n // way callers can mutate `errors` shape freely as long as the head\n // of the validation list is stable, which is the typical pattern\n // after a server returns the same 422 twice in a row.\n const lastScrolledFieldRef = useRef<string | null>(null);\n\n // Resolve the first errored field by visual order. A field is\n // \"errored\" iff its key has a truthy string value — the kit's form\n // contract is `Record<string, string | undefined>` where `undefined`\n // / missing keys mean \"no error\".\n const firstErroredField =\n fieldOrder.find((name) => Boolean(errors[name])) ?? null;\n\n useEffect(() => {\n if (skipInitialMount && !ranOnceRef.current) {\n ranOnceRef.current = true;\n // Record what we skipped so the next render doesn't try to\n // scroll to a field that was already errored at mount.\n lastScrolledFieldRef.current = firstErroredField;\n return;\n }\n\n if (!firstErroredField) {\n lastScrolledFieldRef.current = null;\n return;\n }\n\n if (firstErroredField === lastScrolledFieldRef.current) return;\n\n if (typeof window === 'undefined') return;\n\n // rAF defers the scroll until after the browser has laid out the\n // freshly-rendered error labels. Calling scrollIntoView synchronously\n // inside useEffect would fire before the new DOM is painted on\n // some browsers, leaving the viewport pointing at the old layout.\n const handle = window.requestAnimationFrame(() => {\n const root = getScopeRoot(scope);\n if (!root) return;\n const el = findErrorElement(firstErroredField, root);\n if (!el) return;\n\n el.scrollIntoView(scrollOptions);\n if (focus) {\n // preventScroll: true so the browser doesn't override the\n // smooth scroll above with a snap to put the element at the\n // top of the viewport.\n el.focus({ preventScroll: true });\n }\n lastScrolledFieldRef.current = firstErroredField;\n });\n\n return () => window.cancelAnimationFrame(handle);\n // `scrollOptions` / `focus` / `scope` / `skipInitialMount` are\n // option bag values — re-running on their identity change would\n // be surprising. The hook re-fires only when the field at the\n // head of the errored list changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [firstErroredField]);\n}\n","import { useCallback, useMemo, useState } from 'react';\n\n/* ------------------------------------------------------------------ */\n/* useSigningSession */\n/* */\n/* Orchestration state for a multi-field signing flow: N signature */\n/* fields across M pages (and optionally multiple PDFs per envelope), */\n/* a live \"X of Y signed\" counter, and a completion gate. Pure state — */\n/* no I/O, no globals, no persistence. The consumer owns the documents, */\n/* the capture UI, and where signatures are sent. */\n/* */\n/* Generic over the field shape (so geometry / page / docIndex / label */\n/* ride along untouched and `fields` can map straight onto SignatureField)*/\n/* and over the captured payload type (typically SignatureConfirmPayload).*/\n/* */\n/* The SET of field ids and their initial `signed` flags are captured at */\n/* first render — an envelope's fields are fixed for the session. Field */\n/* geometry/label changes still flow through `fields` on every render. */\n/* ------------------------------------------------------------------ */\n\n/** Minimum shape a signing field must satisfy. */\nexport interface SigningFieldBase {\n /** Stable, unique id for the field within the session. */\n id: string;\n /** Initial signed state (default `false`). */\n signed?: boolean;\n}\n\ninterface SignedEntry<TPayload> {\n signed: boolean;\n payload?: TPayload;\n}\n\n/** A consumer field enriched with the session's live signed state + payload. */\nexport type SigningField<TField extends SigningFieldBase, TPayload> = TField & {\n signed: boolean;\n payload?: TPayload;\n};\n\nexport interface UseSigningSessionReturn<\n TField extends SigningFieldBase,\n TPayload,\n> {\n /** The input fields, each enriched with live `signed` + `payload`. */\n fields: SigningField<TField, TPayload>[];\n /** How many fields are currently signed. */\n signedCount: number;\n /** Total number of fields. */\n total: number;\n /** True when every field is signed (and there is at least one). */\n isComplete: boolean;\n /** The field whose capture UI is currently open, or `null`. */\n activeFieldId: string | null;\n /** Open a field's capture UI (sets `activeFieldId`). */\n openField: (id: string) => void;\n /** Close any open capture UI (clears `activeFieldId`). */\n closeField: () => void;\n /** Flip a field to signed, storing its payload, and close it if active. */\n markSigned: (id: string, payload?: TPayload) => void;\n /** Read a single field's signed state. */\n isFieldSigned: (id: string) => boolean;\n /** Clear all signatures and close any open field. */\n reset: () => void;\n}\n\nfunction seedSigned<TField extends SigningFieldBase, TPayload>(\n fields: TField[],\n forceUnsigned = false,\n): Record<string, SignedEntry<TPayload>> {\n const map: Record<string, SignedEntry<TPayload>> = {};\n for (const field of fields) {\n map[field.id] = { signed: forceUnsigned ? false : Boolean(field.signed) };\n }\n return map;\n}\n\nexport function useSigningSession<\n TField extends SigningFieldBase,\n TPayload = unknown,\n>(fields: TField[]): UseSigningSessionReturn<TField, TPayload> {\n const [signed, setSigned] = useState<Record<string, SignedEntry<TPayload>>>(\n () => seedSigned<TField, TPayload>(fields),\n );\n const [activeFieldId, setActiveFieldId] = useState<string | null>(null);\n\n const enriched = useMemo<SigningField<TField, TPayload>[]>(\n () =>\n fields.map((field) => {\n const entry = signed[field.id];\n return {\n ...field,\n signed: entry ? entry.signed : Boolean(field.signed),\n payload: entry?.payload,\n };\n }),\n [fields, signed],\n );\n\n const signedCount = useMemo(\n () =>\n enriched.reduce((count, field) => (field.signed ? count + 1 : count), 0),\n [enriched],\n );\n const total = enriched.length;\n const isComplete = total > 0 && signedCount === total;\n\n const openField = useCallback((id: string) => {\n setActiveFieldId(id);\n }, []);\n\n const closeField = useCallback(() => {\n setActiveFieldId(null);\n }, []);\n\n const markSigned = useCallback((id: string, payload?: TPayload) => {\n setSigned((prev) => ({ ...prev, [id]: { signed: true, payload } }));\n setActiveFieldId((current) => (current === id ? null : current));\n }, []);\n\n const isFieldSigned = useCallback(\n (id: string) => Boolean(signed[id]?.signed),\n [signed],\n );\n\n const reset = useCallback(() => {\n setSigned(seedSigned<TField, TPayload>(fields, true));\n setActiveFieldId(null);\n }, [fields]);\n\n return useMemo(\n () => ({\n fields: enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n }),\n [\n enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n ],\n );\n}\n"],"names":["getScopeRoot","scope","findErrorElement","name","root","safe","selector","matches","el","useScrollToFirstError","errors","fieldOrder","options","scrollOptions","focus","skipInitialMount","ranOnceRef","useRef","lastScrolledFieldRef","firstErroredField","useEffect","handle","seedSigned","fields","forceUnsigned","map","field","useSigningSession","signed","setSigned","useState","activeFieldId","setActiveFieldId","enriched","useMemo","entry","signedCount","count","total","isComplete","openField","useCallback","id","closeField","markSigned","payload","prev","current","isFieldSigned","_a","reset"],"mappings":";AAiDA,SAASA,EACPC,GACmB;AACnB,SAAIA,KAAA,QAAAA,EAAO,UAAgBA,EAAM,UAC7B,OAAO,WAAa,MAAoB,OACrC;AACT;AAsBA,SAASC,EAAiBC,GAAcC,GAAsC;AAQ5E,QAAMC,IACJ,OAAO,MAAQ,OAAe,OAAO,IAAI,UAAW,aAChD,IAAI,OAAOF,CAAI;AAAA;AAAA;AAAA;AAAA,IAIfA,EAAK,QAAQ,cAAc,EAAE;AAAA,KAC7BG,IACJ,uBAAuBD,CAAI,cACjBA,CAAI,gBACFA,CAAI,OAEZE,IAAU,MAAM,KAAKH,EAAK,iBAA8BE,CAAQ,CAAC;AACvE,SAAIC,EAAQ,WAAW,IAAU,OAEjBA,EAAQ,KAAK,CAACC,MAAOA,EAAG,iBAAiB,IAAI,KAC3CD,EAAQ,CAAC;AAC7B;AA6BO,SAASE,EACdC,GACAC,GACAC,IAAwC,CAAA,GAClC;AACN,QAAM;AAAA,IACJ,OAAAX;AAAA,IACA,eAAAY,IAAgB,EAAE,UAAU,UAAU,OAAO,SAAA;AAAA,IAC7C,OAAAC,IAAQ;AAAA,IACR,kBAAAC,IAAmB;AAAA,EAAA,IACjBH,GAKEI,IAAaC,EAAO,EAAK,GAQzBC,IAAuBD,EAAsB,IAAI,GAMjDE,IACJR,EAAW,KAAK,CAACR,MAAS,EAAQO,EAAOP,CAAI,CAAE,KAAK;AAEtD,EAAAiB,EAAU,MAAM;AACd,QAAIL,KAAoB,CAACC,EAAW,SAAS;AAC3C,MAAAA,EAAW,UAAU,IAGrBE,EAAqB,UAAUC;AAC/B;AAA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-first-error.ts","../../src/hooks/use-signing-session.ts"],"sourcesContent":["import { useEffect, useRef, type RefObject } from 'react';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\nexport interface UseScrollToFirstErrorOptions {\n /**\n * Limits the DOM query to this element. Useful when the page renders\n * more than one form, or when an unrelated component happens to share\n * a field name. Defaults to `document`.\n */\n scope?: RefObject<HTMLElement | null>;\n /**\n * Forwarded to `scrollIntoView`. Defaults to\n * `{ behavior: 'smooth', block: 'center' }`. Pass\n * `{ behavior: 'auto' }` (or omit `behavior`) on consumers that\n * respect `prefers-reduced-motion` upstream — the kit doesn't shadow\n * the user's motion preference inside the hook, since some consumers\n * deliberately keep a near-instant snap for power-user form flows.\n */\n scrollOptions?: ScrollIntoViewOptions;\n /**\n * Move keyboard focus to the errored field after scrolling. Default\n * `true`. The focus call uses `preventScroll: true` so the smooth\n * scroll the hook just did isn't replaced by a snap.\n *\n * Setting this `false` defeats the keyboard-user side of WCAG 3.3.1\n * — the viewport will scroll but the active element stays on the\n * submit button, forcing a Shift+Tab back into the form. Only flip\n * this off when an upstream concern (e.g. a custom error summary\n * panel that owns its own focus) is taking responsibility.\n */\n focus?: boolean;\n /**\n * On the very first render, do nothing even if `errors` already has\n * entries. Default `true`. Without this the hook would yank the\n * viewport whenever a form is hydrated with server-rendered errors\n * from a no-JS fallback path — bad UX, since the user landed on the\n * page and hasn't asked for any movement yet. Set `false` only when\n * the consumer explicitly wants the initial-mount scroll (rare).\n */\n skipInitialMount?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction getScopeRoot(\n scope: RefObject<HTMLElement | null> | undefined,\n): ParentNode | null {\n if (scope?.current) return scope.current;\n if (typeof document === 'undefined') return null;\n return document;\n}\n\n/**\n * Resolve the DOM element to scroll/focus for a given errored field\n * name. The match order is:\n *\n * 1. `[data-error-anchor=\"<name>\"]` — the consumer's explicit hook,\n * used for Radix-based fields (Checkbox / Select / Switch) where\n * the named `<input>` is hidden behind a visible `<button>`.\n * Consumers set this on the trigger.\n * 2. `[name=\"<name>\"]` — the literal field name.\n * 3. `[name$=\"[<name>]\"]` — Symfony form-prefixed names like\n * `privacy_generator[fiscal_code]`. Suffix match keeps the hook\n * consumer-agnostic; no need to thread the form prefix through.\n *\n * Returns the first visible element among the matches. \"Visible\" here\n * means `offsetParent !== null` — that's the cheap heuristic Radix's\n * hidden inputs (display:none-equivalent positioning) fail and the\n * visible triggers pass. Falls back to the first match if every match\n * is hidden, so a field can still be scrolled into view even when the\n * trigger uses a non-standard layout.\n */\nfunction findErrorElement(name: string, root: ParentNode): HTMLElement | null {\n // `CSS.escape` is load-bearing here, not cosmetic. The Symfony\n // suffix-match arm embeds `name` inside `[name$=\"[${safe}]\"]`, so a\n // field name containing `]` would otherwise close the attribute\n // selector early and turn the rest of the string into stray\n // selector tokens. We don't expect adversarial input in practice\n // (server-controlled field names), but a server returning a `]`\n // in a 422 payload shouldn't be able to break the query.\n const safe =\n typeof CSS !== 'undefined' && typeof CSS.escape === 'function'\n ? CSS.escape(name)\n : // SSR / jsdom fallback — drop every character that's\n // significant in a CSS attribute selector. Conservative but\n // robust enough for the test environment.\n name.replace(/[\"'\\\\[\\]]/g, '');\n const selector =\n `[data-error-anchor=\"${safe}\"], ` +\n `[name=\"${safe}\"], ` +\n `[name$=\"[${safe}]\"]`;\n\n const matches = Array.from(root.querySelectorAll<HTMLElement>(selector));\n if (matches.length === 0) return null;\n\n const visible = matches.find((el) => el.offsetParent !== null);\n return visible ?? matches[0];\n}\n\n/* -------------------------------------------------------------------- */\n/* Hook */\n/* -------------------------------------------------------------------- */\n\n/**\n * Scrolls the first errored field into view and (by default) focuses\n * it, after `errors` changes. Backs the standard AlfaDocs rebrand\n * validation-error UX: after a 422 with `{ errors: { field: message } }`\n * is rendered inline, the user shouldn't be left staring at red labels\n * they can't see. Implements WCAG 3.3.1 / 3.3.3.\n *\n * The hook is stateless and never mutates the DOM beyond the\n * `scrollIntoView` + `focus` calls.\n *\n * @example\n * const fieldOrder = ['firstName', 'email', 'fiscalCode'] as const;\n * const [errors, setErrors] = useState<Record<string, string>>({});\n * useScrollToFirstError(errors, fieldOrder);\n *\n * @example Radix-based field\n * <Checkbox data-error-anchor=\"consent\" name=\"consent\" />\n * // hook scrolls to the visible <button>, not Radix's hidden input.\n *\n * @example Scoped to one form\n * const formRef = useRef<HTMLFormElement>(null);\n * useScrollToFirstError(errors, fieldOrder, { scope: formRef });\n */\nexport function useScrollToFirstError(\n errors: Readonly<Record<string, string | undefined>>,\n fieldOrder: ReadonlyArray<string>,\n options: UseScrollToFirstErrorOptions = {},\n): void {\n const {\n scope,\n scrollOptions = { behavior: 'smooth', block: 'center' },\n focus = true,\n skipInitialMount = true,\n } = options;\n\n // Single ref guards the initial-mount skip across StrictMode's\n // mount/unmount/remount cycle — flipped inside the effect body, not\n // in cleanup, so the second run sees `true` and stays gated.\n const ranOnceRef = useRef(false);\n\n // Track the previous \"first errored field name\" so a re-render that\n // leaves the same field errored doesn't re-scroll. We intentionally\n // depend on the resolved name (not the whole errors object) — that\n // way callers can mutate `errors` shape freely as long as the head\n // of the validation list is stable, which is the typical pattern\n // after a server returns the same 422 twice in a row.\n const lastScrolledFieldRef = useRef<string | null>(null);\n\n // Resolve the first errored field by visual order. A field is\n // \"errored\" iff its key has a truthy string value — the kit's form\n // contract is `Record<string, string | undefined>` where `undefined`\n // / missing keys mean \"no error\".\n const firstErroredField =\n fieldOrder.find((name) => Boolean(errors[name])) ?? null;\n\n useEffect(() => {\n if (skipInitialMount && !ranOnceRef.current) {\n ranOnceRef.current = true;\n // Record what we skipped so the next render doesn't try to\n // scroll to a field that was already errored at mount.\n lastScrolledFieldRef.current = firstErroredField;\n return;\n }\n\n if (!firstErroredField) {\n lastScrolledFieldRef.current = null;\n return;\n }\n\n if (firstErroredField === lastScrolledFieldRef.current) return;\n\n if (typeof window === 'undefined') return;\n\n // rAF defers the scroll until after the browser has laid out the\n // freshly-rendered error labels. Calling scrollIntoView synchronously\n // inside useEffect would fire before the new DOM is painted on\n // some browsers, leaving the viewport pointing at the old layout.\n const handle = window.requestAnimationFrame(() => {\n const root = getScopeRoot(scope);\n if (!root) return;\n const el = findErrorElement(firstErroredField, root);\n if (!el) return;\n\n el.scrollIntoView(scrollOptions);\n if (focus) {\n // preventScroll: true so the browser doesn't override the\n // smooth scroll above with a snap to put the element at the\n // top of the viewport.\n el.focus({ preventScroll: true });\n }\n lastScrolledFieldRef.current = firstErroredField;\n });\n\n return () => window.cancelAnimationFrame(handle);\n // `scrollOptions` / `focus` / `scope` / `skipInitialMount` are\n // option bag values — re-running on their identity change would\n // be surprising. The hook re-fires only when the field at the\n // head of the errored list changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [firstErroredField]);\n}\n","import { useCallback, useMemo, useState } from 'react';\n\n/* ------------------------------------------------------------------ */\n/* useSigningSession */\n/* */\n/* Orchestration state for a multi-field signing flow: N signature */\n/* fields across M pages (and optionally multiple PDFs per envelope), */\n/* a live \"X of Y signed\" counter, and a completion gate. Pure state — */\n/* no I/O, no globals, no persistence. The consumer owns the documents, */\n/* the capture UI, and where signatures are sent. */\n/* */\n/* Generic over the field shape (so geometry / page / docIndex / label */\n/* ride along untouched and `fields` can map straight onto SignatureField)*/\n/* and over the captured payload type (typically SignatureConfirmPayload).*/\n/* */\n/* The SET of field ids and their initial `signed` flags are captured at */\n/* first render — an envelope's fields are fixed for the session. Field */\n/* geometry/label changes still flow through `fields` on every render. */\n/* ------------------------------------------------------------------ */\n\n/** Minimum shape a signing field must satisfy. */\nexport interface SigningFieldBase {\n /** Stable, unique id for the field within the session. */\n id: string;\n /** Initial signed state (default `false`). */\n signed?: boolean;\n}\n\ninterface SignedEntry<TPayload> {\n signed: boolean;\n payload?: TPayload;\n}\n\n/** A consumer field enriched with the session's live signed state + payload. */\nexport type SigningField<TField extends SigningFieldBase, TPayload> = TField & {\n signed: boolean;\n payload?: TPayload;\n};\n\nexport interface UseSigningSessionReturn<\n TField extends SigningFieldBase,\n TPayload,\n> {\n /** The input fields, each enriched with live `signed` + `payload`. */\n fields: SigningField<TField, TPayload>[];\n /** How many fields are currently signed. */\n signedCount: number;\n /** Total number of fields. */\n total: number;\n /** True when every field is signed (and there is at least one). */\n isComplete: boolean;\n /** The field whose capture UI is currently open, or `null`. */\n activeFieldId: string | null;\n /** Open a field's capture UI (sets `activeFieldId`). */\n openField: (id: string) => void;\n /** Close any open capture UI (clears `activeFieldId`). */\n closeField: () => void;\n /** Flip a field to signed, storing its payload, and close it if active. */\n markSigned: (id: string, payload?: TPayload) => void;\n /** Read a single field's signed state. */\n isFieldSigned: (id: string) => boolean;\n /** Clear all signatures and close any open field. */\n reset: () => void;\n /** The field currently targeted by next/previous navigation, or `null`. */\n cursorFieldId: string | null;\n /** Move the navigation cursor to the next field (input order, cycling). */\n goToNextField: () => void;\n /** Move the navigation cursor to the previous field (cycling). */\n goToPreviousField: () => void;\n /** Move the cursor to the next still-unsigned field (cycling); no-op if all signed. */\n goToNextUnsigned: () => void;\n}\n\nfunction seedSigned<TField extends SigningFieldBase, TPayload>(\n fields: TField[],\n forceUnsigned = false,\n): Record<string, SignedEntry<TPayload>> {\n const map: Record<string, SignedEntry<TPayload>> = {};\n for (const field of fields) {\n map[field.id] = { signed: forceUnsigned ? false : Boolean(field.signed) };\n }\n return map;\n}\n\nexport function useSigningSession<\n TField extends SigningFieldBase,\n TPayload = unknown,\n>(fields: TField[]): UseSigningSessionReturn<TField, TPayload> {\n const [signed, setSigned] = useState<Record<string, SignedEntry<TPayload>>>(\n () => seedSigned<TField, TPayload>(fields),\n );\n const [activeFieldId, setActiveFieldId] = useState<string | null>(null);\n const [cursorFieldId, setCursorFieldId] = useState<string | null>(\n () => fields[0]?.id ?? null,\n );\n\n const enriched = useMemo<SigningField<TField, TPayload>[]>(\n () =>\n fields.map((field) => {\n const entry = signed[field.id];\n return {\n ...field,\n signed: entry ? entry.signed : Boolean(field.signed),\n payload: entry?.payload,\n };\n }),\n [fields, signed],\n );\n\n const signedCount = useMemo(\n () =>\n enriched.reduce((count, field) => (field.signed ? count + 1 : count), 0),\n [enriched],\n );\n const total = enriched.length;\n const isComplete = total > 0 && signedCount === total;\n\n const openField = useCallback((id: string) => {\n setActiveFieldId(id);\n }, []);\n\n const closeField = useCallback(() => {\n setActiveFieldId(null);\n }, []);\n\n const markSigned = useCallback((id: string, payload?: TPayload) => {\n setSigned((prev) => ({ ...prev, [id]: { signed: true, payload } }));\n setActiveFieldId((current) => (current === id ? null : current));\n }, []);\n\n const isFieldSigned = useCallback(\n (id: string) => Boolean(signed[id]?.signed),\n [signed],\n );\n\n const reset = useCallback(() => {\n setSigned(seedSigned<TField, TPayload>(fields, true));\n setActiveFieldId(null);\n setCursorFieldId(fields[0]?.id ?? null);\n }, [fields]);\n\n const goToNextField = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return null;\n const i = cur ? enriched.findIndex((f) => f.id === cur) : -1;\n return enriched[(i + 1 + len) % len].id;\n });\n }, [enriched]);\n\n const goToPreviousField = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return null;\n const i = cur ? enriched.findIndex((f) => f.id === cur) : 0;\n return enriched[(i - 1 + len) % len].id;\n });\n }, [enriched]);\n\n const goToNextUnsigned = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return cur;\n const start = cur ? enriched.findIndex((f) => f.id === cur) : -1;\n for (let step = 1; step <= len; step += 1) {\n const field = enriched[(start + step) % len];\n if (!field.signed) return field.id;\n }\n return cur;\n });\n }, [enriched]);\n\n return useMemo(\n () => ({\n fields: enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n cursorFieldId,\n goToNextField,\n goToPreviousField,\n goToNextUnsigned,\n }),\n [\n enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n cursorFieldId,\n goToNextField,\n goToPreviousField,\n goToNextUnsigned,\n ],\n );\n}\n"],"names":["getScopeRoot","scope","findErrorElement","name","root","safe","selector","matches","el","useScrollToFirstError","errors","fieldOrder","options","scrollOptions","focus","skipInitialMount","ranOnceRef","useRef","lastScrolledFieldRef","firstErroredField","useEffect","handle","seedSigned","fields","forceUnsigned","map","field","useSigningSession","signed","setSigned","useState","activeFieldId","setActiveFieldId","cursorFieldId","setCursorFieldId","_a","enriched","useMemo","entry","signedCount","count","total","isComplete","openField","useCallback","id","closeField","markSigned","payload","prev","current","isFieldSigned","reset","goToNextField","cur","len","i","f","goToPreviousField","goToNextUnsigned","start","step"],"mappings":";AAiDA,SAASA,EACPC,GACmB;AACnB,SAAIA,KAAA,QAAAA,EAAO,UAAgBA,EAAM,UAC7B,OAAO,WAAa,MAAoB,OACrC;AACT;AAsBA,SAASC,EAAiBC,GAAcC,GAAsC;AAQ5E,QAAMC,IACJ,OAAO,MAAQ,OAAe,OAAO,IAAI,UAAW,aAChD,IAAI,OAAOF,CAAI;AAAA;AAAA;AAAA;AAAA,IAIfA,EAAK,QAAQ,cAAc,EAAE;AAAA,KAC7BG,IACJ,uBAAuBD,CAAI,cACjBA,CAAI,gBACFA,CAAI,OAEZE,IAAU,MAAM,KAAKH,EAAK,iBAA8BE,CAAQ,CAAC;AACvE,SAAIC,EAAQ,WAAW,IAAU,OAEjBA,EAAQ,KAAK,CAACC,MAAOA,EAAG,iBAAiB,IAAI,KAC3CD,EAAQ,CAAC;AAC7B;AA6BO,SAASE,EACdC,GACAC,GACAC,IAAwC,CAAA,GAClC;AACN,QAAM;AAAA,IACJ,OAAAX;AAAA,IACA,eAAAY,IAAgB,EAAE,UAAU,UAAU,OAAO,SAAA;AAAA,IAC7C,OAAAC,IAAQ;AAAA,IACR,kBAAAC,IAAmB;AAAA,EAAA,IACjBH,GAKEI,IAAaC,EAAO,EAAK,GAQzBC,IAAuBD,EAAsB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AAAA,MACA,eAAAnB;AAAA,MACA,eAAAoB;AAAA,MACA,mBAAAK;AAAA,MACA,kBAAAC;AAAA,IAAA;AAAA,IAEF;AAAA,MACEvB;AAAA,MACAG;AAAA,MACAE;AAAA,MACAC;AAAA,MACAX;AAAA,MACAY;AAAA,MACAG;AAAA,MACAC;AAAA,MACAI;AAAA,MACAC;AAAA,MACAnB;AAAA,MACAoB;AAAA,MACAK;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.54.0",
3
+ "packageVersion": "0.56.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { O as r } from "../../_chunks/otp-input-Chb9r5vf.js";
1
+ import { O as r } from "../../_chunks/otp-input-xQ4Ps5VY.js";
2
2
  export {
3
3
  r as OTPInput
4
4
  };
@@ -1,3 +1,4 @@
1
+ export type OTPMode = 'numeric' | 'alphanumeric';
1
2
  /** Agent-readiness curated handle for OTPInput. */
2
3
  export interface OTPInputHandle {
3
4
  getValue: () => string;
@@ -7,7 +8,11 @@ export interface OTPInputHandle {
7
8
  isComplete: () => boolean;
8
9
  }
9
10
  export interface OTPInputProps {
10
- length?: 4 | 6 | 8;
11
+ /**
12
+ * Number of boxes. Default 6. Any integer in [3, 10] is honoured;
13
+ * out-of-range values are clamped (with a DEV warning).
14
+ */
15
+ length?: number;
11
16
  value?: string;
12
17
  defaultValue?: string;
13
18
  onChange?: (value: string) => void;
@@ -40,6 +45,13 @@ export interface OTPInputProps {
40
45
  * `sms_code_form[code]`. Default off — no behaviour change.
41
46
  */
42
47
  name?: string;
48
+ /**
49
+ * Character set. `numeric` (default) accepts digits only (with Arabic-Indic
50
+ * digit folding) — byte-identical to prior behaviour. `alphanumeric` accepts
51
+ * `[A-Za-z0-9]`, uppercases the value, and switches the boxes to text input
52
+ * (for SMS codes that mix letters and digits).
53
+ */
54
+ mode?: OTPMode;
43
55
  }
44
56
  export declare const OTPInput: import("react").ForwardRefExoticComponent<OTPInputProps & import("react").RefAttributes<OTPInputHandle>>;
45
57
  //# sourceMappingURL=otp-input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"otp-input.d.ts","sourceRoot":"","sources":["../../../src/components/otp-input/otp-input.tsx"],"names":[],"mappings":"AAsBA,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AA0BD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAqBD,eAAO,MAAM,QAAQ,0GA0PpB,CAAC"}
1
+ {"version":3,"file":"otp-input.d.ts","sourceRoot":"","sources":["../../../src/components/otp-input/otp-input.tsx"],"names":[],"mappings":"AAsBA,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAEjD,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AA0BD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAiDD,eAAO,MAAM,QAAQ,0GAgRpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { P as p, p as a } from "../../_chunks/pdf-viewer-4odMFuFW.js";
1
+ import { P as p, p as a } from "../../_chunks/pdf-viewer-XxWdtKfD.js";
2
2
  export {
3
3
  p as PDFViewer,
4
4
  a as pdfViewerAgent
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-viewer.d.ts","sourceRoot":"","sources":["../../../src/components/pdf-viewer/pdf-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BAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { S as o, s } from "../../_chunks/sign-document-BzHTjMVC.js";
1
+ import { S as o, s } from "../../_chunks/sign-document-BmAT0kKD.js";
2
2
  export {
3
3
  o as SignDocument,
4
4
  s as signDocumentAgent
@@ -1,4 +1,4 @@
1
- import { S as r, s as t } from "../../_chunks/signature-capture-CHbrKoA_.js";
1
+ import { S as r, s as t } from "../../_chunks/signature-capture-COi0Uiqu.js";
2
2
  export {
3
3
  r as SignatureCapture,
4
4
  t as signatureCaptureAgent
@@ -1 +1 @@
1
- {"version":3,"file":"signature-capture.d.ts","sourceRoot":"","sources":["../../../src/components/signature-capture/signature-capture.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAUhD,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACvD,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;CACxD;AAMD,QAAA,MAAM,eAAe,oFAWpB,CAAC;AAsCF,QAAA,MAAM,oBAAoB,oFAqBzB,CAAC;AAEF,QAAA,MAAM,qBAAqB,oFAmB1B,CAAC;AA+JF,eAAO,MAAM,gBAAgB,0HA+e5B,CAAC;AAIF,OAAO,EACL,eAAe,IAAI,wBAAwB,EAC3C,oBAAoB,IAAI,6BAA6B,EACrD,qBAAqB,IAAI,8BAA8B,GACxD,CAAC"}
1
+ {"version":3,"file":"signature-capture.d.ts","sourceRoot":"","sources":["../../../src/components/signature-capture/signature-capture.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAUhD,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2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,oFAqBzB,CAAC;AAEF,QAAA,MAAM,qBAAqB,oFAmB1B,CAAC;AAkKF,eAAO,MAAM,gBAAgB,0HA+e5B,CAAC;AAIF,OAAO,EACL,eAAe,IAAI,wBAAwB,EAC3C,oBAAoB,IAAI,6BAA6B,EACrD,qBAAqB,IAAI,8BAA8B,GACxD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { u as v } from "../_chunks/use-prefers-reduced-motion-BMwIQRjB.js";
2
2
  import { u as D } from "../_chunks/use-media-query-CcAx5SMM.js";
3
- import { u as g, a as _ } from "../_chunks/use-signing-session-C5evzYmo.js";
3
+ import { u as g, a as _ } from "../_chunks/use-signing-session-CyOZWinp.js";
4
4
  import { u as O } from "../_chunks/use-count-up-BLLetaZ8.js";
5
5
  import { u as k } from "../_chunks/use-locale-BkCIHujH.js";
6
6
  import { A as K, T as H, a as M, r as Y, t as q, u as B } from "../_chunks/use-theme-CAuo6EYT.js";
@@ -31,6 +31,14 @@ export interface UseSigningSessionReturn<TField extends SigningFieldBase, TPaylo
31
31
  isFieldSigned: (id: string) => boolean;
32
32
  /** Clear all signatures and close any open field. */
33
33
  reset: () => void;
34
+ /** The field currently targeted by next/previous navigation, or `null`. */
35
+ cursorFieldId: string | null;
36
+ /** Move the navigation cursor to the next field (input order, cycling). */
37
+ goToNextField: () => void;
38
+ /** Move the navigation cursor to the previous field (cycling). */
39
+ goToPreviousField: () => void;
40
+ /** Move the cursor to the next still-unsigned field (cycling); no-op if all signed. */
41
+ goToNextUnsigned: () => void;
34
42
  }
35
43
  export declare function useSigningSession<TField extends SigningFieldBase, TPayload = unknown>(fields: TField[]): UseSigningSessionReturn<TField, TPayload>;
36
44
  //# sourceMappingURL=use-signing-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-signing-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-signing-session.ts"],"names":[],"mappings":"AAoBA,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,E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D,wBAAgB,iBAAiB,CAC/B,MAAM,SAAS,gBAAgB,EAC/B,QAAQ,GAAG,OAAO,EAClB,MAAM,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAuH7D"}
@@ -147,6 +147,7 @@ export declare const arUi: {
147
147
  };
148
148
  readonly otp: {
149
149
  readonly digitLabel: "الرقم {{current}} من {{total}}";
150
+ readonly charLabel: "الحرف {{current}} من {{total}}";
150
151
  };
151
152
  readonly slider: {
152
153
  readonly minLabel: "الحد الأدنى";
@@ -1 +1 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/ar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6lFP,CAAC"}
@@ -139,7 +139,8 @@ const e = {
139
139
  clear: "مسح الاختيار"
140
140
  },
141
141
  otp: {
142
- digitLabel: "الرقم {{current}} من {{total}}"
142
+ digitLabel: "الرقم {{current}} من {{total}}",
143
+ charLabel: "الحرف {{current}} من {{total}}"
143
144
  },
144
145
  slider: {
145
146
  minLabel: "الحد الأدنى",