@flanksource/clicky-ui 0.3.60 → 0.3.61

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 (511) hide show
  1. package/NOTICE.md +4 -0
  2. package/dist/chat.cjs +7 -1
  3. package/dist/chat.js +4 -2
  4. package/dist/comments/AnnotationSurface.cjs +317 -0
  5. package/dist/comments/AnnotationSurface.cjs.map +1 -0
  6. package/dist/comments/AnnotationSurface.d.ts +19 -0
  7. package/dist/comments/AnnotationSurface.d.ts.map +1 -0
  8. package/dist/comments/AnnotationSurface.js +317 -0
  9. package/dist/comments/AnnotationSurface.js.map +1 -0
  10. package/dist/comments/CapturePin.cjs +26 -0
  11. package/dist/comments/CapturePin.cjs.map +1 -0
  12. package/dist/comments/CapturePin.d.ts +12 -0
  13. package/dist/comments/CapturePin.d.ts.map +1 -0
  14. package/dist/comments/CapturePin.js +26 -0
  15. package/dist/comments/CapturePin.js.map +1 -0
  16. package/dist/comments/CommentAuthor.cjs +17 -3
  17. package/dist/comments/CommentAuthor.cjs.map +1 -1
  18. package/dist/comments/CommentAuthor.d.ts +3 -0
  19. package/dist/comments/CommentAuthor.d.ts.map +1 -1
  20. package/dist/comments/CommentAuthor.js +18 -5
  21. package/dist/comments/CommentAuthor.js.map +1 -1
  22. package/dist/comments/CommentCard.cjs +98 -52
  23. package/dist/comments/CommentCard.cjs.map +1 -1
  24. package/dist/comments/CommentCard.d.ts +3 -0
  25. package/dist/comments/CommentCard.d.ts.map +1 -1
  26. package/dist/comments/CommentCard.js +100 -54
  27. package/dist/comments/CommentCard.js.map +1 -1
  28. package/dist/comments/CommentCardParts.cjs +76 -0
  29. package/dist/comments/CommentCardParts.cjs.map +1 -1
  30. package/dist/comments/CommentCardParts.d.ts.map +1 -1
  31. package/dist/comments/CommentCardParts.js +76 -0
  32. package/dist/comments/CommentCardParts.js.map +1 -1
  33. package/dist/comments/CommentComposer.cjs +71 -34
  34. package/dist/comments/CommentComposer.cjs.map +1 -1
  35. package/dist/comments/CommentComposer.d.ts +2 -1
  36. package/dist/comments/CommentComposer.d.ts.map +1 -1
  37. package/dist/comments/CommentComposer.js +72 -35
  38. package/dist/comments/CommentComposer.js.map +1 -1
  39. package/dist/comments/CommentDraftCard.cjs +68 -0
  40. package/dist/comments/CommentDraftCard.cjs.map +1 -0
  41. package/dist/comments/CommentDraftCard.d.ts +7 -0
  42. package/dist/comments/CommentDraftCard.d.ts.map +1 -0
  43. package/dist/comments/CommentDraftCard.js +68 -0
  44. package/dist/comments/CommentDraftCard.js.map +1 -0
  45. package/dist/comments/CommentDraftPopover.cjs +60 -0
  46. package/dist/comments/CommentDraftPopover.cjs.map +1 -0
  47. package/dist/comments/CommentDraftPopover.d.ts +6 -0
  48. package/dist/comments/CommentDraftPopover.d.ts.map +1 -0
  49. package/dist/comments/CommentDraftPopover.js +60 -0
  50. package/dist/comments/CommentDraftPopover.js.map +1 -0
  51. package/dist/comments/CommentEditor.cjs +350 -0
  52. package/dist/comments/CommentEditor.cjs.map +1 -0
  53. package/dist/comments/CommentEditor.d.ts +10 -0
  54. package/dist/comments/CommentEditor.d.ts.map +1 -0
  55. package/dist/comments/CommentEditor.js +350 -0
  56. package/dist/comments/CommentEditor.js.map +1 -0
  57. package/dist/comments/CommentMarkdown.cjs +28 -13
  58. package/dist/comments/CommentMarkdown.cjs.map +1 -1
  59. package/dist/comments/CommentMarkdown.d.ts +4 -1
  60. package/dist/comments/CommentMarkdown.d.ts.map +1 -1
  61. package/dist/comments/CommentMarkdown.js +28 -13
  62. package/dist/comments/CommentMarkdown.js.map +1 -1
  63. package/dist/comments/CommentPersistenceBoundary.cjs +55 -0
  64. package/dist/comments/CommentPersistenceBoundary.cjs.map +1 -0
  65. package/dist/comments/CommentPersistenceBoundary.d.ts +6 -0
  66. package/dist/comments/CommentPersistenceBoundary.d.ts.map +1 -0
  67. package/dist/comments/CommentPersistenceBoundary.js +55 -0
  68. package/dist/comments/CommentPersistenceBoundary.js.map +1 -0
  69. package/dist/comments/CommentPreview.cjs +45 -0
  70. package/dist/comments/CommentPreview.cjs.map +1 -0
  71. package/dist/comments/CommentPreview.d.ts +7 -0
  72. package/dist/comments/CommentPreview.d.ts.map +1 -0
  73. package/dist/comments/CommentPreview.js +45 -0
  74. package/dist/comments/CommentPreview.js.map +1 -0
  75. package/dist/comments/CommentProvider.cjs +34 -9
  76. package/dist/comments/CommentProvider.cjs.map +1 -1
  77. package/dist/comments/CommentProvider.d.ts +3 -1
  78. package/dist/comments/CommentProvider.d.ts.map +1 -1
  79. package/dist/comments/CommentProvider.js +34 -9
  80. package/dist/comments/CommentProvider.js.map +1 -1
  81. package/dist/comments/CommentRail.cjs +83 -0
  82. package/dist/comments/CommentRail.cjs.map +1 -0
  83. package/dist/comments/CommentRail.d.ts +18 -0
  84. package/dist/comments/CommentRail.d.ts.map +1 -0
  85. package/dist/comments/CommentRail.js +83 -0
  86. package/dist/comments/CommentRail.js.map +1 -0
  87. package/dist/comments/CommentReplyInput.cjs +73 -0
  88. package/dist/comments/CommentReplyInput.cjs.map +1 -0
  89. package/dist/comments/CommentReplyInput.d.ts +9 -0
  90. package/dist/comments/CommentReplyInput.d.ts.map +1 -0
  91. package/dist/comments/CommentReplyInput.js +73 -0
  92. package/dist/comments/CommentReplyInput.js.map +1 -0
  93. package/dist/comments/CommentSidePanel.cjs +22 -6
  94. package/dist/comments/CommentSidePanel.cjs.map +1 -1
  95. package/dist/comments/CommentSidePanel.d.ts +4 -1
  96. package/dist/comments/CommentSidePanel.d.ts.map +1 -1
  97. package/dist/comments/CommentSidePanel.js +22 -6
  98. package/dist/comments/CommentSidePanel.js.map +1 -1
  99. package/dist/comments/CommentThread.cjs +4 -1
  100. package/dist/comments/CommentThread.cjs.map +1 -1
  101. package/dist/comments/CommentThread.d.ts +3 -2
  102. package/dist/comments/CommentThread.d.ts.map +1 -1
  103. package/dist/comments/CommentThread.js +4 -1
  104. package/dist/comments/CommentThread.js.map +1 -1
  105. package/dist/comments/CommentThreadList.cjs +55 -86
  106. package/dist/comments/CommentThreadList.cjs.map +1 -1
  107. package/dist/comments/CommentThreadList.d.ts +4 -3
  108. package/dist/comments/CommentThreadList.d.ts.map +1 -1
  109. package/dist/comments/CommentThreadList.js +56 -87
  110. package/dist/comments/CommentThreadList.js.map +1 -1
  111. package/dist/comments/ElementOutline.cjs +20 -0
  112. package/dist/comments/ElementOutline.cjs.map +1 -0
  113. package/dist/comments/ElementOutline.d.ts +6 -0
  114. package/dist/comments/ElementOutline.d.ts.map +1 -0
  115. package/dist/comments/ElementOutline.js +20 -0
  116. package/dist/comments/ElementOutline.js.map +1 -0
  117. package/dist/comments/VocabularyChip.cjs +50 -0
  118. package/dist/comments/VocabularyChip.cjs.map +1 -0
  119. package/dist/comments/VocabularyChip.d.ts +6 -0
  120. package/dist/comments/VocabularyChip.d.ts.map +1 -0
  121. package/dist/comments/VocabularyChip.js +50 -0
  122. package/dist/comments/VocabularyChip.js.map +1 -0
  123. package/dist/comments/VocabularyPreview.cjs +15 -0
  124. package/dist/comments/VocabularyPreview.cjs.map +1 -0
  125. package/dist/comments/VocabularyPreview.d.ts +7 -0
  126. package/dist/comments/VocabularyPreview.d.ts.map +1 -0
  127. package/dist/comments/VocabularyPreview.js +15 -0
  128. package/dist/comments/VocabularyPreview.js.map +1 -0
  129. package/dist/comments/agent-delivery.cjs +23 -0
  130. package/dist/comments/agent-delivery.cjs.map +1 -0
  131. package/dist/comments/agent-delivery.d.ts +15 -0
  132. package/dist/comments/agent-delivery.d.ts.map +1 -0
  133. package/dist/comments/agent-delivery.js +22 -0
  134. package/dist/comments/agent-delivery.js.map +1 -0
  135. package/dist/comments/anchoring/CommentAnchorBridge.cjs +36 -0
  136. package/dist/comments/anchoring/CommentAnchorBridge.cjs.map +1 -0
  137. package/dist/comments/anchoring/CommentAnchorBridge.d.ts +8 -0
  138. package/dist/comments/anchoring/CommentAnchorBridge.d.ts.map +1 -0
  139. package/dist/comments/anchoring/CommentAnchorBridge.js +36 -0
  140. package/dist/comments/anchoring/CommentAnchorBridge.js.map +1 -0
  141. package/dist/comments/anchoring/dom-anchor.cjs +402 -0
  142. package/dist/comments/anchoring/dom-anchor.cjs.map +1 -0
  143. package/dist/comments/anchoring/dom-anchor.d.ts +82 -0
  144. package/dist/comments/anchoring/dom-anchor.d.ts.map +1 -0
  145. package/dist/comments/anchoring/dom-anchor.js +384 -0
  146. package/dist/comments/anchoring/dom-anchor.js.map +1 -0
  147. package/dist/comments/anchoring/index.d.ts +6 -0
  148. package/dist/comments/anchoring/index.d.ts.map +1 -0
  149. package/dist/comments/anchoring/markdown-anchor.cjs +188 -0
  150. package/dist/comments/anchoring/markdown-anchor.cjs.map +1 -0
  151. package/dist/comments/anchoring/markdown-anchor.d.ts +37 -0
  152. package/dist/comments/anchoring/markdown-anchor.d.ts.map +1 -0
  153. package/dist/comments/anchoring/markdown-anchor.js +181 -0
  154. package/dist/comments/anchoring/markdown-anchor.js.map +1 -0
  155. package/dist/comments/anchoring/model.cjs +11 -0
  156. package/dist/comments/anchoring/model.cjs.map +1 -0
  157. package/dist/comments/anchoring/model.d.ts +30 -0
  158. package/dist/comments/anchoring/model.d.ts.map +1 -0
  159. package/dist/comments/anchoring/model.js +8 -0
  160. package/dist/comments/anchoring/model.js.map +1 -0
  161. package/dist/comments/anchoring/patch-anchor.cjs +86 -0
  162. package/dist/comments/anchoring/patch-anchor.cjs.map +1 -0
  163. package/dist/comments/anchoring/patch-anchor.d.ts +26 -0
  164. package/dist/comments/anchoring/patch-anchor.d.ts.map +1 -0
  165. package/dist/comments/anchoring/patch-anchor.js +80 -0
  166. package/dist/comments/anchoring/patch-anchor.js.map +1 -0
  167. package/dist/comments/annotation-screenshot.cjs +191 -0
  168. package/dist/comments/annotation-screenshot.cjs.map +1 -0
  169. package/dist/comments/annotation-screenshot.d.ts +16 -0
  170. package/dist/comments/annotation-screenshot.d.ts.map +1 -0
  171. package/dist/comments/annotation-screenshot.js +189 -0
  172. package/dist/comments/annotation-screenshot.js.map +1 -0
  173. package/dist/comments/annotation-types.d.ts +36 -0
  174. package/dist/comments/annotation-types.d.ts.map +1 -0
  175. package/dist/comments/comment-context.cjs.map +1 -1
  176. package/dist/comments/comment-context.d.ts +1 -1
  177. package/dist/comments/comment-context.d.ts.map +1 -1
  178. package/dist/comments/comment-context.js.map +1 -1
  179. package/dist/comments/comment-detail.d.ts +14 -0
  180. package/dist/comments/comment-detail.d.ts.map +1 -0
  181. package/dist/comments/comment-persistence.cjs +102 -0
  182. package/dist/comments/comment-persistence.cjs.map +1 -0
  183. package/dist/comments/comment-persistence.d.ts +29 -0
  184. package/dist/comments/comment-persistence.d.ts.map +1 -0
  185. package/dist/comments/comment-persistence.js +99 -0
  186. package/dist/comments/comment-persistence.js.map +1 -0
  187. package/dist/comments/comment-types.cjs.map +1 -1
  188. package/dist/comments/comment-types.d.ts +18 -0
  189. package/dist/comments/comment-types.d.ts.map +1 -1
  190. package/dist/comments/comment-types.js.map +1 -1
  191. package/dist/comments/comment-utils.cjs +3 -1
  192. package/dist/comments/comment-utils.cjs.map +1 -1
  193. package/dist/comments/comment-utils.d.ts.map +1 -1
  194. package/dist/comments/comment-utils.js +3 -1
  195. package/dist/comments/comment-utils.js.map +1 -1
  196. package/dist/comments/comment-vocabulary.cjs +38 -0
  197. package/dist/comments/comment-vocabulary.cjs.map +1 -0
  198. package/dist/comments/comment-vocabulary.d.ts +33 -0
  199. package/dist/comments/comment-vocabulary.d.ts.map +1 -0
  200. package/dist/comments/comment-vocabulary.js +34 -0
  201. package/dist/comments/comment-vocabulary.js.map +1 -0
  202. package/dist/comments/element-picker.cjs +47 -0
  203. package/dist/comments/element-picker.cjs.map +1 -0
  204. package/dist/comments/element-picker.d.ts +28 -0
  205. package/dist/comments/element-picker.d.ts.map +1 -0
  206. package/dist/comments/element-picker.js +46 -0
  207. package/dist/comments/element-picker.js.map +1 -0
  208. package/dist/comments/use-comment-rail-width.cjs +28 -0
  209. package/dist/comments/use-comment-rail-width.cjs.map +1 -0
  210. package/dist/comments/use-comment-rail-width.d.ts +2 -0
  211. package/dist/comments/use-comment-rail-width.d.ts.map +1 -0
  212. package/dist/comments/use-comment-rail-width.js +28 -0
  213. package/dist/comments/use-comment-rail-width.js.map +1 -0
  214. package/dist/comments/vocabulary-capture.cjs +47 -0
  215. package/dist/comments/vocabulary-capture.cjs.map +1 -0
  216. package/dist/comments/vocabulary-capture.d.ts +10 -0
  217. package/dist/comments/vocabulary-capture.d.ts.map +1 -0
  218. package/dist/comments/vocabulary-capture.js +47 -0
  219. package/dist/comments/vocabulary-capture.js.map +1 -0
  220. package/dist/comments.cjs +87 -6
  221. package/dist/comments.d.ts +18 -1
  222. package/dist/comments.d.ts.map +1 -1
  223. package/dist/comments.js +26 -7
  224. package/dist/components/DateField.d.ts +1 -1
  225. package/dist/components/DatePicker.d.ts +1 -1
  226. package/dist/components/DateTimePicker.d.ts +1 -1
  227. package/dist/components/SplitButton.cjs +2 -2
  228. package/dist/components/SplitButton.cjs.map +1 -1
  229. package/dist/components/SplitButton.js +2 -2
  230. package/dist/components/SplitButton.js.map +1 -1
  231. package/dist/components/mdx-editor-callout-model.d.ts +1 -1
  232. package/dist/components/mdx-editor-field-plugins.cjs +11 -2
  233. package/dist/components/mdx-editor-field-plugins.cjs.map +1 -1
  234. package/dist/components/mdx-editor-field-plugins.d.ts.map +1 -1
  235. package/dist/components/mdx-editor-field-plugins.js +11 -2
  236. package/dist/components/mdx-editor-field-plugins.js.map +1 -1
  237. package/dist/components/mdx-editor-options.d.ts +7 -0
  238. package/dist/components/mdx-editor-options.d.ts.map +1 -1
  239. package/dist/components.cjs +2 -0
  240. package/dist/components.d.ts +1 -0
  241. package/dist/components.d.ts.map +1 -1
  242. package/dist/components.js +2 -1
  243. package/dist/data/ImagePreview.cjs +42 -0
  244. package/dist/data/ImagePreview.cjs.map +1 -0
  245. package/dist/data/ImagePreview.d.ts +13 -0
  246. package/dist/data/ImagePreview.d.ts.map +1 -0
  247. package/dist/data/ImagePreview.js +42 -0
  248. package/dist/data/ImagePreview.js.map +1 -0
  249. package/dist/data/Markdown.cjs +31 -2
  250. package/dist/data/Markdown.cjs.map +1 -1
  251. package/dist/data/Markdown.d.ts +3 -1
  252. package/dist/data/Markdown.d.ts.map +1 -1
  253. package/dist/data/Markdown.js +31 -2
  254. package/dist/data/Markdown.js.map +1 -1
  255. package/dist/data/MarkdownEditor.model.d.ts +1 -1
  256. package/dist/data/Tree.cjs +17 -9
  257. package/dist/data/Tree.cjs.map +1 -1
  258. package/dist/data/Tree.d.ts +5 -1
  259. package/dist/data/Tree.d.ts.map +1 -1
  260. package/dist/data/Tree.js +17 -9
  261. package/dist/data/Tree.js.map +1 -1
  262. package/dist/data/TreeNode.cjs +32 -9
  263. package/dist/data/TreeNode.cjs.map +1 -1
  264. package/dist/data/TreeNode.d.ts +5 -1
  265. package/dist/data/TreeNode.d.ts.map +1 -1
  266. package/dist/data/TreeNode.js +32 -9
  267. package/dist/data/TreeNode.js.map +1 -1
  268. package/dist/data/ai/RuntimeModePicker.cjs +1 -1
  269. package/dist/data/ai/RuntimeModePicker.js +1 -1
  270. package/dist/data/ai/SessionInspector.summary.cjs +1 -1
  271. package/dist/data/ai/SessionInspector.summary.js +1 -1
  272. package/dist/data/ai/SpecRuntimeEditor/ModelSection.cjs +1 -1
  273. package/dist/data/ai/SpecRuntimeEditor/ModelSection.js +1 -1
  274. package/dist/data/chat/AgentIdentity.cjs +56 -0
  275. package/dist/data/chat/AgentIdentity.cjs.map +1 -0
  276. package/dist/data/chat/AgentIdentity.d.ts +17 -0
  277. package/dist/data/chat/AgentIdentity.d.ts.map +1 -0
  278. package/dist/data/chat/AgentIdentity.js +55 -0
  279. package/dist/data/chat/AgentIdentity.js.map +1 -0
  280. package/dist/data/chat/Chat.cjs +1 -1
  281. package/dist/data/chat/Chat.js +1 -1
  282. package/dist/data/chat/ContextMeter.bar.cjs +2 -2
  283. package/dist/data/chat/ContextMeter.bar.js +2 -2
  284. package/dist/data/chat/ContextMeter.model.cjs +41 -13
  285. package/dist/data/chat/ContextMeter.model.cjs.map +1 -1
  286. package/dist/data/chat/ContextMeter.model.d.ts +2 -0
  287. package/dist/data/chat/ContextMeter.model.d.ts.map +1 -1
  288. package/dist/data/chat/ContextMeter.model.js +41 -14
  289. package/dist/data/chat/ContextMeter.model.js.map +1 -1
  290. package/dist/data/chat/ModelSelector.cjs +1 -1
  291. package/dist/data/chat/ModelSelector.js +1 -1
  292. package/dist/data/chat/agent-identity-context.cjs +5 -0
  293. package/dist/data/chat/agent-identity-context.cjs.map +1 -0
  294. package/dist/data/chat/agent-identity-context.d.ts +7 -0
  295. package/dist/data/chat/agent-identity-context.d.ts.map +1 -0
  296. package/dist/data/chat/agent-identity-context.js +6 -0
  297. package/dist/data/chat/agent-identity-context.js.map +1 -0
  298. package/dist/data/chat/index.d.ts +3 -0
  299. package/dist/data/chat/index.d.ts.map +1 -1
  300. package/dist/data/diagnostics/ActionError.cjs +26 -0
  301. package/dist/data/diagnostics/ActionError.cjs.map +1 -0
  302. package/dist/data/diagnostics/ActionError.d.ts +10 -0
  303. package/dist/data/diagnostics/ActionError.d.ts.map +1 -0
  304. package/dist/data/diagnostics/ActionError.js +26 -0
  305. package/dist/data/diagnostics/ActionError.js.map +1 -0
  306. package/dist/data/diagnostics/error-diagnostics.cjs +7 -0
  307. package/dist/data/diagnostics/error-diagnostics.cjs.map +1 -1
  308. package/dist/data/diagnostics/error-diagnostics.d.ts.map +1 -1
  309. package/dist/data/diagnostics/error-diagnostics.js +7 -0
  310. package/dist/data/diagnostics/error-diagnostics.js.map +1 -1
  311. package/dist/data/markdown-urls.cjs +14 -0
  312. package/dist/data/markdown-urls.cjs.map +1 -0
  313. package/dist/data/markdown-urls.d.ts +9 -0
  314. package/dist/data/markdown-urls.d.ts.map +1 -0
  315. package/dist/data/markdown-urls.js +14 -0
  316. package/dist/data/markdown-urls.js.map +1 -0
  317. package/dist/data/runtime/RuntimeBar.model.cjs +1 -1
  318. package/dist/data/runtime/RuntimeBar.model.js +1 -1
  319. package/dist/data/version-info.cjs +3 -3
  320. package/dist/data/version-info.js +3 -3
  321. package/dist/data.cjs +10 -0
  322. package/dist/data.d.ts +2 -0
  323. package/dist/data.d.ts.map +1 -1
  324. package/dist/data.js +5 -1
  325. package/dist/file-findings/AnnotatedCode.cjs +44 -3
  326. package/dist/file-findings/AnnotatedCode.cjs.map +1 -1
  327. package/dist/file-findings/AnnotatedCode.d.ts +7 -0
  328. package/dist/file-findings/AnnotatedCode.d.ts.map +1 -1
  329. package/dist/file-findings/AnnotatedCode.js +44 -3
  330. package/dist/file-findings/AnnotatedCode.js.map +1 -1
  331. package/dist/file-findings/FileFindingsView.cjs +188 -82
  332. package/dist/file-findings/FileFindingsView.cjs.map +1 -1
  333. package/dist/file-findings/FileFindingsView.d.ts +87 -14
  334. package/dist/file-findings/FileFindingsView.d.ts.map +1 -1
  335. package/dist/file-findings/FileFindingsView.js +189 -83
  336. package/dist/file-findings/FileFindingsView.js.map +1 -1
  337. package/dist/file-findings/FolderFindings.cjs +144 -0
  338. package/dist/file-findings/FolderFindings.cjs.map +1 -0
  339. package/dist/file-findings/FolderFindings.d.ts +39 -0
  340. package/dist/file-findings/FolderFindings.d.ts.map +1 -0
  341. package/dist/file-findings/FolderFindings.js +144 -0
  342. package/dist/file-findings/FolderFindings.js.map +1 -0
  343. package/dist/file-findings/NodeActions.cjs +50 -0
  344. package/dist/file-findings/NodeActions.cjs.map +1 -0
  345. package/dist/file-findings/NodeActions.d.ts +15 -0
  346. package/dist/file-findings/NodeActions.d.ts.map +1 -0
  347. package/dist/file-findings/NodeActions.js +50 -0
  348. package/dist/file-findings/NodeActions.js.map +1 -0
  349. package/dist/file-findings/SeverityCounts.cjs +22 -0
  350. package/dist/file-findings/SeverityCounts.cjs.map +1 -0
  351. package/dist/file-findings/SeverityCounts.d.ts +6 -0
  352. package/dist/file-findings/SeverityCounts.d.ts.map +1 -0
  353. package/dist/file-findings/SeverityCounts.js +22 -0
  354. package/dist/file-findings/SeverityCounts.js.map +1 -0
  355. package/dist/file-findings/adapters.cjs +43 -16
  356. package/dist/file-findings/adapters.cjs.map +1 -1
  357. package/dist/file-findings/adapters.d.ts +8 -7
  358. package/dist/file-findings/adapters.d.ts.map +1 -1
  359. package/dist/file-findings/adapters.js +43 -16
  360. package/dist/file-findings/adapters.js.map +1 -1
  361. package/dist/file-findings/file-review/CommentDraft.cjs +10 -43
  362. package/dist/file-findings/file-review/CommentDraft.cjs.map +1 -1
  363. package/dist/file-findings/file-review/CommentDraft.d.ts +4 -2
  364. package/dist/file-findings/file-review/CommentDraft.d.ts.map +1 -1
  365. package/dist/file-findings/file-review/CommentDraft.js +11 -44
  366. package/dist/file-findings/file-review/CommentDraft.js.map +1 -1
  367. package/dist/file-findings/file-review/EditThreads.cjs +85 -0
  368. package/dist/file-findings/file-review/EditThreads.cjs.map +1 -0
  369. package/dist/file-findings/file-review/EditThreads.d.ts +40 -0
  370. package/dist/file-findings/file-review/EditThreads.d.ts.map +1 -0
  371. package/dist/file-findings/file-review/EditThreads.js +85 -0
  372. package/dist/file-findings/file-review/EditThreads.js.map +1 -0
  373. package/dist/file-findings/file-review/FileReview.cjs +559 -54
  374. package/dist/file-findings/file-review/FileReview.cjs.map +1 -1
  375. package/dist/file-findings/file-review/FileReview.d.ts +67 -9
  376. package/dist/file-findings/file-review/FileReview.d.ts.map +1 -1
  377. package/dist/file-findings/file-review/FileReview.js +562 -57
  378. package/dist/file-findings/file-review/FileReview.js.map +1 -1
  379. package/dist/file-findings/file-review/FileThreads.cjs +96 -0
  380. package/dist/file-findings/file-review/FileThreads.cjs.map +1 -0
  381. package/dist/file-findings/file-review/FileThreads.d.ts +50 -0
  382. package/dist/file-findings/file-review/FileThreads.d.ts.map +1 -0
  383. package/dist/file-findings/file-review/FileThreads.js +94 -0
  384. package/dist/file-findings/file-review/FileThreads.js.map +1 -0
  385. package/dist/file-findings/file-review/InlineThread.cjs +2 -1
  386. package/dist/file-findings/file-review/InlineThread.cjs.map +1 -1
  387. package/dist/file-findings/file-review/InlineThread.d.ts +9 -2
  388. package/dist/file-findings/file-review/InlineThread.d.ts.map +1 -1
  389. package/dist/file-findings/file-review/InlineThread.js +2 -1
  390. package/dist/file-findings/file-review/InlineThread.js.map +1 -1
  391. package/dist/file-findings/file-review/ProblemsList.cjs +67 -56
  392. package/dist/file-findings/file-review/ProblemsList.cjs.map +1 -1
  393. package/dist/file-findings/file-review/ProblemsList.d.ts +7 -0
  394. package/dist/file-findings/file-review/ProblemsList.d.ts.map +1 -1
  395. package/dist/file-findings/file-review/ProblemsList.js +68 -58
  396. package/dist/file-findings/file-review/ProblemsList.js.map +1 -1
  397. package/dist/file-findings/file-review/SourceView.cjs +2 -1
  398. package/dist/file-findings/file-review/SourceView.cjs.map +1 -1
  399. package/dist/file-findings/file-review/SourceView.js +3 -2
  400. package/dist/file-findings/file-review/SourceView.js.map +1 -1
  401. package/dist/file-findings/file-review/geometry.cjs +36 -7
  402. package/dist/file-findings/file-review/geometry.cjs.map +1 -1
  403. package/dist/file-findings/file-review/geometry.d.ts +9 -3
  404. package/dist/file-findings/file-review/geometry.d.ts.map +1 -1
  405. package/dist/file-findings/file-review/geometry.js +36 -7
  406. package/dist/file-findings/file-review/geometry.js.map +1 -1
  407. package/dist/file-findings/file-review/hooks.cjs +36 -3
  408. package/dist/file-findings/file-review/hooks.cjs.map +1 -1
  409. package/dist/file-findings/file-review/hooks.d.ts +15 -1
  410. package/dist/file-findings/file-review/hooks.d.ts.map +1 -1
  411. package/dist/file-findings/file-review/hooks.js +37 -5
  412. package/dist/file-findings/file-review/hooks.js.map +1 -1
  413. package/dist/file-findings/file-review/patch-comments.cjs +65 -0
  414. package/dist/file-findings/file-review/patch-comments.cjs.map +1 -0
  415. package/dist/file-findings/file-review/patch-comments.d.ts +29 -0
  416. package/dist/file-findings/file-review/patch-comments.d.ts.map +1 -0
  417. package/dist/file-findings/file-review/patch-comments.js +60 -0
  418. package/dist/file-findings/file-review/patch-comments.js.map +1 -0
  419. package/dist/file-findings/file-review/post-actions.cjs +33 -0
  420. package/dist/file-findings/file-review/post-actions.cjs.map +1 -0
  421. package/dist/file-findings/file-review/post-actions.d.ts +20 -0
  422. package/dist/file-findings/file-review/post-actions.d.ts.map +1 -0
  423. package/dist/file-findings/file-review/post-actions.js +30 -0
  424. package/dist/file-findings/file-review/post-actions.js.map +1 -0
  425. package/dist/file-findings/file-review/problem-filters.cjs +6 -0
  426. package/dist/file-findings/file-review/problem-filters.cjs.map +1 -1
  427. package/dist/file-findings/file-review/problem-filters.d.ts +2 -0
  428. package/dist/file-findings/file-review/problem-filters.d.ts.map +1 -1
  429. package/dist/file-findings/file-review/problem-filters.js +6 -1
  430. package/dist/file-findings/file-review/problem-filters.js.map +1 -1
  431. package/dist/file-findings/file-review/selection-lines.cjs +47 -0
  432. package/dist/file-findings/file-review/selection-lines.cjs.map +1 -0
  433. package/dist/file-findings/file-review/selection-lines.d.ts +19 -0
  434. package/dist/file-findings/file-review/selection-lines.d.ts.map +1 -0
  435. package/dist/file-findings/file-review/selection-lines.js +46 -0
  436. package/dist/file-findings/file-review/selection-lines.js.map +1 -0
  437. package/dist/file-findings/file-review/views.cjs +16 -0
  438. package/dist/file-findings/file-review/views.cjs.map +1 -0
  439. package/dist/file-findings/file-review/views.d.ts +8 -0
  440. package/dist/file-findings/file-review/views.d.ts.map +1 -0
  441. package/dist/file-findings/file-review/views.js +14 -0
  442. package/dist/file-findings/file-review/views.js.map +1 -0
  443. package/dist/file-findings/file-urls.cjs +60 -0
  444. package/dist/file-findings/file-urls.cjs.map +1 -0
  445. package/dist/file-findings/file-urls.d.ts +20 -0
  446. package/dist/file-findings/file-urls.d.ts.map +1 -0
  447. package/dist/file-findings/file-urls.js +57 -0
  448. package/dist/file-findings/file-urls.js.map +1 -0
  449. package/dist/file-findings/types.cjs +5 -0
  450. package/dist/file-findings/types.cjs.map +1 -1
  451. package/dist/file-findings/types.d.ts +8 -2
  452. package/dist/file-findings/types.d.ts.map +1 -1
  453. package/dist/file-findings/types.js +5 -1
  454. package/dist/file-findings/types.js.map +1 -1
  455. package/dist/file-findings.cjs +24 -0
  456. package/dist/file-findings.d.ts +9 -4
  457. package/dist/file-findings.d.ts.map +1 -1
  458. package/dist/file-findings.js +8 -3
  459. package/dist/icons/components/UiChecks.cjs +51 -0
  460. package/dist/icons/components/UiChecks.cjs.map +1 -0
  461. package/dist/icons/components/UiChecks.d.ts +15 -0
  462. package/dist/icons/components/UiChecks.d.ts.map +1 -0
  463. package/dist/icons/components/UiChecks.js +48 -0
  464. package/dist/icons/components/UiChecks.js.map +1 -0
  465. package/dist/icons/components/UiPaperPlaneRight.cjs +51 -0
  466. package/dist/icons/components/UiPaperPlaneRight.cjs.map +1 -0
  467. package/dist/icons/components/UiPaperPlaneRight.d.ts +15 -0
  468. package/dist/icons/components/UiPaperPlaneRight.d.ts.map +1 -0
  469. package/dist/icons/components/UiPaperPlaneRight.js +48 -0
  470. package/dist/icons/components/UiPaperPlaneRight.js.map +1 -0
  471. package/dist/icons/index.d.ts +4 -0
  472. package/dist/icons/index.d.ts.map +1 -1
  473. package/dist/icons/registry.cjs +4 -0
  474. package/dist/icons/registry.cjs.map +1 -1
  475. package/dist/icons/registry.d.ts.map +1 -1
  476. package/dist/icons/registry.js +4 -0
  477. package/dist/icons/registry.js.map +1 -1
  478. package/dist/icons.cjs +6 -0
  479. package/dist/icons.js +3 -1
  480. package/dist/index.cjs +99 -6
  481. package/dist/index.js +31 -7
  482. package/dist/layout/ResizeHandle.cjs +58 -0
  483. package/dist/layout/ResizeHandle.cjs.map +1 -0
  484. package/dist/layout/ResizeHandle.d.ts +13 -0
  485. package/dist/layout/ResizeHandle.d.ts.map +1 -0
  486. package/dist/layout/ResizeHandle.js +58 -0
  487. package/dist/layout/ResizeHandle.js.map +1 -0
  488. package/dist/monaco/DocumentEditor.cjs +275 -0
  489. package/dist/monaco/DocumentEditor.cjs.map +1 -0
  490. package/dist/monaco/DocumentEditor.d.ts +60 -0
  491. package/dist/monaco/DocumentEditor.d.ts.map +1 -0
  492. package/dist/monaco/DocumentEditor.js +273 -0
  493. package/dist/monaco/DocumentEditor.js.map +1 -0
  494. package/dist/monaco/document-source.cjs +122 -0
  495. package/dist/monaco/document-source.cjs.map +1 -0
  496. package/dist/monaco/document-source.d.ts +19 -0
  497. package/dist/monaco/document-source.d.ts.map +1 -0
  498. package/dist/monaco/document-source.js +120 -0
  499. package/dist/monaco/document-source.js.map +1 -0
  500. package/dist/monaco/source-comments.cjs +34 -0
  501. package/dist/monaco/source-comments.cjs.map +1 -0
  502. package/dist/monaco/source-comments.d.ts +19 -0
  503. package/dist/monaco/source-comments.d.ts.map +1 -0
  504. package/dist/monaco/source-comments.js +34 -0
  505. package/dist/monaco/source-comments.js.map +1 -0
  506. package/dist/monaco.cjs +6 -0
  507. package/dist/monaco.d.ts +2 -0
  508. package/dist/monaco.d.ts.map +1 -1
  509. package/dist/monaco.js +3 -1
  510. package/dist/styles.css +1 -1
  511. package/package.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"problem-filters.cjs","names":[],"sources":["../../../src/file-findings/file-review/problem-filters.ts"],"sourcesContent":["import type { FilterState } from \"../../data/test-runner/filterState\";\nimport type { FileFinding, LintSeverity } from \"../types\";\n\n/** Controlled include/exclude/neutral filters, persisted by the host. */\nexport type ProblemFilters = {\n severity: FilterState<LintSeverity>;\n type: FilterState<string>;\n};\nexport function emptyProblemFilters(): ProblemFilters {\n return { severity: new Map(), type: new Map() };\n}\nexport function problemType(finding: FileFinding): string {\n return finding.rule || finding.source;\n}\n"],"mappings":";AAQA,SAAgB,sBAAsC;CACpD,OAAO;EAAE,0BAAU,IAAI,IAAI;EAAG,sBAAM,IAAI,IAAI;CAAE;AAChD;AACA,SAAgB,YAAY,SAA8B;CACxD,OAAO,QAAQ,QAAQ,QAAQ;AACjC"}
