@cucumber/react-components 24.2.0 → 24.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/LICENSE +1 -1
  2. package/dist/src/CucumberQueryContext.d.ts +1 -2
  3. package/dist/src/CucumberQueryContext.d.ts.map +1 -1
  4. package/dist/src/CucumberQueryContext.js +2 -2
  5. package/dist/src/CucumberQueryContext.js.map +1 -1
  6. package/dist/src/GherkinQueryContext.d.ts +1 -2
  7. package/dist/src/GherkinQueryContext.d.ts.map +1 -1
  8. package/dist/src/GherkinQueryContext.js +2 -2
  9. package/dist/src/GherkinQueryContext.js.map +1 -1
  10. package/dist/src/SearchContext.d.ts +11 -5
  11. package/dist/src/SearchContext.d.ts.map +1 -1
  12. package/dist/src/SearchContext.js +4 -2
  13. package/dist/src/SearchContext.js.map +1 -1
  14. package/dist/src/ciCommitLink.d.ts +1 -1
  15. package/dist/src/ciCommitLink.d.ts.map +1 -1
  16. package/dist/src/ciCommitLink.js +1 -1
  17. package/dist/src/ciCommitLink.js.map +1 -1
  18. package/dist/src/components/app/CICommitLink.d.ts +2 -2
  19. package/dist/src/components/app/CICommitLink.d.ts.map +1 -1
  20. package/dist/src/components/app/CICommitLink.js +3 -8
  21. package/dist/src/components/app/CICommitLink.js.map +1 -1
  22. package/dist/src/components/app/CIJobLink.d.ts +2 -2
  23. package/dist/src/components/app/CIJobLink.d.ts.map +1 -1
  24. package/dist/src/components/app/CIJobLink.js +3 -7
  25. package/dist/src/components/app/CIJobLink.js.map +1 -1
  26. package/dist/src/components/app/ControlledSearchProvider.d.ts +2 -2
  27. package/dist/src/components/app/ControlledSearchProvider.d.ts.map +1 -1
  28. package/dist/src/components/app/ControlledSearchProvider.js +24 -2
  29. package/dist/src/components/app/ControlledSearchProvider.js.map +1 -1
  30. package/dist/src/components/app/CopyButton.d.ts +2 -1
  31. package/dist/src/components/app/CopyButton.d.ts.map +1 -1
  32. package/dist/src/components/app/CopyButton.js +4 -4
  33. package/dist/src/components/app/CopyButton.js.map +1 -1
  34. package/dist/src/components/app/DocumentAccordion.d.ts +3 -3
  35. package/dist/src/components/app/DocumentAccordion.d.ts.map +1 -1
  36. package/dist/src/components/app/DocumentAccordion.js +12 -20
  37. package/dist/src/components/app/DocumentAccordion.js.map +1 -1
  38. package/dist/src/components/app/DocumentAccordion.module.scss +15 -7
  39. package/dist/src/components/app/EnvelopesProvider.d.ts +2 -2
  40. package/dist/src/components/app/EnvelopesProvider.d.ts.map +1 -1
  41. package/dist/src/components/app/EnvelopesProvider.js +3 -2
  42. package/dist/src/components/app/EnvelopesProvider.js.map +1 -1
  43. package/dist/src/components/app/ExecutionSummary.d.ts +1 -1
  44. package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -1
  45. package/dist/src/components/app/ExecutionSummary.js +3 -49
  46. package/dist/src/components/app/ExecutionSummary.js.map +1 -1
  47. package/dist/src/components/app/FilteredDocuments.d.ts +1 -1
  48. package/dist/src/components/app/FilteredDocuments.d.ts.map +1 -1
  49. package/dist/src/components/app/FilteredDocuments.js +4 -4
  50. package/dist/src/components/app/FilteredDocuments.js.map +1 -1
  51. package/dist/src/components/app/GherkinDocumentList.d.ts +3 -3
  52. package/dist/src/components/app/GherkinDocumentList.d.ts.map +1 -1
  53. package/dist/src/components/app/GherkinDocumentList.js +8 -9
  54. package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
  55. package/dist/src/components/app/Header.d.ts +1 -1
  56. package/dist/src/components/app/Header.d.ts.map +1 -1
  57. package/dist/src/components/app/Header.js +4 -4
  58. package/dist/src/components/app/Header.js.map +1 -1
  59. package/dist/src/components/app/HealthChart.d.ts +1 -1
  60. package/dist/src/components/app/HealthChart.d.ts.map +1 -1
  61. package/dist/src/components/app/HealthChart.js +6 -7
  62. package/dist/src/components/app/HealthChart.js.map +1 -1
  63. package/dist/src/components/app/HighLight.d.ts +2 -2
  64. package/dist/src/components/app/HighLight.d.ts.map +1 -1
  65. package/dist/src/components/app/HighLight.js +15 -9
  66. package/dist/src/components/app/HighLight.js.map +1 -1
  67. package/dist/src/components/app/ImplementationIcon.d.ts +2 -2
  68. package/dist/src/components/app/ImplementationIcon.d.ts.map +1 -1
  69. package/dist/src/components/app/ImplementationIcon.js +2 -2
  70. package/dist/src/components/app/ImplementationIcon.js.map +1 -1
  71. package/dist/src/components/app/InMemorySearchProvider.d.ts +2 -2
  72. package/dist/src/components/app/InMemorySearchProvider.d.ts.map +1 -1
  73. package/dist/src/components/app/InMemorySearchProvider.js +3 -2
  74. package/dist/src/components/app/InMemorySearchProvider.js.map +1 -1
  75. package/dist/src/components/app/NavigationButton.d.ts +1 -1
  76. package/dist/src/components/app/NavigationButton.d.ts.map +1 -1
  77. package/dist/src/components/app/NavigationButton.js +2 -2
  78. package/dist/src/components/app/NavigationButton.js.map +1 -1
  79. package/dist/src/components/app/OSIcon.d.ts +2 -2
  80. package/dist/src/components/app/OSIcon.d.ts.map +1 -1
  81. package/dist/src/components/app/OSIcon.js +4 -4
  82. package/dist/src/components/app/OSIcon.js.map +1 -1
  83. package/dist/src/components/app/QueriesProvider.d.ts +3 -3
  84. package/dist/src/components/app/QueriesProvider.d.ts.map +1 -1
  85. package/dist/src/components/app/QueriesProvider.js +4 -3
  86. package/dist/src/components/app/QueriesProvider.js.map +1 -1
  87. package/dist/src/components/app/Report.d.ts +1 -1
  88. package/dist/src/components/app/Report.d.ts.map +1 -1
  89. package/dist/src/components/app/Report.js +2 -11
  90. package/dist/src/components/app/Report.js.map +1 -1
  91. package/dist/src/components/app/RuntimeIcon.d.ts +2 -2
  92. package/dist/src/components/app/RuntimeIcon.d.ts.map +1 -1
  93. package/dist/src/components/app/RuntimeIcon.js +4 -4
  94. package/dist/src/components/app/RuntimeIcon.js.map +1 -1
  95. package/dist/src/components/app/SearchBar.d.ts +1 -1
  96. package/dist/src/components/app/SearchBar.d.ts.map +1 -1
  97. package/dist/src/components/app/SearchBar.js +9 -24
  98. package/dist/src/components/app/SearchBar.js.map +1 -1
  99. package/dist/src/components/app/StatusesSummary.d.ts +1 -1
  100. package/dist/src/components/app/StatusesSummary.d.ts.map +1 -1
  101. package/dist/src/components/app/StatusesSummary.js +8 -11
  102. package/dist/src/components/app/StatusesSummary.js.map +1 -1
  103. package/dist/src/components/app/TestRunHooks.d.ts +1 -1
  104. package/dist/src/components/app/TestRunHooks.d.ts.map +1 -1
  105. package/dist/src/components/app/TestRunHooks.js +5 -5
  106. package/dist/src/components/app/TestRunHooks.js.map +1 -1
  107. package/dist/src/components/app/UrlSearchProvider.d.ts +1 -1
  108. package/dist/src/components/app/UrlSearchProvider.d.ts.map +1 -1
  109. package/dist/src/components/app/UrlSearchProvider.js +6 -3
  110. package/dist/src/components/app/UrlSearchProvider.js.map +1 -1
  111. package/dist/src/components/app/icons/CucumberLogo.d.ts +1 -1
  112. package/dist/src/components/app/icons/CucumberLogo.d.ts.map +1 -1
  113. package/dist/src/components/app/icons/CucumberLogo.js +2 -6
  114. package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
  115. package/dist/src/components/app/icons/Jvm.d.ts +1 -1
  116. package/dist/src/components/app/icons/Jvm.d.ts.map +1 -1
  117. package/dist/src/components/app/icons/Jvm.js +2 -7
  118. package/dist/src/components/app/icons/Jvm.js.map +1 -1
  119. package/dist/src/components/app/icons/Linux.d.ts +1 -1
  120. package/dist/src/components/app/icons/Linux.d.ts.map +1 -1
  121. package/dist/src/components/app/icons/Linux.js +2 -17
  122. package/dist/src/components/app/icons/Linux.js.map +1 -1
  123. package/dist/src/components/app/icons/MacOS.d.ts +1 -1
  124. package/dist/src/components/app/icons/MacOS.d.ts.map +1 -1
  125. package/dist/src/components/app/icons/MacOS.js +2 -3
  126. package/dist/src/components/app/icons/MacOS.js.map +1 -1
  127. package/dist/src/components/app/icons/NodeJs.d.ts +1 -1
  128. package/dist/src/components/app/icons/NodeJs.d.ts.map +1 -1
  129. package/dist/src/components/app/icons/NodeJs.js +2 -5
  130. package/dist/src/components/app/icons/NodeJs.js.map +1 -1
  131. package/dist/src/components/app/icons/Ruby.d.ts +1 -1
  132. package/dist/src/components/app/icons/Ruby.d.ts.map +1 -1
  133. package/dist/src/components/app/icons/Ruby.js +2 -3
  134. package/dist/src/components/app/icons/Ruby.js.map +1 -1
  135. package/dist/src/components/app/icons/Windows.d.ts +1 -1
  136. package/dist/src/components/app/icons/Windows.d.ts.map +1 -1
  137. package/dist/src/components/app/icons/Windows.js +2 -3
  138. package/dist/src/components/app/icons/Windows.js.map +1 -1
  139. package/dist/src/components/app/makeSetupString.d.ts +1 -1
  140. package/dist/src/components/app/makeSetupString.d.ts.map +1 -1
  141. package/dist/src/components/app/makeSetupString.js.map +1 -1
  142. package/dist/src/components/app/markdownComponents.d.ts +9 -0
  143. package/dist/src/components/app/markdownComponents.d.ts.map +1 -0
  144. package/dist/src/components/app/markdownComponents.js +6 -0
  145. package/dist/src/components/app/markdownComponents.js.map +1 -0
  146. package/dist/src/components/app/rehypePlugins.d.ts +2 -2
  147. package/dist/src/components/app/rehypePlugins.d.ts.map +1 -1
  148. package/dist/src/components/app/rehypePlugins.js.map +1 -1
  149. package/dist/src/components/app/remarkPlugins.d.ts +2 -2
  150. package/dist/src/components/app/remarkPlugins.d.ts.map +1 -1
  151. package/dist/src/components/app/remarkPlugins.js.map +1 -1
  152. package/dist/src/components/customise/CustomRendering.d.ts +18 -18
  153. package/dist/src/components/customise/CustomRendering.d.ts.map +1 -1
  154. package/dist/src/components/customise/CustomRendering.js +10 -9
  155. package/dist/src/components/customise/CustomRendering.js.map +1 -1
  156. package/dist/src/components/customise/CustomRendering.stories.scss +0 -17
  157. package/dist/src/components/gherkin/Anchor.d.ts +3 -3
  158. package/dist/src/components/gherkin/Anchor.d.ts.map +1 -1
  159. package/dist/src/components/gherkin/Anchor.js +3 -6
  160. package/dist/src/components/gherkin/Anchor.js.map +1 -1
  161. package/dist/src/components/gherkin/Background.d.ts +3 -3
  162. package/dist/src/components/gherkin/Background.d.ts.map +1 -1
  163. package/dist/src/components/gherkin/Background.js +4 -10
  164. package/dist/src/components/gherkin/Background.js.map +1 -1
  165. package/dist/src/components/gherkin/Children.d.ts +3 -3
  166. package/dist/src/components/gherkin/Children.d.ts.map +1 -1
  167. package/dist/src/components/gherkin/Children.js +3 -3
  168. package/dist/src/components/gherkin/Children.js.map +1 -1
  169. package/dist/src/components/gherkin/DataTable.d.ts +3 -3
  170. package/dist/src/components/gherkin/DataTable.d.ts.map +1 -1
  171. package/dist/src/components/gherkin/DataTable.js +4 -6
  172. package/dist/src/components/gherkin/DataTable.js.map +1 -1
  173. package/dist/src/components/gherkin/Description.d.ts +3 -3
  174. package/dist/src/components/gherkin/Description.d.ts.map +1 -1
  175. package/dist/src/components/gherkin/Description.js +3 -4
  176. package/dist/src/components/gherkin/Description.js.map +1 -1
  177. package/dist/src/components/gherkin/DocString.d.ts +3 -3
  178. package/dist/src/components/gherkin/DocString.d.ts.map +1 -1
  179. package/dist/src/components/gherkin/DocString.js +3 -4
  180. package/dist/src/components/gherkin/DocString.js.map +1 -1
  181. package/dist/src/components/gherkin/ErrorMessage.d.ts +2 -2
  182. package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
  183. package/dist/src/components/gherkin/ErrorMessage.js +5 -3
  184. package/dist/src/components/gherkin/ErrorMessage.js.map +1 -1
  185. package/dist/src/components/gherkin/ErrorMessage.module.scss +17 -5
  186. package/dist/src/components/gherkin/Examples.d.ts +3 -3
  187. package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
  188. package/dist/src/components/gherkin/Examples.js +7 -18
  189. package/dist/src/components/gherkin/Examples.js.map +1 -1
  190. package/dist/src/components/gherkin/Feature.d.ts +3 -3
  191. package/dist/src/components/gherkin/Feature.d.ts.map +1 -1
  192. package/dist/src/components/gherkin/Feature.js +14 -24
  193. package/dist/src/components/gherkin/Feature.js.map +1 -1
  194. package/dist/src/components/gherkin/GherkinDocument.d.ts +3 -3
  195. package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -1
  196. package/dist/src/components/gherkin/GherkinDocument.js +3 -3
  197. package/dist/src/components/gherkin/GherkinDocument.js.map +1 -1
  198. package/dist/src/components/gherkin/Keyword.d.ts +2 -2
  199. package/dist/src/components/gherkin/Keyword.d.ts.map +1 -1
  200. package/dist/src/components/gherkin/Keyword.js +3 -3
  201. package/dist/src/components/gherkin/Keyword.js.map +1 -1
  202. package/dist/src/components/gherkin/Keyword.module.scss +0 -1
  203. package/dist/src/components/gherkin/Parameter.d.ts +3 -3
  204. package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
  205. package/dist/src/components/gherkin/Parameter.js +4 -4
  206. package/dist/src/components/gherkin/Parameter.js.map +1 -1
  207. package/dist/src/components/gherkin/Rule.d.ts +3 -3
  208. package/dist/src/components/gherkin/Rule.d.ts.map +1 -1
  209. package/dist/src/components/gherkin/Rule.js +11 -21
  210. package/dist/src/components/gherkin/Rule.js.map +1 -1
  211. package/dist/src/components/gherkin/Scenario.d.ts +3 -3
  212. package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
  213. package/dist/src/components/gherkin/Scenario.js +5 -14
  214. package/dist/src/components/gherkin/Scenario.js.map +1 -1
  215. package/dist/src/components/gherkin/StatusIcon.d.ts +2 -2
  216. package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -1
  217. package/dist/src/components/gherkin/StatusIcon.js +10 -10
  218. package/dist/src/components/gherkin/StatusIcon.js.map +1 -1
  219. package/dist/src/components/gherkin/StepsList.d.ts +1 -1
  220. package/dist/src/components/gherkin/StepsList.d.ts.map +1 -1
  221. package/dist/src/components/gherkin/StepsList.js +2 -2
  222. package/dist/src/components/gherkin/StepsList.js.map +1 -1
  223. package/dist/src/components/gherkin/Tags.d.ts +3 -3
  224. package/dist/src/components/gherkin/Tags.d.ts.map +1 -1
  225. package/dist/src/components/gherkin/Tags.js +4 -5
  226. package/dist/src/components/gherkin/Tags.js.map +1 -1
  227. package/dist/src/components/gherkin/Title.d.ts +3 -3
  228. package/dist/src/components/gherkin/Title.d.ts.map +1 -1
  229. package/dist/src/components/gherkin/Title.js +3 -4
  230. package/dist/src/components/gherkin/Title.js.map +1 -1
  231. package/dist/src/components/gherkin/attachment/Attachment.d.ts +3 -3
  232. package/dist/src/components/gherkin/attachment/Attachment.d.ts.map +1 -1
  233. package/dist/src/components/gherkin/attachment/Attachment.js +14 -17
  234. package/dist/src/components/gherkin/attachment/Attachment.js.map +1 -1
  235. package/dist/src/components/gherkin/attachment/Attachment.module.scss +15 -5
  236. package/dist/src/components/gherkin/attachment/Image.d.ts +4 -4
  237. package/dist/src/components/gherkin/attachment/Image.d.ts.map +1 -1
  238. package/dist/src/components/gherkin/attachment/Image.js +6 -8
  239. package/dist/src/components/gherkin/attachment/Image.js.map +1 -1
  240. package/dist/src/components/gherkin/attachment/Links.d.ts +3 -3
  241. package/dist/src/components/gherkin/attachment/Links.d.ts.map +1 -1
  242. package/dist/src/components/gherkin/attachment/Links.js +7 -10
  243. package/dist/src/components/gherkin/attachment/Links.js.map +1 -1
  244. package/dist/src/components/gherkin/attachment/Log.d.ts +3 -3
  245. package/dist/src/components/gherkin/attachment/Log.d.ts.map +1 -1
  246. package/dist/src/components/gherkin/attachment/Log.js +3 -3
  247. package/dist/src/components/gherkin/attachment/Log.js.map +1 -1
  248. package/dist/src/components/gherkin/attachment/Text.d.ts +3 -3
  249. package/dist/src/components/gherkin/attachment/Text.d.ts.map +1 -1
  250. package/dist/src/components/gherkin/attachment/Text.js +4 -6
  251. package/dist/src/components/gherkin/attachment/Text.js.map +1 -1
  252. package/dist/src/components/gherkin/attachment/Unknown.d.ts +2 -2
  253. package/dist/src/components/gherkin/attachment/Unknown.d.ts.map +1 -1
  254. package/dist/src/components/gherkin/attachment/Unknown.js +9 -17
  255. package/dist/src/components/gherkin/attachment/Unknown.js.map +1 -1
  256. package/dist/src/components/gherkin/attachment/Video.d.ts +3 -3
  257. package/dist/src/components/gherkin/attachment/Video.d.ts.map +1 -1
  258. package/dist/src/components/gherkin/attachment/Video.js +6 -10
  259. package/dist/src/components/gherkin/attachment/Video.js.map +1 -1
  260. package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts +1 -1
  261. package/dist/src/components/gherkin/attachment/attachmentFilename.d.ts.map +1 -1
  262. package/dist/src/components/gherkin/attachment/attachmentFilename.js.map +1 -1
  263. package/dist/src/components/gherkin/attachment/base64Decode.d.ts +9 -1
  264. package/dist/src/components/gherkin/attachment/base64Decode.d.ts.map +1 -1
  265. package/dist/src/components/gherkin/attachment/base64Decode.js +17 -3
  266. package/dist/src/components/gherkin/attachment/base64Decode.js.map +1 -1
  267. package/dist/src/components/gherkin/attachment/useText.d.ts +1 -1
  268. package/dist/src/components/gherkin/attachment/useText.d.ts.map +1 -1
  269. package/dist/src/components/gherkin/attachment/useText.js +3 -3
  270. package/dist/src/components/gherkin/attachment/useText.js.map +1 -1
  271. package/dist/src/components/gherkin/composeHookStepTitle.d.ts +1 -1
  272. package/dist/src/components/gherkin/composeHookStepTitle.d.ts.map +1 -1
  273. package/dist/src/components/gherkin/composeHookStepTitle.js +1 -1
  274. package/dist/src/components/gherkin/composeHookStepTitle.js.map +1 -1
  275. package/dist/src/components/gherkin/composePickleStepTitle.d.ts +1 -1
  276. package/dist/src/components/gherkin/composePickleStepTitle.d.ts.map +1 -1
  277. package/dist/src/components/gherkin/composePickleStepTitle.js +2 -2
  278. package/dist/src/components/gherkin/composePickleStepTitle.js.map +1 -1
  279. package/dist/src/components/gherkin/statusName.d.ts +2 -2
  280. package/dist/src/components/gherkin/statusName.d.ts.map +1 -1
  281. package/dist/src/components/gherkin/statusName.js.map +1 -1
  282. package/dist/src/components/results/AmbiguousResult.d.ts +8 -0
  283. package/dist/src/components/results/AmbiguousResult.d.ts.map +1 -0
  284. package/dist/src/components/results/AmbiguousResult.js +11 -0
  285. package/dist/src/components/results/AmbiguousResult.js.map +1 -0
  286. package/dist/src/components/results/AmbiguousResult.module.scss +22 -0
  287. package/dist/src/components/results/FailedResult.d.ts +8 -0
  288. package/dist/src/components/results/FailedResult.d.ts.map +1 -0
  289. package/dist/src/components/results/FailedResult.js +15 -0
  290. package/dist/src/components/results/FailedResult.js.map +1 -0
  291. package/dist/src/components/results/PendingResult.d.ts +8 -0
  292. package/dist/src/components/results/PendingResult.d.ts.map +1 -0
  293. package/dist/src/components/results/PendingResult.js +12 -0
  294. package/dist/src/components/results/PendingResult.js.map +1 -0
  295. package/dist/src/components/results/ResultNote.d.ts +3 -0
  296. package/dist/src/components/results/ResultNote.d.ts.map +1 -0
  297. package/dist/src/components/results/ResultNote.js +6 -0
  298. package/dist/src/components/results/ResultNote.js.map +1 -0
  299. package/dist/src/components/results/ResultNote.module.scss +6 -0
  300. package/dist/src/components/results/SkippedResult.d.ts +8 -0
  301. package/dist/src/components/results/SkippedResult.d.ts.map +1 -0
  302. package/dist/src/components/results/SkippedResult.js +12 -0
  303. package/dist/src/components/results/SkippedResult.js.map +1 -0
  304. package/dist/src/components/results/SourceReference.d.ts +8 -0
  305. package/dist/src/components/results/SourceReference.d.ts.map +1 -0
  306. package/dist/src/components/results/SourceReference.js +13 -0
  307. package/dist/src/components/results/SourceReference.js.map +1 -0
  308. package/dist/src/components/results/SourceReference.module.scss +10 -0
  309. package/dist/src/components/results/TestCaseOutcome.d.ts +2 -2
  310. package/dist/src/components/results/TestCaseOutcome.d.ts.map +1 -1
  311. package/dist/src/components/results/TestCaseOutcome.js +5 -9
  312. package/dist/src/components/results/TestCaseOutcome.js.map +1 -1
  313. package/dist/src/components/results/TestRunHookOutcome.d.ts +2 -2
  314. package/dist/src/components/results/TestRunHookOutcome.d.ts.map +1 -1
  315. package/dist/src/components/results/TestRunHookOutcome.js +4 -13
  316. package/dist/src/components/results/TestRunHookOutcome.js.map +1 -1
  317. package/dist/src/components/results/TestStepAttachments.d.ts +2 -2
  318. package/dist/src/components/results/TestStepAttachments.d.ts.map +1 -1
  319. package/dist/src/components/results/TestStepAttachments.js +4 -5
  320. package/dist/src/components/results/TestStepAttachments.js.map +1 -1
  321. package/dist/src/components/results/TestStepDuration.d.ts +2 -2
  322. package/dist/src/components/results/TestStepDuration.d.ts.map +1 -1
  323. package/dist/src/components/results/TestStepDuration.js +4 -2
  324. package/dist/src/components/results/TestStepDuration.js.map +1 -1
  325. package/dist/src/components/results/TestStepOutcome.d.ts +2 -2
  326. package/dist/src/components/results/TestStepOutcome.d.ts.map +1 -1
  327. package/dist/src/components/results/TestStepOutcome.js +18 -27
  328. package/dist/src/components/results/TestStepOutcome.js.map +1 -1
  329. package/dist/src/components/results/TestStepOutcome.module.scss +1 -1
  330. package/dist/src/components/results/UndefinedResult.d.ts +8 -0
  331. package/dist/src/components/results/UndefinedResult.d.ts.map +1 -0
  332. package/dist/src/components/results/UndefinedResult.js +18 -0
  333. package/dist/src/components/results/UndefinedResult.js.map +1 -0
  334. package/dist/src/components/results/UndefinedResult.module.scss +14 -0
  335. package/dist/src/components/results/index.d.ts +1 -1
  336. package/dist/src/components/results/index.d.ts.map +1 -1
  337. package/dist/src/components/results/index.js +1 -1
  338. package/dist/src/components/results/index.js.map +1 -1
  339. package/dist/src/formatExecutionDuration.js.map +1 -1
  340. package/dist/src/hooks/helpers.js.map +1 -1
  341. package/dist/src/hooks/useFilteredDocuments.d.ts +2 -2
  342. package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -1
  343. package/dist/src/hooks/useFilteredDocuments.js +70 -34
  344. package/dist/src/hooks/useFilteredDocuments.js.map +1 -1
  345. package/dist/src/hooks/useMostSevereStatusByUri.js.map +1 -1
  346. package/dist/src/hooks/useQueries.d.ts +2 -2
  347. package/dist/src/hooks/useQueries.d.ts.map +1 -1
  348. package/dist/src/hooks/useQueries.js.map +1 -1
  349. package/dist/src/hooks/useResultStatistics.d.ts +1 -1
  350. package/dist/src/hooks/useResultStatistics.d.ts.map +1 -1
  351. package/dist/src/hooks/useResultStatistics.js.map +1 -1
  352. package/dist/src/hooks/useSearch.d.ts +1 -1
  353. package/dist/src/hooks/useSearch.d.ts.map +1 -1
  354. package/dist/src/hooks/useSearch.js.map +1 -1
  355. package/dist/src/hooks/useTestCaseStarted.d.ts +6 -1
  356. package/dist/src/hooks/useTestCaseStarted.d.ts.map +1 -1
  357. package/dist/src/hooks/useTestCaseStarted.js +13 -10
  358. package/dist/src/hooks/useTestCaseStarted.js.map +1 -1
  359. package/dist/src/hooks/useTestRunHooks.d.ts +1 -1
  360. package/dist/src/hooks/useTestRunHooks.d.ts.map +1 -1
  361. package/dist/src/hooks/useTestRunHooks.js.map +1 -1
  362. package/dist/src/search/FeatureSearch.d.ts +12 -3
  363. package/dist/src/search/FeatureSearch.d.ts.map +1 -1
  364. package/dist/src/search/FeatureSearch.js +9 -17
  365. package/dist/src/search/FeatureSearch.js.map +1 -1
  366. package/dist/src/search/ScenarioLikeSearch.d.ts +8 -13
  367. package/dist/src/search/ScenarioLikeSearch.d.ts.map +1 -1
  368. package/dist/src/search/ScenarioLikeSearch.js +13 -17
  369. package/dist/src/search/ScenarioLikeSearch.js.map +1 -1
  370. package/dist/src/search/StepSearch.d.ts +9 -16
  371. package/dist/src/search/StepSearch.d.ts.map +1 -1
  372. package/dist/src/search/StepSearch.js +13 -17
  373. package/dist/src/search/StepSearch.js.map +1 -1
  374. package/dist/src/search/TextSearch.d.ts +11 -2
  375. package/dist/src/search/TextSearch.d.ts.map +1 -1
  376. package/dist/src/search/TextSearch.js +59 -52
  377. package/dist/src/search/TextSearch.js.map +1 -1
  378. package/dist/src/search/createSearchIndex.d.ts +7 -0
  379. package/dist/src/search/createSearchIndex.d.ts.map +1 -0
  380. package/dist/src/search/createSearchIndex.js +10 -0
  381. package/dist/src/search/createSearchIndex.js.map +1 -0
  382. package/dist/src/search/deriveLineageConstraints.d.ts +8 -0
  383. package/dist/src/search/deriveLineageConstraints.d.ts.map +1 -0
  384. package/dist/src/search/deriveLineageConstraints.js +38 -0
  385. package/dist/src/search/deriveLineageConstraints.js.map +1 -0
  386. package/dist/src/search/index.d.ts +3 -1
  387. package/dist/src/search/index.d.ts.map +1 -1
  388. package/dist/src/search/index.js +3 -1
  389. package/dist/src/search/index.js.map +1 -1
  390. package/dist/src/search/pruneGherkinDocuments.d.ts +24 -0
  391. package/dist/src/search/pruneGherkinDocuments.d.ts.map +1 -0
  392. package/dist/src/search/pruneGherkinDocuments.js +180 -0
  393. package/dist/src/search/pruneGherkinDocuments.js.map +1 -0
  394. package/dist/src/search/types.d.ts +39 -8
  395. package/dist/src/search/types.d.ts.map +1 -1
  396. package/dist/src/search/types.js +1 -1
  397. package/dist/src/search/types.js.map +1 -1
  398. package/dist/src/toRepositoryId.d.ts +1 -1
  399. package/dist/src/toRepositoryId.d.ts.map +1 -1
  400. package/dist/src/toRepositoryId.js +7 -6
  401. package/dist/src/toRepositoryId.js.map +1 -1
  402. package/dist/tsconfig.build.tsbuildinfo +1 -1
  403. package/package.json +56 -69
  404. package/dist/src/components/results/TestStepResultDetails.d.ts +0 -4
  405. package/dist/src/components/results/TestStepResultDetails.d.ts.map +0 -1
  406. package/dist/src/components/results/TestStepResultDetails.js +0 -16
  407. package/dist/src/components/results/TestStepResultDetails.js.map +0 -1
  408. package/dist/src/search/Search.d.ts +0 -11
  409. package/dist/src/search/Search.d.ts.map +0 -1
  410. package/dist/src/search/Search.js +0 -51
  411. package/dist/src/search/Search.js.map +0 -1
  412. package/dist/src/search/TagSearch.d.ts +0 -4
  413. package/dist/src/search/TagSearch.d.ts.map +0 -1
  414. package/dist/src/search/TagSearch.js +0 -57
  415. package/dist/src/search/TagSearch.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cucumber/react-components",
