@docmentis/udoc-viewer 0.1.0 → 0.1.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 (263) hide show
  1. package/dist/wasm/udoc_bg.wasm +0 -0
  2. package/dist/worker/WorkerClient.js +1 -1
  3. package/package.json +11 -3
  4. package/dist/WorkerClient.d.ts +0 -36
  5. package/dist/WorkerClient.d.ts.map +0 -1
  6. package/dist/WorkerClient.js +0 -121
  7. package/dist/WorkerClient.js.map +0 -1
  8. package/dist/annotation/AnnotationLayer.d.ts +0 -166
  9. package/dist/annotation/AnnotationLayer.d.ts.map +0 -1
  10. package/dist/annotation/AnnotationLayer.js +0 -1090
  11. package/dist/annotation/AnnotationLayer.js.map +0 -1
  12. package/dist/annotation/index.d.ts +0 -6
  13. package/dist/annotation/index.d.ts.map +0 -1
  14. package/dist/annotation/index.js +0 -6
  15. package/dist/annotation/index.js.map +0 -1
  16. package/dist/components/FloatingBar.d.ts +0 -102
  17. package/dist/components/FloatingBar.d.ts.map +0 -1
  18. package/dist/components/FloatingBar.js +0 -513
  19. package/dist/components/FloatingBar.js.map +0 -1
  20. package/dist/components/Header.d.ts +0 -46
  21. package/dist/components/Header.d.ts.map +0 -1
  22. package/dist/components/Header.js +0 -93
  23. package/dist/components/Header.js.map +0 -1
  24. package/dist/components/index.d.ts +0 -6
  25. package/dist/components/index.d.ts.map +0 -1
  26. package/dist/components/index.js +0 -4
  27. package/dist/components/index.js.map +0 -1
  28. package/dist/components/panels/CommentsPanel.d.ts +0 -33
  29. package/dist/components/panels/CommentsPanel.d.ts.map +0 -1
  30. package/dist/components/panels/CommentsPanel.js +0 -176
  31. package/dist/components/panels/CommentsPanel.js.map +0 -1
  32. package/dist/components/panels/OutlinePanel.d.ts +0 -30
  33. package/dist/components/panels/OutlinePanel.d.ts.map +0 -1
  34. package/dist/components/panels/OutlinePanel.js +0 -144
  35. package/dist/components/panels/OutlinePanel.js.map +0 -1
  36. package/dist/components/panels/ThumbnailsPanel.d.ts +0 -51
  37. package/dist/components/panels/ThumbnailsPanel.d.ts.map +0 -1
  38. package/dist/components/panels/ThumbnailsPanel.js +0 -160
  39. package/dist/components/panels/ThumbnailsPanel.js.map +0 -1
  40. package/dist/components/panels/index.d.ts +0 -7
  41. package/dist/components/panels/index.d.ts.map +0 -1
  42. package/dist/components/panels/index.js +0 -4
  43. package/dist/components/panels/index.js.map +0 -1
  44. package/dist/constants.d.ts +0 -25
  45. package/dist/constants.d.ts.map +0 -1
  46. package/dist/constants.js +0 -46
  47. package/dist/constants.js.map +0 -1
  48. package/dist/core/NavigationController.d.ts +0 -54
  49. package/dist/core/NavigationController.d.ts.map +0 -1
  50. package/dist/core/NavigationController.js +0 -145
  51. package/dist/core/NavigationController.js.map +0 -1
  52. package/dist/core/PerfTimer.d.ts +0 -12
  53. package/dist/core/PerfTimer.d.ts.map +0 -1
  54. package/dist/core/PerfTimer.js +0 -32
  55. package/dist/core/PerfTimer.js.map +0 -1
  56. package/dist/core/ViewerState.d.ts +0 -108
  57. package/dist/core/ViewerState.d.ts.map +0 -1
  58. package/dist/core/ViewerState.js +0 -179
  59. package/dist/core/ViewerState.js.map +0 -1
  60. package/dist/core/constants.d.ts +0 -24
  61. package/dist/core/constants.d.ts.map +0 -1
  62. package/dist/core/constants.js +0 -42
  63. package/dist/core/constants.js.map +0 -1
  64. package/dist/core/index.d.ts +0 -8
  65. package/dist/core/index.d.ts.map +0 -1
  66. package/dist/core/index.js +0 -11
  67. package/dist/core/index.js.map +0 -1
  68. package/dist/core/types.d.ts +0 -573
  69. package/dist/core/types.d.ts.map +0 -1
  70. package/dist/core/types.js +0 -5
  71. package/dist/core/types.js.map +0 -1
  72. package/dist/icons/icons.d.ts +0 -41
  73. package/dist/icons/icons.d.ts.map +0 -1
  74. package/dist/icons/icons.js +0 -51
  75. package/dist/icons/icons.js.map +0 -1
  76. package/dist/icons/index.d.ts +0 -3
  77. package/dist/icons/index.d.ts.map +0 -1
  78. package/dist/icons/index.js +0 -2
  79. package/dist/icons/index.js.map +0 -1
  80. package/dist/layout/BandManager.d.ts +0 -87
  81. package/dist/layout/BandManager.d.ts.map +0 -1
  82. package/dist/layout/BandManager.js +0 -185
  83. package/dist/layout/BandManager.js.map +0 -1
  84. package/dist/layout/LayoutCalculator.d.ts +0 -42
  85. package/dist/layout/LayoutCalculator.d.ts.map +0 -1
  86. package/dist/layout/LayoutCalculator.js +0 -180
  87. package/dist/layout/LayoutCalculator.js.map +0 -1
  88. package/dist/layout/LayoutState.d.ts +0 -46
  89. package/dist/layout/LayoutState.d.ts.map +0 -1
  90. package/dist/layout/LayoutState.js +0 -109
  91. package/dist/layout/LayoutState.js.map +0 -1
  92. package/dist/layout/TransitionCoordinator.d.ts +0 -11
  93. package/dist/layout/TransitionCoordinator.d.ts.map +0 -1
  94. package/dist/layout/TransitionCoordinator.js +0 -22
  95. package/dist/layout/TransitionCoordinator.js.map +0 -1
  96. package/dist/layout/index.d.ts +0 -7
  97. package/dist/layout/index.d.ts.map +0 -1
  98. package/dist/layout/index.js +0 -4
  99. package/dist/layout/index.js.map +0 -1
  100. package/dist/rendering/BandManager.d.ts +0 -87
  101. package/dist/rendering/BandManager.d.ts.map +0 -1
  102. package/dist/rendering/BandManager.js +0 -185
  103. package/dist/rendering/BandManager.js.map +0 -1
  104. package/dist/rendering/PageCache.d.ts +0 -75
  105. package/dist/rendering/PageCache.d.ts.map +0 -1
  106. package/dist/rendering/PageCache.js +0 -122
  107. package/dist/rendering/PageCache.js.map +0 -1
  108. package/dist/rendering/RenderQueue.d.ts +0 -75
  109. package/dist/rendering/RenderQueue.d.ts.map +0 -1
  110. package/dist/rendering/RenderQueue.js +0 -105
  111. package/dist/rendering/RenderQueue.js.map +0 -1
  112. package/dist/rendering/ThumbnailQueue.d.ts +0 -57
  113. package/dist/rendering/ThumbnailQueue.d.ts.map +0 -1
  114. package/dist/rendering/ThumbnailQueue.js +0 -85
  115. package/dist/rendering/ThumbnailQueue.js.map +0 -1
  116. package/dist/rendering/index.d.ts +0 -13
  117. package/dist/rendering/index.d.ts.map +0 -1
  118. package/dist/rendering/index.js +0 -10
  119. package/dist/rendering/index.js.map +0 -1
  120. package/dist/rendering/types.d.ts +0 -72
  121. package/dist/rendering/types.d.ts.map +0 -1
  122. package/dist/rendering/types.js +0 -5
  123. package/dist/rendering/types.js.map +0 -1
  124. package/dist/styles/index.d.ts +0 -6
  125. package/dist/styles/index.d.ts.map +0 -1
  126. package/dist/styles/index.js +0 -1221
  127. package/dist/styles/index.js.map +0 -1
  128. package/dist/types.d.ts +0 -6
  129. package/dist/types.d.ts.map +0 -1
  130. package/dist/types.js +0 -6
  131. package/dist/types.js.map +0 -1
  132. package/dist/ui/Component.d.ts +0 -127
  133. package/dist/ui/Component.d.ts.map +0 -1
  134. package/dist/ui/Component.js +0 -201
  135. package/dist/ui/Component.js.map +0 -1
  136. package/dist/ui/annotation/AnnotationLayer.d.ts +0 -90
  137. package/dist/ui/annotation/AnnotationLayer.d.ts.map +0 -1
  138. package/dist/ui/annotation/AnnotationLayer.js +0 -322
  139. package/dist/ui/annotation/AnnotationLayer.js.map +0 -1
  140. package/dist/ui/annotation/LinkRenderer.d.ts +0 -32
  141. package/dist/ui/annotation/LinkRenderer.d.ts.map +0 -1
  142. package/dist/ui/annotation/LinkRenderer.js +0 -74
  143. package/dist/ui/annotation/LinkRenderer.js.map +0 -1
  144. package/dist/ui/annotation/MarkupRenderer.d.ts +0 -40
  145. package/dist/ui/annotation/MarkupRenderer.d.ts.map +0 -1
  146. package/dist/ui/annotation/MarkupRenderer.js +0 -154
  147. package/dist/ui/annotation/MarkupRenderer.js.map +0 -1
  148. package/dist/ui/annotation/ShapeRenderer.d.ts +0 -46
  149. package/dist/ui/annotation/ShapeRenderer.d.ts.map +0 -1
  150. package/dist/ui/annotation/ShapeRenderer.js +0 -376
  151. package/dist/ui/annotation/ShapeRenderer.js.map +0 -1
  152. package/dist/ui/annotation/TextRenderer.d.ts +0 -36
  153. package/dist/ui/annotation/TextRenderer.d.ts.map +0 -1
  154. package/dist/ui/annotation/TextRenderer.js +0 -199
  155. package/dist/ui/annotation/TextRenderer.js.map +0 -1
  156. package/dist/ui/annotation/index.d.ts +0 -17
  157. package/dist/ui/annotation/index.d.ts.map +0 -1
  158. package/dist/ui/annotation/index.js +0 -13
  159. package/dist/ui/annotation/index.js.map +0 -1
  160. package/dist/ui/annotation/utils.d.ts +0 -40
  161. package/dist/ui/annotation/utils.d.ts.map +0 -1
  162. package/dist/ui/annotation/utils.js +0 -62
  163. package/dist/ui/annotation/utils.js.map +0 -1
  164. package/dist/ui/components/CommentsContent.d.ts +0 -35
  165. package/dist/ui/components/CommentsContent.d.ts.map +0 -1
  166. package/dist/ui/components/CommentsContent.js +0 -203
  167. package/dist/ui/components/CommentsContent.js.map +0 -1
  168. package/dist/ui/components/FloatingBar.d.ts +0 -55
  169. package/dist/ui/components/FloatingBar.d.ts.map +0 -1
  170. package/dist/ui/components/FloatingBar.js +0 -585
  171. package/dist/ui/components/FloatingBar.js.map +0 -1
  172. package/dist/ui/components/Header.d.ts +0 -29
  173. package/dist/ui/components/Header.d.ts.map +0 -1
  174. package/dist/ui/components/Header.js +0 -127
  175. package/dist/ui/components/Header.js.map +0 -1
  176. package/dist/ui/components/LeftPanel.d.ts +0 -54
  177. package/dist/ui/components/LeftPanel.d.ts.map +0 -1
  178. package/dist/ui/components/LeftPanel.js +0 -202
  179. package/dist/ui/components/LeftPanel.js.map +0 -1
  180. package/dist/ui/components/OutlineContent.d.ts +0 -34
  181. package/dist/ui/components/OutlineContent.d.ts.map +0 -1
  182. package/dist/ui/components/OutlineContent.js +0 -147
  183. package/dist/ui/components/OutlineContent.js.map +0 -1
  184. package/dist/ui/components/RightPanel.d.ts +0 -52
  185. package/dist/ui/components/RightPanel.d.ts.map +0 -1
  186. package/dist/ui/components/RightPanel.js +0 -142
  187. package/dist/ui/components/RightPanel.js.map +0 -1
  188. package/dist/ui/components/Viewport.d.ts +0 -70
  189. package/dist/ui/components/Viewport.d.ts.map +0 -1
  190. package/dist/ui/components/Viewport.js +0 -173
  191. package/dist/ui/components/Viewport.js.map +0 -1
  192. package/dist/ui/components/index.d.ts +0 -11
  193. package/dist/ui/components/index.d.ts.map +0 -1
  194. package/dist/ui/components/index.js +0 -10
  195. package/dist/ui/components/index.js.map +0 -1
  196. package/dist/ui/icons/icons.d.ts +0 -43
  197. package/dist/ui/icons/icons.d.ts.map +0 -1
  198. package/dist/ui/icons/icons.js +0 -46
  199. package/dist/ui/icons/icons.js.map +0 -1
  200. package/dist/ui/icons/index.d.ts +0 -11
  201. package/dist/ui/icons/index.d.ts.map +0 -1
  202. package/dist/ui/icons/index.js +0 -18
  203. package/dist/ui/icons/index.js.map +0 -1
  204. package/dist/ui/index.d.ts +0 -7
  205. package/dist/ui/index.d.ts.map +0 -1
  206. package/dist/ui/index.js +0 -9
  207. package/dist/ui/index.js.map +0 -1
  208. package/dist/ui/styles/base.css.d.ts +0 -5
  209. package/dist/ui/styles/base.css.d.ts.map +0 -1
  210. package/dist/ui/styles/base.css.js +0 -49
  211. package/dist/ui/styles/base.css.js.map +0 -1
  212. package/dist/ui/styles/floating-bar.css.d.ts +0 -5
  213. package/dist/ui/styles/floating-bar.css.d.ts.map +0 -1
  214. package/dist/ui/styles/floating-bar.css.js +0 -417
  215. package/dist/ui/styles/floating-bar.css.js.map +0 -1
  216. package/dist/ui/styles/header.css.d.ts +0 -5
  217. package/dist/ui/styles/header.css.d.ts.map +0 -1
  218. package/dist/ui/styles/header.css.js +0 -49
  219. package/dist/ui/styles/header.css.js.map +0 -1
  220. package/dist/ui/styles/index.d.ts +0 -21
  221. package/dist/ui/styles/index.d.ts.map +0 -1
  222. package/dist/ui/styles/index.js +0 -48
  223. package/dist/ui/styles/index.js.map +0 -1
  224. package/dist/ui/styles/panels.css.d.ts +0 -5
  225. package/dist/ui/styles/panels.css.d.ts.map +0 -1
  226. package/dist/ui/styles/panels.css.js +0 -446
  227. package/dist/ui/styles/panels.css.js.map +0 -1
  228. package/dist/ui/styles/responsive.css.d.ts +0 -5
  229. package/dist/ui/styles/responsive.css.d.ts.map +0 -1
  230. package/dist/ui/styles/responsive.css.js +0 -201
  231. package/dist/ui/styles/responsive.css.js.map +0 -1
  232. package/dist/ui/styles/variables.css.d.ts +0 -6
  233. package/dist/ui/styles/variables.css.d.ts.map +0 -1
  234. package/dist/ui/styles/variables.css.js +0 -75
  235. package/dist/ui/styles/variables.css.js.map +0 -1
  236. package/dist/ui/styles/viewport.css.d.ts +0 -5
  237. package/dist/ui/styles/viewport.css.d.ts.map +0 -1
  238. package/dist/ui/styles/viewport.css.js +0 -87
  239. package/dist/ui/styles/viewport.css.js.map +0 -1
  240. package/dist/view/LayoutCalculator.d.ts +0 -42
  241. package/dist/view/LayoutCalculator.d.ts.map +0 -1
  242. package/dist/view/LayoutCalculator.js +0 -180
  243. package/dist/view/LayoutCalculator.js.map +0 -1
  244. package/dist/view/TransitionCoordinator.d.ts +0 -11
  245. package/dist/view/TransitionCoordinator.d.ts.map +0 -1
  246. package/dist/view/TransitionCoordinator.js +0 -22
  247. package/dist/view/TransitionCoordinator.js.map +0 -1
  248. package/dist/view/ViewState.d.ts +0 -46
  249. package/dist/view/ViewState.d.ts.map +0 -1
  250. package/dist/view/ViewState.js +0 -109
  251. package/dist/view/ViewState.js.map +0 -1
  252. package/dist/view/index.d.ts +0 -7
  253. package/dist/view/index.d.ts.map +0 -1
  254. package/dist/view/index.js +0 -4
  255. package/dist/view/index.js.map +0 -1
  256. package/dist/worker/types.d.ts +0 -81
  257. package/dist/worker/types.d.ts.map +0 -1
  258. package/dist/worker/types.js +0 -6
  259. package/dist/worker/types.js.map +0 -1
  260. package/dist/worker.d.ts +0 -2
  261. package/dist/worker.d.ts.map +0 -1
  262. package/dist/worker.js +0 -205
  263. package/dist/worker.js.map +0 -1