1
+ {"version":3,"file":"problem-filters.cjs","names":["matchesFilterState"],"sources":["../../../src/file-findings/file-review/problem-filters.ts"],"sourcesContent":["import { matchesFilterState, type FilterState } from \"../../data/test-runner/filterState\";\nimport type { FileFinding, LintSeverity } from \"../types\";\n\n/** Controlled include/exclude/neutral filters, persisted by the host. */\nexport type ProblemFilters = {\n severity: FilterState<LintSeverity>;\n type: FilterState<string>;\n};\nexport function emptyProblemFilters(): ProblemFilters {\n return { severity: new Map(), type: new Map() };\n}\nexport function problemType(finding: FileFinding): string {\n return finding.rule || finding.source;\n}\n/** Whether a finding passes the Problems severity and issue-type filters. */\nexport function matchesProblemFilters(finding: FileFinding, filters: ProblemFilters): boolean {\n return matchesFilterState(finding.severity, filters.severity) && matchesFilterState(problemType(finding), filters.type);\n}\n"],"mappings":";;AAQA,SAAgB,sBAAsC;CACpD,OAAO;EAAE,0BAAU,IAAI,IAAI;EAAG,sBAAM,IAAI,IAAI;CAAE;AAChD;AACA,SAAgB,YAAY,SAA8B;CACxD,OAAO,QAAQ,QAAQ,QAAQ;AACjC;;AAEA,SAAgB,sBAAsB,SAAsB,SAAkC;CAC5F,OAAOA,oBAAAA,mBAAmB,QAAQ,UAAU,QAAQ,QAAQ,KAAKA,oBAAAA,mBAAmB,YAAY,OAAO,GAAG,QAAQ,IAAI;AACxH"}
@@ -7,4 +7,6 @@ export type ProblemFilters = {
7
7
  };