3
- "version": "24.2.0",
3
+ "version": "24.3.0",
4
4
  "description": "React components for Cucumber",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -21,94 +21,81 @@
21
21
  "start": "ladle serve",
22
22
  "build": "ladle build",
23
23
  "preview": "ladle preview",
24
- "fix": "eslint --max-warnings 0 src test --fix src && prettier --write src test",
25
- "lint": "eslint --max-warnings 0 src test && prettier --check src test",
24
+ "lint": "biome check --error-on-warnings",
25
+ "fix": "biome check --error-on-warnings --write",
26
26
  "prepublishOnly": "npm run compile"
27
27
  },
28
28
  "dependencies": {
29
- "@cucumber/gherkin-utils": "10.0.0",
30
- "@cucumber/messages": "29.0.1",
31
- "@cucumber/query": "14.3.0",
32
- "@cucumber/tag-expressions": "6.2.0",
33
- "@fortawesome/fontawesome-svg-core": "6.2.1",
34
- "@fortawesome/free-solid-svg-icons": "6.2.1",
35
- "@fortawesome/react-fontawesome": "0.2.0",
36
- "@orama/orama": "^2.0.0-beta.7",
37
- "@orama/stemmers": "^2.0.0-beta.7",
38
- "@teppeis/multimaps": "2.0.0",
29
+ "@cucumber/gherkin-utils": "11.0.0",
30
+ "@cucumber/messages": "32.2.0",
31
+ "@cucumber/query": "15.0.1",
32
+ "@cucumber/tag-expressions": "9.1.0",
33
+ "@fortawesome/fontawesome-svg-core": "7.2.0",
34
+ "@fortawesome/free-solid-svg-icons": "7.2.0",
35
+ "@fortawesome/react-fontawesome": "3.3.0",
36
+ "@orama/orama": "^3.0.0",
37
+ "@orama/stemmers": "^3.0.0",
38
+ "@teppeis/multimaps": "3.0.0",
39
39
  "ansi-to-html": "0.7.2",
40
- "color": "4.2.3",
41
- "date-fns": "2.29.3",
40
+ "date-fns": "4.1.0",
42
41
  "hast-util-sanitize": "^5.0.1",
43
- "highlight-words": "1.2.2",
44
- "mime": "^3.0.0",
45
- "react-accessible-accordion": "5.0.0",
46
- "react-error-boundary": "^4.0.13",
47
- "react-markdown": "6.0.3",
48
- "rehype-raw": "5.1.0",
49
- "rehype-sanitize": "4.0.0",
50
- "remark-breaks": "2.0.2",
51
- "remark-gfm": "1.0.0",
52
- "use-debounce": "^10.0.0",
53
- "uuid": "9.0.0"
42
+ "highlight-words-core": "1.2.3",
43
+ "mime": "^4.0.0",
44
+ "react-aria-components": "^1.16.0",
45
+ "react-error-boundary": "^6.0.0",
46
+ "react-markdown": "10.1.0",
47
+ "rehype-raw": "7.0.0",
48
+ "rehype-sanitize": "6.0.0",
49
+ "remark-breaks": "4.0.0",
50
+ "remark-gfm": "4.0.1",
51
+ "use-debounce": "^10.0.0"
54
52
  },
