@manta-eu/react 0.1.1 → 0.1.3

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 (427) hide show
  1. package/README.md +2 -6
  2. package/dist/components/brand-icons/index.d.ts +6 -0
  3. package/dist/components/brand-icons/index.d.ts.map +1 -0
  4. package/dist/components/brand-icons/index.js +34 -0
  5. package/dist/components/breadcrumbs/index.d.ts +26 -0
  6. package/dist/components/breadcrumbs/index.d.ts.map +1 -0
  7. package/dist/components/breadcrumbs/index.js +36 -0
  8. package/dist/components/chip/index.d.ts +14 -0
  9. package/dist/components/chip/index.d.ts.map +1 -0
  10. package/dist/components/chip/index.js +8 -0
  11. package/dist/components/editable-text/index.d.ts +13 -0
  12. package/dist/components/editable-text/index.d.ts.map +1 -0
  13. package/dist/components/editable-text/index.js +61 -0
  14. package/dist/components/explain-fact/ExplainFact.d.ts +16 -0
  15. package/dist/components/explain-fact/ExplainFact.d.ts.map +1 -0
  16. package/dist/components/{rdfox-explain/RDFoxExplain.js → explain-fact/ExplainFact.js} +12 -12
  17. package/dist/components/explain-fact/OutdatedFactNotice.d.ts.map +1 -0
  18. package/dist/components/input/index.d.ts +2 -0
  19. package/dist/components/input/index.d.ts.map +1 -1
  20. package/dist/components/input/index.js +2 -0
  21. package/dist/components/input/input-numeric.d.ts +19 -0
  22. package/dist/components/input/input-numeric.d.ts.map +1 -0
  23. package/dist/components/input/input-numeric.js +85 -0
  24. package/dist/components/input/input-tags.d.ts +17 -0
  25. package/dist/components/input/input-tags.d.ts.map +1 -0
  26. package/dist/components/input/input-tags.js +46 -0
  27. package/dist/components/multi-select/index.d.ts +32 -0
  28. package/dist/components/multi-select/index.d.ts.map +1 -0
  29. package/dist/components/multi-select/index.js +33 -0
  30. package/dist/components/multi-select/toggle-value.d.ts +2 -0
  31. package/dist/components/multi-select/toggle-value.d.ts.map +1 -0
  32. package/dist/components/multi-select/toggle-value.js +3 -0
  33. package/dist/components/sidebar/index.d.ts +4 -1
  34. package/dist/components/sidebar/index.d.ts.map +1 -1
  35. package/dist/components/sidebar/index.js +2 -2
  36. package/dist/components/skeleton/index.js +1 -1
  37. package/dist/components/tool-invocation-card/ExplainFactResultDisplay.d.ts +9 -0
  38. package/dist/components/tool-invocation-card/ExplainFactResultDisplay.d.ts.map +1 -0
  39. package/dist/components/tool-invocation-card/{ExplainRDFoxResultDisplay.js → ExplainFactResultDisplay.js} +3 -3
  40. package/dist/components/tool-invocation-card/ToolOutputRenderer.js +2 -2
  41. package/dist/components/tool-invocation-card/types.d.ts +4 -4
  42. package/dist/components/tool-invocation-card/types.d.ts.map +1 -1
  43. package/dist/components/tool-invocation-card/types.js +2 -2
  44. package/dist/components/tree-multi-select/index.d.ts +1 -1
  45. package/dist/components/tree-multi-select/index.d.ts.map +1 -1
  46. package/dist/components/tree-multi-select/index.js +1 -1
  47. package/dist/components/tree-multi-select/tree-multi-select-rows.d.ts +2 -1
  48. package/dist/components/tree-multi-select/tree-multi-select-rows.d.ts.map +1 -1
  49. package/dist/components/tree-multi-select/tree-multi-select-rows.js +21 -31
  50. package/dist/components/tree-multi-select/tree-multi-select.d.ts +2 -0
  51. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  52. package/dist/components/tree-multi-select/tree-multi-select.js +21 -8
  53. package/dist/explain-fact/DatalogCode.d.ts.map +1 -0
  54. package/dist/explain-fact/EntityChip.d.ts.map +1 -0
  55. package/dist/explain-fact/EntityChip.js +17 -0
  56. package/dist/explain-fact/ExplainCompactView.d.ts.map +1 -0
  57. package/dist/explain-fact/ExplainFactState.d.ts +7 -0
  58. package/dist/explain-fact/ExplainFactState.d.ts.map +1 -0
  59. package/dist/{rdfox-explain/RDFoxExplainState.js → explain-fact/ExplainFactState.js} +1 -1
  60. package/dist/explain-fact/ExplainFullView.d.ts.map +1 -0
  61. package/dist/explain-fact/ExplainStates.d.ts.map +1 -0
  62. package/dist/explain-fact/ExplainTag.d.ts.map +1 -0
  63. package/dist/explain-fact/FactNotice.d.ts +7 -0
  64. package/dist/explain-fact/FactNotice.d.ts.map +1 -0
  65. package/dist/explain-fact/FactNotice.js +25 -0
  66. package/dist/explain-fact/FactValue.d.ts.map +1 -0
  67. package/dist/explain-fact/NumDot.d.ts.map +1 -0
  68. package/dist/explain-fact/PanelLabel.d.ts.map +1 -0
  69. package/dist/explain-fact/ProofSubjectHeader.d.ts.map +1 -0
  70. package/dist/explain-fact/ProvenanceBadge.d.ts.map +1 -0
  71. package/dist/{rdfox-explain → explain-fact}/ProvenanceBadge.js +2 -1
  72. package/dist/explain-fact/RuleVariableTypes.d.ts.map +1 -0
  73. package/dist/explain-fact/SubstitutedFactNotice.d.ts.map +1 -0
  74. package/dist/explain-fact/ValuePill.d.ts.map +1 -0
  75. package/dist/explain-fact/conclusion/ConclusionCard.d.ts.map +1 -0
  76. package/dist/explain-fact/conclusion/ConclusionSubtitle.d.ts.map +1 -0
  77. package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionSubtitle.js +3 -1
  78. package/dist/explain-fact/conclusion/index.d.ts.map +1 -0
  79. package/dist/explain-fact/explain-styles.d.ts.map +1 -0
  80. package/dist/explain-fact/fact-token.d.ts.map +1 -0
  81. package/dist/explain-fact/formula-hues.d.ts.map +1 -0
  82. package/dist/{rdfox-explain → explain-fact}/index.d.ts +2 -3
  83. package/dist/explain-fact/index.d.ts.map +1 -0
  84. package/dist/{rdfox-explain → explain-fact}/index.js +2 -3
  85. package/dist/explain-fact/inspector/ExplainInspector.d.ts.map +1 -0
  86. package/dist/explain-fact/inspector/ExplainInspector.js +20 -0
  87. package/dist/explain-fact/inspector/InspectorBindings.d.ts.map +1 -0
  88. package/dist/explain-fact/inspector/InspectorFact.d.ts.map +1 -0
  89. package/dist/explain-fact/inspector/InspectorHeader.d.ts.map +1 -0
  90. package/dist/{rdfox-explain → explain-fact}/inspector/InspectorRule.d.ts +3 -0
  91. package/dist/explain-fact/inspector/InspectorRule.d.ts.map +1 -0
  92. package/dist/{rdfox-explain → explain-fact}/inspector/InspectorRule.js +4 -5
  93. package/dist/explain-fact/inspector/SupportsSection.d.ts.map +1 -0
  94. package/dist/{rdfox-explain → explain-fact}/inspector/SupportsSection.js +2 -1
  95. package/dist/explain-fact/inspector/index.d.ts.map +1 -0
  96. package/dist/explain-fact/proof-tree/ProofFactLabel.d.ts.map +1 -0
  97. package/dist/explain-fact/proof-tree/ProofRowBadge.d.ts.map +1 -0
  98. package/dist/explain-fact/proof-tree/ProofRowContent.d.ts.map +1 -0
  99. package/dist/explain-fact/proof-tree/ProofRowValue.d.ts.map +1 -0
  100. package/dist/explain-fact/proof-tree/ProofTree.d.ts.map +1 -0
  101. package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTree.js +1 -1
  102. package/dist/explain-fact/proof-tree/ProofTreeFormulaFooter.d.ts.map +1 -0
  103. package/dist/explain-fact/proof-tree/ProofTreeNode.d.ts.map +1 -0
  104. package/dist/explain-fact/proof-tree/SupportsTag.d.ts.map +1 -0
  105. package/dist/explain-fact/proof-tree/SupportsTag.js +6 -0
  106. package/dist/explain-fact/proof-tree/index.d.ts.map +1 -0
  107. package/dist/explain-fact/proof-tree/proof-tree-navigation.d.ts.map +1 -0
  108. package/dist/explain-fact/proof-tree/proof-tree-root-view.d.ts.map +1 -0
  109. package/dist/explain-fact/proof-tree/visible-premises.d.ts.map +1 -0
  110. package/dist/explain-fact/rule-presentation.d.ts.map +1 -0
  111. package/dist/{rdfox-explain → explain-fact}/tree-model.d.ts +18 -9
  112. package/dist/explain-fact/tree-model.d.ts.map +1 -0
  113. package/dist/{rdfox-explain → explain-fact}/tree-model.js +19 -10
  114. package/dist/explain-fact/use-fact-measure.d.ts.map +1 -0
  115. package/dist/globals.css +240 -18
  116. package/dist/graph/nodes/AdMockupCard.d.ts.map +1 -1
  117. package/dist/graph/nodes/AdMockupCard.js +2 -1
  118. package/dist/graph/nodes/AttioCompanyView.d.ts.map +1 -1
  119. package/dist/graph/nodes/AttioCompanyView.js +2 -1
  120. package/dist/graph/nodes/LinkedinAdAccountView.d.ts.map +1 -1
  121. package/dist/graph/nodes/LinkedinAdAccountView.js +1 -1
  122. package/dist/graph/nodes/SlackChannelView.d.ts.map +1 -1
  123. package/dist/graph/nodes/SlackChannelView.js +2 -1
  124. package/dist/graph/nodes/SlackMessageView.d.ts.map +1 -1
  125. package/dist/graph/nodes/SlackMessageView.js +1 -1
  126. package/dist/graph/nodes/SlackUserView.d.ts.map +1 -1
  127. package/dist/graph/nodes/SlackUserView.js +2 -1
  128. package/dist/graph/nodes/SlackWorkspaceView.d.ts.map +1 -1
  129. package/dist/graph/nodes/SlackWorkspaceView.js +1 -1
  130. package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
  131. package/dist/index.d.ts +3 -0
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +3 -0
  134. package/dist/ldo-ui.d.ts +1 -1
  135. package/dist/ldo-ui.d.ts.map +1 -1
  136. package/dist/ldo-ui.js +1 -1
  137. package/dist/lib/datastore-route-paths.d.ts +2 -2
  138. package/dist/lib/datastore-route-paths.d.ts.map +1 -1
  139. package/dist/lib/datastore-route-paths.js +2 -2
  140. package/dist/lib/datastore-route-table.d.ts +36 -0
  141. package/dist/lib/datastore-route-table.d.ts.map +1 -0
  142. package/dist/lib/datastore-route-table.js +43 -0
  143. package/dist/lib/datastore-routes.d.ts +1 -1
  144. package/dist/lib/datastore-routes.d.ts.map +1 -1
  145. package/dist/lib/datastore-routes.js +1 -1
  146. package/dist/lib/spa-routes.d.ts +3 -0
  147. package/dist/lib/spa-routes.d.ts.map +1 -0
  148. package/dist/lib/spa-routes.js +5 -0
  149. package/dist/routes/data-explorer/components/Breadcrumbs.d.ts.map +1 -1
  150. package/dist/routes/data-explorer/components/Breadcrumbs.js +5 -5
  151. package/dist/routes/datastores/components/DatastoreFormDialog.d.ts +20 -0
  152. package/dist/routes/datastores/components/DatastoreFormDialog.d.ts.map +1 -0
  153. package/dist/routes/datastores/components/DatastoreFormDialog.js +33 -0
  154. package/dist/routes/datastores/components/DatastoreTableSkeleton.d.ts +2 -0
  155. package/dist/routes/datastores/components/DatastoreTableSkeleton.d.ts.map +1 -0
  156. package/dist/routes/datastores/components/DatastoreTableSkeleton.js +7 -0
  157. package/dist/routes/datastores/components/DatastoresToolbar.d.ts +18 -0
  158. package/dist/routes/datastores/components/DatastoresToolbar.d.ts.map +1 -0
  159. package/dist/routes/datastores/components/DatastoresToolbar.js +29 -0
  160. package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts +14 -0
  161. package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts.map +1 -0
  162. package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.js +83 -0
  163. package/dist/routes/datastores/components/RenameDatastoreGroupDialog.d.ts +9 -0
  164. package/dist/routes/datastores/components/RenameDatastoreGroupDialog.d.ts.map +1 -0
  165. package/dist/routes/datastores/components/RenameDatastoreGroupDialog.js +21 -0
  166. package/dist/routes/datastores/components/StatusBadge.d.ts +21 -0
  167. package/dist/routes/datastores/components/StatusBadge.d.ts.map +1 -0
  168. package/dist/routes/datastores/components/StatusBadge.js +49 -0
  169. package/dist/routes/datastores/components/UnlinkedDatastoresPanel.d.ts +20 -0
  170. package/dist/routes/datastores/components/UnlinkedDatastoresPanel.d.ts.map +1 -0
  171. package/dist/routes/datastores/components/UnlinkedDatastoresPanel.js +13 -0
  172. package/dist/routes/datastores/flatten.d.ts +33 -0
  173. package/dist/routes/datastores/flatten.d.ts.map +1 -0
  174. package/dist/routes/datastores/flatten.js +86 -0
  175. package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts +47 -0
  176. package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts.map +1 -0
  177. package/dist/routes/datastores/hooks/useDatastoreColumns.js +165 -0
  178. package/dist/routes/datastores/hooks/useDatastoreTable.d.ts +14 -0
  179. package/dist/routes/datastores/hooks/useDatastoreTable.d.ts.map +1 -0
  180. package/dist/routes/datastores/hooks/useDatastoreTable.js +45 -0
  181. package/dist/routes/datastores/index.d.ts +2 -0
  182. package/dist/routes/datastores/index.d.ts.map +1 -0
  183. package/dist/routes/datastores/index.js +471 -0
  184. package/dist/routes/explain/ExplainEmpty.d.ts +2 -0
  185. package/dist/routes/explain/ExplainEmpty.d.ts.map +1 -0
  186. package/dist/routes/explain/ExplainEmpty.js +8 -0
  187. package/dist/routes/explain/index.d.ts +2 -0
  188. package/dist/routes/explain/index.d.ts.map +1 -0
  189. package/dist/routes/explain/index.js +16 -0
  190. package/dist/routes/explain/url-params.d.ts +9 -0
  191. package/dist/routes/explain/url-params.d.ts.map +1 -0
  192. package/dist/routes/explain/url-params.js +21 -0
  193. package/dist/routes/integrations/components/ConnectionRow.d.ts.map +1 -1
  194. package/dist/routes/integrations/components/ConnectionRow.js +1 -1
  195. package/dist/routes/integrations/connection-view.d.ts.map +1 -1
  196. package/dist/routes/integrations/connection-view.js +17 -1
  197. package/dist/routes/integrations/types.d.ts +2 -1
  198. package/dist/routes/integrations/types.d.ts.map +1 -1
  199. package/dist/routes/rules/components/CreateRuleChatModal.d.ts +10 -0
  200. package/dist/routes/rules/components/CreateRuleChatModal.d.ts.map +1 -0
  201. package/dist/routes/rules/components/CreateRuleChatModal.js +52 -0
  202. package/dist/routes/rules/components/RuleActionabilityBadge.d.ts +8 -0
  203. package/dist/routes/rules/components/RuleActionabilityBadge.d.ts.map +1 -0
  204. package/dist/routes/rules/components/RuleActionabilityBadge.js +18 -0
  205. package/dist/routes/rules/components/RuleAffectedActionPlansSection.d.ts +6 -0
  206. package/dist/routes/rules/components/RuleAffectedActionPlansSection.d.ts.map +1 -0
  207. package/dist/routes/rules/components/RuleAffectedActionPlansSection.js +151 -0
  208. package/dist/routes/rules/components/RuleAst.d.ts +6 -0
  209. package/dist/routes/rules/components/RuleAst.d.ts.map +1 -0
  210. package/dist/routes/rules/components/RuleAst.js +23 -0
  211. package/dist/routes/rules/components/RuleDependentRulesSection.d.ts +6 -0
  212. package/dist/routes/rules/components/RuleDependentRulesSection.d.ts.map +1 -0
  213. package/dist/routes/rules/components/RuleDependentRulesSection.js +16 -0
  214. package/dist/routes/rules/components/RuleDetailsPage.d.ts +14 -0
  215. package/dist/routes/rules/components/RuleDetailsPage.d.ts.map +1 -0
  216. package/dist/routes/rules/components/RuleDetailsPage.js +51 -0
  217. package/dist/routes/rules/components/RuleProducersSection.d.ts +7 -0
  218. package/dist/routes/rules/components/RuleProducersSection.d.ts.map +1 -0
  219. package/dist/routes/rules/components/RuleProducersSection.js +10 -0
  220. package/dist/routes/rules/components/RuleSampleFactsSection.d.ts +7 -0
  221. package/dist/routes/rules/components/RuleSampleFactsSection.d.ts.map +1 -0
  222. package/dist/routes/rules/components/RuleSampleFactsSection.js +70 -0
  223. package/dist/routes/rules/components/RulesOverviewHeaderActions.d.ts +17 -0
  224. package/dist/routes/rules/components/RulesOverviewHeaderActions.d.ts.map +1 -0
  225. package/dist/routes/rules/components/RulesOverviewHeaderActions.js +55 -0
  226. package/dist/routes/rules/components/RulesOverviewPage.d.ts +13 -0
  227. package/dist/routes/rules/components/RulesOverviewPage.d.ts.map +1 -0
  228. package/dist/routes/rules/components/RulesOverviewPage.js +236 -0
  229. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.d.ts +7 -0
  230. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.d.ts.map +1 -0
  231. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.js +47 -0
  232. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.d.ts +8 -0
  233. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.d.ts.map +1 -0
  234. package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.js +76 -0
  235. package/dist/routes/rules/components/SupportedActionShapesList/TokenList.d.ts +6 -0
  236. package/dist/routes/rules/components/SupportedActionShapesList/TokenList.d.ts.map +1 -0
  237. package/dist/routes/rules/components/SupportedActionShapesList/TokenList.js +9 -0
  238. package/dist/routes/rules/components/SupportedActionShapesList/index.d.ts +2 -0
  239. package/dist/routes/rules/components/SupportedActionShapesList/index.d.ts.map +1 -0
  240. package/dist/routes/rules/components/SupportedActionShapesList/index.js +1 -0
  241. package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.d.ts +20 -0
  242. package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.d.ts.map +1 -0
  243. package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.js +48 -0
  244. package/dist/routes/rules/components/datalog-editor/BindingsPreview.d.ts +9 -0
  245. package/dist/routes/rules/components/datalog-editor/BindingsPreview.d.ts.map +1 -0
  246. package/dist/routes/rules/components/datalog-editor/BindingsPreview.js +38 -0
  247. package/dist/routes/rules/components/datalog-editor/FactsPreview.d.ts +10 -0
  248. package/dist/routes/rules/components/datalog-editor/FactsPreview.d.ts.map +1 -0
  249. package/dist/routes/rules/components/datalog-editor/FactsPreview.js +43 -0
  250. package/dist/routes/rules/components/datalog-editor/PreviewPanel.d.ts +7 -0
  251. package/dist/routes/rules/components/datalog-editor/PreviewPanel.d.ts.map +1 -0
  252. package/dist/routes/rules/components/datalog-editor/PreviewPanel.js +8 -0
  253. package/dist/routes/rules/components/datalog-editor/QueryResults.d.ts +9 -0
  254. package/dist/routes/rules/components/datalog-editor/QueryResults.d.ts.map +1 -0
  255. package/dist/routes/rules/components/datalog-editor/QueryResults.js +22 -0
  256. package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.d.ts +11 -0
  257. package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.d.ts.map +1 -0
  258. package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.js +21 -0
  259. package/dist/routes/rules/components/rule-producers.d.ts +15 -0
  260. package/dist/routes/rules/components/rule-producers.d.ts.map +1 -0
  261. package/dist/routes/rules/components/rule-producers.js +76 -0
  262. package/dist/routes/rules/components/sample-facts-query.d.ts +9 -0
  263. package/dist/routes/rules/components/sample-facts-query.d.ts.map +1 -0
  264. package/dist/routes/rules/components/sample-facts-query.js +71 -0
  265. package/dist/routes/rules/datalog-editor.d.ts +6 -0
  266. package/dist/routes/rules/datalog-editor.d.ts.map +1 -0
  267. package/dist/routes/rules/datalog-editor.js +7 -0
  268. package/dist/routes/rules/hooks/useRuleFactsPreview.d.ts +53 -0
  269. package/dist/routes/rules/hooks/useRuleFactsPreview.d.ts.map +1 -0
  270. package/dist/routes/rules/hooks/useRuleFactsPreview.js +214 -0
  271. package/dist/routes/rules/hooks/useSparqlQueryExecution.d.ts +14 -0
  272. package/dist/routes/rules/hooks/useSparqlQueryExecution.d.ts.map +1 -0
  273. package/dist/routes/rules/hooks/useSparqlQueryExecution.js +77 -0
  274. package/dist/routes/rules/pages.d.ts +6 -0
  275. package/dist/routes/rules/pages.d.ts.map +1 -0
  276. package/dist/routes/rules/pages.js +7 -0
  277. package/dist/rules/RuleNameLink.d.ts +6 -0
  278. package/dist/rules/RuleNameLink.d.ts.map +1 -0
  279. package/dist/rules/RuleNameLink.js +8 -0
  280. package/package.json +68 -33
  281. package/src/globals.css +5 -0
  282. package/src/themes/manta-dark.css +1 -0
  283. package/src/themes/manta.css +1 -0
  284. package/src/themes/standard.css +1 -0
  285. package/dist/components/rdfox-explain/OutdatedFactNotice.d.ts.map +0 -1
  286. package/dist/components/rdfox-explain/RDFoxExplain.d.ts +0 -16
  287. package/dist/components/rdfox-explain/RDFoxExplain.d.ts.map +0 -1
  288. package/dist/components/tool-invocation-card/ExplainRDFoxResultDisplay.d.ts +0 -9
  289. package/dist/components/tool-invocation-card/ExplainRDFoxResultDisplay.d.ts.map +0 -1
  290. package/dist/lib/test-utils.d.ts +0 -4
  291. package/dist/lib/test-utils.d.ts.map +0 -1
  292. package/dist/lib/test-utils.js +0 -16
  293. package/dist/rdfox-explain/AbsentFactNotice.d.ts +0 -5
  294. package/dist/rdfox-explain/AbsentFactNotice.d.ts.map +0 -1
  295. package/dist/rdfox-explain/AbsentFactNotice.js +0 -6
  296. package/dist/rdfox-explain/DatalogCode.d.ts.map +0 -1
  297. package/dist/rdfox-explain/EntityChip.d.ts.map +0 -1
  298. package/dist/rdfox-explain/EntityChip.js +0 -9
  299. package/dist/rdfox-explain/ExplainCompactView.d.ts.map +0 -1
  300. package/dist/rdfox-explain/ExplainFullView.d.ts.map +0 -1
  301. package/dist/rdfox-explain/ExplainStates.d.ts.map +0 -1
  302. package/dist/rdfox-explain/ExplainTag.d.ts.map +0 -1
  303. package/dist/rdfox-explain/FactValue.d.ts.map +0 -1
  304. package/dist/rdfox-explain/NumDot.d.ts.map +0 -1
  305. package/dist/rdfox-explain/PanelLabel.d.ts.map +0 -1
  306. package/dist/rdfox-explain/ProofSubjectHeader.d.ts.map +0 -1
  307. package/dist/rdfox-explain/ProvenanceBadge.d.ts.map +0 -1
  308. package/dist/rdfox-explain/RDFoxExplainState.d.ts +0 -7
  309. package/dist/rdfox-explain/RDFoxExplainState.d.ts.map +0 -1
  310. package/dist/rdfox-explain/RuleVariableTypes.d.ts.map +0 -1
  311. package/dist/rdfox-explain/StoredFactNotice.d.ts +0 -5
  312. package/dist/rdfox-explain/StoredFactNotice.d.ts.map +0 -1
  313. package/dist/rdfox-explain/StoredFactNotice.js +0 -6
  314. package/dist/rdfox-explain/SubstitutedFactNotice.d.ts.map +0 -1
  315. package/dist/rdfox-explain/ValuePill.d.ts.map +0 -1
  316. package/dist/rdfox-explain/busy-aggregate-fixture.d.ts +0 -7
  317. package/dist/rdfox-explain/busy-aggregate-fixture.d.ts.map +0 -1
  318. package/dist/rdfox-explain/busy-aggregate-fixture.js +0 -6
  319. package/dist/rdfox-explain/conclusion/ConclusionCard.d.ts.map +0 -1
  320. package/dist/rdfox-explain/conclusion/ConclusionSubtitle.d.ts.map +0 -1
  321. package/dist/rdfox-explain/conclusion/index.d.ts.map +0 -1
  322. package/dist/rdfox-explain/explain-styles.d.ts.map +0 -1
  323. package/dist/rdfox-explain/fact-token.d.ts.map +0 -1
  324. package/dist/rdfox-explain/formula-hues.d.ts.map +0 -1
  325. package/dist/rdfox-explain/index.d.ts.map +0 -1
  326. package/dist/rdfox-explain/inspector/ExplainInspector.d.ts.map +0 -1
  327. package/dist/rdfox-explain/inspector/ExplainInspector.js +0 -22
  328. package/dist/rdfox-explain/inspector/InspectorBindings.d.ts.map +0 -1
  329. package/dist/rdfox-explain/inspector/InspectorFact.d.ts.map +0 -1
  330. package/dist/rdfox-explain/inspector/InspectorHeader.d.ts.map +0 -1
  331. package/dist/rdfox-explain/inspector/InspectorRule.d.ts.map +0 -1
  332. package/dist/rdfox-explain/inspector/SupportsSection.d.ts.map +0 -1
  333. package/dist/rdfox-explain/inspector/index.d.ts.map +0 -1
  334. package/dist/rdfox-explain/proof-tree/ProofFactLabel.d.ts.map +0 -1
  335. package/dist/rdfox-explain/proof-tree/ProofRowBadge.d.ts.map +0 -1
  336. package/dist/rdfox-explain/proof-tree/ProofRowContent.d.ts.map +0 -1
  337. package/dist/rdfox-explain/proof-tree/ProofRowValue.d.ts.map +0 -1
  338. package/dist/rdfox-explain/proof-tree/ProofTree.d.ts.map +0 -1
  339. package/dist/rdfox-explain/proof-tree/ProofTreeFormulaFooter.d.ts.map +0 -1
  340. package/dist/rdfox-explain/proof-tree/ProofTreeNode.d.ts.map +0 -1
  341. package/dist/rdfox-explain/proof-tree/SupportsTag.d.ts.map +0 -1
  342. package/dist/rdfox-explain/proof-tree/SupportsTag.js +0 -6
  343. package/dist/rdfox-explain/proof-tree/index.d.ts.map +0 -1
  344. package/dist/rdfox-explain/proof-tree/proof-tree-navigation.d.ts.map +0 -1
  345. package/dist/rdfox-explain/proof-tree/proof-tree-root-view.d.ts.map +0 -1
  346. package/dist/rdfox-explain/proof-tree/visible-premises.d.ts.map +0 -1
  347. package/dist/rdfox-explain/rule-presentation.d.ts.map +0 -1
  348. package/dist/rdfox-explain/tree-model.d.ts.map +0 -1
  349. package/dist/rdfox-explain/use-fact-measure.d.ts.map +0 -1
  350. package/dist/test-support.d.ts +0 -9
  351. package/dist/test-support.d.ts.map +0 -1
  352. package/dist/test-support.js +0 -18
  353. /package/dist/components/{rdfox-explain → explain-fact}/OutdatedFactNotice.d.ts +0 -0
  354. /package/dist/components/{rdfox-explain → explain-fact}/OutdatedFactNotice.js +0 -0
  355. /package/dist/{rdfox-explain → explain-fact}/DatalogCode.d.ts +0 -0
  356. /package/dist/{rdfox-explain → explain-fact}/DatalogCode.js +0 -0
  357. /package/dist/{rdfox-explain → explain-fact}/EntityChip.d.ts +0 -0
  358. /package/dist/{rdfox-explain → explain-fact}/ExplainCompactView.d.ts +0 -0
  359. /package/dist/{rdfox-explain → explain-fact}/ExplainCompactView.js +0 -0
  360. /package/dist/{rdfox-explain → explain-fact}/ExplainFullView.d.ts +0 -0
  361. /package/dist/{rdfox-explain → explain-fact}/ExplainFullView.js +0 -0
  362. /package/dist/{rdfox-explain → explain-fact}/ExplainStates.d.ts +0 -0
  363. /package/dist/{rdfox-explain → explain-fact}/ExplainStates.js +0 -0
  364. /package/dist/{rdfox-explain → explain-fact}/ExplainTag.d.ts +0 -0
  365. /package/dist/{rdfox-explain → explain-fact}/ExplainTag.js +0 -0
  366. /package/dist/{rdfox-explain → explain-fact}/FactValue.d.ts +0 -0
  367. /package/dist/{rdfox-explain → explain-fact}/FactValue.js +0 -0
  368. /package/dist/{rdfox-explain → explain-fact}/NumDot.d.ts +0 -0
  369. /package/dist/{rdfox-explain → explain-fact}/NumDot.js +0 -0
  370. /package/dist/{rdfox-explain → explain-fact}/PanelLabel.d.ts +0 -0
  371. /package/dist/{rdfox-explain → explain-fact}/PanelLabel.js +0 -0
  372. /package/dist/{rdfox-explain → explain-fact}/ProofSubjectHeader.d.ts +0 -0
  373. /package/dist/{rdfox-explain → explain-fact}/ProofSubjectHeader.js +0 -0
  374. /package/dist/{rdfox-explain → explain-fact}/ProvenanceBadge.d.ts +0 -0
  375. /package/dist/{rdfox-explain → explain-fact}/RuleVariableTypes.d.ts +0 -0
  376. /package/dist/{rdfox-explain → explain-fact}/RuleVariableTypes.js +0 -0
  377. /package/dist/{rdfox-explain → explain-fact}/SubstitutedFactNotice.d.ts +0 -0
  378. /package/dist/{rdfox-explain → explain-fact}/SubstitutedFactNotice.js +0 -0
  379. /package/dist/{rdfox-explain → explain-fact}/ValuePill.d.ts +0 -0
  380. /package/dist/{rdfox-explain → explain-fact}/ValuePill.js +0 -0
  381. /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionCard.d.ts +0 -0
  382. /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionCard.js +0 -0
  383. /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionSubtitle.d.ts +0 -0
  384. /package/dist/{rdfox-explain → explain-fact}/conclusion/index.d.ts +0 -0
  385. /package/dist/{rdfox-explain → explain-fact}/conclusion/index.js +0 -0
  386. /package/dist/{rdfox-explain → explain-fact}/explain-styles.d.ts +0 -0
  387. /package/dist/{rdfox-explain → explain-fact}/explain-styles.js +0 -0
  388. /package/dist/{rdfox-explain → explain-fact}/fact-token.d.ts +0 -0
  389. /package/dist/{rdfox-explain → explain-fact}/fact-token.js +0 -0
  390. /package/dist/{rdfox-explain → explain-fact}/formula-hues.d.ts +0 -0
  391. /package/dist/{rdfox-explain → explain-fact}/formula-hues.js +0 -0
  392. /package/dist/{rdfox-explain → explain-fact}/inspector/ExplainInspector.d.ts +0 -0
  393. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorBindings.d.ts +0 -0
  394. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorBindings.js +0 -0
  395. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorFact.d.ts +0 -0
  396. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorFact.js +0 -0
  397. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorHeader.d.ts +0 -0
  398. /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorHeader.js +0 -0
  399. /package/dist/{rdfox-explain → explain-fact}/inspector/SupportsSection.d.ts +0 -0
  400. /package/dist/{rdfox-explain → explain-fact}/inspector/index.d.ts +0 -0
  401. /package/dist/{rdfox-explain → explain-fact}/inspector/index.js +0 -0
  402. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofFactLabel.d.ts +0 -0
  403. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofFactLabel.js +0 -0
  404. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowBadge.d.ts +0 -0
  405. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowBadge.js +0 -0
  406. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowContent.d.ts +0 -0
  407. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowContent.js +0 -0
  408. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowValue.d.ts +0 -0
  409. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowValue.js +0 -0
  410. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTree.d.ts +0 -0
  411. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeFormulaFooter.d.ts +0 -0
  412. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeFormulaFooter.js +0 -0
  413. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeNode.d.ts +0 -0
  414. /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeNode.js +0 -0
  415. /package/dist/{rdfox-explain → explain-fact}/proof-tree/SupportsTag.d.ts +0 -0
  416. /package/dist/{rdfox-explain → explain-fact}/proof-tree/index.d.ts +0 -0
  417. /package/dist/{rdfox-explain → explain-fact}/proof-tree/index.js +0 -0
  418. /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-navigation.d.ts +0 -0
  419. /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-navigation.js +0 -0
  420. /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-root-view.d.ts +0 -0
  421. /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-root-view.js +0 -0
  422. /package/dist/{rdfox-explain → explain-fact}/proof-tree/visible-premises.d.ts +0 -0
  423. /package/dist/{rdfox-explain → explain-fact}/proof-tree/visible-premises.js +0 -0
  424. /package/dist/{rdfox-explain → explain-fact}/rule-presentation.d.ts +0 -0
  425. /package/dist/{rdfox-explain → explain-fact}/rule-presentation.js +0 -0
  426. /package/dist/{rdfox-explain → explain-fact}/use-fact-measure.d.ts +0 -0
  427. /package/dist/{rdfox-explain → explain-fact}/use-fact-measure.js +0 -0
