@pdf-viewer/react 1.17.0-beta.0 → 1.17.0-beta.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.
Files changed (114) hide show
  1. package/dist/ToolbarLayout.module-00eddd49.js +3746 -0
  2. package/dist/assets/style.css +1 -1
  3. package/dist/assets/style.js +1 -1
  4. package/dist/components/RPController.js +7 -6
  5. package/dist/components/RPPages.js +6 -5
  6. package/dist/components/RPProvider.js +7 -6
  7. package/dist/components/layout/LayoutContainer.js +6 -5
  8. package/dist/components/layout/RPDefaultLayout.js +6 -5
  9. package/dist/components/layout/RPLayout.js +28 -25
  10. package/dist/components/layout/SkipLink.js +28 -0
  11. package/dist/components/layout/sidebar/RPSidebar.js +6 -5
  12. package/dist/components/layout/sidebar/Thumbnail.js +6 -5
  13. package/dist/components/layout/sidebar/Thumbnails.js +6 -5
  14. package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
  15. package/dist/components/layout/toolbar/DocumentDialog.js +6 -5
  16. package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
  17. package/dist/components/layout/toolbar/FileDownloadTool.js +6 -5
  18. package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
  19. package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
  20. package/dist/components/layout/toolbar/MenuItem.js +3 -3
  21. package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
  22. package/dist/components/layout/toolbar/MostPageTool.js +6 -5
  23. package/dist/components/layout/toolbar/OtherTool.js +6 -5
  24. package/dist/components/layout/toolbar/Paginate.js +6 -5
  25. package/dist/components/layout/toolbar/PrintTool.js +6 -5
  26. package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
  27. package/dist/components/layout/toolbar/RPMoreOptions.js +17 -16
  28. package/dist/components/layout/toolbar/RPToolbar.js +6 -5
  29. package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
  30. package/dist/components/layout/toolbar/RotateTool.js +3 -3
  31. package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
  32. package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
  33. package/dist/components/layout/toolbar/SearchResultNavigator.js +6 -5
  34. package/dist/components/layout/toolbar/SearchTool.js +6 -5
  35. package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
  36. package/dist/components/layout/toolbar/ThumbnailTool.js +7 -6
  37. package/dist/components/layout/toolbar/ToolbarCustom.js +43 -25
  38. package/dist/components/layout/toolbar/ToolbarDefault.js +38 -28
  39. package/dist/components/layout/toolbar/ToolbarLayout.js +7 -6
  40. package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
  41. package/dist/components/layout/toolbar/ZoomTool.js +6 -5
  42. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +7 -6
  43. package/dist/components/layout/toolbar/tools/DualPageTool.js +17 -24
  44. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +7 -6
  45. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +11 -10
  46. package/dist/components/layout/toolbar/tools/FileUploadTool.js +6 -6
  47. package/dist/components/layout/toolbar/tools/FullScreenTool.js +18 -17
  48. package/dist/components/layout/toolbar/tools/InputPageTool.js +40 -32
  49. package/dist/components/layout/toolbar/tools/NextPageTool.js +15 -13
  50. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +18 -16
  51. package/dist/components/layout/toolbar/tools/PrintTool.js +9 -8
  52. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +13 -6
  53. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +10 -10
  54. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +18 -10
  55. package/dist/components/layout/toolbar/tools/SinglePageTool.js +8 -7
  56. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +12 -4
  57. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +18 -16
  58. package/dist/components/layout/toolbar/tools/ZoomInTool.js +16 -15
  59. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +6 -5
  60. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +75 -40
  61. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +13 -12
  62. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
  63. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +7 -6
  64. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +11 -11
  65. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -17
  66. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +24 -16
  67. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +22 -14
  68. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +38 -21
  69. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -17
  70. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +33 -19
  71. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +47 -29
  72. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +40 -24
  73. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +48 -31
  74. package/dist/components/page/AnnotationLayer.js +6 -5
  75. package/dist/components/page/CanvasLayer.js +6 -5
  76. package/dist/components/page/DualPage.js +6 -5
  77. package/dist/components/page/DualPageWithCover.js +6 -5
  78. package/dist/components/page/RPPage.js +6 -5
  79. package/dist/components/page/SinglePage.js +6 -5
  80. package/dist/components/page/TextHighlightLayer.js +6 -5
  81. package/dist/components/page/TextLayer.js +6 -5
  82. package/dist/components/ui/Button.js +14 -12
  83. package/dist/components/ui/Checkbox.js +75 -68
  84. package/dist/components/ui/DropDown.js +3 -3
  85. package/dist/components/ui/Input.js +12 -11
  86. package/dist/components/ui/LoadingIndicator.js +6 -5
  87. package/dist/components/ui/PasswordModal.js +43 -29
  88. package/dist/components/ui/RPTooltip.js +201 -415
  89. package/dist/contexts/PaginationContext.js +8 -7
  90. package/dist/contexts/PrintContext.js +8 -7
  91. package/dist/contexts/RenderQueueProvider.js +8 -7
  92. package/dist/contexts/SearchContext.js +8 -7
  93. package/dist/contexts/ThumbnailsContext.js +8 -7
  94. package/dist/index-808ea7bf.js +1685 -0
  95. package/dist/index-a48ec088.js +1672 -0
  96. package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
  97. package/dist/main.js +91 -90
  98. package/dist/types/components/layout/SkipLink.d.ts +7 -0
  99. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  100. package/dist/types/utils/annotations.d.ts +10 -0
  101. package/dist/utils/annotations.js +184 -158
  102. package/dist/utils/hooks/useFileDownload.js +6 -5
  103. package/dist/utils/hooks/useLicense.js +1 -1
  104. package/dist/utils/hooks/usePaginate.js +6 -5
  105. package/dist/utils/hooks/usePresentPage.js +6 -5
  106. package/dist/utils/hooks/usePrint.js +6 -5
  107. package/dist/utils/hooks/useScrollToPage.js +6 -5
  108. package/dist/utils/hooks/useSearch.js +6 -5
  109. package/dist/utils/hooks/useThumbnail.js +6 -5
  110. package/dist/utils/hooks/useVirtualReactWindow.js +6 -5
  111. package/package.json +1 -1
  112. package/dist/ToolbarLayout.module-0245d511.js +0 -3653
  113. package/dist/floating-ui.react-dom-6b2fe0df.js +0 -1474
  114. package/dist/index-f563c6f0.js +0 -1889