8
8
  export declare function emptyProblemFilters(): ProblemFilters;
9
9
  export declare function problemType(finding: FileFinding): string;
10
+ /** Whether a finding passes the Problems severity and issue-type filters. */
11
+ export declare function matchesProblemFilters(finding: FileFinding, filters: ProblemFilters): boolean;
10
12
  //# sourceMappingURL=problem-filters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"problem-filters.d.ts","sourceRoot":"","sources":["../../../src/file-findings/file-review/problem-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACpC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B,CAAC;AACF,wBAAgB,mBAAmB,IAAI,cAAc,CAEpD;AACD,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAExD"}
1
+ {"version":3,"file":"problem-filters.d.ts","sourceRoot":"","sources":["../../../src/file-findings/file-review/problem-filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACpC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B,CAAC;AACF,wBAAgB,mBAAmB,IAAI,cAAc,CAEpD;AACD,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAExD;AACD,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAE5F"}
@@ -1,3 +1,4 @@
1
+ import { matchesFilterState } from "../../data/test-runner/filterState.js";
1
2
  // src/file-findings/file-review/problem-filters.ts
2
3
  function emptyProblemFilters() {
3
4
  return {
@@ -8,6 +9,10 @@ function emptyProblemFilters() {
8
9
  function problemType(finding) {
9
10
  return finding.rule || finding.source;
10
11
  }
11
- export { emptyProblemFilters, problemType };
12
+ /** Whether a finding passes the Problems severity and issue-type filters. */
13
+ function matchesProblemFilters(finding, filters) {
14
+ return matchesFilterState(finding.severity, filters.severity) && matchesFilterState(problemType(finding), filters.type);
15
+ }
16
+ export { emptyProblemFilters, matchesProblemFilters, problemType };
12
17
 
13
18
  //# sourceMappingURL=problem-filters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"problem-filters.js","names":[],"sources":["../../../src/file-findings/file-review/problem-filters.ts"],"sourcesContent":["import type { FilterState } from \"../../data/test-runner/filterState\";\nimport type { FileFinding, LintSeverity } from \"../types\";\n\n/** Controlled include/exclude/neutral filters, persisted by the host. */\nexport type ProblemFilters = {\n severity: FilterState<LintSeverity>;\n type: FilterState<string>;\n};\nexport function emptyProblemFilters(): ProblemFilters {\n return { severity: new Map(), type: new Map() };\n}\nexport function problemType(finding: FileFinding): string {\n return finding.rule || finding.source;\n}\n"],"mappings":";AAQA,SAAgB,sBAAsC;CACpD,OAAO;EAAE,0BAAU,IAAI,IAAI;EAAG,sBAAM,IAAI,IAAI;CAAE;AAChD;AACA,SAAgB,YAAY,SAA8B;CACxD,OAAO,QAAQ,QAAQ,QAAQ;AACjC"}
1
+ {"version":3,"file":"problem-filters.js","names":[],"sources":["../../../src/file-findings/file-review/problem-filters.ts"],"sourcesContent":["import { matchesFilterState, type FilterState } from \"../../data/test-runner/filterState\";\nimport type { FileFinding, LintSeverity } from \"../types\";\n\n/** Controlled include/exclude/neutral filters, persisted by the host. */\nexport type ProblemFilters = {\n severity: FilterState<LintSeverity>;\n type: FilterState<string>;\n};\nexport function emptyProblemFilters(): ProblemFilters {\n return { severity: new Map(), type: new Map() };\n}\nexport function problemType(finding: FileFinding): string {\n return finding.rule || finding.source;\n}\n/** Whether a finding passes the Problems severity and issue-type filters. */\nexport function matchesProblemFilters(finding: FileFinding, filters: ProblemFilters): boolean {\n return matchesFilterState(finding.severity, filters.severity) && matchesFilterState(problemType(finding), filters.type);\n}\n"],"mappings":";;AAQA,SAAgB,sBAAsC;CACpD,OAAO;EAAE,0BAAU,IAAI,IAAI;EAAG,sBAAM,IAAI,IAAI;CAAE;AAChD;AACA,SAAgB,YAAY,SAA8B;CACxD,OAAO,QAAQ,QAAQ,QAAQ;AACjC;;AAEA,SAAgB,sBAAsB,SAAsB,SAAkC;CAC5F,OAAO,mBAAmB,QAAQ,UAAU,QAAQ,QAAQ,KAAK,mBAAmB,YAAY,OAAO,GAAG,QAAQ,IAAI;AACxH"}
@@ -0,0 +1,47 @@
1
+ const require_source_marks = require("./source-marks.cjs");
2
+ // src/file-findings/file-review/selection-lines.ts
3
+ var SOURCE_BLOCK = "[data-source-start]";
4
+ /**
5
+ * The source lines of the rendered blocks (`Markdown sourceBlocks`) a
6
+ * selection in Preview touches, from the first block's start to the last
7
+ * block's end. A selection that merely reaches the edge of a block does not
8
+ * cover it. Null when it touches no block.
9
+ */
10
+ function previewSelectionLines(range, markdown) {
11
+ const covered = [];
12
+ for (const block of markdown.querySelectorAll(SOURCE_BLOCK)) {
13
+ if (block.parentElement?.closest(SOURCE_BLOCK)) continue;
14
+ const blockRange = document.createRange();
15
+ blockRange.selectNodeContents(block);
16
+ const startsBeforeBlockEnds = range.compareBoundaryPoints(Range.END_TO_START, blockRange) < 0;
17
+ const endsAfterBlockStarts = range.compareBoundaryPoints(Range.START_TO_END, blockRange) > 0;
18
+ if (startsBeforeBlockEnds && endsAfterBlockStarts) covered.push({
19
+ startLine: Number(block.dataset.sourceStart),
20
+ endLine: Number(block.dataset.sourceEnd)
21
+ });
22
+ }
23
+ if (covered.length === 0) return null;
24
+ return {
25
+ startLine: Math.min(...covered.map((block) => block.startLine)),
26
+ endLine: Math.max(...covered.map((block) => block.endLine))
27
+ };
28
+ }
29
+ /**
30
+ * The source lines a selection in the Source listing covers. A selection that
31
+ * ends at the very start of a later line does not include that line. Null when
32
+ * either end is outside the lines' text.
33
+ */
34
+ function sourceSelectionLines(range) {
35
+ const covered = require_source_marks.sourceRangeOf(range);
36
+ if (!covered) return null;
37
+ const { start, end } = covered;
38
+ const endLine = end.column === 0 && end.line > start.line ? end.line - 1 : end.line;
39
+ return {
40
+ startLine: start.line,
41
+ endLine
42
+ };
43
+ }
44
+ exports.previewSelectionLines = previewSelectionLines;
45
+ exports.sourceSelectionLines = sourceSelectionLines;
46
+
47
+ //# sourceMappingURL=selection-lines.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-lines.cjs","names":["sourceRangeOf"],"sources":["../../../src/file-findings/file-review/selection-lines.ts"],"sourcesContent":["import { sourceRangeOf } from \"./source-marks\";\n\n/** An inclusive, 1-based range of source lines. */\nexport type LineRange = { startLine: number; endLine: number };\n\nconst SOURCE_BLOCK = \"[data-source-start]\";\n\n/**\n * The source lines of the rendered blocks (`Markdown sourceBlocks`) a\n * selection in Preview touches, from the first block's start to the last\n * block's end. A selection that merely reaches the edge of a block does not\n * cover it. Null when it touches no block.\n */\nexport function previewSelectionLines(range: Range, markdown: Element): LineRange | null {\n const covered: LineRange[] = [];\n for (const block of markdown.querySelectorAll<HTMLElement>(SOURCE_BLOCK)) {\n if (block.parentElement?.closest(SOURCE_BLOCK)) continue;\n const blockRange = document.createRange();\n blockRange.selectNodeContents(block);\n const startsBeforeBlockEnds = range.compareBoundaryPoints(Range.END_TO_START, blockRange) < 0;\n const endsAfterBlockStarts = range.compareBoundaryPoints(Range.START_TO_END, blockRange) > 0;\n if (startsBeforeBlockEnds && endsAfterBlockStarts) {\n covered.push({ startLine: Number(block.dataset.sourceStart), endLine: Number(block.dataset.sourceEnd) });\n }\n }\n if (covered.length === 0) return null;\n return {\n startLine: Math.min(...covered.map((block) => block.startLine)),\n endLine: Math.max(...covered.map((block) => block.endLine)),\n };\n}\n\n/**\n * The source lines a selection in the Source listing covers. A selection that\n * ends at the very start of a later line does not include that line. Null when\n * either end is outside the lines' text.\n */\nexport function sourceSelectionLines(range: Range): LineRange | null {\n const covered = sourceRangeOf(range);\n if (!covered) return null;\n const { start, end } = covered;\n const endLine = end.column === 0 && end.line > start.line ? end.line - 1 : end.line;\n return { startLine: start.line, endLine };\n}\n"],"mappings":";;AAKA,IAAM,eAAe;;;;;;;AAQrB,SAAgB,sBAAsB,OAAc,UAAqC;CACvF,MAAM,UAAuB,CAAC;CAC9B,KAAK,MAAM,SAAS,SAAS,iBAA8B,YAAY,GAAG;EACxE,IAAI,MAAM,eAAe,QAAQ,YAAY,GAAG;EAChD,MAAM,aAAa,SAAS,YAAY;EACxC,WAAW,mBAAmB,KAAK;EACnC,MAAM,wBAAwB,MAAM,sBAAsB,MAAM,cAAc,UAAU,IAAI;EAC5F,MAAM,uBAAuB,MAAM,sBAAsB,MAAM,cAAc,UAAU,IAAI;EAC3F,IAAI,yBAAyB,sBAC3B,QAAQ,KAAK;GAAE,WAAW,OAAO,MAAM,QAAQ,WAAW;GAAG,SAAS,OAAO,MAAM,QAAQ,SAAS;EAAE,CAAC;CAE3G;CACA,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO;EACL,WAAW,KAAK,IAAI,GAAG,QAAQ,KAAK,UAAU,MAAM,SAAS,CAAC;EAC9D,SAAS,KAAK,IAAI,GAAG,QAAQ,KAAK,UAAU,MAAM,OAAO,CAAC;CAC5D;AACF;;;;;;AAOA,SAAgB,qBAAqB,OAAgC;CACnE,MAAM,UAAUA,qBAAAA,cAAc,KAAK;CACnC,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,UAAU,IAAI,WAAW,KAAK,IAAI,OAAO,MAAM,OAAO,IAAI,OAAO,IAAI,IAAI;CAC/E,OAAO;EAAE,WAAW,MAAM;EAAM;CAAQ;AAC1C"}
@@ -0,0 +1,19 @@
1
+ /** An inclusive, 1-based range of source lines. */
2
+ export type LineRange = {
3
+ startLine: number;
4
+ endLine: number;
5
+ };
6
+ /**
7
+ * The source lines of the rendered blocks (`Markdown sourceBlocks`) a
8
+ * selection in Preview touches, from the first block's start to the last
9
+ * block's end. A selection that merely reaches the edge of a block does not
10
+ * cover it. Null when it touches no block.
11
+ */
12
+ export declare function previewSelectionLines(range: Range, markdown: Element): LineRange | null;
13
+ /**
14
+ * The source lines a selection in the Source listing covers. A selection that
15
+ * ends at the very start of a later line does not include that line. Null when
16
+ * either end is outside the lines' text.
17
+ */
18
+ export declare function sourceSelectionLines(range: Range): LineRange | null;
19
+ //# sourceMappingURL=selection-lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-lines.d.ts","sourceRoot":"","sources":["../../../src/file-findings/file-review/selection-lines.ts"],"names":[],"mappings":"AAEA,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAI/D;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAiBvF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI,CAMnE"}
@@ -0,0 +1,46 @@
1
+ import { sourceRangeOf } from "./source-marks.js";
2
+ // src/file-findings/file-review/selection-lines.ts
3
+ var SOURCE_BLOCK = "[data-source-start]";
4
+ /**
5
+ * The source lines of the rendered blocks (`Markdown sourceBlocks`) a
6
+ * selection in Preview touches, from the first block's start to the last
7
+ * block's end. A selection that merely reaches the edge of a block does not
8
+ * cover it. Null when it touches no block.
9
+ */
10
+ function previewSelectionLines(range, markdown) {
11
+ const covered = [];
12
+ for (const block of markdown.querySelectorAll(SOURCE_BLOCK)) {
13
+ if (block.parentElement?.closest(SOURCE_BLOCK)) continue;
14
+ const blockRange = document.createRange();
15
+ blockRange.selectNodeContents(block);
16
+ const startsBeforeBlockEnds = range.compareBoundaryPoints(Range.END_TO_START, blockRange) < 0;
17
+ const endsAfterBlockStarts = range.compareBoundaryPoints(Range.START_TO_END, blockRange) > 0;
18
+ if (startsBeforeBlockEnds && endsAfterBlockStarts) covered.push({
19
+ startLine: Number(block.dataset.sourceStart),
20
+ endLine: Number(block.dataset.sourceEnd)
21
+ });
22
+ }
23
+ if (covered.length === 0) return null;
24
+ return {
25
+ startLine: Math.min(...covered.map((block) => block.startLine)),
26
+ endLine: Math.max(...covered.map((block) => block.endLine))
27
+ };
28
+ }
29
+ /**
30
+ * The source lines a selection in the Source listing covers. A selection that
31
+ * ends at the very start of a later line does not include that line. Null when
32
+ * either end is outside the lines' text.
33
+ */
34
+ function sourceSelectionLines(range) {
35
+ const covered = sourceRangeOf(range);
36
+ if (!covered) return null;
37
+ const { start, end } = covered;
38
+ const endLine = end.column === 0 && end.line > start.line ? end.line - 1 : end.line;
39
+ return {
40
+ startLine: start.line,
41
+ endLine
42
+ };
43
+ }
44
+ export { previewSelectionLines, sourceSelectionLines };
45
+
46
+ //# sourceMappingURL=selection-lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-lines.js","names":[],"sources":["../../../src/file-findings/file-review/selection-lines.ts"],"sourcesContent":["import { sourceRangeOf } from \"./source-marks\";\n\n/** An inclusive, 1-based range of source lines. */\nexport type LineRange = { startLine: number; endLine: number };\n\nconst SOURCE_BLOCK = \"[data-source-start]\";\n\n/**\n * The source lines of the rendered blocks (`Markdown sourceBlocks`) a\n * selection in Preview touches, from the first block's start to the last\n * block's end. A selection that merely reaches the edge of a block does not\n * cover it. Null when it touches no block.\n */\nexport function previewSelectionLines(range: Range, markdown: Element): LineRange | null {\n const covered: LineRange[] = [];\n for (const block of markdown.querySelectorAll<HTMLElement>(SOURCE_BLOCK)) {\n if (block.parentElement?.closest(SOURCE_BLOCK)) continue;\n const blockRange = document.createRange();\n blockRange.selectNodeContents(block);\n const startsBeforeBlockEnds = range.compareBoundaryPoints(Range.END_TO_START, blockRange) < 0;\n const endsAfterBlockStarts = range.compareBoundaryPoints(Range.START_TO_END, blockRange) > 0;\n if (startsBeforeBlockEnds && endsAfterBlockStarts) {\n covered.push({ startLine: Number(block.dataset.sourceStart), endLine: Number(block.dataset.sourceEnd) });\n }\n }\n if (covered.length === 0) return null;\n return {\n startLine: Math.min(...covered.map((block) => block.startLine)),\n endLine: Math.max(...covered.map((block) => block.endLine)),\n };\n}\n\n/**\n * The source lines a selection in the Source listing covers. A selection that\n * ends at the very start of a later line does not include that line. Null when\n * either end is outside the lines' text.\n */\nexport function sourceSelectionLines(range: Range): LineRange | null {\n const covered = sourceRangeOf(range);\n if (!covered) return null;\n const { start, end } = covered;\n const endLine = end.column === 0 && end.line > start.line ? end.line - 1 : end.line;\n return { startLine: start.line, endLine };\n}\n"],"mappings":";;AAKA,IAAM,eAAe;;;;;;;AAQrB,SAAgB,sBAAsB,OAAc,UAAqC;CACvF,MAAM,UAAuB,CAAC;CAC9B,KAAK,MAAM,SAAS,SAAS,iBAA8B,YAAY,GAAG;EACxE,IAAI,MAAM,eAAe,QAAQ,YAAY,GAAG;EAChD,MAAM,aAAa,SAAS,YAAY;EACxC,WAAW,mBAAmB,KAAK;EACnC,MAAM,wBAAwB,MAAM,sBAAsB,MAAM,cAAc,UAAU,IAAI;EAC5F,MAAM,uBAAuB,MAAM,sBAAsB,MAAM,cAAc,UAAU,IAAI;EAC3F,IAAI,yBAAyB,sBAC3B,QAAQ,KAAK;GAAE,WAAW,OAAO,MAAM,QAAQ,WAAW;GAAG,SAAS,OAAO,MAAM,QAAQ,SAAS;EAAE,CAAC;CAE3G;CACA,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO;EACL,WAAW,KAAK,IAAI,GAAG,QAAQ,KAAK,UAAU,MAAM,SAAS,CAAC;EAC9D,SAAS,KAAK,IAAI,GAAG,QAAQ,KAAK,UAAU,MAAM,OAAO,CAAC;CAC5D;AACF;;;;;;AAOA,SAAgB,qBAAqB,OAAgC;CACnE,MAAM,UAAU,cAAc,KAAK;CACnC,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,UAAU,IAAI,WAAW,KAAK,IAAI,OAAO,MAAM,OAAO,IAAI,OAAO,IAAI,IAAI;CAC/E,OAAO;EAAE,WAAW,MAAM;EAAM;CAAQ;AAC1C"}
@@ -0,0 +1,16 @@
1
+ // src/file-findings/file-review/views.ts
2
+ var BUILTIN_FILE_REVIEW_VIEWS = [
3
+ "preview",
4
+ "source",
5
+ "problems"
6
+ ];
7
+ function isBuiltinFileReviewView(view) {
8
+ return BUILTIN_FILE_REVIEW_VIEWS.includes(view);
9
+ }
10
+ /** A folder's built-in tab. */
11
+ var FOLDER_PROBLEMS_VIEW = "problems";
12
+ exports.BUILTIN_FILE_REVIEW_VIEWS = BUILTIN_FILE_REVIEW_VIEWS;
13
+ exports.FOLDER_PROBLEMS_VIEW = FOLDER_PROBLEMS_VIEW;
14
+ exports.isBuiltinFileReviewView = isBuiltinFileReviewView;
15
+
16
+ //# sourceMappingURL=views.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.cjs","names":[],"sources":["../../../src/file-findings/file-review/views.ts"],"sourcesContent":["export const BUILTIN_FILE_REVIEW_VIEWS = [\"preview\", \"source\", \"problems\"] as const;\nexport type BuiltinFileReviewView = (typeof BUILTIN_FILE_REVIEW_VIEWS)[number];\n/** A built-in tab, or the id of one of the host's `tabs`. */\nexport type FileReviewView = BuiltinFileReviewView | (string & {});\n\nexport function isBuiltinFileReviewView(view: string): view is BuiltinFileReviewView {\n return (BUILTIN_FILE_REVIEW_VIEWS as readonly string[]).includes(view);\n}\n\n/** A folder's built-in tab. */\nexport const FOLDER_PROBLEMS_VIEW = \"problems\";\n"],"mappings":";AAAA,IAAa,4BAA4B;CAAC;CAAW;CAAU;AAAU;AAKzE,SAAgB,wBAAwB,MAA6C;CACnF,OAAQ,0BAAgD,SAAS,IAAI;AACvE;;AAGA,IAAa,uBAAuB"}
@@ -0,0 +1,8 @@
1
+ export declare const BUILTIN_FILE_REVIEW_VIEWS: readonly ["preview", "source", "problems"];
2
+ export type BuiltinFileReviewView = (typeof BUILTIN_FILE_REVIEW_VIEWS)[number];
3
+ /** A built-in tab, or the id of one of the host's `tabs`. */
4
+ export type FileReviewView = BuiltinFileReviewView | (string & {});
5
+ export declare function isBuiltinFileReviewView(view: string): view is BuiltinFileReviewView;
6
+ /** A folder's built-in tab. */
7
+ export declare const FOLDER_PROBLEMS_VIEW = "problems";
8
+ //# sourceMappingURL=views.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../src/file-findings/file-review/views.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,4CAA6C,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/E,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEnE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,qBAAqB,CAEnF;AAED,+BAA+B;AAC/B,eAAO,MAAM,oBAAoB,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ // src/file-findings/file-review/views.ts
2
+ var BUILTIN_FILE_REVIEW_VIEWS = [
3
+ "preview",
4
+ "source",
5
+ "problems"
6
+ ];
7
+ function isBuiltinFileReviewView(view) {
8
+ return BUILTIN_FILE_REVIEW_VIEWS.includes(view);
9
+ }
10
+ /** A folder's built-in tab. */
11
+ var FOLDER_PROBLEMS_VIEW = "problems";
12
+ export { BUILTIN_FILE_REVIEW_VIEWS, FOLDER_PROBLEMS_VIEW, isBuiltinFileReviewView };
13
+
14
+ //# sourceMappingURL=views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.js","names":[],"sources":["../../../src/file-findings/file-review/views.ts"],"sourcesContent":["export const BUILTIN_FILE_REVIEW_VIEWS = [\"preview\", \"source\", \"problems\"] as const;\nexport type BuiltinFileReviewView = (typeof BUILTIN_FILE_REVIEW_VIEWS)[number];\n/** A built-in tab, or the id of one of the host's `tabs`. */\nexport type FileReviewView = BuiltinFileReviewView | (string & {});\n\nexport function isBuiltinFileReviewView(view: string): view is BuiltinFileReviewView {\n return (BUILTIN_FILE_REVIEW_VIEWS as readonly string[]).includes(view);\n}\n\n/** A folder's built-in tab. */\nexport const FOLDER_PROBLEMS_VIEW = \"problems\";\n"],"mappings":";AAAA,IAAa,4BAA4B;CAAC;CAAW;CAAU;AAAU;AAKzE,SAAgB,wBAAwB,MAA6C;CACnF,OAAQ,0BAAgD,SAAS,IAAI;AACvE;;AAGA,IAAa,uBAAuB"}
@@ -0,0 +1,60 @@
1
+ // src/file-findings/file-urls.ts
2
+ var IMAGE_EXTENSION = /\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i;
3
+ var SCHEME = /^[a-z][a-z0-9+.-]*:/i;
4
+ /** True for an image file by extension: png, jpg, jpeg, gif, webp, svg, avif, bmp or ico. */
5
+ function isImagePath(path) {
6
+ return IMAGE_EXTENSION.test(path);
7
+ }
8
+ /** An image with no text source: every image but svg. */
9
+ function isRasterImagePath(path) {
10
+ return isImagePath(path) && !/\.svg$/i.test(path);
11
+ }
12
+ /**
13
+ * The decoded file path of a document-relative URL, without `?query` or `#hash`.
14
+ * Null when the URL is not relative to the document (a scheme such as `http:`,
15
+ * `data:` or `mailto:`, `//host`, `/absolute`, `#fragment`), is empty, or has
16
+ * malformed percent-encoding, so the caller leaves it for the browser.
17
+ */
18
+ function relativeUrlPath(url) {
19
+ const trimmed = url.trim();
20
+ if (!trimmed || trimmed.startsWith("/") || trimmed.startsWith("#") || SCHEME.test(trimmed)) return null;
21
+ const path = trimmed.replace(/[?#].*$/s, "");
22
+ if (!path) return null;
23
+ try {
24
+ return decodeURIComponent(path);
25
+ } catch {
26
+ return null;
27
+ }
28
+ }
29
+ function normalizePosix(path) {
30
+ const out = [];
31
+ for (const segment of path.split("/")) {
32
+ if (!segment || segment === ".") continue;
33
+ if (segment === ".." && out.length > 0 && out[out.length - 1] !== "..") out.pop();
34
+ else out.push(segment);
35
+ }
36
+ return out.join("/");
37
+ }
38
+ /**
39
+ * The file a document-relative `url` names when read from `from`: the url
40
+ * joined onto the directory of `from.file`, normalized, in the same work dir.
41
+ * A `..` past the root is kept rather than clamped; the server rejects it.
42
+ * Null when `url` is not document-relative.
43
+ */
44
+ function resolveRelativeFile(from, url) {
45
+ const relative = relativeUrlPath(url);
46
+ if (relative === null) return null;
47
+ const slash = from.file.lastIndexOf("/");
48
+ const dir = slash < 0 ? "" : from.file.slice(0, slash);
49
+ const file = normalizePosix(dir ? `${dir}/${relative}` : relative);
50
+ return from.workDir === void 0 ? { file } : {
51
+ workDir: from.workDir,
52
+ file
53
+ };
54
+ }
55
+ exports.isImagePath = isImagePath;
56
+ exports.isRasterImagePath = isRasterImagePath;
57
+ exports.relativeUrlPath = relativeUrlPath;
58
+ exports.resolveRelativeFile = resolveRelativeFile;
59
+
60
+ //# sourceMappingURL=file-urls.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-urls.cjs","names":[],"sources":["../../src/file-findings/file-urls.ts"],"sourcesContent":["import type { FileRef } from \"./types\";\n\nconst IMAGE_EXTENSION = /\\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i;\nconst SCHEME = /^[a-z][a-z0-9+.-]*:/i;\n\n/** True for an image file by extension: png, jpg, jpeg, gif, webp, svg, avif, bmp or ico. */\nexport function isImagePath(path: string): boolean {\n return IMAGE_EXTENSION.test(path);\n}\n\n/** An image with no text source: every image but svg. */\nexport function isRasterImagePath(path: string): boolean {\n return isImagePath(path) && !/\\.svg$/i.test(path);\n}\n\n/**\n * The decoded file path of a document-relative URL, without `?query` or `#hash`.\n * Null when the URL is not relative to the document (a scheme such as `http:`,\n * `data:` or `mailto:`, `//host`, `/absolute`, `#fragment`), is empty, or has\n * malformed percent-encoding, so the caller leaves it for the browser.\n */\nexport function relativeUrlPath(url: string): string | null {\n const trimmed = url.trim();\n if (!trimmed || trimmed.startsWith(\"/\") || trimmed.startsWith(\"#\") || SCHEME.test(trimmed)) return null;\n const path = trimmed.replace(/[?#].*$/s, \"\");\n if (!path) return null;\n try {\n return decodeURIComponent(path);\n } catch {\n return null;\n }\n}\n\nfunction normalizePosix(path: string): string {\n const out: string[] = [];\n for (const segment of path.split(\"/\")) {\n if (!segment || segment === \".\") continue;\n if (segment === \"..\" && out.length > 0 && out[out.length - 1] !== \"..\") out.pop();\n else out.push(segment);\n }\n return out.join(\"/\");\n}\n\n/**\n * The file a document-relative `url` names when read from `from`: the url\n * joined onto the directory of `from.file`, normalized, in the same work dir.\n * A `..` past the root is kept rather than clamped; the server rejects it.\n * Null when `url` is not document-relative.\n */\nexport function resolveRelativeFile(from: FileRef, url: string): FileRef | null {\n const relative = relativeUrlPath(url);\n if (relative === null) return null;\n const slash = from.file.lastIndexOf(\"/\");\n const dir = slash < 0 ? \"\" : from.file.slice(0, slash);\n const file = normalizePosix(dir ? `${dir}/${relative}` : relative);\n return from.workDir === undefined ? { file } : { workDir: from.workDir, file };\n}\n"],"mappings":";AAEA,IAAM,kBAAkB;AACxB,IAAM,SAAS;;AAGf,SAAgB,YAAY,MAAuB;CACjD,OAAO,gBAAgB,KAAK,IAAI;AAClC;;AAGA,SAAgB,kBAAkB,MAAuB;CACvD,OAAO,YAAY,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAClD;;;;;;;AAQA,SAAgB,gBAAgB,KAA4B;CAC1D,MAAM,UAAU,IAAI,KAAK;CACzB,IAAI,CAAC,WAAW,QAAQ,WAAW,GAAG,KAAK,QAAQ,WAAW,GAAG,KAAK,OAAO,KAAK,OAAO,GAAG,OAAO;CACnG,MAAM,OAAO,QAAQ,QAAQ,YAAY,EAAE;CAC3C,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI;EACF,OAAO,mBAAmB,IAAI;CAChC,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,eAAe,MAAsB;CAC5C,MAAM,MAAgB,CAAC;CACvB,KAAK,MAAM,WAAW,KAAK,MAAM,GAAG,GAAG;EACrC,IAAI,CAAC,WAAW,YAAY,KAAK;EACjC,IAAI,YAAY,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,OAAO,MAAM,IAAI,IAAI;OAC3E,IAAI,KAAK,OAAO;CACvB;CACA,OAAO,IAAI,KAAK,GAAG;AACrB;;;;;;;AAQA,SAAgB,oBAAoB,MAAe,KAA6B;CAC9E,MAAM,WAAW,gBAAgB,GAAG;CACpC,IAAI,aAAa,MAAM,OAAO;CAC9B,MAAM,QAAQ,KAAK,KAAK,YAAY,GAAG;CACvC,MAAM,MAAM,QAAQ,IAAI,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK;CACrD,MAAM,OAAO,eAAe,MAAM,GAAG,IAAI,GAAG,aAAa,QAAQ;CACjE,OAAO,KAAK,YAAY,KAAA,IAAY,EAAE,KAAK,IAAI;EAAE,SAAS,KAAK;EAAS;CAAK;AAC/E"}
@@ -0,0 +1,20 @@
1
+ import { FileRef } from './types.js';
2
+ /** True for an image file by extension: png, jpg, jpeg, gif, webp, svg, avif, bmp or ico. */
3
+ export declare function isImagePath(path: string): boolean;
4
+ /** An image with no text source: every image but svg. */
5
+ export declare function isRasterImagePath(path: string): boolean;
6
+ /**
7
+ * The decoded file path of a document-relative URL, without `?query` or `#hash`.
8
+ * Null when the URL is not relative to the document (a scheme such as `http:`,
9
+ * `data:` or `mailto:`, `//host`, `/absolute`, `#fragment`), is empty, or has
10
+ * malformed percent-encoding, so the caller leaves it for the browser.
11
+ */
12
+ export declare function relativeUrlPath(url: string): string | null;
13
+ /**
14
+ * The file a document-relative `url` names when read from `from`: the url
15
+ * joined onto the directory of `from.file`, normalized, in the same work dir.
16
+ * A `..` past the root is kept rather than clamped; the server rejects it.
17
+ * Null when `url` is not document-relative.
18
+ */
19
+ export declare function resolveRelativeFile(from: FileRef, url: string): FileRef | null;
20
+ //# sourceMappingURL=file-urls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-urls.d.ts","sourceRoot":"","sources":["../../src/file-findings/file-urls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAKvC,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU1D;AAYD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAO9E"}
@@ -0,0 +1,57 @@
1
+ // src/file-findings/file-urls.ts
2
+ var IMAGE_EXTENSION = /\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i;
3
+ var SCHEME = /^[a-z][a-z0-9+.-]*:/i;
4
+ /** True for an image file by extension: png, jpg, jpeg, gif, webp, svg, avif, bmp or ico. */
5
+ function isImagePath(path) {
6
+ return IMAGE_EXTENSION.test(path);
7
+ }
8
+ /** An image with no text source: every image but svg. */
9
+ function isRasterImagePath(path) {
10
+ return isImagePath(path) && !/\.svg$/i.test(path);
11
+ }
12
+ /**
13
+ * The decoded file path of a document-relative URL, without `?query` or `#hash`.
14
+ * Null when the URL is not relative to the document (a scheme such as `http:`,
15
+ * `data:` or `mailto:`, `//host`, `/absolute`, `#fragment`), is empty, or has
16
+ * malformed percent-encoding, so the caller leaves it for the browser.
17
+ */
18
+ function relativeUrlPath(url) {
19
+ const trimmed = url.trim();
20
+ if (!trimmed || trimmed.startsWith("/") || trimmed.startsWith("#") || SCHEME.test(trimmed)) return null;
21
+ const path = trimmed.replace(/[?#].*$/s, "");
22
+ if (!path) return null;
23
+ try {
24
+ return decodeURIComponent(path);
25
+ } catch {
26
+ return null;
27
+ }
28
+ }
29
+ function normalizePosix(path) {
30
+ const out = [];
31
+ for (const segment of path.split("/")) {
32
+ if (!segment || segment === ".") continue;
33
+ if (segment === ".." && out.length > 0 && out[out.length - 1] !== "..") out.pop();
34
+ else out.push(segment);
35
+ }
36
+ return out.join("/");
37
+ }
38
+ /**
39
+ * The file a document-relative `url` names when read from `from`: the url
40
+ * joined onto the directory of `from.file`, normalized, in the same work dir.
41
+ * A `..` past the root is kept rather than clamped; the server rejects it.
42
+ * Null when `url` is not document-relative.
43
+ */
44
+ function resolveRelativeFile(from, url) {
45
+ const relative = relativeUrlPath(url);
46
+ if (relative === null) return null;
47
+ const slash = from.file.lastIndexOf("/");
48
+ const dir = slash < 0 ? "" : from.file.slice(0, slash);
49
+ const file = normalizePosix(dir ? `${dir}/${relative}` : relative);
50
+ return from.workDir === void 0 ? { file } : {
51
+ workDir: from.workDir,
52
+ file
53
+ };
54
+ }
55
+ export { isImagePath, isRasterImagePath, relativeUrlPath, resolveRelativeFile };
56
+
57
+ //# sourceMappingURL=file-urls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-urls.js","names":[],"sources":["../../src/file-findings/file-urls.ts"],"sourcesContent":["import type { FileRef } from \"./types\";\n\nconst IMAGE_EXTENSION = /\\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i;\nconst SCHEME = /^[a-z][a-z0-9+.-]*:/i;\n\n/** True for an image file by extension: png, jpg, jpeg, gif, webp, svg, avif, bmp or ico. */\nexport function isImagePath(path: string): boolean {\n return IMAGE_EXTENSION.test(path);\n}\n\n/** An image with no text source: every image but svg. */\nexport function isRasterImagePath(path: string): boolean {\n return isImagePath(path) && !/\\.svg$/i.test(path);\n}\n\n/**\n * The decoded file path of a document-relative URL, without `?query` or `#hash`.\n * Null when the URL is not relative to the document (a scheme such as `http:`,\n * `data:` or `mailto:`, `//host`, `/absolute`, `#fragment`), is empty, or has\n * malformed percent-encoding, so the caller leaves it for the browser.\n */\nexport function relativeUrlPath(url: string): string | null {\n const trimmed = url.trim();\n if (!trimmed || trimmed.startsWith(\"/\") || trimmed.startsWith(\"#\") || SCHEME.test(trimmed)) return null;\n const path = trimmed.replace(/[?#].*$/s, \"\");\n if (!path) return null;\n try {\n return decodeURIComponent(path);\n } catch {\n return null;\n }\n}\n\nfunction normalizePosix(path: string): string {\n const out: string[] = [];\n for (const segment of path.split(\"/\")) {\n if (!segment || segment === \".\") continue;\n if (segment === \"..\" && out.length > 0 && out[out.length - 1] !== \"..\") out.pop();\n else out.push(segment);\n }\n return out.join(\"/\");\n}\n\n/**\n * The file a document-relative `url` names when read from `from`: the url\n * joined onto the directory of `from.file`, normalized, in the same work dir.\n * A `..` past the root is kept rather than clamped; the server rejects it.\n * Null when `url` is not document-relative.\n */\nexport function resolveRelativeFile(from: FileRef, url: string): FileRef | null {\n const relative = relativeUrlPath(url);\n if (relative === null) return null;\n const slash = from.file.lastIndexOf(\"/\");\n const dir = slash < 0 ? \"\" : from.file.slice(0, slash);\n const file = normalizePosix(dir ? `${dir}/${relative}` : relative);\n return from.workDir === undefined ? { file } : { workDir: from.workDir, file };\n}\n"],"mappings":";AAEA,IAAM,kBAAkB;AACxB,IAAM,SAAS;;AAGf,SAAgB,YAAY,MAAuB;CACjD,OAAO,gBAAgB,KAAK,IAAI;AAClC;;AAGA,SAAgB,kBAAkB,MAAuB;CACvD,OAAO,YAAY,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;AAClD;;;;;;;AAQA,SAAgB,gBAAgB,KAA4B;CAC1D,MAAM,UAAU,IAAI,KAAK;CACzB,IAAI,CAAC,WAAW,QAAQ,WAAW,GAAG,KAAK,QAAQ,WAAW,GAAG,KAAK,OAAO,KAAK,OAAO,GAAG,OAAO;CACnG,MAAM,OAAO,QAAQ,QAAQ,YAAY,EAAE;CAC3C,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI;EACF,OAAO,mBAAmB,IAAI;CAChC,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,eAAe,MAAsB;CAC5C,MAAM,MAAgB,CAAC;CACvB,KAAK,MAAM,WAAW,KAAK,MAAM,GAAG,GAAG;EACrC,IAAI,CAAC,WAAW,YAAY,KAAK;EACjC,IAAI,YAAY,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,OAAO,MAAM,IAAI,IAAI;OAC3E,IAAI,KAAK,OAAO;CACvB;CACA,OAAO,IAAI,KAAK,GAAG;AACrB;;;;;;;AAQA,SAAgB,oBAAoB,MAAe,KAA6B;CAC9E,MAAM,WAAW,gBAAgB,GAAG;CACpC,IAAI,aAAa,MAAM,OAAO;CAC9B,MAAM,QAAQ,KAAK,KAAK,YAAY,GAAG;CACvC,MAAM,MAAM,QAAQ,IAAI,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK;CACrD,MAAM,OAAO,eAAe,MAAM,GAAG,IAAI,GAAG,aAAa,QAAQ;CACjE,OAAO,KAAK,YAAY,KAAA,IAAY,EAAE,KAAK,IAAI;EAAE,SAAS,KAAK;EAAS;CAAK;AAC/E"}
@@ -1,4 +1,8 @@
1
1
  // src/file-findings/types.ts
2
+ function sameSelection(a, b) {
3
+ if (!a || !b) return a === b;
4
+ return a.kind === b.kind && sameFileRef(a.ref, b.ref);
5
+ }
2
6
  function fileRefKey(ref) {
3
7
  return `${ref.workDir ?? ""}\u0000${ref.file}`;
4
8
  }
@@ -8,5 +12,6 @@ function sameFileRef(a, b) {
8
12
  }
9
13
  exports.fileRefKey = fileRefKey;
10
14
  exports.sameFileRef = sameFileRef;
15
+ exports.sameSelection = sameSelection;
11
16
 
12
17
  //# sourceMappingURL=types.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/file-findings/types.ts"],"sourcesContent":["// One finding against one line of one file, whichever tool raised it. Lint\n// violations and failed tests both project onto this shape so a single view\n// can overlay them on the file's source.\n\nimport type { LintSeverity } from \"../data/lint/types\";\n\nexport type { LintSeverity };\n\nexport type FindingKind = \"lint\" | \"test\";\n\nexport type FileFinding = {\n /** Path relative to `workDir` when it lives under it, otherwise as the tool reported it. */\n file: string;\n /** Root `file` is relative to; absent when the tool reported none. */\n workDir?: string | undefined;\n /** 1-based first line of the finding. */\n line: number;\n /** 1-based first column. */\n column?: number | undefined;\n /** 1-based last line of the finding's range. */\n endLine?: number | undefined;\n /** 1-based column just past the range on `endLine`. */\n endColumn?: number | undefined;\n severity: LintSeverity;\n message: string;\n /** The linter or test framework that raised it. */\n source: string;\n /** Rule id for lint findings; the test name for test findings. */\n rule?: string | undefined;\n kind: FindingKind;\n};\n\n/** Identifies a file within a findings set: the same relative path can exist under several work dirs. */\nexport type FileRef = {\n workDir?: string | undefined;\n file: string;\n};\n\nexport type FileTreeNode = {\n /** Stable, unique key (folders collapsed into a child keep the child's key). */\n key: string;\n name: string;\n kind: \"folder\" | \"file\";\n children?: FileTreeNode[] | undefined;\n /** Set on `file` nodes. */\n ref?: FileRef | undefined;\n /** Findings in this file, or beneath this folder. */\n findings: FileFinding[];\n};\n\nexport function fileRefKey(ref: FileRef): string {\n return `${ref.workDir ?? \"\"}\\u0000${ref.file}`;\n}\n\nexport function sameFileRef(a: FileRef | null, b: FileRef | null): boolean {\n if (!a || !b) return a === b;\n return a.file === b.file && (a.workDir ?? \"\") === (b.workDir ?? \"\");\n}\n"],"mappings":";AAkDA,SAAgB,WAAW,KAAsB;CAC/C,OAAO,GAAG,IAAI,WAAW,GAAG,QAAQ,IAAI;AAC1C;AAEA,SAAgB,YAAY,GAAmB,GAA4B;CACzE,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,SAAS,EAAE,WAAW;AAClE"}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/file-findings/types.ts"],"sourcesContent":["// One finding against one line of one file, whichever tool raised it. Lint\n// violations and failed tests both project onto this shape so a single view\n// can overlay them on the file's source.\n\nimport type { LintSeverity } from \"../data/lint/types\";\n\nexport type { LintSeverity };\n\nexport type FindingKind = \"lint\" | \"test\";\n\nexport type FileFinding = {\n /** Path relative to `workDir` when it lives under it, otherwise as the tool reported it. */\n file: string;\n /** Root `file` is relative to; absent when the tool reported none. */\n workDir?: string | undefined;\n /** 1-based first line of the finding. */\n line: number;\n /** 1-based first column. */\n column?: number | undefined;\n /** 1-based last line of the finding's range. */\n endLine?: number | undefined;\n /** 1-based column just past the range on `endLine`. */\n endColumn?: number | undefined;\n severity: LintSeverity;\n message: string;\n /** The linter or test framework that raised it. */\n source: string;\n /** Rule id for lint findings; the test name for test findings. */\n rule?: string | undefined;\n kind: FindingKind;\n};\n\n/** Identifies a file within a findings set: the same relative path can exist under several work dirs. */\nexport type FileRef = {\n workDir?: string | undefined;\n file: string;\n};\n\nexport type FileTreeNode = {\n /** Stable, unique key (folders collapsed into a child keep the child's key). */\n key: string;\n name: string;\n kind: \"folder\" | \"file\";\n children?: FileTreeNode[] | undefined;\n /** The file, or the folder's path under its work dir (`\"\"` for a work dir's root). */\n ref: FileRef;\n /** Findings in this file, or beneath this folder. */\n findings: FileFinding[];\n};\n\n/** The tree node open in the viewer: a file, or a folder shown as the findings beneath it. */\nexport type FileTreeSelection = { kind: FileTreeNode[\"kind\"]; ref: FileRef };\n\nexport function sameSelection(a: FileTreeSelection | null, b: FileTreeSelection | null): boolean {\n if (!a || !b) return a === b;\n return a.kind === b.kind && sameFileRef(a.ref, b.ref);\n}\n\nexport function fileRefKey(ref: FileRef): string {\n return `${ref.workDir ?? \"\"}\\u0000${ref.file}`;\n}\n\nexport function sameFileRef(a: FileRef | null, b: FileRef | null): boolean {\n if (!a || !b) return a === b;\n return a.file === b.file && (a.workDir ?? \"\") === (b.workDir ?? \"\");\n}\n"],"mappings":";AAqDA,SAAgB,cAAc,GAA6B,GAAsC;CAC/F,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,QAAQ,YAAY,EAAE,KAAK,EAAE,GAAG;AACtD;AAEA,SAAgB,WAAW,KAAsB;CAC/C,OAAO,GAAG,IAAI,WAAW,GAAG,QAAQ,IAAI;AAC1C;AAEA,SAAgB,YAAY,GAAmB,GAA4B;CACzE,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,SAAS,EAAE,WAAW;AAClE"}
@@ -33,11 +33,17 @@ export type FileTreeNode = {
33
33
  name: string;
34
34
  kind: "folder" | "file";
35
35
  children?: FileTreeNode[] | undefined;
36
- /** Set on `file` nodes. */
37
- ref?: FileRef | undefined;
36
+ /** The file, or the folder's path under its work dir (`""` for a work dir's root). */
37
+ ref: FileRef;
38
38
  /** Findings in this file, or beneath this folder. */
39
39
  findings: FileFinding[];
40
40
  };
41
+ /** The tree node open in the viewer: a file, or a folder shown as the findings beneath it. */
42
+ export type FileTreeSelection = {
43
+ kind: FileTreeNode["kind"];
44
+ ref: FileRef;
45
+ };
46
+ export declare function sameSelection(a: FileTreeSelection | null, b: FileTreeSelection | null): boolean;
41
47
  export declare function fileRefKey(ref: FileRef): string;
42
48
  export declare function sameFileRef(a: FileRef | null, b: FileRef | null): boolean;
43
49
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/file-findings/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,yGAAyG;AACzG,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACtC,2BAA2B;IAC3B,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAEF,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAGzE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/file-findings/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,yGAAyG;AACzG,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACtC,sFAAsF;IACtF,GAAG,EAAE,OAAO,CAAC;IACb,qDAAqD;IACrD,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAEF,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7E,wBAAgB,aAAa,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,EAAE,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAG/F;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAGzE"}
@@ -1,4 +1,8 @@
1
1
  // src/file-findings/types.ts
2
+ function sameSelection(a, b) {
3
+ if (!a || !b) return a === b;
4
+ return a.kind === b.kind && sameFileRef(a.ref, b.ref);
5
+ }
2
6
  function fileRefKey(ref) {
3
7
  return `${ref.workDir ?? ""}\u0000${ref.file}`;
4
8
  }
@@ -6,6 +10,6 @@ function sameFileRef(a, b) {
6
10
  if (!a || !b) return a === b;
7
11
  return a.file === b.file && (a.workDir ?? "") === (b.workDir ?? "");
8
12
  }
9
- export { fileRefKey, sameFileRef };
13
+ export { fileRefKey, sameFileRef, sameSelection };
10
14
 
11
15
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/file-findings/types.ts"],"sourcesContent":["// One finding against one line of one file, whichever tool raised it. Lint\n// violations and failed tests both project onto this shape so a single view\n// can overlay them on the file's source.\n\nimport type { LintSeverity } from \"../data/lint/types\";\n\nexport type { LintSeverity };\n\nexport type FindingKind = \"lint\" | \"test\";\n\nexport type FileFinding = {\n /** Path relative to `workDir` when it lives under it, otherwise as the tool reported it. */\n file: string;\n /** Root `file` is relative to; absent when the tool reported none. */\n workDir?: string | undefined;\n /** 1-based first line of the finding. */\n line: number;\n /** 1-based first column. */\n column?: number | undefined;\n /** 1-based last line of the finding's range. */\n endLine?: number | undefined;\n /** 1-based column just past the range on `endLine`. */\n endColumn?: number | undefined;\n severity: LintSeverity;\n message: string;\n /** The linter or test framework that raised it. */\n source: string;\n /** Rule id for lint findings; the test name for test findings. */\n rule?: string | undefined;\n kind: FindingKind;\n};\n\n/** Identifies a file within a findings set: the same relative path can exist under several work dirs. */\nexport type FileRef = {\n workDir?: string | undefined;\n file: string;\n};\n\nexport type FileTreeNode = {\n /** Stable, unique key (folders collapsed into a child keep the child's key). */\n key: string;\n name: string;\n kind: \"folder\" | \"file\";\n children?: FileTreeNode[] | undefined;\n /** Set on `file` nodes. */\n ref?: FileRef | undefined;\n /** Findings in this file, or beneath this folder. */\n findings: FileFinding[];\n};\n\nexport function fileRefKey(ref: FileRef): string {\n return `${ref.workDir ?? \"\"}\\u0000${ref.file}`;\n}\n\nexport function sameFileRef(a: FileRef | null, b: FileRef | null): boolean {\n if (!a || !b) return a === b;\n return a.file === b.file && (a.workDir ?? \"\") === (b.workDir ?? \"\");\n}\n"],"mappings":";AAkDA,SAAgB,WAAW,KAAsB;CAC/C,OAAO,GAAG,IAAI,WAAW,GAAG,QAAQ,IAAI;AAC1C;AAEA,SAAgB,YAAY,GAAmB,GAA4B;CACzE,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,SAAS,EAAE,WAAW;AAClE"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/file-findings/types.ts"],"sourcesContent":["// One finding against one line of one file, whichever tool raised it. Lint\n// violations and failed tests both project onto this shape so a single view\n// can overlay them on the file's source.\n\nimport type { LintSeverity } from \"../data/lint/types\";\n\nexport type { LintSeverity };\n\nexport type FindingKind = \"lint\" | \"test\";\n\nexport type FileFinding = {\n /** Path relative to `workDir` when it lives under it, otherwise as the tool reported it. */\n file: string;\n /** Root `file` is relative to; absent when the tool reported none. */\n workDir?: string | undefined;\n /** 1-based first line of the finding. */\n line: number;\n /** 1-based first column. */\n column?: number | undefined;\n /** 1-based last line of the finding's range. */\n endLine?: number | undefined;\n /** 1-based column just past the range on `endLine`. */\n endColumn?: number | undefined;\n severity: LintSeverity;\n message: string;\n /** The linter or test framework that raised it. */\n source: string;\n /** Rule id for lint findings; the test name for test findings. */\n rule?: string | undefined;\n kind: FindingKind;\n};\n\n/** Identifies a file within a findings set: the same relative path can exist under several work dirs. */\nexport type FileRef = {\n workDir?: string | undefined;\n file: string;\n};\n\nexport type FileTreeNode = {\n /** Stable, unique key (folders collapsed into a child keep the child's key). */\n key: string;\n name: string;\n kind: \"folder\" | \"file\";\n children?: FileTreeNode[] | undefined;\n /** The file, or the folder's path under its work dir (`\"\"` for a work dir's root). */\n ref: FileRef;\n /** Findings in this file, or beneath this folder. */\n findings: FileFinding[];\n};\n\n/** The tree node open in the viewer: a file, or a folder shown as the findings beneath it. */\nexport type FileTreeSelection = { kind: FileTreeNode[\"kind\"]; ref: FileRef };\n\nexport function sameSelection(a: FileTreeSelection | null, b: FileTreeSelection | null): boolean {\n if (!a || !b) return a === b;\n return a.kind === b.kind && sameFileRef(a.ref, b.ref);\n}\n\nexport function fileRefKey(ref: FileRef): string {\n return `${ref.workDir ?? \"\"}\\u0000${ref.file}`;\n}\n\nexport function sameFileRef(a: FileRef | null, b: FileRef | null): boolean {\n if (!a || !b) return a === b;\n return a.file === b.file && (a.workDir ?? \"\") === (b.workDir ?? \"\");\n}\n"],"mappings":";AAqDA,SAAgB,cAAc,GAA6B,GAAsC;CAC/F,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,QAAQ,YAAY,EAAE,KAAK,EAAE,GAAG;AACtD;AAEA,SAAgB,WAAW,KAAsB;CAC/C,OAAO,GAAG,IAAI,WAAW,GAAG,QAAQ,IAAI;AAC1C;AAEA,SAAgB,YAAY,GAAmB,GAA4B;CACzE,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;CAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,SAAS,EAAE,WAAW;AAClE"}
@@ -1,4 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_dom_anchor = require("./comments/anchoring/dom-anchor.cjs");
3
+ const require_patch_anchor = require("./comments/anchoring/patch-anchor.cjs");
2
4
  const require_types = require("./file-findings/types.cjs");
3
5
  const require_adapters = require("./file-findings/adapters.cjs");
4
6
  const require_findings_comments = require("./file-findings/findings-comments.cjs");
@@ -10,38 +12,60 @@ const require_severity_counts = require("./file-findings/severity-counts.cjs");
10
12
  const require_problem_filters = require("./file-findings/file-review/problem-filters.cjs");
11
13
  const require_blame = require("./file-findings/file-review/blame.cjs");
12
14
  const require_source_anchor = require("./file-findings/file-review/source-anchor.cjs");
15
+ const require_views = require("./file-findings/file-review/views.cjs");
13
16
  const require_FileReview = require("./file-findings/file-review/FileReview.cjs");
17
+ const require_file_urls = require("./file-findings/file-urls.cjs");
18
+ const require_FolderFindings = require("./file-findings/FolderFindings.cjs");
14
19
  const require_FileFindingsView = require("./file-findings/FileFindingsView.cjs");
15
20
  const require_monaco_language = require("./file-findings/monaco-language.cjs");
16
21
  exports.AnnotatedCode = require_LazyAnnotatedCode.AnnotatedCode;
22
+ exports.BUILTIN_FILE_REVIEW_VIEWS = require_views.BUILTIN_FILE_REVIEW_VIEWS;
23
+ exports.ELEMENT_PREFIX = require_dom_anchor.ELEMENT_PREFIX;
17
24
  exports.FINDINGS_COMMENT_CONFIG = require_findings_comments.FINDINGS_COMMENT_CONFIG;
25
+ exports.FOLDER_PROBLEMS_VIEW = require_views.FOLDER_PROBLEMS_VIEW;
18
26
  exports.FileFindingsView = require_FileFindingsView.FileFindingsView;
19
27
  exports.FileReview = require_FileReview.FileReview;
28
+ exports.FolderFindings = require_FolderFindings.FolderFindings;
29
+ exports.PATCH_PREFIX = require_patch_anchor.PATCH_PREFIX;
20
30
  exports.QUOTE_PREFIX = require_quote_anchor.QUOTE_PREFIX;
21
31
  exports.SOURCE_PREFIX = require_source_anchor.SOURCE_PREFIX;
22
32
  exports.blameAge = require_blame.blameAge;
23
33
  exports.blankMdxPreamble = require_mdx_source.blankMdxPreamble;
24
34
  exports.blockAnchor = require_findings_comments.blockAnchor;
35
+ exports.capturePatch = require_patch_anchor.capturePatch;
25
36
  exports.countFindingsBySeverity = require_severity_counts.countFindingsBySeverity;
37
+ exports.describePatch = require_patch_anchor.describePatch;
26
38
  exports.describeQuote = require_quote_anchor.describeQuote;
27
39
  exports.describeSource = require_source_anchor.describeSource;
40
+ exports.elementAnchor = require_dom_anchor.elementAnchor;
28
41
  exports.emptyProblemFilters = require_problem_filters.emptyProblemFilters;
29
42
  exports.fileRefKey = require_types.fileRefKey;
30
43
  exports.findingsToComments = require_findings_comments.findingsToComments;
31
44
  exports.groupFindingsByFile = require_adapters.groupFindingsByFile;
45
+ exports.isBuiltinFileReviewView = require_views.isBuiltinFileReviewView;
46
+ exports.isElementAnchor = require_dom_anchor.isElementAnchor;
47
+ exports.isImagePath = require_file_urls.isImagePath;
48
+ exports.isPatchAnchor = require_patch_anchor.isPatchAnchor;
32
49
  exports.isUncommitted = require_blame.isUncommitted;
33
50
  exports.lineAnchor = require_findings_comments.lineAnchor;
34
51
  exports.lineRangeAnchorResolver = require_findings_comments.lineRangeAnchorResolver;
35
52
  exports.lintFindings = require_adapters.lintFindings;
36
53
  exports.markdownOutline = require_quote_anchor.markdownOutline;
54
+ exports.matchPatch = require_patch_anchor.matchPatch;
55
+ exports.matchesProblemFilters = require_problem_filters.matchesProblemFilters;
37
56
  exports.monacoLanguageForPath = require_monaco_language.monacoLanguageForPath;
57
+ exports.parseElementAnchor = require_dom_anchor.parseElementAnchor;
58
+ exports.parsePatchAnchor = require_patch_anchor.parsePatchAnchor;
38
59
  exports.parseQuoteAnchor = require_quote_anchor.parseQuoteAnchor;
39
60
  exports.parseSourceAnchor = require_source_anchor.parseSourceAnchor;
61
+ exports.patchAnchor = require_patch_anchor.patchAnchor;
40
62
  exports.problemType = require_problem_filters.problemType;
41
63
  exports.quoteAnchor = require_quote_anchor.quoteAnchor;
64
+ exports.relativeUrlPath = require_file_urls.relativeUrlPath;
42
65
  exports.resolveQuote = require_quote_anchor.resolveQuote;
43
66
  exports.resolveSource = require_source_anchor.resolveSource;
44
67
  exports.sameFileRef = require_types.sameFileRef;
68
+ exports.sameSelection = require_types.sameSelection;
45
69
  exports.sourceAnchor = require_source_anchor.sourceAnchor;
46
70
  exports.sourceBlockOf = require_geometry.sourceBlockOf;
47
71
  exports.testFindings = require_adapters.testFindings;
@@ -1,7 +1,9 @@
1
- export { FileFindingsView, type FileFindingsViewProps } from './file-findings/FileFindingsView.js';
1
+ export { FileFindingsView, type FileFindingsViewProps, type FileTreeNodeSlots, type FileTreeSlotContext, } from './file-findings/FileFindingsView.js';
2
+ export { FolderFindings, type FolderFindingsProps, type FolderTab, type FolderTabContext, } from './file-findings/FolderFindings.js';
2
3
  export { AnnotatedCode, type AnnotatedCodeProps } from './file-findings/LazyAnnotatedCode.js';
3
- export { FileReview, type FileReviewComments, type FileReviewLayout, type FileReviewProps, type FileReviewView, } from './file-findings/file-review/FileReview.js';
4
- export { emptyProblemFilters, problemType, type ProblemFilters } from './file-findings/file-review/problem-filters.js';
4
+ export { FileReview, type FileReviewCommentTargets, type FileReviewComments, type FileReviewLayout, type FileReviewProps, type FileReviewTab, type FileReviewTabContext, } from './file-findings/file-review/FileReview.js';
5
+ export { BUILTIN_FILE_REVIEW_VIEWS, FOLDER_PROBLEMS_VIEW, isBuiltinFileReviewView, type BuiltinFileReviewView, type FileReviewView, } from './file-findings/file-review/views.js';
6
+ export { emptyProblemFilters, matchesProblemFilters, problemType, type ProblemFilters, } from './file-findings/file-review/problem-filters.js';
5
7
  export { QUOTE_PREFIX, describeQuote, markdownOutline, parseQuoteAnchor, quoteAnchor, resolveQuote, type OutlineEntry, type QuoteLocator, } from './file-findings/file-review/quote-anchor.js';
6
8
  export { SOURCE_PREFIX, describeSource, parseSourceAnchor, resolveSource, sourceAnchor, type SourceLocator, } from './file-findings/file-review/source-anchor.js';
7
9
  export { blameAge, isUncommitted, type BlameCommit, type BlameRange } from './file-findings/file-review/blame.js';
@@ -9,7 +11,10 @@ export { sourceBlockOf, type AnchorMode } from './file-findings/file-review/geom
9
11
  export { countFindingsBySeverity } from './file-findings/severity-counts.js';
10
12
  export { groupFindingsByFile, lintFindings, testFindings } from './file-findings/adapters.js';
11
13
  export { FINDINGS_COMMENT_CONFIG, blockAnchor, findingsToComments, lineAnchor, lineRangeAnchorResolver, } from './file-findings/findings-comments.js';
14
+ export { isImagePath, relativeUrlPath } from './file-findings/file-urls.js';
12
15
  export { blankMdxPreamble } from './file-findings/mdx-source.js';
13
16
  export { monacoLanguageForPath } from './file-findings/monaco-language.js';
14
- export { fileRefKey, sameFileRef, type FileFinding, type FileRef, type FileTreeNode, type FindingKind, type LintSeverity, } from './file-findings/types.js';
17
+ export { fileRefKey, sameFileRef, sameSelection, type FileFinding, type FileRef, type FileTreeNode, type FileTreeSelection, type FindingKind, type LintSeverity, } from './file-findings/types.js';
18
+ export { PATCH_PREFIX, capturePatch, describePatch, isPatchAnchor, matchPatch, parsePatchAnchor, patchAnchor, type PatchMatch, } from './comments/anchoring/patch-anchor.js';
19
+ export { ELEMENT_PREFIX, elementAnchor, isElementAnchor, parseElementAnchor } from './comments/anchoring/dom-anchor.js';
15
20
  //# sourceMappingURL=file-findings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-findings.d.ts","sourceRoot":"","sources":["../src/file-findings.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EACL,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,6CAA6C,CAAC;AACpH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,KAAK,aAAa,GACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EACL,UAAU,EACV,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"file-findings.d.ts","sourceRoot":"","sources":["../src/file-findings.ts"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EACL,UAAU,EACV,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,KAAK,cAAc,GACpB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,KAAK,aAAa,GACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,UAAU,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}