@@ -8,7 +8,9 @@ export function ConclusionSubtitle(props) {
8
8
  const subject = root.spo && !hasPremises && (_jsxs(_Fragment, { children: [" for ", _jsx("span", { className: "text-body-foreground", children: _jsx(OntologyTermText, { term: root.spo.subject, className: "no-underline" }) })] }));
9
9
  if (root.provenance === "absent")
10
10
  return _jsxs("span", { children: ["No rule or stored fact", subject, " makes this true"] });
11
- if (!root.rule)
11
+ if (root.provenance === "unsupported")
12
+ return _jsxs("span", { children: ["In the graph", subject, ", but no rule derives it"] });
13
+ if (root.provenance === "explicit")
12
14
  return _jsxs("span", { children: ["Stored", subject, ", asserted directly in the graph"] });
13
15
  if (hasPremises)
14
16
  return _jsx("span", { children: "Derived because everything below is true" });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/conclusion/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explain-styles.d.ts","sourceRoot":"","sources":["../../src/explain-fact/explain-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE,eAAO,MAAM,gBAAgB,wCAAwC,CAAC;AAEtE,eAAO,MAAM,iBAAiB,sDAAsD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fact-token.d.ts","sourceRoot":"","sources":["../../src/explain-fact/fact-token.ts"],"names":[],"mappings":"AASA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formula-hues.d.ts","sourceRoot":"","sources":["../../src/explain-fact/formula-hues.ts"],"names":[],"mappings":"AAwBA,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -1,5 +1,5 @@
1
- export * from "./AbsentFactNotice.js";
2
1
  export * from "./DatalogCode.js";
2
+ export * from "./FactNotice.js";
3
3
  export * from "./EntityChip.js";
4
4
  export * from "./ExplainCompactView.js";
5
5
  export * from "./ExplainFullView.js";
@@ -10,9 +10,8 @@ export * from "./NumDot.js";
10
10
  export * from "./PanelLabel.js";
11
11
  export * from "./ProofSubjectHeader.js";
12
12
  export * from "./ProvenanceBadge.js";
13
- export * from "./RDFoxExplainState.js";
13
+ export * from "./ExplainFactState.js";
14
14
  export * from "./RuleVariableTypes.js";
15
- export * from "./StoredFactNotice.js";
16
15
  export * from "./SubstitutedFactNotice.js";
17
16
  export * from "./ValuePill.js";
18
17
  export * from "./conclusion/index.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/explain-fact/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
- export * from "./AbsentFactNotice.js";
2
1
  export * from "./DatalogCode.js";
2
+ export * from "./FactNotice.js";
3
3
  export * from "./EntityChip.js";
4
4
  export * from "./ExplainCompactView.js";
5
5
  export * from "./ExplainFullView.js";
@@ -10,9 +10,8 @@ export * from "./NumDot.js";
10
10
  export * from "./PanelLabel.js";
11
11
  export * from "./ProofSubjectHeader.js";
12
12
  export * from "./ProvenanceBadge.js";
13
- export * from "./RDFoxExplainState.js";
13
+ export * from "./ExplainFactState.js";
14
14
  export * from "./RuleVariableTypes.js";
15
- export * from "./StoredFactNotice.js";
16
15
  export * from "./SubstitutedFactNotice.js";
17
16
  export * from "./ValuePill.js";
18
17
  export * from "./conclusion/index.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplainInspector.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/ExplainInspector.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAsC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAQxF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA6B5D"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isPresent } from "@manta-eu/lib/present";