@@ -1,74 +1,74 @@
1
- import { sanitizeExternalUrl as x } from "./sanitizeExternalUrl.js";
1
+ import { sanitizeExternalUrl as L } from "./sanitizeExternalUrl.js";
2
2
  import { AnnotationType as l } from "./types.js";
3
- import { dateFormatter as I } from "./dateFormatter.js";
3
+ import { dateFormatter as w } from "./dateFormatter.js";
4
4
  import "../th_TH-d1686d95.js";
5
- const v = ["click", "dblclick", "input", "change", "mouseover"], m = /* @__PURE__ */ new Map(), E = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
6
- function B(e, t) {
7
- const n = E(e, t);
8
- return m.has(n) ? m.get(n) ?? null : null;
5
+ const x = ["click", "dblclick", "input", "change", "mouseover"], p = /* @__PURE__ */ new Map(), v = (t, n) => `${t.loadingTask.docId}___${n.num}R${n.gen === 0 ? "" : n.gen}`;
6
+ function _(t, n) {
7
+ const e = v(t, n);
8
+ return p.has(e) ? p.get(e) ?? null : null;
9
9
  }
10
- const S = (e, t, n) => {
11
- m.set(E(e, t), n);
12
- }, A = (e, t) => {
13
- switch (t[1].name) {
10
+ const B = (t, n, e) => {
11
+ p.set(v(t, n), e);
12
+ }, O = (t, n) => {
13
+ switch (n[1].name) {
14
14
  case "XYZ":
15
15
  return {
16
- bottomOffset: (n, a) => t[3] === null ? a : t[3],
17
- leftOffset: (n, a) => t[2] === null ? 0 : t[2],
18
- pageIndex: e,
19
- scaleTo: t[4]
16
+ bottomOffset: (e, a) => n[3] === null ? a : n[3],
17
+ leftOffset: (e, a) => n[2] === null ? 0 : n[2],
18
+ pageIndex: t,
19
+ scaleTo: n[4]
20
20
  };
21
21
  case "Fit":
22
22
  case "FitB":
23
23
  return {
24
24
  bottomOffset: 0,
25
25
  leftOffset: 0,
26
- pageIndex: e,
26
+ pageIndex: t,
27
27
  scaleTo: 1
28
28
  };
29
29
  case "FitH":
30
30
  case "FitBH":
31
31
  return {
32
- bottomOffset: t[2],
32
+ bottomOffset: n[2],
33
33
  leftOffset: 0,
34
- pageIndex: e,
34
+ pageIndex: t,
35
35
  scaleTo: 1
36
36
  };
37
37
  default:
38
38
  return {
39
39
  bottomOffset: 0,
40
40
  leftOffset: 0,
41
- pageIndex: e,
41
+ pageIndex: t,
42
42
  scaleTo: 1
43
43
  };
44
44
  }
45
45
  };
46
- async function L(e, t) {
47
- let n;
48
- if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
49
- const a = n[0], s = B(e, a);
46
+ async function E(t, n) {
47
+ let e;
48
+ if (typeof n == "string" ? e = await t.getDestination(n) : e = n, e && typeof e[0] == "object" && e[0] !== null) {
49
+ const a = e[0], s = _(t, a);
50
50
  if (s === null) {
51
- const r = await e.getPageIndex(a);
52
- return S(e, a, r), await L(e, n);
51
+ const o = await t.getPageIndex(a);
52
+ return B(t, a, o), await E(t, e);
53
53
  } else
54
- return A(s, n);
54
+ return O(s, e);
55
55
  } else
56
- return A(n[0], n);
56
+ return O(e[0], e);
57
57
  }
58
- const P = (e) => {
59
- const n = e.target.parentNode;
60
- if (!n)
58
+ const P = (t) => {
59
+ const e = t.target.parentNode;
60
+ if (!e)
61
61
  return;
62
62
  const a = new MutationObserver((s) => {
63
63
  s.forEach(() => {
64
- n.querySelectorAll(
64
+ e.querySelectorAll(
65
65
  '[data-l10n-id="pdfjs-annotation-date-time-string"]'
66
- ).forEach((o) => {
67
- const c = o.getAttribute("data-l10n-args");
66
+ ).forEach((i) => {
67
+ const c = i.getAttribute("data-l10n-args");
68
68
  if (c) {
69
69
  try {
70
- const { dateObj: i } = JSON.parse(c);
71
- i && (o.textContent = I(i));
70
+ const { dateObj: r } = JSON.parse(c);
71
+ r && (i.textContent = w(r));
72
72
  } catch {
73
73
  }
74
74
  a.disconnect();
@@ -76,7 +76,7 @@ const P = (e) => {
76
76
  });
77
77
  });
78
78
  });
79
- return a.observe(n, {
79
+ return a.observe(e, {
80
80
  childList: !0,
81
81
  // Watch for changes to child elements
82
82
  subtree: !0,
@@ -85,162 +85,186 @@ const P = (e) => {
85
85
  // Watch for changes to attributes
86
86
  }), () => a.disconnect();
87
87
  };
88
- function U(e, t) {
89
- for (const n of v)
90
- e.addEventListener(n, t);
88
+ function U(t, n) {
89
+ for (const e of x)
90
+ t.addEventListener(e, n);
91
91
  }
92
- function D(e, t) {
93
- for (const n of v)
94
- e.removeEventListener(n, t);
92
+ function W(t, n) {
93
+ for (const e of x)
94
+ t.removeEventListener(e, n);
95
95
  }
96
- function V(e) {
97
- const { id: t, url: n, unsafeUrl: a } = e;
98
- new MutationObserver((r, o) => {
99
- const c = document.querySelector(`[data-annotation-id="${t}"]`);
96
+ function j(t) {
97
+ const { id: n, url: e, unsafeUrl: a } = t;
98
+ new MutationObserver((o, i) => {
99
+ const c = document.querySelector(`[data-annotation-id="${n}"]`);
100
100
  if (c) {
101
- const i = c.querySelector("a"), g = x((n || a) ?? "", "");
102
- i && (i == null || i.setAttribute("target", "_blank"), i == null || i.setAttribute("href", g), i == null || i.setAttribute("rel", "noopener noreferrer")), o.disconnect();
101
+ const r = c.querySelector("a"), g = L((e || a) ?? "", "");
102
+ r && (r == null || r.setAttribute("target", "_blank"), r == null || r.setAttribute("href", g), r == null || r.setAttribute("rel", "noopener noreferrer")), i.disconnect();
103
103
  }
104
104
  }).observe(document.body, { childList: !0, subtree: !0 });
105
105
  }
106
- function $(e, t, n) {
107
- const { rotation: a, scale: s } = t, r = a % 180 === 0;
108
- if (e.fieldType === "Btn" && e.pushButton) {
109
- const o = e.rect[2] - e.rect[0], c = e.rect[3] - e.rect[1], i = document.createElement("canvas");
110
- i.setAttribute("width", ((r ? o : c) * s).toString()), i.setAttribute("height", ((r ? c : o) * s).toString()), n.set(e.id, i);
106
+ function V(t, n, e) {
107
+ const { rotation: a, scale: s } = n, o = a % 180 === 0;
108
+ if (t.fieldType === "Btn" && t.pushButton) {
109
+ const i = t.rect[2] - t.rect[0], c = t.rect[3] - t.rect[1], r = document.createElement("canvas");
110
+ r.setAttribute("width", ((o ? i : c) * s).toString()), r.setAttribute("height", ((o ? c : i) * s).toString()), e.set(t.id, r);
111
111
  }
112
112
  }
113
- function w(e) {
114
- var r;
115
- let t = e;
116
- for (; t.tagName !== "SECTION"; )
117
- t = t.parentElement;
118
- const n = t.getAttribute("aria-haspopup") === "dialog", a = t.classList.contains("popupAnnotation");
119
- if (!n && !a)
113
+ function $(t) {
114
+ t.querySelectorAll("[tabindex]").forEach((e) => {
115
+ const a = e.getAttribute("tabindex");
116
+ a && parseInt(a, 10) > 0 && (e.tagName === "A" || e.tagName === "BUTTON" || e.getAttribute("role") === "button" || e.getAttribute("role") === "link" || e.classList.contains("linkAnnotation") ? e.setAttribute("tabindex", "0") : e.removeAttribute("tabindex"));
117
+ });
118
+ }
119
+ function D(t) {
120
+ t.querySelectorAll("a").forEach((e) => {
121
+ const a = e.textContent && e.textContent.trim().length > 0, s = e.getAttribute("aria-label");
122
+ if (!a && !s) {
123
+ const o = e.getAttribute("href") || "";
124
+ let i;
125
+ if (!o || o.startsWith("#") || o.startsWith("javascript:"))
126
+ i = "Link to page in document";
127
+ else
128
+ try {
129
+ i = `External link to ${new URL(o, window.location.href).hostname.replace("www.", "")}`;
130
+ } catch {
131
+ i = "External link";
132
+ }
133
+ e.setAttribute("aria-label", i);
134
+ }
135
+ });
136
+ }
137
+ function S(t) {
138
+ var o;
139
+ let n = t;
140
+ for (; n.tagName !== "SECTION"; )
141
+ n = n.parentElement;
142
+ const e = n.getAttribute("aria-haspopup") === "dialog", a = n.classList.contains("popupAnnotation");
143
+ if (!e && !a)
120
144
  return;
121
- let s = t.id || t.getAttribute("aria-controls");
122
- if (s || (s = (r = t.firstChild) == null ? void 0 : r.id), s && t.parentElement) {
123
- const o = t.parentElement.querySelector(`[aria-controls="${s}"]`);
124
- o && new MutationObserver((i, g) => {
125
- const b = document.querySelectorAll(".popupDate");
126
- b.length > 0 && (b.forEach((p) => {
127
- if (p.innerHTML)
145
+ let s = n.id || n.getAttribute("aria-controls");
146
+ if (s || (s = (o = n.firstChild) == null ? void 0 : o.id), s && n.parentElement) {
147
+ const i = n.parentElement.querySelector(`[aria-controls="${s}"]`);
148
+ i && new MutationObserver((r, g) => {
149
+ const m = document.querySelectorAll(".popupDate");
150
+ m.length > 0 && (m.forEach((b) => {
151
+ if (b.innerHTML)
128
152
  return !1;
129
- const N = p.getAttribute("data-l10n-args");
130
- if (N) {
131
- const { date: h, time: y, dateObj: O } = JSON.parse(N);
132
- if (h && y)
133
- p.textContent = `${h}, ${y}`;
134
- else if (O) {
135
- const _ = new Date(O);
136
- p.textContent = _.toLocaleString();
153
+ const h = b.getAttribute("data-l10n-args");
154
+ if (h) {
155
+ const { date: N, time: A, dateObj: y } = JSON.parse(h);
156
+ if (N && A)
157
+ b.textContent = `${N}, ${A}`;
158
+ else if (y) {
159
+ const I = new Date(y);
160
+ b.textContent = I.toLocaleString();
137
161
  }
138
162
  }
139
163
  }), g.disconnect());
140
- }).observe(o, { childList: !0, subtree: !0 });
164
+ }).observe(i, { childList: !0, subtree: !0 });
141
165
  }
142
166
  }
143
- function d(e, t, n) {
167
+ function d(t, n, e) {
144
168
  const a = [];
145
- if (n)
146
- for (const s of n)
147
- s[e] === t && a.push(s);
169
+ if (e)
170
+ for (const s of e)
171
+ s[t] === n && a.push(s);
148
172
  return a;
149
173
  }
150
- function u(e, t) {
151
- return { type: e, data: t };
174
+ function u(t, n) {
175
+ return { type: t, data: n };
152
176
  }
153
- async function k(e, t) {
154
- if (e.dest)
155
- if (typeof e.dest == "string") {
156
- const n = await L(t, e.dest);
177
+ async function k(t, n) {
178
+ if (t.dest)
179
+ if (typeof t.dest == "string") {
180
+ const e = await E(n, t.dest);
157
181
  return u(l.INTERNAL_LINK, {
158
- referencedPage: n.pageIndex,
182
+ referencedPage: e.pageIndex,
159
183
  offset: null
160
184
  });
161
185
  } else {
162
- const n = await t.getPageIndex(e.dest[0]);
186
+ const e = await n.getPageIndex(t.dest[0]);
163
187
  return u(l.INTERNAL_LINK, {
164
- referencedPage: n,
188
+ referencedPage: e,
165
189
  offset: {
166
- left: e.dest[2],
167
- bottom: e.dest[3]
190
+ left: t.dest[2],
191
+ bottom: t.dest[3]
168
192
  }
169
193
  });
170
194
  }
171
- else if (e.url)
195
+ else if (t.url)
172
196
  return u(l.LINK, {
173
- url: e.url,
174
- unsafeUrl: e.unsafeUrl
197
+ url: t.url,
198
+ unsafeUrl: t.unsafeUrl
175
199
  });
176
200
  }
177
- function T(e) {
178
- for (const t of e.getElementsByTagName("span")) {
179
- let n = t.textContent;
180
- const a = JSON.parse(t.dataset.l10nArgs ?? "{}");
181
- if (n)
201
+ function T(t) {
202
+ for (const n of t.getElementsByTagName("span")) {
203
+ let e = n.textContent;
204
+ const a = JSON.parse(n.dataset.l10nArgs ?? "{}");
205
+ if (e)
182
206
  for (const s in a)
183
- n = n.replace(`{{${s}}}`, a[s]);
184
- t.textContent = n;
207
+ e = e.replace(`{{${s}}}`, a[s]);
208
+ n.textContent = e;
185
209
  }
186
210
  }
187
- function C(e) {
188
- return u(l.FILE_ATTACHMENT, e.file);
211
+ function C(t) {
212
+ return u(l.FILE_ATTACHMENT, t.file);
189
213
  }
190
- function f(e, t) {
191
- switch (e.type) {
214
+ function f(t, n) {
215
+ switch (t.type) {
192
216
  case "textarea":
193
217
  case "text":
194
218
  return u(l.FORM_TEXT, {
195
- fieldName: e.name,
196
- value: e.value
219
+ fieldName: t.name,
220
+ value: t.value
197
221
  });
198
222
  case "select-one":
199
223
  case "select-multiple":
200
- const n = [];
201
- for (const s of e.options)
202
- n.push({
224
+ const e = [];
225
+ for (const s of t.options)
226
+ e.push({
203
227
  value: s.value,
204
228
  label: s.label
205
229
  });
206
230
  const a = [];
207
- for (const s of e.selectedOptions)
231
+ for (const s of t.selectedOptions)
208
232
  a.push({
209
233
  value: s.value,
210
234
  label: s.label
211
235
  });
212
236
  return u(l.FORM_SELECT, {
213
- fieldName: e.name,
237
+ fieldName: t.name,
214
238
  value: a,
215
- options: n
239
+ options: e
216
240
  });
217
241
  case "checkbox":
218
242
  return u(l.FORM_CHECKBOX, {
219
- fieldName: e.name,
220
- checked: e.checked
243
+ fieldName: t.name,
244
+ checked: t.checked
221
245
  });
222
246
  case "radio":
223
247
  return u(l.FORM_RADIO, {
224
- fieldName: e.name,
225
- ...t
248
+ fieldName: t.name,
249
+ ...n
226
250
  });
227
251
  case "button":
228
252
  return u(l.FORM_BUTTON, {
229
- fieldName: e.name,
230
- ...t
253
+ fieldName: t.name,
254
+ ...n
231
255
  });
232
256
  }
233
257
  }
234
- async function j(e, t, n) {
258
+ async function q(t, n, e) {
235
259
  var s;
236
- let a = e.target.parentNode;
237
- if (a.tagName === "DIV" && (a = a.firstChild), w(a), typeof a.className != "object")
238
- if (a.className === "linkAnnotation" && e.type === "click") {
239
- const r = (s = a.dataset) == null ? void 0 : s.annotationId;
240
- if (r) {
241
- const o = d("id", r, n);
242
- if (o.length)
243
- return await k(o[0], t);
260
+ let a = t.target.parentNode;
261
+ if (a.tagName === "DIV" && (a = a.firstChild), S(a), typeof a.className != "object")
262
+ if (a.className === "linkAnnotation" && t.type === "click") {
263
+ const o = (s = a.dataset) == null ? void 0 : s.annotationId;
264
+ if (o) {
265
+ const i = d("id", o, e);
266
+ if (i.length)
267
+ return await k(i[0], n);
244
268
  }
245
269
  } else if (
246
270
  /* annotation.className.includes('popupAnnotation') || */
@@ -249,53 +273,55 @@ async function j(e, t, n) {
249
273
  T(a);
250
274
  else if (a.className.includes("fileAttachmentAnnotation")) {
251
275
  T(a);
252
- const r = a.dataset.annotationId;
253
- if (r && e.type === "dblclick")
254
- return C(d("id", r, n)[0]);
255
- } else if (a.className.includes("textWidgetAnnotation") && e.type === "input") {
256
- let r = a.getElementsByTagName("input")[0];
257
- return r || (r = a.getElementsByTagName("textarea")[0]), f(r);
276
+ const o = a.dataset.annotationId;
277
+ if (o && t.type === "dblclick")
278
+ return C(d("id", o, e)[0]);
279
+ } else if (a.className.includes("textWidgetAnnotation") && t.type === "input") {
280
+ let o = a.getElementsByTagName("input")[0];
281
+ return o || (o = a.getElementsByTagName("textarea")[0]), f(o);
258
282
  } else {
259
- if (a.className.includes("choiceWidgetAnnotation") && e.type === "input")
283
+ if (a.className.includes("choiceWidgetAnnotation") && t.type === "input")
260
284
  return f(a.getElementsByTagName("select")[0]);
261
- if (a.className.includes("buttonWidgetAnnotation checkBox") && e.type === "change")
285
+ if (a.className.includes("buttonWidgetAnnotation checkBox") && t.type === "change")
262
286
  return f(a.getElementsByTagName("input")[0]);
263
- if (a.className.includes("buttonWidgetAnnotation radioButton") && e.type === "change") {
264
- const r = a.dataset.annotationId;
265
- if (r) {
266
- const o = d("id", r, n)[0], c = [];
267
- for (const i of d(
287
+ if (a.className.includes("buttonWidgetAnnotation radioButton") && t.type === "change") {
288
+ const o = a.dataset.annotationId;
289
+ if (o) {
290
+ const i = d("id", o, e)[0], c = [];
291
+ for (const r of d(
268
292
  "fieldName",
269
- o.fieldName,
270
- n
293
+ i.fieldName,
294
+ e
271
295
  ))
272
- i.buttonValue && c.push(i.buttonValue);
296
+ r.buttonValue && c.push(r.buttonValue);
273
297
  return f(a.getElementsByTagName("input")[0], {
274
- value: o.buttonValue,
275
- defaultValue: o.fieldValue,
298
+ value: i.buttonValue,
299
+ defaultValue: i.fieldValue,
276
300
  options: c
277
301
  });
278
302
  }
279
- } else if (a.className.includes("buttonWidgetAnnotation pushButton") && e.type === "click") {
280
- const r = a.dataset.annotationId;
281
- if (r) {
282
- const o = d("id", r, n)[0], { action: c } = o;
283
- return c && ["Print", "SaveAs"].includes(c) ? { type: l.BUTTON, data: o } : o.resetForm ? f(
284
- { name: o.fieldName, type: "button" },
285
- { actions: o.actions, reset: !0 }
303
+ } else if (a.className.includes("buttonWidgetAnnotation pushButton") && t.type === "click") {
304
+ const o = a.dataset.annotationId;
305
+ if (o) {
306
+ const i = d("id", o, e)[0], { action: c } = i;
307
+ return c && ["Print", "SaveAs"].includes(c) ? { type: l.BUTTON, data: i } : i.resetForm ? f(
308
+ { name: i.fieldName, type: "button" },
309
+ { actions: i.actions, reset: !0 }
286
310
  ) : f(
287
- { name: o.fieldName, type: "button" },
288
- { actions: o.actions, reset: !1 }
311
+ { name: i.fieldName, type: "button" },
312
+ { actions: i.actions, reset: !1 }
289
313
  );
290
314
  }
291
315
  }
292
316
  }
293
317
  }
294
318
  export {
295
- j as annotationEventsHandler,
319
+ q as annotationEventsHandler,
296
320
  P as annotationsEvents,
297
321
  U as bindLayerEvents,
298
- V as handleAnnotationLink,
299
- $ as handleAnnotationWidget,
300
- D as unbindLayerEvents
322
+ D as enhanceLinkAccessibility,
323
+ $ as fixTabIndexAccessibility,
324
+ j as handleAnnotationLink,
325
+ V as handleAnnotationWidget,
326
+ W as unbindLayerEvents
301
327
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { b as Er } from "../../ToolbarLayout.module-0245d511.js";
5
+ import { b as Gr } from "../../ToolbarLayout.module-00eddd49.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -41,6 +41,7 @@ import "../../components/layout/sidebar/RPSplitter.js";
41
41
  import "../../components/layout/WrapperLayout.js";
42
42
  import "../../components/RPDropFileZone.js";
43
43
  import "../../LayoutWrapper-3f4d0a19.js";
44
+ import "../../components/layout/SkipLink.js";
44
45
  import "../../components/ui/Button.js";
45
46
  import "../../SearchCloseButton-08d57275.js";
46
47
  import "../../components/ui/Input.js";
@@ -94,10 +95,10 @@ import "../getWordPositionInPage.js";
94
95
  import "../smoothScrollTo.js";
95
96
  import "../../components/layout/toolbar/FileUploadTool.js";
96
97
  import "../../components/icons/FileUploadDefaultIcon.js";
97
- import "../../index-f563c6f0.js";
98
- import "../../index-35c7f4a2.js";
98
+ import "../../index-a48ec088.js";
99
+ import "../../index-c9a2990a.js";
99
100
  import "react-dom";
100
- import "../../floating-ui.react-dom-6b2fe0df.js";
101
+ import "../../index-808ea7bf.js";
101
102
  import "../../components/layout/toolbar/DarkModeTool.js";
102
103
  import "../../components/icons/MoonIcon.js";
103
104
  import "../../components/icons/SunIcon.js";
@@ -136,5 +137,5 @@ import "./useHighlight.js";
136
137
  import "../../components/icons/LightPdfIcon.js";
137
138
  import "../../components/icons/DarkPdfIcon.js";
138
139
  export {
139
- Er as useFileDownload
140
+ Gr as useFileDownload
140
141
  };
@@ -1,6 +1,6 @@
1
1
  import { useState as E, useCallback as h, useEffect as A } from "react";
2
2
  import { appConsole as l } from "../appConsole.js";
3
- const b = /* @__PURE__ */ new Date("2026-01-19T06:35:59.996Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
3
+ const b = /* @__PURE__ */ new Date("2026-01-20T03:11:26.121Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
4
4
  invalidLicense: `You are currently using without a valid license. ${d}`,
5
5
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
6
6
  expired: `Your license key has expired. ${d}`,
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../types.js";
3
- import { v as Er } from "../../ToolbarLayout.module-0245d511.js";
3
+ import { v as Fr } from "../../ToolbarLayout.module-00eddd49.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
@@ -42,6 +42,7 @@ import "../../components/layout/sidebar/RPSplitter.js";
42
42
  import "../../components/layout/WrapperLayout.js";
43
43
  import "../../components/RPDropFileZone.js";
44
44
  import "../../LayoutWrapper-3f4d0a19.js";
45
+ import "../../components/layout/SkipLink.js";
45
46
  import "../../components/ui/Button.js";
46
47
  import "../../SearchCloseButton-08d57275.js";
47
48
  import "../../components/ui/Input.js";
@@ -94,10 +95,10 @@ import "../getWordPositionInPage.js";
94
95
  import "../smoothScrollTo.js";
95
96
  import "../../components/layout/toolbar/FileUploadTool.js";
96
97
  import "../../components/icons/FileUploadDefaultIcon.js";
97
- import "../../index-f563c6f0.js";
98
- import "../../index-35c7f4a2.js";
98
+ import "../../index-a48ec088.js";
99
+ import "../../index-c9a2990a.js";
99
100
  import "react-dom";
100
- import "../../floating-ui.react-dom-6b2fe0df.js";
101
+ import "../../index-808ea7bf.js";
101
102
  import "../../components/layout/toolbar/DarkModeTool.js";
102
103
  import "../../components/icons/MoonIcon.js";
103
104
  import "../../components/icons/SunIcon.js";
@@ -136,5 +137,5 @@ import "./useHighlight.js";
136
137
  import "../../components/icons/LightPdfIcon.js";
137
138
  import "../../components/icons/DarkPdfIcon.js";
138
139
  export {
139
- Er as usePaginate
140
+ Fr as usePaginate
140
141
  };
@@ -5,7 +5,7 @@ import "../calculatePage.js";
5
5
  import "react/jsx-runtime";
6
6
  import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/DocumentPasswordContext.js";
8
- import { U as Do } from "../../ToolbarLayout.module-0245d511.js";
8
+ import { U as Eo } from "../../ToolbarLayout.module-00eddd49.js";
9
9
  import "../../contexts/DarkModeContext.js";
10
10
  import "../types.js";
11
11
  import "../../contexts/RotationContext.js";
@@ -43,6 +43,7 @@ import "../../components/layout/sidebar/RPSplitter.js";
43
43
  import "../../components/layout/WrapperLayout.js";
44
44
  import "../../components/RPDropFileZone.js";
45
45
  import "../../LayoutWrapper-3f4d0a19.js";
46
+ import "../../components/layout/SkipLink.js";
46
47
  import "../../components/ui/Button.js";
47
48
  import "../../SearchCloseButton-08d57275.js";
48
49
  import "../../components/ui/Input.js";
@@ -94,10 +95,10 @@ import "../getWordPositionInPage.js";
94
95
  import "../smoothScrollTo.js";
95
96
  import "../../components/layout/toolbar/FileUploadTool.js";
96
97
  import "../../components/icons/FileUploadDefaultIcon.js";
97
- import "../../index-f563c6f0.js";
98
- import "../../index-35c7f4a2.js";
98
+ import "../../index-a48ec088.js";
99
+ import "../../index-c9a2990a.js";
99
100
  import "react-dom";
100
- import "../../floating-ui.react-dom-6b2fe0df.js";
101
+ import "../../index-808ea7bf.js";
101
102
  import "../../components/layout/toolbar/DarkModeTool.js";
102
103
  import "../../components/icons/MoonIcon.js";
103
104
  import "../../components/icons/SunIcon.js";
@@ -136,5 +137,5 @@ import "./useHighlight.js";
136
137
  import "../../components/icons/LightPdfIcon.js";
137
138
  import "../../components/icons/DarkPdfIcon.js";
138
139
  export {
139
- Do as usePresentPage
140
+ Eo as usePresentPage
140
141
  };
@@ -2,7 +2,7 @@ import "react";
2
2
  import "react/jsx-runtime";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { x as Eo } from "../../ToolbarLayout.module-0245d511.js";
5
+ import { x as Fo } from "../../ToolbarLayout.module-00eddd49.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -41,6 +41,7 @@ import "../../components/layout/sidebar/RPSplitter.js";
41
41
  import "../../components/layout/WrapperLayout.js";
42
42
  import "../../components/RPDropFileZone.js";
43
43
  import "../../LayoutWrapper-3f4d0a19.js";
44
+ import "../../components/layout/SkipLink.js";
44
45
  import "../../components/ui/Button.js";
45
46
  import "../../SearchCloseButton-08d57275.js";
46
47
  import "../../components/ui/Input.js";
@@ -94,10 +95,10 @@ import "../getWordPositionInPage.js";
94
95
  import "../smoothScrollTo.js";
95
96
  import "../../components/layout/toolbar/FileUploadTool.js";
96
97
  import "../../components/icons/FileUploadDefaultIcon.js";
97
- import "../../index-f563c6f0.js";
98
- import "../../index-35c7f4a2.js";
98
+ import "../../index-a48ec088.js";
99
+ import "../../index-c9a2990a.js";
99
100
  import "react-dom";
100
- import "../../floating-ui.react-dom-6b2fe0df.js";
101
+ import "../../index-808ea7bf.js";
101
102
  import "../../components/layout/toolbar/DarkModeTool.js";
102
103
  import "../../components/icons/MoonIcon.js";
103
104
  import "../../components/icons/SunIcon.js";
@@ -136,5 +137,5 @@ import "./useHighlight.js";
136
137
  import "../../components/icons/LightPdfIcon.js";
137
138
  import "../../components/icons/DarkPdfIcon.js";
138
139
  export {
139
- Eo as usePrint
140
+ Fo as usePrint
140
141
  };