55
53
  "peerDependencies": {
56
- "react": "~18",
57
- "react-dom": "~18"
54
+ "react": "^18.0.0 || ^19.0.0",
55
+ "react-dom": "^18.0.0 || ^19.0.0"
58
56
  },
59
57
  "devDependencies": {
60
- "@cucumber/compatibility-kit": "^27.0.0",
61
- "@cucumber/gherkin": "^35.1.0",
58
+ "@biomejs/biome": "^2.4.1",
59
+ "@cucumber/biome-config": "cucumber/biome-config#v0.1.0",
60
+ "@cucumber/compatibility-kit": "^29.0.0",
61
+ "@cucumber/gherkin": "^39.0.0",
62
62
  "@cucumber/message-streams": "^4.0.1",
63
- "@eslint/compat": "^1.2.7",
64
- "@eslint/eslintrc": "^3.2.0",
65
- "@eslint/js": "^9.20.0",
66
63
  "@ladle/react": "^5.0.3",
67
- "@testing-library/react": "14.1.2",
68
- "@testing-library/user-event": "14.5.1",
69
- "@types/chai": "^4.3.11",
64
+ "@testing-library/react": "16.3.2",
65
+ "@testing-library/user-event": "14.6.1",
66
+ "@types/chai": "^5.0.0",
70
67
  "@types/chai-dom": "^1.11.3",
71
- "@types/color": "3.0.3",
72
- "@types/glob": "8.0.0",
73
- "@types/jsdom": "^21.1.6",
74
- "@types/mime": "^3.0.1",
68
+ "@types/glob": "9.0.0",
69
+ "@types/highlight-words-core": "^1.2.3",
70
+ "@types/jsdom": "^28.0.0",
71
+ "@types/mime": "^4.0.0",
75
72
  "@types/mocha": "^10.0.6",
76
- "@types/node": "18.11.18",
77
- "@types/react": "^18.0.26",
78
- "@types/react-dom": "^18.0.9",
79
- "@types/sinon": "^17.0.2",
80
- "@types/sinon-chai": "^3.2.12",
81
- "@typescript-eslint/eslint-plugin": "^8.24.1",
82
- "@typescript-eslint/parser": "^8.24.1",
83
- "chai": "^4.3.10",
73
+ "@types/node": "24.12.2",
74
+ "@types/react": "^19.2.14",
75
+ "@types/react-dom": "^19.2.3",
76
+ "@types/sinon": "^21.0.0",
77
+ "@types/sinon-chai": "^4.0.0",
78
+ "chai": "^6.0.0",
84
79
  "chai-dom": "^1.12.0",
85
- "core-js": "3.27.1",
86
- "cpy-cli": "4.2.0",
87
- "eslint": "9.20.1",
88
- "eslint-plugin-import": "^2.31.0",
89
- "eslint-plugin-n": "^17.15.1",
90
- "eslint-plugin-react": "^7.37.4",
91
- "eslint-plugin-react-hooks": "^5.1.0",
92
- "eslint-plugin-simple-import-sort": "^12.1.1",
93
- "glob": "8.1.0",
94
- "global-jsdom": "^9.1.0",
95
- "globals": "^16.0.0",
96
- "jsdom": "22.1.0",
80
+ "core-js": "3.49.0",
81
+ "cpy-cli": "7.0.0",
82
+ "glob": "13.0.6",
83
+ "global-jsdom": "^29.0.0",
84
+ "jsdom": "29.0.2",
97
85
  "mocha": "^11.2.2",
98
- "nyc": "15.1.0",
86
+ "nyc": "18.0.0",
99
87
  "path-browserify": "1.0.1",
100
- "prettier": "^3.5.1",
101
- "react": "18.2.0",
102
- "react-dom": "18.2.0",
103
- "react-is": "18.2.0",
88
+ "react": "^19.2.5",
89
+ "react-dom": "^19.2.5",
90
+ "react-is": "^19.2.5",
104
91
  "sass": "^1.89.2",
105
- "sinon": "^17.0.1",
106
- "sinon-chai": "^3.7.0",
92
+ "sinon": "^21.0.0",
93
+ "sinon-chai": "^4.0.0",
107
94
  "ts-node": "^10.9.1",
108
- "typescript": "4.9.4"
95
+ "typescript": "5.9.3"
109
96
  },
