@embedpdf/react 3.0.0-next.14 → 3.0.0-next.16

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 (244) hide show
  1. package/dist/AnnotationList-DcyhF2kU-CiBFOq1z.d.cts +878 -0
  2. package/dist/AnnotationList-DcyhF2kU-CiBFOq1z.d.ts +878 -0
  3. package/dist/actions.cjs +25 -5
  4. package/dist/actions.cjs.map +1 -1
  5. package/dist/actions.d.cts +18 -5
  6. package/dist/actions.d.ts +18 -5
  7. package/dist/actions.js +22 -6
  8. package/dist/actions.js.map +1 -1
  9. package/dist/anchored-DeX95xSd.d.ts +85 -0
  10. package/dist/anchored-DzN3JywS.d.cts +85 -0
  11. package/dist/anchored.cjs +71 -28
  12. package/dist/anchored.cjs.map +1 -1
  13. package/dist/anchored.d.cts +2 -45
  14. package/dist/anchored.d.ts +2 -45
  15. package/dist/anchored.js +56 -19
  16. package/dist/anchored.js.map +1 -1
  17. package/dist/annotation-3UvABfJm.d.cts +305 -0
  18. package/dist/annotation-BNHQpMKv.cjs +806 -0
  19. package/dist/annotation-BNHQpMKv.cjs.map +1 -0
  20. package/dist/annotation-CDI8CFb3.js +684 -0
  21. package/dist/annotation-CDI8CFb3.js.map +1 -0
  22. package/dist/annotation-DhEfs0pH.d.ts +305 -0
  23. package/dist/annotation.cjs +20 -784
  24. package/dist/annotation.d.cts +2 -2
  25. package/dist/annotation.d.ts +2 -2
  26. package/dist/annotation.js +2 -769
  27. package/dist/attachment.cjs +39 -0
  28. package/dist/attachment.cjs.map +1 -0
  29. package/dist/attachment.d.cts +29 -0
  30. package/dist/attachment.d.ts +29 -0
  31. package/dist/attachment.js +28 -0
  32. package/dist/attachment.js.map +1 -0
  33. package/dist/commands.cjs +68 -28
  34. package/dist/commands.cjs.map +1 -1
  35. package/dist/commands.d.cts +37 -10
  36. package/dist/commands.d.ts +37 -10
  37. package/dist/commands.js +68 -31
  38. package/dist/commands.js.map +1 -1
  39. package/dist/form-BSGvjA5D.js +511 -0
  40. package/dist/form-BSGvjA5D.js.map +1 -0
  41. package/dist/form-BgztZyOK.cjs +548 -0
  42. package/dist/form-BgztZyOK.cjs.map +1 -0
  43. package/dist/form.cjs +5 -5
  44. package/dist/form.d.cts +41 -2
  45. package/dist/form.d.ts +41 -2
  46. package/dist/form.js +2 -3
  47. package/dist/history.cjs +38 -0
  48. package/dist/history.cjs.map +1 -0
  49. package/dist/history.d.cts +27 -0
  50. package/dist/history.d.ts +27 -0
  51. package/dist/history.js +27 -0
  52. package/dist/history.js.map +1 -0
  53. package/dist/i18n.cjs +26 -30
  54. package/dist/i18n.cjs.map +1 -1
  55. package/dist/i18n.d.cts +24 -21
  56. package/dist/i18n.d.ts +24 -21
  57. package/dist/i18n.js +24 -31
  58. package/dist/i18n.js.map +1 -1
  59. package/dist/index.cjs +227 -57
  60. package/dist/index.d.cts +35 -32
  61. package/dist/index.d.ts +35 -32
  62. package/dist/index.js +36 -30
  63. package/dist/inert-CmBEbKCn.cjs +19 -0
  64. package/dist/inert-CmBEbKCn.cjs.map +1 -0
  65. package/dist/inert-D8fkennb.js +14 -0
  66. package/dist/inert-D8fkennb.js.map +1 -0
  67. package/dist/interaction.cjs +48 -102
  68. package/dist/interaction.cjs.map +1 -1
  69. package/dist/interaction.d.cts +23 -32
  70. package/dist/interaction.d.ts +23 -32
  71. package/dist/interaction.js +33 -102
  72. package/dist/interaction.js.map +1 -1
  73. package/dist/link.cjs +65 -104
  74. package/dist/link.cjs.map +1 -1
  75. package/dist/link.d.cts +21 -16
  76. package/dist/link.d.ts +22 -17
  77. package/dist/link.js +67 -107
  78. package/dist/link.js.map +1 -1
  79. package/dist/measurement.cjs +36 -11
  80. package/dist/measurement.cjs.map +1 -1
  81. package/dist/measurement.d.cts +33 -7
  82. package/dist/measurement.d.ts +33 -7
  83. package/dist/measurement.js +35 -14
  84. package/dist/measurement.js.map +1 -1
  85. package/dist/metadata.cjs +20 -7
  86. package/dist/metadata.cjs.map +1 -1
  87. package/dist/metadata.d.cts +22 -7
  88. package/dist/metadata.d.ts +22 -7
  89. package/dist/metadata.js +20 -10
  90. package/dist/metadata.js.map +1 -1
  91. package/dist/outline.cjs +39 -0
  92. package/dist/outline.cjs.map +1 -0
  93. package/dist/outline.d.cts +31 -0
  94. package/dist/outline.d.ts +31 -0
  95. package/dist/outline.js +28 -0
  96. package/dist/outline.js.map +1 -0
  97. package/dist/page-edit.cjs +15 -3
  98. package/dist/page-edit.cjs.map +1 -1
  99. package/dist/page-edit.d.cts +17 -2
  100. package/dist/page-edit.d.ts +17 -2
  101. package/dist/page-edit.js +15 -5
  102. package/dist/page-edit.js.map +1 -1
  103. package/dist/page-layers-Bkaaz8Zf.js +26 -0
  104. package/dist/page-layers-Bkaaz8Zf.js.map +1 -0
  105. package/dist/page-layers-BloZDoOV.cjs +37 -0
  106. package/dist/page-layers-BloZDoOV.cjs.map +1 -0
  107. package/dist/page-view.cjs +89 -82
  108. package/dist/page-view.cjs.map +1 -1
  109. package/dist/page-view.d.cts +14 -7
  110. package/dist/page-view.d.ts +18 -11
  111. package/dist/page-view.js +86 -81
  112. package/dist/page-view.js.map +1 -1
  113. package/dist/redaction.cjs +30 -15
  114. package/dist/redaction.cjs.map +1 -1
  115. package/dist/redaction.d.cts +27 -9
  116. package/dist/redaction.d.ts +27 -9
  117. package/dist/redaction.js +29 -18
  118. package/dist/redaction.js.map +1 -1
  119. package/dist/render.cjs +71 -46
  120. package/dist/render.cjs.map +1 -1
  121. package/dist/render.d.cts +17 -5
  122. package/dist/render.d.ts +17 -5
  123. package/dist/render.js +70 -49
  124. package/dist/render.js.map +1 -1
  125. package/dist/runtime-BfnpyfY0.cjs +556 -0
  126. package/dist/runtime-BfnpyfY0.cjs.map +1 -0
  127. package/dist/runtime-DBEBlpQV.d.cts +237 -0
  128. package/dist/runtime-V3MVMb91.d.ts +237 -0
  129. package/dist/runtime-tD5iJU83.js +399 -0
  130. package/dist/runtime-tD5iJU83.js.map +1 -0
  131. package/dist/runtime.cjs +45 -324
  132. package/dist/runtime.d.cts +2 -2
  133. package/dist/runtime.d.ts +2 -2
  134. package/dist/runtime.js +2 -306
  135. package/dist/search.cjs +81 -50
  136. package/dist/search.cjs.map +1 -1
  137. package/dist/search.d.cts +37 -24
  138. package/dist/search.d.ts +37 -24
  139. package/dist/search.js +81 -53
  140. package/dist/search.js.map +1 -1
  141. package/dist/selection.cjs +105 -108
  142. package/dist/selection.cjs.map +1 -1
  143. package/dist/selection.d.cts +54 -26
  144. package/dist/selection.d.ts +56 -28
  145. package/dist/selection.js +103 -110
  146. package/dist/selection.js.map +1 -1
  147. package/dist/shell.cjs +36 -21
  148. package/dist/shell.cjs.map +1 -1
  149. package/dist/shell.d.cts +32 -17
  150. package/dist/shell.d.ts +32 -17
  151. package/dist/shell.js +36 -24
  152. package/dist/shell.js.map +1 -1
  153. package/dist/signature.cjs +29 -48
  154. package/dist/signature.cjs.map +1 -1
  155. package/dist/signature.d.cts +26 -26
  156. package/dist/signature.d.ts +26 -26
  157. package/dist/signature.js +30 -48
  158. package/dist/signature.js.map +1 -1
  159. package/dist/stage-B7BG2e8Q.cjs +369 -0
  160. package/dist/stage-B7BG2e8Q.cjs.map +1 -0
  161. package/dist/stage-BqfBjDu6.js +302 -0
  162. package/dist/stage-BqfBjDu6.js.map +1 -0
  163. package/dist/stage-ByFPD-Fv.d.cts +117 -0
  164. package/dist/stage-DaboaheR.d.ts +117 -0
  165. package/dist/stage-scope-CQgCuf1w.cjs +46 -0
  166. package/dist/stage-scope-CQgCuf1w.cjs.map +1 -0
  167. package/dist/stage-scope-D7ZeNduT.js +23 -0
  168. package/dist/stage-scope-D7ZeNduT.js.map +1 -0
  169. package/dist/stage.cjs +12 -235
  170. package/dist/stage.d.cts +2 -116
  171. package/dist/stage.d.ts +2 -116
  172. package/dist/stage.js +3 -228
  173. package/dist/stamp.cjs +41 -35
  174. package/dist/stamp.cjs.map +1 -1
  175. package/dist/stamp.d.cts +25 -18
  176. package/dist/stamp.d.ts +25 -18
  177. package/dist/stamp.js +40 -37
  178. package/dist/stamp.js.map +1 -1
  179. package/dist/state-0K1I5cM4.d.cts +29 -0
  180. package/dist/state-0K1I5cM4.d.ts +29 -0
  181. package/dist/state-CzI2KlZb.js +62 -0
  182. package/dist/state-CzI2KlZb.js.map +1 -0
  183. package/dist/state-Dtf8HAue.cjs +73 -0
  184. package/dist/state-Dtf8HAue.cjs.map +1 -0
  185. package/dist/svg-shapes-Dm1yTR1b.js +40 -0
  186. package/dist/svg-shapes-Dm1yTR1b.js.map +1 -0
  187. package/dist/svg-shapes-zo0GNkc9.cjs +53 -0
  188. package/dist/svg-shapes-zo0GNkc9.cjs.map +1 -0
  189. package/dist/toolbar.cjs +297 -295
  190. package/dist/toolbar.cjs.map +1 -1
  191. package/dist/toolbar.d.cts +58 -68
  192. package/dist/toolbar.d.ts +67 -77
  193. package/dist/toolbar.js +271 -293
  194. package/dist/toolbar.js.map +1 -1
  195. package/dist/view-manager.cjs +34 -0
  196. package/dist/view-manager.cjs.map +1 -0
  197. package/dist/view-manager.d.cts +21 -0
  198. package/dist/view-manager.d.ts +21 -0
  199. package/dist/view-manager.js +23 -0
  200. package/dist/view-manager.js.map +1 -0
  201. package/package.json +47 -39
  202. package/dist/annotation-BCED_p9H.d.cts +0 -160
  203. package/dist/annotation-anchors-CetwM1g7.js +0 -15
  204. package/dist/annotation-anchors-CetwM1g7.js.map +0 -1
  205. package/dist/annotation-anchors-DuYRBJLl.cjs +0 -26
  206. package/dist/annotation-anchors-DuYRBJLl.cjs.map +0 -1
  207. package/dist/annotation-hooks-BB5ZhPpf.cjs +0 -16
  208. package/dist/annotation-hooks-BB5ZhPpf.cjs.map +0 -1
  209. package/dist/annotation-hooks-Df8EmzDO.js +0 -11
  210. package/dist/annotation-hooks-Df8EmzDO.js.map +0 -1
  211. package/dist/annotation-k38KDlIZ.d.ts +0 -160
  212. package/dist/annotation-menu.cjs +0 -64
  213. package/dist/annotation-menu.cjs.map +0 -1
  214. package/dist/annotation-menu.d.cts +0 -33
  215. package/dist/annotation-menu.d.ts +0 -33
  216. package/dist/annotation-menu.js +0 -48
  217. package/dist/annotation-menu.js.map +0 -1
  218. package/dist/annotation.cjs.map +0 -1
  219. package/dist/annotation.js.map +0 -1
  220. package/dist/form-BVumS7up.cjs +0 -926
  221. package/dist/form-BVumS7up.cjs.map +0 -1
  222. package/dist/form-Bdjk0Z3T.d.cts +0 -537
  223. package/dist/form-CK3mp99m.js +0 -895
  224. package/dist/form-CK3mp99m.js.map +0 -1
  225. package/dist/form-CYRYgthn.d.ts +0 -537
  226. package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
  227. package/dist/runtime-DE76hlnl.d.ts +0 -216
  228. package/dist/runtime-umHA_xHt.d.cts +0 -216
  229. package/dist/runtime.cjs.map +0 -1
  230. package/dist/runtime.js.map +0 -1
  231. package/dist/scrollbar.cjs +0 -241
  232. package/dist/scrollbar.cjs.map +0 -1
  233. package/dist/scrollbar.d.cts +0 -42
  234. package/dist/scrollbar.d.ts +0 -42
  235. package/dist/scrollbar.js +0 -213
  236. package/dist/scrollbar.js.map +0 -1
  237. package/dist/stage.cjs.map +0 -1
  238. package/dist/stage.js.map +0 -1
  239. package/dist/views.cjs +0 -35
  240. package/dist/views.cjs.map +0 -1
  241. package/dist/views.d.cts +0 -21
  242. package/dist/views.d.ts +0 -21
  243. package/dist/views.js +0 -27
  244. package/dist/views.js.map +0 -1