@@ -1,199 +0,0 @@
1
- import { colorToRgb, createSvgOverlay, scaleBounds, POINTS_TO_CSS_PIXELS } from './utils';
2
- /**
3
- * Renders text-related annotations (text, freeText, stamp, caret).
4
- */
5
- export class TextRenderer {
6
- zoom;
7
- onShowPopup;
8
- constructor(zoom, onShowPopup) {
9
- this.zoom = zoom;
10
- this.onShowPopup = onShowPopup;
11
- }
12
- setZoom(zoom) {
13
- this.zoom = zoom;
14
- }
15
- setShowPopupCallback(callback) {
16
- this.onShowPopup = callback;
17
- }
18
- /**
19
- * Render a text (sticky note) annotation as an icon.
20
- */
21
- renderText(overlay, annotation) {
22
- const screenX = annotation.bounds.x * POINTS_TO_CSS_PIXELS * this.zoom;
23
- const iconSize = 20 * this.zoom;
24
- const color = colorToRgb(annotation.color, 'rgb(255, 208, 0)'); // Default yellow
25
- // Position at bottom-left of bounds (PDF anchors sticky notes at lower-left corner)
26
- // After Y-flip, lower-left becomes bottom-left in screen coords
27
- const screenY = (annotation.bounds.y + annotation.bounds.height) * POINTS_TO_CSS_PIXELS * this.zoom -
28
- iconSize;
29
- // Create icon container
30
- const icon = document.createElement('div');
31
- icon.className = 'udoc-annotation-text-icon';
32
- icon.style.cssText = `
33
- position: absolute;
34
- left: ${screenX}px;
35
- top: ${screenY}px;
36
- width: ${iconSize}px;
37
- height: ${iconSize}px;
38
- pointer-events: auto;
39
- cursor: pointer;
40
- `;
41
- // Create SVG icon based on type
42
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
43
- svg.setAttribute('viewBox', '0 0 24 24');
44
- svg.setAttribute('width', String(iconSize));
45
- svg.setAttribute('height', String(iconSize));
46
- // Use a note/comment icon path
47
- const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
48
- path.setAttribute('d', 'M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z');
49
- path.setAttribute('fill', color);
50
- path.setAttribute('stroke', 'rgba(0,0,0,0.3)');
51
- path.setAttribute('stroke-width', '1');
52
- svg.appendChild(path);
53
- icon.appendChild(svg);
54
- // Add click handler to show popup with metadata
55
- if (annotation.metadata && this.onShowPopup) {
56
- const showPopup = this.onShowPopup;
57
- const metadata = annotation.metadata;
58
- icon.addEventListener('click', (e) => {
59
- e.stopPropagation();
60
- showPopup(icon, metadata, color);
61
- });
62
- }
63
- overlay.appendChild(icon);
64
- }
65
- /**
66
- * Render a free text (typewriter/text box) annotation.
67
- */
68
- renderFreeText(overlay, annotation) {
69
- const scaled = scaleBounds(annotation.bounds, this.zoom);
70
- const color = colorToRgb(annotation.color, 'rgb(0, 0, 0)'); // Default black
71
- const borderColor = colorToRgb(annotation.borderColor, 'transparent');
72
- // Create text box
73
- const textBox = document.createElement('div');
74
- textBox.className = 'udoc-annotation-freetext';
75
- textBox.style.cssText = `
76
- position: absolute;
77
- left: ${scaled.x}px;
78
- top: ${scaled.y}px;
79
- width: ${scaled.width}px;
80
- height: ${scaled.height}px;
81
- color: ${color};
82
- border: 1px solid ${borderColor};
83
- font-size: ${12 * this.zoom}px;
84
- font-family: Helvetica, Arial, sans-serif;
85
- text-align: ${annotation.justification};
86
- overflow: hidden;
87
- word-wrap: break-word;
88
- pointer-events: none;
89
- padding: ${2 * this.zoom}px;
90
- box-sizing: border-box;
91
- `;
92
- if (annotation.contents) {
93
- textBox.textContent = annotation.contents;
94
- }
95
- // Render callout line if present
96
- if (annotation.calloutLine && annotation.calloutLine.length >= 2) {
97
- const svg = createSvgOverlay();
98
- const lineColor = colorToRgb(annotation.borderColor, 'rgb(0, 0, 0)');
99
- const strokeWidth = Math.max(1, 1 * this.zoom);
100
- const pathData = annotation.calloutLine
101
- .map((point, i) => {
102
- const x = point.x * POINTS_TO_CSS_PIXELS * this.zoom;
103
- const y = point.y * POINTS_TO_CSS_PIXELS * this.zoom;
104
- return `${i === 0 ? 'M' : 'L'} ${x} ${y}`;
105
- })
106
- .join(' ');
107
- const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
108
- path.setAttribute('d', pathData);
109
- path.setAttribute('stroke', lineColor);
110
- path.setAttribute('stroke-width', String(strokeWidth));
111
- path.setAttribute('fill', 'none');
112
- svg.appendChild(path);
113
- overlay.appendChild(svg);
114
- }
115
- overlay.appendChild(textBox);
116
- }
117
- /**
118
- * Render a stamp annotation as a bordered text label.
119
- */
120
- renderStamp(overlay, annotation) {
121
- const scaled = scaleBounds(annotation.bounds, this.zoom);
122
- const color = colorToRgb(annotation.color, 'rgb(255, 0, 0)'); // Default red
123
- // If stamp has custom appearance, we just show the bounds
124
- // (actual appearance would be rendered via the page content)
125
- // For standard stamps, show the name
126
- const stamp = document.createElement('div');
127
- stamp.className = 'udoc-annotation-stamp';
128
- stamp.style.cssText = `
129
- position: absolute;
130
- left: ${scaled.x}px;
131
- top: ${scaled.y}px;
132
- width: ${scaled.width}px;
133
- height: ${scaled.height}px;
134
- display: flex;
135
- align-items: center;
136
- justify-content: center;
137
- pointer-events: none;
138
- `;
139
- // Only show text for standard stamps without custom appearance
140
- if (!annotation.hasCustomAppearance && annotation.name) {
141
- const label = document.createElement('span');
142
- label.style.cssText = `
143
- color: ${color};
144
- font-size: ${Math.min(scaled.height * 0.4, 16 * this.zoom)}px;
145
- font-weight: bold;
146
- font-family: Helvetica, Arial, sans-serif;
147
- text-transform: uppercase;
148
- border: 2px solid ${color};
149
- padding: ${2 * this.zoom}px ${4 * this.zoom}px;
150
- transform: rotate(-15deg);
151
- white-space: nowrap;
152
- `;
153
- label.textContent = annotation.name;
154
- stamp.appendChild(label);
155
- }
156
- overlay.appendChild(stamp);
157
- }
158
- /**
159
- * Render a caret (text insertion point) annotation.
160
- */
161
- renderCaret(overlay, annotation) {
162
- const svg = createSvgOverlay();
163
- const color = colorToRgb(annotation.color, 'rgb(0, 128, 255)'); // Default blue
164
- const opacity = annotation.opacity ?? 1;
165
- const scaled = scaleBounds(annotation.bounds, this.zoom);
166
- const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
167
- g.setAttribute('opacity', String(opacity));
168
- // Draw caret symbol (^) or paragraph marker
169
- if (annotation.symbol === 'P') {
170
- // Paragraph symbol
171
- const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
172
- text.setAttribute('x', String(scaled.x + scaled.width / 2));
173
- text.setAttribute('y', String(scaled.y + scaled.height * 0.8));
174
- text.setAttribute('fill', color);
175
- text.setAttribute('font-size', String(Math.min(scaled.height, 16 * this.zoom)));
176
- text.setAttribute('text-anchor', 'middle');
177
- text.textContent = '\u00B6'; // Pilcrow sign
178
- g.appendChild(text);
179
- }
180
- else {
181
- // Default caret (^) - draw as an inverted V
182
- const caretHeight = Math.min(scaled.height, 12 * this.zoom);
183
- const caretWidth = caretHeight * 0.8;
184
- const centerX = scaled.x + scaled.width / 2;
185
- const bottomY = scaled.y + scaled.height;
186
- const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
187
- path.setAttribute('d', `M ${centerX - caretWidth / 2} ${bottomY} L ${centerX} ${bottomY - caretHeight} L ${centerX + caretWidth / 2} ${bottomY}`);
188
- path.setAttribute('stroke', color);
189
- path.setAttribute('stroke-width', String(2 * this.zoom));
190
- path.setAttribute('fill', 'none');
191
- path.setAttribute('stroke-linecap', 'round');
192
- path.setAttribute('stroke-linejoin', 'round');
193
- g.appendChild(path);
194
- }
195
- svg.appendChild(g);
196
- overlay.appendChild(svg);
197
- }
198
- }
199
- //# sourceMappingURL=TextRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextRenderer.js","sourceRoot":"","sources":["../../../src/ui/annotation/TextRenderer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAiB1F;;GAEG;AACH,MAAM,OAAO,YAAY;IACb,IAAI,CAAS;IACb,WAAW,CAAqB;IAExC,YAAY,IAAY,EAAE,WAA+B;QACrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,IAAY;QAChB,IAAI,CAAC,IAAI,GAAG,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AAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAClC,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;YAC9C,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;QAED,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACnB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACJ"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Annotation rendering module.
3
- *
4
- * This module provides annotation rendering and interaction for document viewers.
5
- * It includes specialized renderers for different annotation types.
6
- */
7
- export { AnnotationLayer } from './AnnotationLayer';
8
- export { MarkupRenderer } from './MarkupRenderer';
9
- export type { MarkupAnnotation, ShowPopupCallback as MarkupShowPopupCallback } from './MarkupRenderer';
10
- export { LinkRenderer } from './LinkRenderer';
11
- export type { NavigateCallback, OpenUriCallback } from './LinkRenderer';
12
- export { ShapeRenderer } from './ShapeRenderer';
13
- export type { ShapeAnnotation } from './ShapeRenderer';
14
- export { TextRenderer } from './TextRenderer';
15
- export type { TextAnnotationType, ShowPopupCallback as TextShowPopupCallback } from './TextRenderer';
16
- export * from './utils';
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/annotation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACrG,cAAc,SAAS,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Annotation rendering module.
3
- *
4
- * This module provides annotation rendering and interaction for document viewers.
5
- * It includes specialized renderers for different annotation types.
6
- */
7
- export { AnnotationLayer } from './AnnotationLayer';
8
- export { MarkupRenderer } from './MarkupRenderer';
9
- export { LinkRenderer } from './LinkRenderer';
10
- export { ShapeRenderer } from './ShapeRenderer';
11
- export { TextRenderer } from './TextRenderer';
12
- export * from './utils';
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/annotation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,cAAc,SAAS,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Shared utilities for annotation rendering.
3
- */
4
- import type { AnnotationColor, Point } from '../../core/types';
5
- import { POINTS_TO_CSS_PIXELS } from '../../core/constants';
6
- /**
7
- * Convert annotation color to CSS rgb() string.
8
- */
9
- export declare function colorToRgb(color: AnnotationColor | undefined, defaultColor: string): string;
10
- /**
11
- * Scale quad points from PDF coordinates to screen pixels.
12
- */
13
- export declare function scaleQuadPoints(points: [Point, Point, Point, Point], zoom: number): Point[];
14
- /**
15
- * Create an SVG element sized to cover the annotation overlay.
16
- */
17
- export declare function createSvgOverlay(): SVGSVGElement;
18
- /**
19
- * Scale a point from PDF coordinates to screen pixels.
20
- */
21
- export declare function scalePoint(point: Point, zoom: number): Point;
22
- /**
23
- * Scale bounds from PDF coordinates to screen pixels.
24
- */
25
- export declare function scaleBounds(bounds: {
26
- x: number;
27
- y: number;
28
- width: number;
29
- height: number;
30
- }, zoom: number): {
31
- x: number;
32
- y: number;
33
- width: number;
34
- height: number;
35
- };
36
- /**
37
- * Re-export POINTS_TO_CSS_PIXELS for convenience.
38
- */
39
- export { POINTS_TO_CSS_PIXELS };
40
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ui/annotation/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAM3F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC3B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EACpC,IAAI,EAAE,MAAM,GACb,KAAK,EAAE,CAKT;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAYhD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAK5D;AAED;;GAEG;AACH,wBAAgB,WAAW,CACvB,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/D,IAAI,EAAE,MAAM,GACb;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAOzD;AAED;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,62 +0,0 @@
1
- import { POINTS_TO_CSS_PIXELS } from '../../core/constants';
2
- /**
3
- * Convert annotation color to CSS rgb() string.
4
- */
5
- export function colorToRgb(color, defaultColor) {
6
- if (!color)
7
- return defaultColor;
8
- const r = Math.round(color.r * 255);
9
- const g = Math.round(color.g * 255);
10
- const b = Math.round(color.b * 255);
11
- return `rgb(${r}, ${g}, ${b})`;
12
- }
13
- /**
14
- * Scale quad points from PDF coordinates to screen pixels.
15
- */
16
- export function scaleQuadPoints(points, zoom) {
17
- return points.map((p) => ({
18
- x: p.x * POINTS_TO_CSS_PIXELS * zoom,
19
- y: p.y * POINTS_TO_CSS_PIXELS * zoom,
20
- }));
21
- }
22
- /**
23
- * Create an SVG element sized to cover the annotation overlay.
24
- */
25
- export function createSvgOverlay() {
26
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
27
- svg.style.cssText = `
28
- position: absolute;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- pointer-events: none;
34
- overflow: visible;
35
- `;
36
- return svg;
37
- }
38
- /**
39
- * Scale a point from PDF coordinates to screen pixels.
40
- */
41
- export function scalePoint(point, zoom) {
42
- return {
43
- x: point.x * POINTS_TO_CSS_PIXELS * zoom,
44
- y: point.y * POINTS_TO_CSS_PIXELS * zoom,
45
- };
46
- }
47
- /**
48
- * Scale bounds from PDF coordinates to screen pixels.
49
- */
50
- export function scaleBounds(bounds, zoom) {
51
- return {
52
- x: bounds.x * POINTS_TO_CSS_PIXELS * zoom,
53
- y: bounds.y * POINTS_TO_CSS_PIXELS * zoom,
54
- width: bounds.width * POINTS_TO_CSS_PIXELS * zoom,
55
- height: bounds.height * POINTS_TO_CSS_PIXELS * zoom,
56
- };
57
- }
58
- /**
59
- * Re-export POINTS_TO_CSS_PIXELS for convenience.
60
- */
61
- export { POINTS_TO_CSS_PIXELS };
62
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/ui/annotation/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAkC,EAAE,YAAoB;IAC/E,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC3B,MAAoC,EACpC,IAAY;IAEZ,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACtB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;QACpC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;KACvC,CAAC,CAAC,CAAC;AACR,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,GAAG,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;IAC1E,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG;;;;;;;;KAQnB,CAAC;IACF,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAY,EAAE,IAAY;IACjD,OAAO;QACH,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;QACxC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;KAC3C,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CACvB,MAA+D,EAC/D,IAAY;IAEZ,OAAO;QACH,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;QACzC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,oBAAoB,GAAG,IAAI;QACzC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAG,oBAAoB,GAAG,IAAI;QACjD,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,oBAAoB,GAAG,IAAI;KACtD,CAAC;AACN,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,35 +0,0 @@
1
- import { Component } from '../Component';
2
- import type { UDocViewer } from '../../UDocViewer';
3
- import type { Annotation } from '../../core/types';
4
- /**
5
- * CommentsContent renders annotations with metadata (comments, highlights, etc.)
6
- * in the right panel.
7
- *
8
- * Features:
9
- * - Groups annotations by page
10
- * - Collapsible page sections
11
- * - Shows author, status, and content
12
- * - Collapsible reply threads
13
- * - Click to navigate to page
14
- */
15
- export declare class CommentsContent extends Component<HTMLDivElement> {
16
- private onPageClick;
17
- private getAnnotations;
18
- constructor(viewer: UDocViewer, getAnnotations: () => Map<number, Annotation[]>, onPageClick: (pageIndex: number) => void);
19
- protected createElement(): HTMLDivElement;
20
- /**
21
- * Render the comments panel.
22
- */
23
- render(): void;
24
- private renderPlaceholder;
25
- /**
26
- * Render a single comment item with its replies.
27
- * @param depth - Nesting depth (0 = top-level, 1+ = replies)
28
- */
29
- private renderCommentItem;
30
- /**
31
- * Get icon for annotation type.
32
- */
33
- private getAnnotationTypeIcon;
34
- }
35
- //# sourceMappingURL=CommentsContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommentsContent.d.ts","sourceRoot":"","sources":["../../../src/ui/components/CommentsContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,qBAAa,eAAgB,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1D,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,cAAc,CAAkC;gBAGpD,MAAM,EAAE,UAAU,EAClB,cAAc,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAC/C,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI;IAO5C,SAAS,CAAC,aAAa,IAAI,cAAc;IAMzC;;OAEG;IACH,MAAM,IAAI,IAAI;IAwDd,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmGzB;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAgChC"}
@@ -1,203 +0,0 @@
1
- import { Component } from '../Component';
2
- import { ICONS } from '../icons';
3
- /**
4
- * CommentsContent renders annotations with metadata (comments, highlights, etc.)
5
- * in the right panel.
6
- *
7
- * Features:
8
- * - Groups annotations by page
9
- * - Collapsible page sections
10
- * - Shows author, status, and content
11
- * - Collapsible reply threads
12
- * - Click to navigate to page
13
- */
14
- export class CommentsContent extends Component {
15
- onPageClick;
16
- getAnnotations;
17
- constructor(viewer, getAnnotations, onPageClick) {
18
- super(viewer);
19
- this.getAnnotations = getAnnotations;
20
- this.onPageClick = onPageClick;
21
- }
22
- createElement() {
23
- const container = document.createElement('div');
24
- container.className = 'udoc-comments-content';
25
- return container;
26
- }
27
- /**
28
- * Render the comments panel.
29
- */
30
- render() {
31
- this.element.innerHTML = '';
32
- const annotationsByPage = this.getAnnotations();
33
- if (annotationsByPage.size === 0) {
34
- this.renderPlaceholder();
35
- return;
36
- }
37
- const list = document.createElement('div');
38
- list.className = 'udoc-comments-list';
39
- // Sort pages by index
40
- const sortedPages = Array.from(annotationsByPage.keys()).sort((a, b) => a - b);
41
- for (const pageIndex of sortedPages) {
42
- const annotations = annotationsByPage.get(pageIndex);
43
- // Page group container
44
- const pageGroup = document.createElement('div');
45
- pageGroup.className = 'udoc-comments-page-group';
46
- // Page header (foldable)
47
- const pageHeader = document.createElement('div');
48
- pageHeader.className = 'udoc-comments-page-header';
49
- pageHeader.innerHTML = `${ICONS.chevronDown}<span>Page ${pageIndex + 1}</span><span class="udoc-comments-page-count">${annotations.length}</span>`;
50
- pageGroup.appendChild(pageHeader);
51
- // Page content container
52
- const pageContent = document.createElement('div');
53
- pageContent.className = 'udoc-comments-page-content';
54
- // Render each annotation
55
- for (const annotation of annotations) {
56
- this.renderCommentItem(pageContent, annotation, pageIndex, 0);
57
- }
58
- pageGroup.appendChild(pageContent);
59
- // Toggle click handler for page header
60
- pageHeader.addEventListener('click', () => {
61
- const isCollapsed = pageGroup.classList.contains('udoc-comments-page-collapsed');
62
- if (isCollapsed) {
63
- pageGroup.classList.remove('udoc-comments-page-collapsed');
64
- }
65
- else {
66
- pageGroup.classList.add('udoc-comments-page-collapsed');
67
- }
68
- });
69
- list.appendChild(pageGroup);
70
- }
71
- this.element.appendChild(list);
72
- }
73
- renderPlaceholder() {
74
- const placeholder = document.createElement('div');
75
- placeholder.className = 'udoc-panel-placeholder';
76
- placeholder.innerHTML = `
77
- <div class="udoc-placeholder-icon">${ICONS.comments}</div>
78
- <div class="udoc-placeholder-title">Comments</div>
79
- <div class="udoc-placeholder-message">No comments in this document</div>
80
- `;
81
- this.element.appendChild(placeholder);
82
- }
83
- /**
84
- * Render a single comment item with its replies.
85
- * @param depth - Nesting depth (0 = top-level, 1+ = replies)
86
- */
87
- renderCommentItem(container, annotation, pageIndex, depth) {
88
- const item = document.createElement('div');
89
- item.className = depth > 0
90
- ? `udoc-comment-item udoc-comment-reply udoc-comment-depth-${Math.min(depth, 3)}`
91
- : 'udoc-comment-item';
92
- // Icon on the left
93
- const icon = document.createElement('div');
94
- icon.className = 'udoc-comment-icon';
95
- icon.innerHTML = this.getAnnotationTypeIcon(annotation.type);
96
- item.appendChild(icon);
97
- // Body container for title, contents, and toggle button
98
- const body = document.createElement('div');
99
- body.className = 'udoc-comment-body';
100
- // Header with title (author first, fallback to subject) and status badge
101
- const header = document.createElement('div');
102
- header.className = 'udoc-comment-header';
103
- const meta = annotation.metadata;
104
- const title = meta?.author || meta?.subject;
105
- if (title) {
106
- const titleEl = document.createElement('span');
107
- titleEl.className = 'udoc-comment-author';
108
- titleEl.textContent = title;
109
- header.appendChild(titleEl);
110
- }
111
- // Status badge
112
- if (meta?.state) {
113
- const badge = document.createElement('span');
114
- badge.className = `udoc-comment-status udoc-comment-status-${meta.state.toLowerCase()}`;
115
- badge.textContent = meta.state;
116
- header.appendChild(badge);
117
- }
118
- body.appendChild(header);
119
- // Contents
120
- if (meta?.contents) {
121
- const contents = document.createElement('div');
122
- contents.className = 'udoc-comment-contents';
123
- contents.textContent = meta.contents;
124
- body.appendChild(contents);
125
- }
126
- // Reply toggle button (inside body so it aligns with content)
127
- if (annotation.replies && annotation.replies.length > 0) {
128
- const toggleBtn = document.createElement('button');
129
- toggleBtn.className = 'udoc-comment-toggle';
130
- toggleBtn.innerHTML = `${ICONS.chevronRight}<span>${annotation.replies.length} ${annotation.replies.length === 1 ? 'reply' : 'replies'}</span>`;
131
- toggleBtn.title = 'Show replies';
132
- body.appendChild(toggleBtn);
133
- }
134
- item.appendChild(body);
135
- // Click to navigate
136
- item.addEventListener('click', (e) => {
137
- e.stopPropagation();
138
- this.onPageClick(pageIndex);
139
- });
140
- container.appendChild(item);
141
- // Render replies (foldable, collapsed by default)
142
- if (annotation.replies && annotation.replies.length > 0) {
143
- const toggleBtn = body.querySelector('.udoc-comment-toggle');
144
- const repliesContainer = document.createElement('div');
145
- repliesContainer.className = 'udoc-comment-replies udoc-comment-replies-collapsed';
146
- for (const reply of annotation.replies) {
147
- this.renderCommentItem(repliesContainer, reply, pageIndex, depth + 1);
148
- }
149
- container.appendChild(repliesContainer);
150
- // Toggle click handler
151
- toggleBtn.addEventListener('click', (e) => {
152
- e.stopPropagation();
153
- const isCollapsed = repliesContainer.classList.contains('udoc-comment-replies-collapsed');
154
- if (isCollapsed) {
155
- repliesContainer.classList.remove('udoc-comment-replies-collapsed');
156
- toggleBtn.classList.add('udoc-comment-toggle-expanded');
157
- toggleBtn.title = 'Hide replies';
158
- }
159
- else {
160
- repliesContainer.classList.add('udoc-comment-replies-collapsed');
161
- toggleBtn.classList.remove('udoc-comment-toggle-expanded');
162
- toggleBtn.title = 'Show replies';
163
- }
164
- });
165
- }
166
- }
167
- /**
168
- * Get icon for annotation type.
169
- */
170
- getAnnotationTypeIcon(type) {
171
- switch (type) {
172
- case 'text':
173
- return ICONS.stickyNote;
174
- case 'highlight':
175
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>';
176
- case 'underline':
177
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/></svg>';
178
- case 'strikeOut':
179
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/></svg>';
180
- case 'squiggly':
181
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>';
182
- case 'freeText':
183
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"/></svg>';
184
- case 'stamp':
185
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M18 14H6v-4h12m0-2H6a2 2 0 00-2 2v4a2 2 0 002 2h12a2 2 0 002-2v-4a2 2 0 00-2-2M6 20h12v2H6m9-18H9v2H6V6a2 2 0 012-2h2V2h4v2h2a2 2 0 012 2v2h-3V6h-2z"/></svg>';
186
- case 'line':
187
- case 'square':
188
- case 'circle':
189
- case 'polygon':
190
- case 'polyLine':
191
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M2 6v6h6V6H2zm16 0v6h6V6h-6zM7 17l5-5 5 5H7z"/></svg>';
192
- case 'ink':
193
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>';
194
- case 'caret':
195
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>';
196
- case 'redact':
197
- return '<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M6 19h12v2H6z"/></svg>';
198
- default:
199
- return ICONS.comments;
200
- }
201
- }
202
- }
203
- //# sourceMappingURL=CommentsContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommentsContent.js","sourceRoot":"","sources":["../../../src/ui/components/CommentsContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIjC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,eAAgB,SAAQ,SAAyB;IAClD,WAAW,CAA8B;IACzC,cAAc,CAAkC;IAExD,YACI,MAAkB,EAClB,cAA+C,EAC/C,WAAwC;QAExC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAES,aAAa;QACnB,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChD,SAAS,CAAC,SAAS,GAAG,uBAAuB,CAAC;QAC9C,OAAO,SAAS,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,MAAM;QACF,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC;QAE5B,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAEhD,IAAI,iBAAiB,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzB,OAAO;QACX,CAAC;QAED,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,oBAAoB,CAAC;QAEtC,sBAAsB;QACtB,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,C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