110
97
  "overrides": {
111
- "uuid": "9.0.0"
98
+ "uuid": "13.0.0"
112
99
  },
113
100
  "bugs": {
114
101
  "url": "https://github.com/cucumber/react-components/issues"
@@ -1,4 +0,0 @@
1
- import { TestStepResult } from '@cucumber/messages';
2
- import { FC } from 'react';
3
- export declare const TestStepResultDetails: FC<TestStepResult>;
4
- //# sourceMappingURL=TestStepResultDetails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestStepResultDetails.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestStepResultDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjC,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,cAAc,CAapD,CAAA"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { ErrorMessage } from '../gherkin/index.js';
3
- export const TestStepResultDetails = ({ message, exception }) => {
4
- if (exception) {
5
- return (React.createElement(ErrorMessage, null,
6
- React.createElement("strong", null, exception.type),
7
- " ",
8
- exception.message,
9
- exception.stackTrace && React.createElement("div", null, exception.stackTrace)));
10
- }
11
- if (message) {
12
- return React.createElement(ErrorMessage, null, message);
13
- }
14
- return null;
15
- };
16
- //# sourceMappingURL=TestStepResultDetails.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestStepResultDetails.js","sourceRoot":"","sources":["../../../../src/components/results/TestStepResultDetails.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAuB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAClF,IAAI,SAAS,EAAE;QACb,OAAO,CACL,oBAAC,YAAY;YACX,oCAAS,SAAS,CAAC,IAAI,CAAU;;YAAE,SAAS,CAAC,OAAO;YACnD,SAAS,CAAC,UAAU,IAAI,iCAAM,SAAS,CAAC,UAAU,CAAO,CAC7C,CAChB,CAAA;KACF;IACD,IAAI,OAAO,EAAE;QACX,OAAO,oBAAC,YAAY,QAAE,OAAO,CAAgB,CAAA;KAC9C;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["import { TestStepResult } from '@cucumber/messages'\nimport React, { FC } from 'react'\n\nimport { ErrorMessage } from '../gherkin/index.js'\n\nexport const TestStepResultDetails: FC<TestStepResult> = ({ message, exception }) => {\n if (exception) {\n return (\n <ErrorMessage>\n <strong>{exception.type}</strong> {exception.message}\n {exception.stackTrace && <div>{exception.stackTrace}</div>}\n </ErrorMessage>\n )\n }\n if (message) {\n return <ErrorMessage>{message}</ErrorMessage>\n }\n return null\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
2
- import { Searchable } from './types.js';
3
- /**
4
- * Creates a search index that supports querying by term or tag expression, and
5
- * returns an array of abridged Gherkin documents matching the query.
6
- *
7
- * @param gherkinQuery - query instance used internally for searching, with any
8
- * documents already present being pre-populated in the search index
9
- */
10
- export declare function createSearch(gherkinQuery: GherkinQuery): Promise<Searchable>;
11
- //# sourceMappingURL=Search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/search/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAM/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAkCvC;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAUlF"}
@@ -1,51 +0,0 @@
1
- import isTagExpression from '../isTagExpression.js';
2
- import { createTagSearch } from './TagSearch.js';
3
- import { createTextSearch } from './TextSearch.js';
4
- class Search {
5
- tagSearch;
6
- textSearch;
7
- documents = [];
8
- constructor(tagSearch, textSearch) {
9
- this.tagSearch = tagSearch;
10
- this.textSearch = textSearch;
11
- }
12
- async search(query) {
13
- if (!query) {
14
- return [...this.documents];
15
- }
16
- if (isTagExpression(query)) {
17
- try {
18
- return await this.tagSearch.search(query);
19
- }
20
- catch {
21
- // No-op, we fall back to text search.
22
- }
23
- }
24
- return this.textSearch.search(query);
25
- }
26
- async add(gherkinDocument) {
27
- this.documents.push(gherkinDocument);
28
- await this.tagSearch.add(gherkinDocument);
29
- await this.textSearch.add(gherkinDocument);
30
- return this;
31
- }
32
- }
33
- /**
34
- * Creates a search index that supports querying by term or tag expression, and
35
- * returns an array of abridged Gherkin documents matching the query.
36
- *
37
- * @param gherkinQuery - query instance used internally for searching, with any
38
- * documents already present being pre-populated in the search index
39
- */
40
- export async function createSearch(gherkinQuery) {
41
- const [tagSearch, textSearch] = await Promise.all([
42
- createTagSearch(gherkinQuery),
43
- createTextSearch(),
44
- ]);
45
- const searchImpl = new Search(tagSearch, textSearch);
46
- for (const doc of gherkinQuery.getGherkinDocuments()) {
47
- await searchImpl.add(doc);
48
- }
49
- return searchImpl;
50
- }
51
- //# sourceMappingURL=Search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../src/search/Search.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAGlD,MAAM,MAAM;IAIS;IACA;IAJF,SAAS,GAAsB,EAAE,CAAA;IAElD,YACmB,SAAqB,EACrB,UAAsB;QADtB,cAAS,GAAT,SAAS,CAAY;QACrB,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEG,KAAK,CAAC,MAAM,CAAC,KAAa;QAC/B,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAA;SAC3B;QAED,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;aAC1C;YAAC,MAAM;gBACN,sCAAsC;aACvC;SACF;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,eAAgC;QAC/C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACpC,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QACzC,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,YAA0B;IAC3D,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,eAAe,CAAC,YAAY,CAAC;QAC7B,gBAAgB,EAAE;KACnB,CAAC,CAAA;IACF,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IACpD,KAAK,MAAM,GAAG,IAAI,YAAY,CAAC,mBAAmB,EAAE,EAAE;QACpD,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KAC1B;IACD,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { Query as GherkinQuery } from '@cucumber/gherkin-utils'\nimport { GherkinDocument } from '@cucumber/messages'\n\nimport isTagExpression from '../isTagExpression.js'\nimport { createTagSearch } from './TagSearch.js'\nimport { createTextSearch } from './TextSearch.js'\nimport { Searchable } from './types.js'\n\nclass Search {\n private readonly documents: GherkinDocument[] = []\n\n constructor(\n private readonly tagSearch: Searchable,\n private readonly textSearch: Searchable\n ) {}\n\n public async search(query: string): Promise<readonly GherkinDocument[]> {\n if (!query) {\n return [...this.documents]\n }\n\n if (isTagExpression(query)) {\n try {\n return await this.tagSearch.search(query)\n } catch {\n // No-op, we fall back to text search.\n }\n }\n\n return this.textSearch.search(query)\n }\n\n public async add(gherkinDocument: GherkinDocument) {\n this.documents.push(gherkinDocument)\n await this.tagSearch.add(gherkinDocument)\n await this.textSearch.add(gherkinDocument)\n return this\n }\n}\n\n/**\n * Creates a search index that supports querying by term or tag expression, and\n * returns an array of abridged Gherkin documents matching the query.\n *\n * @param gherkinQuery - query instance used internally for searching, with any\n * documents already present being pre-populated in the search index\n */\nexport async function createSearch(gherkinQuery: GherkinQuery): Promise<Searchable> {\n const [tagSearch, textSearch] = await Promise.all([\n createTagSearch(gherkinQuery),\n createTextSearch(),\n ])\n const searchImpl = new Search(tagSearch, textSearch)\n for (const doc of gherkinQuery.getGherkinDocuments()) {\n await searchImpl.add(doc)\n }\n return searchImpl\n}\n"]}
@@ -1,4 +0,0 @@
1
- import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
2
- import { Searchable } from './types.js';
3
- export declare function createTagSearch(gherkinQuery: GherkinQuery): Promise<Searchable>;
4
- //# sourceMappingURL=TagSearch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TagSearch.d.ts","sourceRoot":"","sources":["../../../src/search/TagSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,YAAY,EAEtB,MAAM,yBAAyB,CAAA;AAMhC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AA6DvC,wBAAsB,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAErF"}
@@ -1,57 +0,0 @@
1
- import { GherkinDocumentWalker, rejectAllFilters, } from '@cucumber/gherkin-utils';
2
- import parse from '@cucumber/tag-expressions';
3
- import { ArrayMultimap } from '@teppeis/multimaps';
4
- class TagSearch {
5
- gherkinQuery;
6
- pickleById = new Map();
7
- picklesByScenarioId = new ArrayMultimap();
8
- gherkinDocuments = [];
9
- constructor(gherkinQuery) {
10
- this.gherkinQuery = gherkinQuery;
11
- this.gherkinQuery = gherkinQuery;
12
- }
13
- async search(query) {
14
- const expressionNode = parse(query);
15
- const tagFilters = {
16
- acceptScenario: (scenario) => {
17
- const pickles = this.picklesByScenarioId.get(scenario.id);
18
- for (const pickle of pickles) {
19
- const tags = pickle.tags.map((tag) => tag.name);
20
- if (expressionNode.evaluate(tags)) {
21
- return true;
22
- }
23
- }
24
- return false;
25
- },
26
- };
27
- const filters = { ...rejectAllFilters, ...tagFilters };
28
- const astWalker = new GherkinDocumentWalker(filters);
29
- return this.gherkinDocuments
30
- .map((gherkinDocument) => astWalker.walkGherkinDocument(gherkinDocument))
31
- .filter((gherkinDocument) => gherkinDocument !== null);
32
- }
33
- async add(gherkinDocument) {
34
- this.gherkinDocuments.push(gherkinDocument);
35
- const pickles = this.gherkinQuery.getPickles();
36
- pickles.forEach((pickle) => this.pickleById.set(pickle.id, pickle));
37
- const astWalker = new GherkinDocumentWalker({}, {
38
- handleScenario: (scenario) => {
39
- if (!gherkinDocument.uri)
40
- throw new Error('No uri for gherkinDocument');
41
- const pickleIds = this.gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id);
42
- pickleIds.map((pickleId) => {
43
- const pickle = this.pickleById.get(pickleId);
44
- if (!pickle)
45
- throw new Error(`No pickle for id=${pickleId}`);
46
- this.picklesByScenarioId.put(scenario.id, pickle);
47
- });
48
- },
49
- });
50
- astWalker.walkGherkinDocument(gherkinDocument);
51
- return this;
52
- }
53
- }
54
- export async function createTagSearch(gherkinQuery) {
55
- return new TagSearch(gherkinQuery);
56
- }
57
- //# sourceMappingURL=TagSearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TagSearch.js","sourceRoot":"","sources":["../../../src/search/TagSearch.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n GherkinDocumentWalker,\n Query as GherkinQuery,\n rejectAllFilters,\n} from '@cucumber/gherkin-utils'\nimport * as messages from '@cucumber/messages'\nimport { GherkinDocument } from '@cucumber/messages'\nimport parse from '@cucumber/tag-expressions'\nimport { ArrayMultimap } from '@teppeis/multimaps'\n\nimport { Searchable } from './types.js'\n\nclass TagSearch {\n private readonly pickleById = new Map<string, messages.Pickle>()\n private readonly picklesByScenarioId = new ArrayMultimap<string, messages.Pickle>()\n private gherkinDocuments: messages.GherkinDocument[] = []\n\n constructor(private readonly gherkinQuery: GherkinQuery) {\n this.gherkinQuery = gherkinQuery\n }\n\n public async search(query: string): Promise<readonly messages.GherkinDocument[]> {\n const expressionNode = parse(query)\n const tagFilters = {\n acceptScenario: (scenario: messages.Scenario) => {\n const pickles = this.picklesByScenarioId.get(scenario.id)\n\n for (const pickle of pickles) {\n const tags = pickle.tags.map((tag) => tag.name)\n if (expressionNode.evaluate(tags)) {\n return true\n }\n }\n\n return false\n },\n }\n const filters = { ...rejectAllFilters, ...tagFilters }\n const astWalker = new GherkinDocumentWalker(filters)\n\n return this.gherkinDocuments\n .map((gherkinDocument) => astWalker.walkGherkinDocument(gherkinDocument))\n .filter((gherkinDocument) => gherkinDocument !== null) as GherkinDocument[]\n }\n\n public async add(gherkinDocument: messages.GherkinDocument) {\n this.gherkinDocuments.push(gherkinDocument)\n const pickles = this.gherkinQuery.getPickles()\n pickles.forEach((pickle) => this.pickleById.set(pickle.id, pickle))\n\n const astWalker = new GherkinDocumentWalker(\n {},\n {\n handleScenario: (scenario) => {\n if (!gherkinDocument.uri) throw new Error('No uri for gherkinDocument')\n const pickleIds = this.gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id)\n\n pickleIds.map((pickleId) => {\n const pickle = this.pickleById.get(pickleId)\n if (!pickle) throw new Error(`No pickle for id=${pickleId}`)\n this.picklesByScenarioId.put(scenario.id, pickle)\n })\n },\n }\n )\n astWalker.walkGherkinDocument(gherkinDocument)\n\n return this\n }\n}\n\nexport async function createTagSearch(gherkinQuery: GherkinQuery): Promise<Searchable> {\n return new TagSearch(gherkinQuery)\n}\n"]}