3
+ import { FactNotice } from "../FactNotice.js";
4
+ import { presentRule } from "../rule-presentation.js";
5
+ import { multipleSupports, ruleForSelection } from "../tree-model.js";
6
+ import { InspectorBindings } from "./InspectorBindings.js";
7
+ import { InspectorFact } from "./InspectorFact.js";
8
+ import { InspectorHeader } from "./InspectorHeader.js";
9
+ import { InspectorRule } from "./InspectorRule.js";
10
+ import { SupportsSection } from "./SupportsSection.js";
11
+ import { cn } from "#style";
12
+ export function ExplainInspector(props) {
13
+ const { tree, selectedNodeId, className } = props;
14
+ const node = tree.byId[selectedNodeId] ?? tree.root;
15
+ const selection = ruleForSelection(tree, node);
16
+ const ruleNode = selection?.node;
17
+ const presentation = ruleNode?.rule ? presentRule(ruleNode.rule, ruleNode.groundedRule) : undefined;
18
+ const supports = multipleSupports(node);
19
+ return (_jsxs("div", { className: cn("flex min-w-0 flex-col gap-3.5", className), children: [_jsx(InspectorHeader, { node: node }), _jsx(InspectorFact, { node: node }), supports && _jsx(SupportsSection, { supports: supports }, node.id), selection && presentation && (_jsx(InspectorRule, { presentation: presentation, highlightedAtomIndex: selection.highlightedAtomIndex, derivedFactText: selection.node.display, ruleIri: selection.node.ruleIri, relation: selection.relation })), !presentation && _jsx(FactNotice, { provenance: node.provenance }), presentation && isPresent(presentation.bindings) && _jsx(InspectorBindings, { presentation: presentation })] }));
20
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorBindings.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/InspectorBindings.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAUF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CA2F9D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorFact.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/InspectorFact.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAIhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,kDAyBtD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorHeader.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/InspectorHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAQhE,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAqF1D"}
@@ -1,8 +1,11 @@
1
1
  import { type RulePresentation } from "../rule-presentation.js";
2
+ import type { RuleSelection } from "../tree-model.js";
2
3
  export type InspectorRuleProps = {
3
4
  presentation: RulePresentation;
4
5
  highlightedAtomIndex?: number;
5
6
  derivedFactText?: string;
7
+ ruleIri?: string;
8
+ relation: RuleSelection["relation"];
6
9
  };
7
10
  export declare function InspectorRule(props: InspectorRuleProps): import("react/jsx-runtime").JSX.Element;
8
11
  //# sourceMappingURL=InspectorRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InspectorRule.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/InspectorRule.tsx"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,eAAe,CAAC;AA4BvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,gBAAgB,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACrC,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CA8ItD"}
@@ -3,6 +3,7 @@ import { isPresent } from "@manta-eu/lib/present";
3
3
  import { Copy } from "lucide-react";
4
4
  import { useState } from "react";
5
5
  import { match, P } from "ts-pattern";
6
+ import { RuleNameLink } from "../../rules/RuleNameLink.js";
6
7
  import { DatalogCode } from "../DatalogCode.js";
7
8
  import { sectionLabelClass } from "../explain-styles.js";
8
9
  import { ExplainTag } from "../ExplainTag.js";
@@ -28,10 +29,9 @@ function roleForKind(kind) {
28
29
  .exhaustive();
29
30
  }
30
31
  export function InspectorRule(props) {
31
- const { presentation, highlightedAtomIndex, derivedFactText } = props;
32
+ const { presentation, highlightedAtomIndex, derivedFactText, ruleIri, relation } = props;
32
33
  const { copyToClipboard } = useCopyToClipboard();
33
34
  const [viewMode, setViewMode] = useState("grounded");
34
- const [showAllHeadAtoms, setShowAllHeadAtoms] = useState(false);
35
35
  const grounded = viewMode === "grounded";
36
36
  const ruleAtoms = [...presentation.headAtoms, ...presentation.atoms];
37
37
  const personalDataResolutions = usePersonalDataResolutionFor(ruleAtoms.map((atom) => atom.predicateTerm));
@@ -64,12 +64,11 @@ export function InspectorRule(props) {
64
64
  const ruleText = grounded
65
65
  ? formatRuleText(groundedHead(), presentation.atoms.map((atom) => maskedGrounded(atom.groundedText, atom.text)))
66
66
  : presentation.ruleText;
67
- return (_jsxs("div", { children: [_jsx(PanelLabel, { className: "mb-2.5", right: _jsx(Tabs, { size: "small", value: viewMode, onValueChange: (next) => {
67
+ return (_jsxs("div", { children: [_jsx(PanelLabel, { className: ruleIri ? "mb-1.5" : "mb-2.5", right: _jsx(Tabs, { size: "small", value: viewMode, onValueChange: (next) => {
68
68
  const option = ruleViewModeOptions.find((candidate) => candidate.value === next);
69
69
  if (option)
70
70
  setViewMode(option.value);
71
- }, children: _jsx(TabsList, { children: ruleViewModeOptions.map((option) => (_jsx(TabsTrigger, { value: option.value, children: option.label }, option.value))) }) }), children: "Produced by rule" }), _jsxs("div", { className: "group relative overflow-hidden rounded-[10px] border border-muted-border bg-card/60", children: [_jsx(Button, { type: "button", variant: "ghost", size: "xs", icon: Copy, iconOnly: true, "aria-label": "Copy rule", className: "absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100", onClick: () => void copyToClipboard(ruleText) }), _jsxs("div", { className: "grid grid-cols-[auto_1fr] items-baseline gap-x-2.5 gap-y-2 border-l-2 border-l-primary bg-primary/7 px-3.5 py-3", children: [_jsx("span", { className: cn(sectionLabelClass, "text-primary"), children: "Derives" }), _jsx(DatalogCode, { code: headText(), className: "min-w-0 typography-small" }), showAllHeadAtoms &&
72
- otherHeadAtoms.map((atom) => (_jsx(DatalogCode, { code: grounded ? maskedGrounded(atom.groundedText, atom.text) : atom.text, className: "col-start-2 min-w-0 typography-small opacity-70" }, atom.text))), isPresent(otherHeadAtoms) && (_jsx("button", { type: "button", onClick: () => setShowAllHeadAtoms(!showAllHeadAtoms), className: "col-start-2 justify-self-start typography-tiny text-muted-foreground underline decoration-dotted underline-offset-2 hover:text-body-foreground", children: showAllHeadAtoms ? "Show less" : `+${otherHeadAtoms.length} more facts` }))] }), _jsxs("div", { className: "flex items-center gap-2 border-y border-muted-border bg-faint px-3.5 py-2", children: [_jsx("span", { className: "font-mono typography-small-semibold text-muted-foreground", children: ":-" }), _jsx("span", { className: cn(sectionLabelClass, "text-muted-foreground"), children: "When every premise below holds" })] }), presentation.atoms.map((atom) => {
71
+ }, children: _jsx(TabsList, { children: ruleViewModeOptions.map((option) => (_jsx(TabsTrigger, { value: option.value, children: option.label }, option.value))) }) }), children: relation === "uses" ? "Used by rule" : "Produced by rule" }), ruleIri && (_jsx(RuleNameLink, { ruleIri: ruleIri, className: "mb-2.5 block truncate typography-small-semibold text-primary" })), _jsxs("div", { className: "group relative overflow-hidden rounded-[10px] border border-muted-border bg-card/60", children: [_jsx(Button, { type: "button", variant: "ghost", size: "xs", icon: Copy, iconOnly: true, "aria-label": "Copy rule", className: "absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100", onClick: () => void copyToClipboard(ruleText) }), _jsxs("div", { className: "grid grid-cols-[auto_1fr] items-baseline gap-x-2.5 gap-y-2 border-l-2 border-l-primary bg-primary/7 px-3.5 py-3", children: [_jsx("span", { className: cn(sectionLabelClass, "text-primary"), children: "Derives" }), _jsx(DatalogCode, { code: headText(), className: "min-w-0 typography-small" }), otherHeadAtoms.map((atom) => (_jsx(DatalogCode, { code: grounded ? maskedGrounded(atom.groundedText, atom.text) : atom.text, className: "col-start-2 min-w-0 typography-small opacity-70" }, atom.text)))] }), _jsxs("div", { className: "flex items-center gap-2 border-y border-muted-border bg-faint px-3.5 py-2", children: [_jsx("span", { className: "font-mono typography-small-semibold text-muted-foreground", children: ":-" }), _jsx("span", { className: cn(sectionLabelClass, "text-muted-foreground"), children: "When every premise below holds" })] }), presentation.atoms.map((atom) => {
73
72
  const text = atomText(atom);
74
73
  const isHighlighted = atom.index === highlightedAtomIndex;
75
74
  const kind = atom.kind;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SupportsSection.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/SupportsSection.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kDAkD1D"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { nth } from "ramda";
3
3
  import { useState } from "react";
4
+ import { RuleNameLink } from "../../rules/RuleNameLink.js";
4
5
  import { datalogTextClass } from "../explain-styles.js";
5
6
  import { PanelLabel } from "../PanelLabel.js";
6
7
  import { presentRule } from "../rule-presentation.js";
@@ -14,5 +15,5 @@ export function SupportsSection(props) {
14
15
  return null;
15
16
  return (_jsxs(_Fragment, { children: [_jsxs(PanelLabel, { className: "mb-2", right: _jsx("div", { className: "inline-flex gap-1", children: supports.map((support, index) => (_jsx("button", { type: "button", "aria-pressed": index === activeIndex, onClick: () => setActiveIndex(index), className: cn("rounded-sm-v4 border px-2 py-0.5 typography-tiny-semibold", index === activeIndex
16
17
  ? "border-transparent bg-primary text-primary-foreground"
17
- : "border-default-border text-muted-foreground hover:text-body-foreground"), children: index + 1 }, support.groundedRule ?? support.rule ?? index))) }), children: ["Proven ", supports.length, " independent ways"] }), _jsxs("div", { className: "flex flex-col gap-1 rounded-md border border-muted-border bg-card/60 px-3 py-2.5", children: [_jsx("div", { className: "px-1.5 typography-tiny-medium text-body-foreground", children: presentation.name }), presentation.atoms.map((atom) => (_jsx("span", { className: cn(datalogTextClass, "px-1.5 text-body-foreground"), title: atom.text, children: atom.groundedText }, atom.index)))] })] }));
18
+ : "border-default-border text-muted-foreground hover:text-body-foreground"), children: index + 1 }, support.groundedRule ?? support.rule ?? index))) }), children: ["Proven ", supports.length, " independent ways"] }), _jsxs("div", { className: "flex flex-col gap-1 rounded-md border border-muted-border bg-card/60 px-3 py-2.5", children: [_jsx("div", { className: "px-1.5 typography-tiny-medium text-body-foreground", children: active?.ruleIri ? _jsx(RuleNameLink, { ruleIri: active.ruleIri }) : presentation.name }), presentation.atoms.map((atom) => (_jsx("span", { className: cn(datalogTextClass, "px-1.5 text-body-foreground"), title: atom.text, children: atom.groundedText }, atom.index)))] })] }));
18
19
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/inspector/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofFactLabel.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofFactLabel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAMtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAsBxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofRowBadge.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofRowBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CASlE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofRowContent.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofRowContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EAA0B,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAarG,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAiCtE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofRowValue.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofRowValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAc,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGzF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,kBAAkB,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CA+BlE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofTree.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofTree.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AASxE,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,kDAkG9C"}
@@ -56,5 +56,5 @@ export function ProofTree(props) {
56
56
  }
57
57
  if (!hasPremises)
58
58
  return null;
59
- return (_jsxs("div", { role: "tree", tabIndex: 0, "aria-label": `RDFox proof tree with ${nodeCount} nodes`, className: cn("overflow-hidden rounded-md border border-muted-border bg-card/60 outline-none", className), onKeyDown: selectable ? handleKeyDown : undefined, children: [_jsx("div", { className: "-mt-px", children: visibleChildren.map((child) => (_jsx(ProofTreeNode, { tree: tree, node: child, depth: 0, mode: mode, selectable: selectable, selectedNodeId: selectedNodeId, expandedNodeIds: expandedNodeIds, onSelect: onSelect, onToggle: handleToggle, valueHueClassName: valueHueClassByNodeId.get(child.id) }, child.id))) }), formula && (_jsx(ProofTreeFormulaFooter, { formula: formula, mode: mode, rawText: formulaNodeId ? tree.byId[formulaNodeId]?.display : undefined }))] }));
59
+ return (_jsxs("div", { role: "tree", tabIndex: 0, "aria-label": `Proof tree with ${nodeCount} nodes`, className: cn("overflow-hidden rounded-md border border-muted-border bg-card/60 outline-none", className), onKeyDown: selectable ? handleKeyDown : undefined, children: [_jsx("div", { className: "-mt-px", children: visibleChildren.map((child) => (_jsx(ProofTreeNode, { tree: tree, node: child, depth: 0, mode: mode, selectable: selectable, selectedNodeId: selectedNodeId, expandedNodeIds: expandedNodeIds, onSelect: onSelect, onToggle: handleToggle, valueHueClassName: valueHueClassByNodeId.get(child.id) }, child.id))) }), formula && (_jsx(ProofTreeFormulaFooter, { formula: formula, mode: mode, rawText: formulaNodeId ? tree.byId[formulaNodeId]?.display : undefined }))] }));
60
60
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofTreeFormulaFooter.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofTreeFormulaFooter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMxD,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,uBAAuB,CAAC;IACjC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,2CAgBxE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProofTreeNode.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/ProofTreeNode.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAOvB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CA+EtD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SupportsTag.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/SupportsTag.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAYlD"}
@@ -0,0 +1,6 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ExplainTag } from "../ExplainTag.js";
3
+ export function SupportsTag(props) {
4
+ const { count, className } = props;
5
+ return (_jsxs(ExplainTag, { variant: "success", title: `The reasoner has ${count} independent derivations of this fact. It survives deletion of any one of them.`, className: className, children: [count, " ways"] }));
6
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-tree-navigation.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/proof-tree-navigation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpE,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,cAAc,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC9B,CAAC;AAUF,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,uBAAuB,GAAG,yBAAyB,CA+BrG;AAqDD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBrH"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-tree-root-view.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/proof-tree-root-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpE,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAIF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,iBAAiB,CAwBzE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAEhE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visible-premises.d.ts","sourceRoot":"","sources":["../../../src/explain-fact/proof-tree/visible-premises.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAMrF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,cAAc,EACpB,YAAY,CAAC,EAAE,MAAM,GACpB,cAAc,EAAE,CASlB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-presentation.d.ts","sourceRoot":"","sources":["../../src/explain-fact/rule-presentation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAKV,WAAW,EAEZ,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAIL,KAAK,kBAAkB,EAGxB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,kBAAkB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAuJF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAUrF;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAMF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,wBAAwB,EAAE,EACrC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,wBAAwB,GAAG,SAAS,CAMtC;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAOF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,CAAC;AAEF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAE5E;AAKD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAiBjF;AAoVD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAYrG"}
@@ -1,25 +1,28 @@
1
1
  import { type DatalogBodyFormula } from "@manta-eu/datalog-parser";
2
2
  import { type NarrativeSegment } from "../rules/rule-narrative-format.js";
3
- export type RDFoxExplainOutput = {
4
- [key: string]: RDFoxFact | RDFoxFact[];
3
+ export type ExplainFactOutput = {
4
+ [key: string]: ExplainedFact | ExplainedFact[];
5
5
  };
6
- export type RDFoxFact = {
6
+ export type ExplainedFact = {
7
7
  fact?: string;
8
8
  type?: "derived" | "explicit" | "false";
9
- "rule-instances"?: RDFoxRuleInstance[];
9
+ "rule-instances-complete"?: boolean;
10
+ "rule-instances"?: ExplainRuleInstance[];
10
11
  [key: string]: unknown;
11
12
  };
12
- export type RDFoxRuleInstance = {
13
+ export type ExplainRuleInstance = {
13
14
  rule?: string;
15
+ "rule-iri"?: string;
14
16
  "grounded-rule"?: string;
15
17
  "body-facts"?: (string | null)[];
16
18
  [key: string]: unknown;
17
19
  };
18
20
  export type NormalizedNodeKind = "derived-fact" | "explicit-fact" | "aggregate" | "bind" | "filter" | "negation" | "skolem";
19
- export type FactProvenance = "explicit" | "derived" | "computed" | "absent";
21
+ export type FactProvenance = "explicit" | "derived" | "computed" | "unsupported" | "absent";
20
22
  export type ExplainDisplayMode = "labels" | "datalog";
21
23
  export type RuleInstanceView = {
22
24
  rule?: string;
25
+ ruleIri?: string;
23
26
  groundedRule?: string;
24
27
  bodyFacts: (string | null)[];
25
28
  };
@@ -32,7 +35,7 @@ export type NamedFactSpo = FactSpo & {
32
35
  namedGraph?: string;
33
36
  objectDatatype?: string;
34
37
  };
35
- export declare function isRDFoxExplainOutput(value: unknown): value is RDFoxExplainOutput;
38
+ export declare function isExplainFactOutput(value: unknown): value is ExplainFactOutput;
36
39
  export type AggregateOutput = {
37
40
  segments: NarrativeSegment[];
38
41
  variable: string;
@@ -44,6 +47,7 @@ export type NormalizedNode = {
44
47
  display: string;
45
48
  groundedDisplay?: string;
46
49
  rule?: string;
50
+ ruleIri?: string;
47
51
  groundedRule?: string;
48
52
  parentId: string | null;
49
53
  childIds: string[];
@@ -64,10 +68,15 @@ export declare function isTypeFact(node: NormalizedNode): boolean;
64
68
  export declare function isFactNode(node: NormalizedNode): boolean;
65
69
  export declare function multipleSupports(node: NormalizedNode): RuleInstanceView[] | undefined;
66
70
  export declare function subjectTypeTerm(tree: NormalizedTree, subject: string): string | undefined;
67
- export declare function consumingRuleNode(tree: NormalizedTree, node: NormalizedNode): NormalizedNode | undefined;
71
+ export type RuleSelection = {
72
+ node: NormalizedNode;
73
+ relation: "produces" | "uses";
74
+ highlightedAtomIndex?: number;
75
+ };
76
+ export declare function ruleForSelection(tree: NormalizedTree, node: NormalizedNode): RuleSelection | undefined;
68
77
  export declare function buildExplainPath(spo: NamedFactSpo): string;
69
78
  export declare function parseFactStatement(text: string): FactSpo | undefined;
70
- export declare function normalize(output: RDFoxExplainOutput): NormalizedTree | null;
79
+ export declare function normalize(output: ExplainFactOutput): NormalizedTree | null;
71
80
  export declare function ruleHeadText(rule: string): string;
72
81
  export declare function ruleHeadTerms(rule: string): string[];
73
82
  export declare function getRuleBodyTerms(rule: string): string[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-model.d.ts","sourceRoot":"","sources":["../../src/explain-fact/tree-model.ts"],"names":[],"mappings":"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"}
@@ -7,7 +7,7 @@ import { aggregateBindingSegments } from "../rules/rule-narrative-aggregates.js"
7
7
  import { buildFilterRow } from "../rules/rule-narrative-filters.js";
8
8
  import { labeledEntitySegment } from "../rules/rule-narrative-format.js";
9
9
  import { createRuleNarrativeRenderer } from "../rules/rule-narrative-renderer.js";
10
- export function isRDFoxExplainOutput(value) {
10
+ export function isExplainFactOutput(value) {
11
11
  if (typeof value !== "object" || value === null || Array.isArray(value))
12
12
  return false;
13
13
  return Object.values(value).every((entry) => typeof entry === "object" && entry !== null);
@@ -26,12 +26,13 @@ export function subjectTypeTerm(tree, subject) {
26
26
  const typeFact = Object.values(tree.byId).find((node) => isTypeFact(node) && node.spo?.subject === subject);
27
27
  return typeFact?.spo?.object;
28
28
  }
29
- export function consumingRuleNode(tree, node) {
30
- if (node.id === tree.root.id) {
31
- return node.rule ? node : undefined;
32
- }
29
+ export function ruleForSelection(tree, node) {
30
+ if (node.rule)
31
+ return { node, relation: "produces" };
33
32
  const parent = node.parentId ? tree.byId[node.parentId] : undefined;
34
- return parent?.rule ? parent : undefined;
33
+ if (!parent?.rule)
34
+ return undefined;
35
+ return { node: parent, relation: "uses", highlightedAtomIndex: node.bodyIndex };
35
36
  }
36
37
  // The named graph may follow the closing bracket with no space: ":p[_:b, 1]:Graph".
37
38
  const bracketFactPattern = /^([^[\s]+)\[(.*)\]/;
@@ -99,17 +100,19 @@ export function normalize(output) {
99
100
  const ruleInstance = firstRuleInstance(entry.fact);
100
101
  const rule = ruleInstance?.rule;
101
102
  const supports = ruleInstanceViews(entry.fact);
103
+ const kind = factNodeKind(entry.fact);
102
104
  const node = {
103
105
  id,
104
- kind: factNodeKind(entry.fact),
106
+ kind,
105
107
  display: entry.fact.fact ?? entry.key,
106
108
  rule,
109
+ ruleIri: ruleInstance?.["rule-iri"],
107
110
  groundedRule: ruleInstance?.["grounded-rule"],
108
111
  parentId,
109
112
  childIds: [],
110
113
  bodyIndex,
111
114
  spo: typeof entry.fact.fact === "string" ? parseFactStatement(entry.fact.fact) : undefined,
112
- provenance: provenanceForFact(entry.fact, rule),
115
+ provenance: provenanceForFact(entry.fact, kind, rule),
113
116
  ...(isPresent(supports) && { supports }),
114
117
  };
115
118
  byId[id] = node;
@@ -235,16 +238,22 @@ function ruleInstanceViews(fact) {
235
238
  .filter((instance) => typeof instance.rule === "string")
236
239
  .map((instance) => ({
237
240
  rule: instance.rule,
241
+ ruleIri: instance["rule-iri"],
238
242
  groundedRule: instance["grounded-rule"],
239
243
  bodyFacts: instance["body-facts"] ?? [],
240
244
  }));
241
245
  }
242
- function provenanceForFact(fact, rule) {
246
+ function provenanceForFact(fact, kind, rule) {
243
247
  return match(fact.type)
244
248
  .returnType()
245
249
  .with("false", () => "absent")
246
250
  .with("explicit", () => "explicit")
247
- .otherwise(() => (rule && ruleHeadValueIsComputed(rule) ? "computed" : "derived"));
251
+ .otherwise(() => {
252
+ if (rule)
253
+ return ruleHeadValueIsComputed(rule) ? "computed" : "derived";
254
+ const unsupported = kind === "derived-fact" && fact["rule-instances-complete"] === true;
255
+ return unsupported && !isPresent(fact["rule-instances"] ?? []) ? "unsupported" : "derived";
256
+ });
248
257
  }
249
258
  function ruleHeadValueIsComputed(rule) {
250
259
  const ast = parseDatalogRuleCached(rule).ast;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-fact-measure.d.ts","sourceRoot":"","sources":["../../src/explain-fact/use-fact-measure.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGvE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE1E;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAmB5F"}