@@ -1,786 +1,24 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("./rolldown-runtime-DDXJien1.cjs");
3
- const require_runtime = require("./runtime.cjs");
4
- const require_annotation_anchors = require("./annotation-anchors-DuYRBJLl.cjs");
5
- const require_annotation_hooks = require("./annotation-hooks-BB5ZhPpf.cjs");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- let react = require("react");
8
- react = require_rolldown_runtime.__toESM(react, 1);
9
- let _embedpdf_web = require("@embedpdf/web");
10
- let _embedpdf_plugin_annotation = require("@embedpdf/plugin-annotation");
11
- let _embedpdf_plugin_annotation_internal = require("@embedpdf/plugin-annotation/internal");
12
- let _embedpdf_core_annotation = require("@embedpdf/core-annotation");
13
- //#region src/annotation.tsx
14
- /** `#rrggbb` → `rgba(...)` — the marquee's translucent fill derives from the
15
- * accent, so one `setChrome({ accent })` restyles every piece of chrome. */
16
- const rgba = (hex, alpha) => {
17
- const m = /^#?([0-9a-f]{6})$/i.exec(hex);
18
- if (!m) return hex;
19
- const n = parseInt(m[1], 16);
20
- return `rgba(${n >> 16 & 255},${n >> 8 & 255},${n & 255},${alpha})`;
21
- };
22
- /** Content rect → a view-px box (the page wrapper's own coordinate space). */
23
- function boxOf(r, page) {
24
- const tl = page.transform.toPixels({
25
- x: r.x,
26
- y: r.y
27
- });
28
- const br = page.transform.toPixels({
29
- x: r.x + r.width,
30
- y: r.y + r.height
31
- });
32
- return {
33
- left: tl.x,
34
- top: tl.y,
35
- width: br.x - tl.x,
36
- height: br.y - tl.y
37
- };
38
- }
39
- /** Map a core `Paint` to SVG presentation attributes — the whole framework-facing
40
- * surface. Everything else about appearance is decided in the core's `scene`. */
41
- function paintAttrs(p) {
42
- return {
43
- fill: p.fill ?? "none",
44
- stroke: p.stroke ?? "none",
45
- strokeWidth: p.width,
46
- opacity: p.opacity,
47
- strokeLinejoin: p.join ?? "miter",
48
- strokeMiterlimit: _embedpdf_core_annotation.MITER_LIMIT,
49
- strokeLinecap: p.cap,
50
- strokeDasharray: p.dash ? p.dash.join(" ") : void 0,
51
- ...p.blend ? { style: { mixBlendMode: p.blend } } : {}
52
- };
53
- }
54
- /**
55
- * The dumb painter. The pure core computed `item.box` and the painted `scene`; we
56
- * size the <svg> to the box with a content-space `viewBox` and map each SceneNode
57
- * to one element, applying its `paint`. No per-kind logic, no bounds math — so
58
- * shapes, cloudy borders and every text-markup type all render here, and a Vue /
59
- * Svelte painter is the same ~10-line loop.
60
- */
61
- function Shape({ item, page }) {
62
- if (item.box.width <= 0 || item.box.height <= 0) return null;
63
- const { left, top, width, height } = boxOf(item.box, page);
64
- const vb = `${item.box.x} ${item.box.y} ${item.box.width} ${item.box.height}`;
65
- const rot = item.geom.t === "rect" || item.geom.t === "caret" ? item.rot ?? 0 : 0;
66
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
67
- viewBox: vb,
68
- style: {
69
- position: "absolute",
70
- left,
71
- top,
72
- width,
73
- height,
74
- overflow: "visible",
75
- pointerEvents: "none",
76
- ...rot ? {
77
- transform: `rotate(${rot}deg)`,
78
- transformOrigin: "center"
79
- } : {}
80
- },
81
- children: sceneNodes(item)
82
- });
83
- }
84
- /** Map a core scene to SVG children. */
85
- function sceneNodes(item) {
86
- return (0, _embedpdf_core_annotation.scene)(item).map((n, i) => {
87
- const a = paintAttrs(n.paint);
88
- if (n.kind === "rect") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
89
- x: n.rect.x,
90
- y: n.rect.y,
91
- width: n.rect.width,
92
- height: n.rect.height,
93
- ...a
94
- }, i);
95
- if (n.kind === "ellipse") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ellipse", {
96
- cx: n.rect.x + n.rect.width / 2,
97
- cy: n.rect.y + n.rect.height / 2,
98
- rx: n.rect.width / 2,
99
- ry: n.rect.height / 2,
100
- ...a
101
- }, i);
102
- if (n.kind === "line") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
103
- x1: n.a.x,
104
- y1: n.a.y,
105
- x2: n.b.x,
106
- y2: n.b.y,
107
- ...a
108
- }, i);
109
- if (n.kind === "path") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
110
- d: n.d,
111
- ...a
112
- }, i);
113
- if (n.kind === "text") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
114
- x: n.at.x,
115
- y: n.at.y,
116
- transform: n.rotation ? `rotate(${n.rotation} ${n.at.x} ${n.at.y})` : void 0,
117
- fontSize: n.fontSize,
118
- ...n.fontFamily ? { fontFamily: n.fontFamily } : {},
119
- ...a,
120
- children: n.text
121
- }, i);
122
- const pts = n.points.map((p) => `${p.x},${p.y}`).join(" ");
123
- return n.closed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polygon", {
124
- points: pts,
125
- ...a
126
- }, i) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polyline", {
127
- points: pts,
128
- ...a
129
- }, i);
130
- });
131
- }
132
- function BakedImage({ box, url, page, blend, rot }) {
133
- const b = boxOf(box, page);
134
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
135
- src: url,
136
- alt: "",
137
- draggable: false,
138
- style: {
139
- position: "absolute",
140
- left: b.left,
141
- top: b.top,
142
- width: b.width,
143
- height: b.height,
144
- maxWidth: "none",
145
- maxHeight: "none",
146
- pointerEvents: "none",
147
- mixBlendMode: blend,
148
- ...rot ? {
149
- transform: `rotate(${rot}deg)`,
150
- transformOrigin: "center"
151
- } : {}
152
- }
153
- });
154
- }
155
- /**
156
- * The armed stamp's IMAGE footprint ghost: a translucent render of the payload
157
- * drawn in the EXACT box a click would place it (the plugin computes it with
158
- * the same fit + clamp as placement). Vector footprint ghosts never reach this
159
- * component — they ride `pageItems` like every draft preview. The preview
160
- * bytes live in the capability closure; this layer owns only the object-URL
161
- * lifetime, keyed on the arm epoch — a new arm swaps the image, a disarm (or
162
- * tool change) drops it.
163
- */
164
- function ToolGhostImage({ page }) {
165
- const anno = require_runtime.useCapability(_embedpdf_plugin_annotation_internal.AnnotationToken);
166
- const ghost = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.toolGhost(page.pon));
167
- const epoch = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.stampArmEpoch());
168
- const [url, setUrl] = (0, react.useState)(null);
169
- const bucket = ghost?.kind === "image" ? (0, _embedpdf_plugin_annotation.previewBucket)(ghost.box.width * page.transform.renderScale) : 0;
170
- (0, react.useEffect)(() => {
171
- if (!bucket) {
172
- setUrl(null);
173
- return;
174
- }
175
- let cancelled = false;
176
- let obj = null;
177
- anno.armedStampPreview(bucket).then((preview) => {
178
- if (cancelled || !preview) return;
179
- const body = new ArrayBuffer(preview.bytes.byteLength);
180
- new Uint8Array(body).set(preview.bytes);
181
- const blob = new Blob([body], preview.mimeType ? { type: preview.mimeType } : {});
182
- obj = URL.createObjectURL(blob);
183
- setUrl(obj);
184
- });
185
- return () => {
186
- cancelled = true;
187
- if (obj) URL.revokeObjectURL(obj);
188
- };
189
- }, [
190
- anno,
191
- epoch,
192
- bucket
193
- ]);
194
- if (!ghost || ghost.kind !== "image" || !url) return null;
195
- const b = boxOf(ghost.box, page);
196
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
197
- src: url,
198
- alt: "",
199
- draggable: false,
200
- style: {
201
- position: "absolute",
202
- left: b.left,
203
- top: b.top,
204
- width: b.width,
205
- height: b.height,
206
- maxWidth: "none",
207
- maxHeight: "none",
208
- pointerEvents: "none",
209
- opacity: .5,
210
- ...ghost.rot ? {
211
- transform: `rotate(${ghost.rot}deg)`,
212
- transformOrigin: "center"
213
- } : {}
214
- }
215
- });
216
- }
217
- function Chrome({ page }) {
218
- const scale = page.transform.viewScale;
219
- const rotation = page.transform.rotation;
220
- const zoom = page.transform.zoom;
221
- const nodes = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.chrome(page.pon, scale, rotation, zoom), require_runtime.shallowArray);
222
- const cs = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.chromeSettings());
223
- const outlineStroke = cs.outline.color ?? cs.accent;
224
- const handleStroke = cs.handles.stroke ?? cs.accent;
225
- const knobStroke = cs.knob.stroke ?? cs.accent;
226
- const outlineDash = cs.outline.style === "dashed" ? "4 3" : void 0;
227
- const chip = nodes.find((n) => n.kind === "angle-chip");
228
- const chipAt = chip ? page.transform.toPixels(chip.at) : null;
229
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
230
- style: {
231
- position: "absolute",
232
- inset: 0,
233
- overflow: "visible",
234
- pointerEvents: "none"
235
- },
236
- children: nodes.map((n, i) => {
237
- if (n.kind === "angle-chip") return null;
238
- if (n.kind === "handle") {
239
- const p = page.transform.toPixels(n.at);
240
- const hs = cs.handles.size;
241
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
242
- x: p.x - hs / 2,
243
- y: p.y - hs / 2,
244
- width: hs,
245
- height: hs,
246
- fill: cs.handles.fill,
247
- stroke: handleStroke,
248
- strokeWidth: 1.5,
249
- ...n.rot ? { transform: `rotate(${n.rot} ${p.x} ${p.y})` } : {}
250
- }, i);
251
- }
252
- if (n.kind === "guide") {
253
- const a = page.transform.toPixels(n.axis === "x" ? {
254
- x: n.at,
255
- y: n.lo
256
- } : {
257
- x: n.lo,
258
- y: n.at
259
- });
260
- const b = page.transform.toPixels(n.axis === "x" ? {
261
- x: n.at,
262
- y: n.hi
263
- } : {
264
- x: n.hi,
265
- y: n.at
266
- });
267
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
268
- x1: a.x,
269
- y1: a.y,
270
- x2: b.x,
271
- y2: b.y,
272
- stroke: "#e91e63",
273
- strokeWidth: 1.5,
274
- shapeRendering: "crispEdges"
275
- }, i);
276
- }
277
- if (n.kind === "obb") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polygon", {
278
- points: n.corners.map((c) => {
279
- const p = page.transform.toPixels(c);
280
- return `${p.x},${p.y}`;
281
- }).join(" "),
282
- fill: "none",
283
- stroke: outlineStroke,
284
- strokeWidth: cs.outline.width,
285
- strokeDasharray: outlineDash
286
- }, i);
287
- if (n.kind === "rotate-guides") {
288
- const guideDash = cs.guides.style === "dashed" ? "4 3" : void 0;
289
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("g", { children: n.lines.map((l, j) => {
290
- const a = page.transform.toPixels(l.a);
291
- const b = page.transform.toPixels(l.b);
292
- const axis = l.role === "axis";
293
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
294
- x1: a.x,
295
- y1: a.y,
296
- x2: b.x,
297
- y2: b.y,
298
- stroke: axis ? cs.guides.axisColor ?? cs.accent : cs.guides.indicatorColor ?? cs.accent,
299
- opacity: axis ? cs.guides.axisOpacity : cs.guides.indicatorOpacity,
300
- strokeWidth: cs.guides.width,
301
- strokeDasharray: guideDash
302
- }, j);
303
- }) }, i);
304
- }
305
- if (n.kind === "rotate-knob") {
306
- const at = page.transform.toPixels(n.at);
307
- const from = page.transform.toPixels(n.from);
308
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { children: [cs.knob.stalk && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
309
- x1: from.x,
310
- y1: from.y,
311
- x2: at.x,
312
- y2: at.y,
313
- stroke: knobStroke,
314
- strokeWidth: 1
315
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
316
- cx: at.x,
317
- cy: at.y,
318
- r: cs.knob.size / 2,
319
- fill: cs.knob.fill,
320
- stroke: knobStroke,
321
- strokeWidth: 1.5
322
- })] }, i);
323
- }
324
- const b = boxOf(n.rect, page);
325
- if (n.kind === "marquee") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
326
- x: b.left,
327
- y: b.top,
328
- width: b.width,
329
- height: b.height,
330
- fill: rgba(cs.accent, .08),
331
- stroke: cs.accent,
332
- strokeWidth: 1,
333
- strokeDasharray: "4 3"
334
- }, i);
335
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
336
- x: b.left,
337
- y: b.top,
338
- width: b.width,
339
- height: b.height,
340
- fill: "none",
341
- stroke: outlineStroke,
342
- strokeWidth: cs.outline.width,
343
- strokeDasharray: outlineDash
344
- }, i);
345
- })
346
- }), chip && chipAt && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
347
- style: {
348
- position: "absolute",
349
- left: chipAt.x + 16,
350
- top: chipAt.y - 28,
351
- background: "rgba(0,0,0,0.8)",
352
- color: "#fff",
353
- padding: "2px 6px",
354
- borderRadius: 4,
355
- fontSize: 12,
356
- fontFamily: "monospace",
357
- pointerEvents: "none",
358
- whiteSpace: "nowrap",
359
- zIndex: 1
360
- },
361
- children: [chip.angle, "°"]
362
- })] });
363
- }
364
- /**
365
- * A free-text annotation: the SAME styled element for viewing and editing —
366
- * `contentEditable` just toggles, so the text never jumps. The plugin handed us
367
- * a ready-to-spread body style (`item.css`) and the rich paragraphs
368
- * (`item.richText`); the shared `attachRichTextEditor` binding renders them
369
- * as inline-styled spans, serialises typing back, maps the selection to flat
370
- * offsets and keeps the caret through a restyle; the browser owns layout,
371
- * caret, IME and clipboard; the plugin owns the text truth, the range
372
- * routing and the debounced engine write. This component is the ENTIRE
373
- * per-framework surface for text editing — React's part is the glue below.
374
- */
375
- function FreeText({ item, page }) {
376
- const anno = require_runtime.useCapability(_embedpdf_plugin_annotation_internal.AnnotationToken);
377
- const ref = react.useRef(null);
378
- const box = boxOf(item.box, page);
379
- const scale = item.box.width > 0 ? box.width / item.box.width : 1;
380
- const binding = react.useRef(null);
381
- const latest = react.useRef({
382
- item,
383
- scale
384
- });
385
- latest.current = {
386
- item,
387
- scale
388
- };
389
- (0, react.useEffect)(() => {
390
- const el = ref.current;
391
- if (!el) return;
392
- const b = (0, _embedpdf_web.attachRichTextEditor)(el, {
393
- onInput: (doc) => {
394
- const it = latest.current.item;
395
- if (it.ref) anno.setRichText(it.ref, doc);
396
- },
397
- onSelectionChange: (range) => {
398
- const it = latest.current.item;
399
- if (it.ref) anno.setTextSelection(it.ref, range);
400
- },
401
- onCommand: (command) => anno.toggleTextFormat(command),
402
- cssFontFamily: (family) => anno.cssFontFamily(family)
403
- }, {
404
- document: latest.current.item.richText,
405
- scale: latest.current.scale
406
- });
407
- binding.current = b;
408
- return () => {
409
- b.detach();
410
- binding.current = null;
411
- };
412
- }, [anno]);
413
- (0, react.useEffect)(() => {
414
- binding.current?.update({
415
- document: item.richText,
416
- scale
417
- });
418
- }, [item, scale]);
419
- const pad = item.css.padding * scale;
420
- const plate = {
421
- left: box.left + pad,
422
- top: box.top + pad,
423
- width: Math.max(0, box.width - 2 * pad),
424
- height: Math.max(0, box.height - 2 * pad)
425
- };
426
- (0, react.useEffect)(() => {
427
- if (item.editing) {
428
- const el = ref.current;
429
- if (!el) return;
430
- el.focus();
431
- el.scrollTop = 0;
432
- }
433
- }, [item.editing]);
434
- (0, react.useEffect)(() => {
435
- const el = ref.current;
436
- if (!el) return;
437
- const stop = (e) => e.stopPropagation();
438
- el.addEventListener("pointerdown", stop);
439
- return () => el.removeEventListener("pointerdown", stop);
440
- }, []);
441
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
442
- ref,
443
- contentEditable: item.editing,
444
- suppressContentEditableWarning: true,
445
- onBlur: (e) => {
446
- if (e.relatedTarget == null && ref.current?.isConnected && anno.currentEditing() === item.id) ref.current.focus();
447
- },
448
- style: {
449
- position: "absolute",
450
- left: plate.left,
451
- top: plate.top,
452
- width: plate.width,
453
- height: plate.height,
454
- fontFamily: item.css.fontFamily,
455
- fontSize: item.css.fontSize * scale,
456
- color: item.css.color,
457
- fontWeight: item.css.fontWeight,
458
- fontStyle: item.css.fontStyle,
459
- textDecoration: item.css.textDecoration,
460
- textAlign: item.css.align,
461
- boxSizing: "border-box",
462
- background: "transparent",
463
- whiteSpace: "pre-wrap",
464
- overflowWrap: "break-word",
465
- overflowY: item.editing ? "auto" : "hidden",
466
- overflowX: "hidden",
467
- outline: item.editing ? "1px solid #3858e9" : "none",
468
- cursor: item.editing ? "text" : "default",
469
- ...item.rot ? {
470
- transform: `rotate(${item.rot}deg)`,
471
- transformOrigin: "center"
472
- } : {},
473
- pointerEvents: item.editing ? "auto" : "none"
474
- }
475
- });
476
- }
477
- /**
478
- * Auto-registered behaviors for `interactive` renderer entries — refcounted
479
- * per (capability, entry) because the layer mounts once PER PAGE: the first
480
- * page registers, the last unregisters. Entry identity is the key, hence the
481
- * "define entries outside render" rule on {@link AnnotationRenderer}.
482
- */
483
- const autoBehaviors = /* @__PURE__ */ new WeakMap();
484
- let autoBehaviorSeq = 0;
485
- function useAutoBehaviors(anno, renderers) {
486
- (0, react.useEffect)(() => {
487
- if (!renderers) return;
488
- const released = [];
489
- for (const r of renderers) {
490
- if (!("for" in r) || !r.interactive) continue;
491
- let perCap = autoBehaviors.get(anno);
492
- if (!perCap) autoBehaviors.set(anno, perCap = /* @__PURE__ */ new Map());
493
- let rec = perCap.get(r);
494
- if (!rec) {
495
- const id = r.id ?? `renderer:${++autoBehaviorSeq}`;
496
- const engaged = typeof r.interactive === "function" ? r.interactive : () => true;
497
- rec = {
498
- id,
499
- count: 0,
500
- unregister: anno.registerBehavior({
501
- id,
502
- matches: r.for,
503
- engaged
504
- })
505
- };
506
- perCap.set(r, rec);
507
- }
508
- rec.count++;
509
- const owned = rec;
510
- released.push(() => {
511
- owned.count--;
512
- if (owned.count === 0) {
513
- owned.unregister();
514
- autoBehaviors.get(anno)?.delete(r);
515
- }
516
- });
517
- }
518
- return () => released.forEach((f) => f());
519
- }, [anno, renderers]);
520
- }
521
- /** The behavior id a renderer entry answers for (plugin-owned or auto-registered). */
522
- function rendererBehaviorId(anno, r) {
523
- if ("behavior" in r) return r.behavior;
524
- return autoBehaviors.get(anno)?.get(r)?.id ?? null;
525
- }
526
- /** React 18 spells the `inert` attribute as a string spread; it hard-disables
527
- * pointer AND focus for the whole subtree — the mechanical guarantee that a
528
- * non-interactive renderer entry (a skin) can never steal input. */
529
- const INERT = { inert: "" };
530
- function AnnotationLayer({ renderers } = {}) {
531
- const page = require_runtime.usePage();
532
- const anno = require_runtime.useCapability(_embedpdf_plugin_annotation_internal.AnnotationToken);
533
- const viewZoom = page.transform.zoom;
534
- const viewRotation = page.transform.rotation;
535
- const items = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.pageItems(page.pon, {
536
- zoom: viewZoom,
537
- rotation: viewRotation
538
- }), require_runtime.shallowArray);
539
- const texts = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.textItems(page.pon, {
540
- zoom: viewZoom,
541
- rotation: viewRotation
542
- }), require_runtime.shallowArray);
543
- const [urls, setUrls] = (0, react.useState)({});
544
- useAutoBehaviors(anno, renderers);
545
- (0, react.useEffect)(() => {
546
- anno.ensurePage(page.pon);
547
- }, [anno, page.pon]);
548
- const bakedKey = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.appearanceEpoch(page.pon));
549
- const bakeScale = require_runtime.useSelector(_embedpdf_plugin_annotation_internal.AnnotationToken, (c) => c.bakeScale(page.transform.renderScale));
550
- (0, react.useEffect)(() => {
551
- const controller = new AbortController();
552
- const revokers = [];
553
- (async () => {
554
- try {
555
- const imgs = await anno.appearances(page.pon, bakeScale, controller.signal);
556
- const map = {};
557
- for (const ap of imgs) {
558
- const box = anno.toContentBox(page.pon, ap.rect);
559
- if (!box) continue;
560
- const obj = await ap.image.objectUrl(controller.signal);
561
- if (controller.signal.aborted) {
562
- obj.revoke();
563
- return;
564
- }
565
- revokers.push(obj.revoke);
566
- map[(0, _embedpdf_plugin_annotation.refKey)(ap.ref)] = {
567
- url: obj.url,
568
- box
569
- };
570
- }
571
- if (!controller.signal.aborted) setUrls(map);
572
- } catch {}
573
- })();
574
- return () => {
575
- controller.abort();
576
- revokers.forEach((r) => r());
577
- };
578
- }, [
579
- anno,
580
- page.pon,
581
- bakeScale,
582
- bakedKey
583
- ]);
584
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
585
- style: {
586
- position: "absolute",
587
- inset: 0,
588
- pointerEvents: "none"
589
- },
590
- children: [
591
- items.map((item) => {
592
- const baked = urls[item.id];
593
- const native = item.source === "baked" ? baked ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BakedImage, {
594
- box: item.apBox ?? baked.box,
595
- url: baked.url,
596
- page,
597
- blend: item.blend,
598
- rot: item.apRot
599
- }) : null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Shape, {
600
- item,
601
- page
602
- });
603
- const behavior = anno.behaviorFor({
604
- subtype: item.subtype,
605
- ref: item.ref
606
- });
607
- let out;
608
- if (behavior) {
609
- const entry = renderers?.find((r) => rendererBehaviorId(anno, r) === behavior.id);
610
- if (entry) {
611
- const Owner = entry.component;
612
- out = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Owner, {
613
- item,
614
- page,
615
- appearance: baked ?? null,
616
- native,
617
- interactive: true
618
- });
619
- } else out = null;
620
- } else {
621
- const entry = renderers?.find((r) => "for" in r && r.for({
622
- subtype: item.subtype,
623
- ref: item.ref
624
- }));
625
- if (entry) {
626
- const Skin = entry.component;
627
- out = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
628
- ...INERT,
629
- style: { pointerEvents: "none" },
630
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skin, {
631
- item,
632
- page,
633
- appearance: baked ?? null,
634
- native,
635
- interactive: false
636
- })
637
- });
638
- } else out = native;
639
- }
640
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: out }, item.id);
641
- }),
642
- texts.map((t) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FreeText, {
643
- item: t,
644
- page
645
- }, t.id)),
646
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolGhostImage, { page }),
647
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chrome, { page })
648
- ]
649
- });
650
- }
651
- /**
652
- * The default file-picker provider: the built-in file dialog (from
653
- * `@embedpdf/web`), honouring the tool's `accept` filter. This is the ADAPTER
654
- * fulfilling the plugin's DOM-free port — the dialog lives here, in the
655
- * framework layer, never in the plugin. A picked `File` carries its own name
656
- * and mime, so it goes straight through as the engine's file source.
657
- */
658
- const filePickerProvider = async (req) => {
659
- const file = await (0, _embedpdf_web.pickFile)({ accept: req.accept ?? "*/*" });
660
- return file ? { data: file } : null;
661
- };
662
- /**
663
- * Install the file-picker provider for the active document — the ONE port
664
- * behind every click-then-pick tool (a stamp `'prompt'` source, the file-
665
- * attachment tool). Call ONCE at a document-scoped spot (not inside
666
- * `<AnnotationLayer>`, which is per page). Defaults to
667
- * {@link filePickerProvider}, so a bare `useFilePickerProvider()` makes all of
668
- * them work out of the box; pass a custom provider (asset library, cloud
669
- * drive — switch on `req.subtype` / `req.toolId`) or `null` to make
670
- * click-then-pick tools inert. Cleared on unmount.
671
- */
672
- function useFilePickerProvider(provider = filePickerProvider) {
673
- const anno = require_runtime.useOptionalCapability(_embedpdf_plugin_annotation.AnnotationToken);
674
- (0, react.useEffect)(() => {
675
- if (!anno) return;
676
- anno.setFilePickerProvider(provider);
677
- return () => anno.setFilePickerProvider(null);
678
- }, [anno, provider]);
679
- }
680
- function useAnnotation() {
681
- return require_runtime.useCapability(_embedpdf_plugin_annotation.AnnotationToken);
682
- }
683
- function useAnnotationSelection() {
684
- return require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.selection(), require_runtime.shallowArray);
685
- }
686
- /** Structural equality for a resolved props bag — keeps the subscription from
687
- * re-rendering on unrelated dispatches, since `currentDefaults` returns a fresh
688
- * object each call. Small flat objects; JSON compare is exact and cheap here. */
689
- const sameProps = (a, b) => a === b || JSON.stringify(a) === JSON.stringify(b);
690
- /**
691
- * A tool's RESOLVED defaults (base + per-tool override) as a full flat props
692
- * bag, subscribed so a `setDefaults` re-renders the consumer. Use this — not the
693
- * imperative `useAnnotation().currentDefaults(id)` — to drive default-editing
694
- * controls, so they reflect changes live. Pair with `propsForTool(id)` for the
695
- * specs to render.
696
- */
697
- function useAnnotationDefaults(toolId) {
698
- return require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.currentDefaults(toolId), sameProps);
699
- }
700
- /**
701
- * The selection's editable properties — ordered specs shared by every selected
702
- * kind, current values, and which keys are mixed. THE hook a property sidebar
703
- * renders from; write back with `useAnnotation().updateSelection({ [key]: v })`.
704
- * Reference-stable between model changes (the capability memoizes by model
705
- * identity), so the default equality is enough.
706
- */
707
- function useSelectionProps() {
708
- return require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.getSelectionProps());
709
- }
710
- /**
711
- * The selection's `/F` annotation flags — per-flag `true`/`false`, `null` where
712
- * the selected annotations disagree (render an indeterminate control), `null`
713
- * overall when nothing is selected. Write back with
714
- * `useAnnotation().updateSelectionFlags({ locked: true })`. Reference-stable
715
- * between model changes, like {@link useSelectionProps}.
716
- */
717
- function useSelectionFlags() {
718
- return require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.getSelectionFlags());
719
- }
720
- /** Pure join behind {@link useCommentThreads} — exported for tests. */
721
- function enrichCommentThreads(threads, pages) {
722
- const byPon = new Map(pages.map((p) => [p.pageObjectNumber, p]));
723
- return threads.map((t) => {
724
- const page = byPon.get(t.pageObjectNumber);
725
- return {
726
- ...t,
727
- pageIndex: page ? page.index : -1,
728
- pageLabel: page ? page.label ?? String(page.index + 1) : "?",
729
- contentRect: page ? (0, _embedpdf_core_annotation.pdfToContentRect)(t.root.rect, page.boxes.crop) : null
730
- };
731
- });
732
- }
733
- /** The comments surface (verbs + `permissionsFor`) — imperative; pair with
734
- * {@link useCommentThreads} for the subscribed view. */
735
- function useComments() {
736
- return require_runtime.useCapability(_embedpdf_plugin_annotation.AnnotationToken).comments;
737
- }
738
- const EMPTY_PAGES = [];
739
- /**
740
- * Every comment thread in the document, display-ordered (page position →
741
- * top of page → creation date) and enriched with `pageIndex`/`pageLabel`.
742
- * Subscribed to BOTH stores: annotation writes (own, remote, hydration)
743
- * recompute the threads; page moves/deletes re-run the join. Reference-
744
- * stable between changes — safe to memo child renders on the array.
745
- */
746
- function useCommentThreads() {
747
- const docId = require_runtime.useDocumentId();
748
- const threads = require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.comments.threads());
749
- const pages = require_runtime.useKernelValue((k) => docId ? k.getState().core.documents[docId]?.pages ?? EMPTY_PAGES : EMPTY_PAGES);
750
- return react.useMemo(() => enrichCommentThreads(threads, pages), [threads, pages]);
751
- }
752
- /** The enriched thread containing ANY member ref (root, reply, grouped part,
753
- * state annotation), or null. */
754
- function useCommentThread(ref) {
755
- const views = useCommentThreads();
756
- const api = useComments();
757
- if (ref == null) return null;
758
- const t = api.thread(ref);
759
- if (!t) return null;
760
- return views.find((v) => (0, _embedpdf_plugin_annotation.refKey)(v.root.ref) === (0, _embedpdf_plugin_annotation.refKey)(t.root.ref)) ?? null;
761
- }
762
- /** Whole-document hydration status — the comments sidebar's honest loading
763
- * state (`loading` until `listRawAll` lands, then `complete`/`error`). */
764
- function useCommentsHydration() {
765
- return require_runtime.useSelector(_embedpdf_plugin_annotation.AnnotationToken, (c) => c.comments.hydration());
766
- }
767
- //#endregion
768
- exports.AnnotationLayer = AnnotationLayer;
769
- exports.enrichCommentThreads = enrichCommentThreads;
770
- exports.filePickerProvider = filePickerProvider;
771
- exports.sameAnchor = require_annotation_anchors.sameAnchor;
772
- exports.sameCreationDraftAnchor = require_annotation_anchors.sameCreationDraftAnchor;
773
- exports.useAnnotation = useAnnotation;
774
- exports.useAnnotationDefaults = useAnnotationDefaults;
775
- exports.useAnnotationSelected = require_annotation_hooks.useAnnotationSelected;
776
- exports.useAnnotationSelection = useAnnotationSelection;
777
- exports.useCommentThread = useCommentThread;
778
- exports.useCommentThreads = useCommentThreads;
779
- exports.useComments = useComments;
780
- exports.useCommentsHydration = useCommentsHydration;
781
- exports.useFilePickerProvider = useFilePickerProvider;
782
- exports.useSelectionFlags = useSelectionFlags;
783
- exports.useSelectionProps = useSelectionProps;
2
+ const require_annotation = require("./annotation-BNHQpMKv.cjs");
3
+ exports.AnnotationDraftMenu = require_annotation.AnnotationDraftMenu;
4
+ exports.AnnotationLayer = require_annotation.AnnotationLayer;
5
+ exports.AnnotationMenu = require_annotation.AnnotationMenu;
6
+ exports.AnnotationRotationBadge = require_annotation.AnnotationRotationBadge;
7
+ exports.filePickerProvider = require_annotation.filePickerProvider;
8
+ exports.useAnnotation = require_annotation.useAnnotation;
9
+ exports.useAnnotationAnchor = require_annotation.useAnnotationAnchor;
10
+ exports.useAnnotationDefaults = require_annotation.useAnnotationDefaults;
11
+ exports.useAnnotationEvent = require_annotation.useAnnotationEvent;
12
+ exports.useAnnotationList = require_annotation.useAnnotationList;
13
+ exports.useAnnotationProperties = require_annotation.useAnnotationProperties;
14
+ exports.useAnnotationSettings = require_annotation.useAnnotationSettings;
15
+ exports.useAnnotationState = require_annotation.useAnnotationState;
16
+ exports.useCommentThread = require_annotation.useCommentThread;
17
+ exports.useCommentThreads = require_annotation.useCommentThreads;
18
+ exports.useComments = require_annotation.useComments;
19
+ exports.useFilePickerProvider = require_annotation.useFilePickerProvider;
20
+ exports.useRichTextEditor = require_annotation.useRichTextEditor;
21
+ var _embedpdf_plugin_annotation = require("@embedpdf/plugin-annotation");
784
22
  Object.keys(_embedpdf_plugin_annotation).forEach(function(k) {
785
23
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
786
24
  enumerable: true,
@@ -789,5 +27,3 @@ Object.keys(_embedpdf_plugin_annotation).forEach(function(k) {
789
27
  }
790
28
  });
791
29
  });
792
-
793
- //# sourceMappingURL=annotation.cjs.map