@manta-eu/react 0.1.1 → 0.1.2
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.
- package/README.md +2 -5
- package/dist/components/breadcrumbs/index.d.ts +26 -0
- package/dist/components/breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/breadcrumbs/index.js +36 -0
- package/dist/components/chip/index.d.ts +14 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/chip/index.js +8 -0
- package/dist/components/editable-text/index.d.ts +13 -0
- package/dist/components/editable-text/index.d.ts.map +1 -0
- package/dist/components/editable-text/index.js +61 -0
- package/dist/components/explain-fact/ExplainFact.d.ts +16 -0
- package/dist/components/explain-fact/ExplainFact.d.ts.map +1 -0
- package/dist/components/{rdfox-explain/RDFoxExplain.js → explain-fact/ExplainFact.js} +12 -12
- package/dist/components/explain-fact/OutdatedFactNotice.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/input-numeric.d.ts +19 -0
- package/dist/components/input/input-numeric.d.ts.map +1 -0
- package/dist/components/input/input-numeric.js +85 -0
- package/dist/components/input/input-tags.d.ts +17 -0
- package/dist/components/input/input-tags.d.ts.map +1 -0
- package/dist/components/input/input-tags.js +46 -0
- package/dist/components/multi-select/index.d.ts +32 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/multi-select/index.js +33 -0
- package/dist/components/multi-select/toggle-value.d.ts +2 -0
- package/dist/components/multi-select/toggle-value.d.ts.map +1 -0
- package/dist/components/multi-select/toggle-value.js +3 -0
- package/dist/components/sidebar/index.d.ts +4 -1
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/tool-invocation-card/ExplainFactResultDisplay.d.ts +9 -0
- package/dist/components/tool-invocation-card/ExplainFactResultDisplay.d.ts.map +1 -0
- package/dist/components/tool-invocation-card/{ExplainRDFoxResultDisplay.js → ExplainFactResultDisplay.js} +3 -3
- package/dist/components/tool-invocation-card/ToolOutputRenderer.js +2 -2
- package/dist/components/tool-invocation-card/types.d.ts +4 -4
- package/dist/components/tool-invocation-card/types.d.ts.map +1 -1
- package/dist/components/tool-invocation-card/types.js +2 -2
- package/dist/components/tree-multi-select/index.d.ts +1 -1
- package/dist/components/tree-multi-select/index.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.js +1 -1
- package/dist/components/tree-multi-select/tree-multi-select-rows.d.ts +2 -1
- package/dist/components/tree-multi-select/tree-multi-select-rows.d.ts.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select-rows.js +21 -31
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +2 -0
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.js +21 -8
- package/dist/explain-fact/DatalogCode.d.ts.map +1 -0
- package/dist/explain-fact/EntityChip.d.ts.map +1 -0
- package/dist/explain-fact/EntityChip.js +17 -0
- package/dist/explain-fact/ExplainCompactView.d.ts.map +1 -0
- package/dist/explain-fact/ExplainFactState.d.ts +7 -0
- package/dist/explain-fact/ExplainFactState.d.ts.map +1 -0
- package/dist/{rdfox-explain/RDFoxExplainState.js → explain-fact/ExplainFactState.js} +1 -1
- package/dist/explain-fact/ExplainFullView.d.ts.map +1 -0
- package/dist/explain-fact/ExplainStates.d.ts.map +1 -0
- package/dist/explain-fact/ExplainTag.d.ts.map +1 -0
- package/dist/explain-fact/FactNotice.d.ts +7 -0
- package/dist/explain-fact/FactNotice.d.ts.map +1 -0
- package/dist/explain-fact/FactNotice.js +25 -0
- package/dist/explain-fact/FactValue.d.ts.map +1 -0
- package/dist/explain-fact/NumDot.d.ts.map +1 -0
- package/dist/explain-fact/PanelLabel.d.ts.map +1 -0
- package/dist/explain-fact/ProofSubjectHeader.d.ts.map +1 -0
- package/dist/explain-fact/ProvenanceBadge.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/ProvenanceBadge.js +2 -1
- package/dist/explain-fact/RuleVariableTypes.d.ts.map +1 -0
- package/dist/explain-fact/SubstitutedFactNotice.d.ts.map +1 -0
- package/dist/explain-fact/ValuePill.d.ts.map +1 -0
- package/dist/explain-fact/conclusion/ConclusionCard.d.ts.map +1 -0
- package/dist/explain-fact/conclusion/ConclusionSubtitle.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionSubtitle.js +3 -1
- package/dist/explain-fact/conclusion/index.d.ts.map +1 -0
- package/dist/explain-fact/explain-styles.d.ts.map +1 -0
- package/dist/explain-fact/fact-token.d.ts.map +1 -0
- package/dist/explain-fact/formula-hues.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/index.d.ts +2 -3
- package/dist/explain-fact/index.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/index.js +2 -3
- package/dist/explain-fact/inspector/ExplainInspector.d.ts.map +1 -0
- package/dist/explain-fact/inspector/ExplainInspector.js +20 -0
- package/dist/explain-fact/inspector/InspectorBindings.d.ts.map +1 -0
- package/dist/explain-fact/inspector/InspectorFact.d.ts.map +1 -0
- package/dist/explain-fact/inspector/InspectorHeader.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/inspector/InspectorRule.d.ts +3 -0
- package/dist/explain-fact/inspector/InspectorRule.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/inspector/InspectorRule.js +4 -5
- package/dist/explain-fact/inspector/SupportsSection.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/inspector/SupportsSection.js +2 -1
- package/dist/explain-fact/inspector/index.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofFactLabel.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofRowBadge.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofRowContent.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofRowValue.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofTree.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTree.js +1 -1
- package/dist/explain-fact/proof-tree/ProofTreeFormulaFooter.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/ProofTreeNode.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/SupportsTag.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/SupportsTag.js +6 -0
- package/dist/explain-fact/proof-tree/index.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/proof-tree-navigation.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/proof-tree-root-view.d.ts.map +1 -0
- package/dist/explain-fact/proof-tree/visible-premises.d.ts.map +1 -0
- package/dist/explain-fact/rule-presentation.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/tree-model.d.ts +18 -9
- package/dist/explain-fact/tree-model.d.ts.map +1 -0
- package/dist/{rdfox-explain → explain-fact}/tree-model.js +19 -10
- package/dist/explain-fact/use-fact-measure.d.ts.map +1 -0
- package/dist/globals.css +237 -18
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/ldo-ui.d.ts +1 -1
- package/dist/ldo-ui.d.ts.map +1 -1
- package/dist/ldo-ui.js +1 -1
- package/dist/lib/datastore-route-paths.d.ts +2 -2
- package/dist/lib/datastore-route-paths.d.ts.map +1 -1
- package/dist/lib/datastore-route-paths.js +2 -2
- package/dist/lib/datastore-route-table.d.ts +36 -0
- package/dist/lib/datastore-route-table.d.ts.map +1 -0
- package/dist/lib/datastore-route-table.js +43 -0
- package/dist/lib/datastore-routes.d.ts +1 -1
- package/dist/lib/datastore-routes.d.ts.map +1 -1
- package/dist/lib/datastore-routes.js +1 -1
- package/dist/lib/spa-routes.d.ts +3 -0
- package/dist/lib/spa-routes.d.ts.map +1 -0
- package/dist/lib/spa-routes.js +5 -0
- package/dist/routes/data-explorer/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/routes/data-explorer/components/Breadcrumbs.js +5 -5
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts +18 -0
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts.map +1 -0
- package/dist/routes/datastores/components/DatastoreFormDialog.js +27 -0
- package/dist/routes/datastores/components/DatastoreTableSkeleton.d.ts +2 -0
- package/dist/routes/datastores/components/DatastoreTableSkeleton.d.ts.map +1 -0
- package/dist/routes/datastores/components/DatastoreTableSkeleton.js +7 -0
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts +18 -0
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts.map +1 -0
- package/dist/routes/datastores/components/DatastoresToolbar.js +29 -0
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts +14 -0
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts.map +1 -0
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.js +83 -0
- package/dist/routes/datastores/components/RenameDatastoreGroupDialog.d.ts +9 -0
- package/dist/routes/datastores/components/RenameDatastoreGroupDialog.d.ts.map +1 -0
- package/dist/routes/datastores/components/RenameDatastoreGroupDialog.js +21 -0
- package/dist/routes/datastores/components/StatusBadge.d.ts +21 -0
- package/dist/routes/datastores/components/StatusBadge.d.ts.map +1 -0
- package/dist/routes/datastores/components/StatusBadge.js +49 -0
- package/dist/routes/datastores/components/UnlinkedDatastoresPanel.d.ts +20 -0
- package/dist/routes/datastores/components/UnlinkedDatastoresPanel.d.ts.map +1 -0
- package/dist/routes/datastores/components/UnlinkedDatastoresPanel.js +13 -0
- package/dist/routes/datastores/flatten.d.ts +33 -0
- package/dist/routes/datastores/flatten.d.ts.map +1 -0
- package/dist/routes/datastores/flatten.js +86 -0
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts +47 -0
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts.map +1 -0
- package/dist/routes/datastores/hooks/useDatastoreColumns.js +165 -0
- package/dist/routes/datastores/hooks/useDatastoreTable.d.ts +14 -0
- package/dist/routes/datastores/hooks/useDatastoreTable.d.ts.map +1 -0
- package/dist/routes/datastores/hooks/useDatastoreTable.js +45 -0
- package/dist/routes/datastores/index.d.ts +2 -0
- package/dist/routes/datastores/index.d.ts.map +1 -0
- package/dist/routes/datastores/index.js +467 -0
- package/dist/routes/explain/ExplainEmpty.d.ts +2 -0
- package/dist/routes/explain/ExplainEmpty.d.ts.map +1 -0
- package/dist/routes/explain/ExplainEmpty.js +8 -0
- package/dist/routes/explain/index.d.ts +2 -0
- package/dist/routes/explain/index.d.ts.map +1 -0
- package/dist/routes/explain/index.js +16 -0
- package/dist/routes/explain/url-params.d.ts +9 -0
- package/dist/routes/explain/url-params.d.ts.map +1 -0
- package/dist/routes/explain/url-params.js +21 -0
- package/dist/routes/integrations/components/ConnectionRow.d.ts.map +1 -1
- package/dist/routes/integrations/components/ConnectionRow.js +1 -1
- package/dist/routes/integrations/connection-view.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.js +17 -1
- package/dist/routes/integrations/types.d.ts +2 -1
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/rules/components/CreateRuleChatModal.d.ts +10 -0
- package/dist/routes/rules/components/CreateRuleChatModal.d.ts.map +1 -0
- package/dist/routes/rules/components/CreateRuleChatModal.js +52 -0
- package/dist/routes/rules/components/RuleActionabilityBadge.d.ts +8 -0
- package/dist/routes/rules/components/RuleActionabilityBadge.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleActionabilityBadge.js +18 -0
- package/dist/routes/rules/components/RuleAffectedActionPlansSection.d.ts +6 -0
- package/dist/routes/rules/components/RuleAffectedActionPlansSection.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleAffectedActionPlansSection.js +151 -0
- package/dist/routes/rules/components/RuleAst.d.ts +6 -0
- package/dist/routes/rules/components/RuleAst.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleAst.js +23 -0
- package/dist/routes/rules/components/RuleDependentRulesSection.d.ts +6 -0
- package/dist/routes/rules/components/RuleDependentRulesSection.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleDependentRulesSection.js +16 -0
- package/dist/routes/rules/components/RuleDetailsPage.d.ts +14 -0
- package/dist/routes/rules/components/RuleDetailsPage.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleDetailsPage.js +51 -0
- package/dist/routes/rules/components/RuleProducersSection.d.ts +7 -0
- package/dist/routes/rules/components/RuleProducersSection.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleProducersSection.js +10 -0
- package/dist/routes/rules/components/RuleSampleFactsSection.d.ts +7 -0
- package/dist/routes/rules/components/RuleSampleFactsSection.d.ts.map +1 -0
- package/dist/routes/rules/components/RuleSampleFactsSection.js +70 -0
- package/dist/routes/rules/components/RulesOverviewHeaderActions.d.ts +17 -0
- package/dist/routes/rules/components/RulesOverviewHeaderActions.d.ts.map +1 -0
- package/dist/routes/rules/components/RulesOverviewHeaderActions.js +55 -0
- package/dist/routes/rules/components/RulesOverviewPage.d.ts +13 -0
- package/dist/routes/rules/components/RulesOverviewPage.d.ts.map +1 -0
- package/dist/routes/rules/components/RulesOverviewPage.js +236 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.d.ts +7 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.d.ts.map +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapeDetails.js +47 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.d.ts +8 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.d.ts.map +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/SupportedActionShapesList.js +76 -0
- package/dist/routes/rules/components/SupportedActionShapesList/TokenList.d.ts +6 -0
- package/dist/routes/rules/components/SupportedActionShapesList/TokenList.d.ts.map +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/TokenList.js +9 -0
- package/dist/routes/rules/components/SupportedActionShapesList/index.d.ts +2 -0
- package/dist/routes/rules/components/SupportedActionShapesList/index.d.ts.map +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/index.js +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.d.ts +20 -0
- package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.d.ts.map +1 -0
- package/dist/routes/rules/components/SupportedActionShapesList/shacl-shape.js +48 -0
- package/dist/routes/rules/components/datalog-editor/BindingsPreview.d.ts +9 -0
- package/dist/routes/rules/components/datalog-editor/BindingsPreview.d.ts.map +1 -0
- package/dist/routes/rules/components/datalog-editor/BindingsPreview.js +38 -0
- package/dist/routes/rules/components/datalog-editor/FactsPreview.d.ts +10 -0
- package/dist/routes/rules/components/datalog-editor/FactsPreview.d.ts.map +1 -0
- package/dist/routes/rules/components/datalog-editor/FactsPreview.js +43 -0
- package/dist/routes/rules/components/datalog-editor/PreviewPanel.d.ts +7 -0
- package/dist/routes/rules/components/datalog-editor/PreviewPanel.d.ts.map +1 -0
- package/dist/routes/rules/components/datalog-editor/PreviewPanel.js +8 -0
- package/dist/routes/rules/components/datalog-editor/QueryResults.d.ts +9 -0
- package/dist/routes/rules/components/datalog-editor/QueryResults.d.ts.map +1 -0
- package/dist/routes/rules/components/datalog-editor/QueryResults.js +22 -0
- package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.d.ts +11 -0
- package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.d.ts.map +1 -0
- package/dist/routes/rules/components/datalog-editor/SparqlQueryPanel.js +21 -0
- package/dist/routes/rules/components/rule-producers.d.ts +15 -0
- package/dist/routes/rules/components/rule-producers.d.ts.map +1 -0
- package/dist/routes/rules/components/rule-producers.js +76 -0
- package/dist/routes/rules/components/sample-facts-query.d.ts +9 -0
- package/dist/routes/rules/components/sample-facts-query.d.ts.map +1 -0
- package/dist/routes/rules/components/sample-facts-query.js +71 -0
- package/dist/routes/rules/datalog-editor.d.ts +6 -0
- package/dist/routes/rules/datalog-editor.d.ts.map +1 -0
- package/dist/routes/rules/datalog-editor.js +7 -0
- package/dist/routes/rules/hooks/useRuleFactsPreview.d.ts +53 -0
- package/dist/routes/rules/hooks/useRuleFactsPreview.d.ts.map +1 -0
- package/dist/routes/rules/hooks/useRuleFactsPreview.js +214 -0
- package/dist/routes/rules/hooks/useSparqlQueryExecution.d.ts +14 -0
- package/dist/routes/rules/hooks/useSparqlQueryExecution.d.ts.map +1 -0
- package/dist/routes/rules/hooks/useSparqlQueryExecution.js +77 -0
- package/dist/routes/rules/pages.d.ts +6 -0
- package/dist/routes/rules/pages.d.ts.map +1 -0
- package/dist/routes/rules/pages.js +7 -0
- package/dist/rules/RuleNameLink.d.ts +6 -0
- package/dist/rules/RuleNameLink.d.ts.map +1 -0
- package/dist/rules/RuleNameLink.js +8 -0
- package/package.json +59 -24
- package/src/globals.css +5 -0
- package/src/themes/manta-dark.css +1 -0
- package/src/themes/manta.css +1 -0
- package/src/themes/standard.css +1 -0
- package/dist/components/rdfox-explain/OutdatedFactNotice.d.ts.map +0 -1
- package/dist/components/rdfox-explain/RDFoxExplain.d.ts +0 -16
- package/dist/components/rdfox-explain/RDFoxExplain.d.ts.map +0 -1
- package/dist/components/tool-invocation-card/ExplainRDFoxResultDisplay.d.ts +0 -9
- package/dist/components/tool-invocation-card/ExplainRDFoxResultDisplay.d.ts.map +0 -1
- package/dist/lib/test-utils.d.ts +0 -4
- package/dist/lib/test-utils.d.ts.map +0 -1
- package/dist/lib/test-utils.js +0 -16
- package/dist/rdfox-explain/AbsentFactNotice.d.ts +0 -5
- package/dist/rdfox-explain/AbsentFactNotice.d.ts.map +0 -1
- package/dist/rdfox-explain/AbsentFactNotice.js +0 -6
- package/dist/rdfox-explain/DatalogCode.d.ts.map +0 -1
- package/dist/rdfox-explain/EntityChip.d.ts.map +0 -1
- package/dist/rdfox-explain/EntityChip.js +0 -9
- package/dist/rdfox-explain/ExplainCompactView.d.ts.map +0 -1
- package/dist/rdfox-explain/ExplainFullView.d.ts.map +0 -1
- package/dist/rdfox-explain/ExplainStates.d.ts.map +0 -1
- package/dist/rdfox-explain/ExplainTag.d.ts.map +0 -1
- package/dist/rdfox-explain/FactValue.d.ts.map +0 -1
- package/dist/rdfox-explain/NumDot.d.ts.map +0 -1
- package/dist/rdfox-explain/PanelLabel.d.ts.map +0 -1
- package/dist/rdfox-explain/ProofSubjectHeader.d.ts.map +0 -1
- package/dist/rdfox-explain/ProvenanceBadge.d.ts.map +0 -1
- package/dist/rdfox-explain/RDFoxExplainState.d.ts +0 -7
- package/dist/rdfox-explain/RDFoxExplainState.d.ts.map +0 -1
- package/dist/rdfox-explain/RuleVariableTypes.d.ts.map +0 -1
- package/dist/rdfox-explain/StoredFactNotice.d.ts +0 -5
- package/dist/rdfox-explain/StoredFactNotice.d.ts.map +0 -1
- package/dist/rdfox-explain/StoredFactNotice.js +0 -6
- package/dist/rdfox-explain/SubstitutedFactNotice.d.ts.map +0 -1
- package/dist/rdfox-explain/ValuePill.d.ts.map +0 -1
- package/dist/rdfox-explain/busy-aggregate-fixture.d.ts +0 -7
- package/dist/rdfox-explain/busy-aggregate-fixture.d.ts.map +0 -1
- package/dist/rdfox-explain/busy-aggregate-fixture.js +0 -6
- package/dist/rdfox-explain/conclusion/ConclusionCard.d.ts.map +0 -1
- package/dist/rdfox-explain/conclusion/ConclusionSubtitle.d.ts.map +0 -1
- package/dist/rdfox-explain/conclusion/index.d.ts.map +0 -1
- package/dist/rdfox-explain/explain-styles.d.ts.map +0 -1
- package/dist/rdfox-explain/fact-token.d.ts.map +0 -1
- package/dist/rdfox-explain/formula-hues.d.ts.map +0 -1
- package/dist/rdfox-explain/index.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/ExplainInspector.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/ExplainInspector.js +0 -22
- package/dist/rdfox-explain/inspector/InspectorBindings.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/InspectorFact.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/InspectorHeader.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/InspectorRule.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/SupportsSection.d.ts.map +0 -1
- package/dist/rdfox-explain/inspector/index.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofFactLabel.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofRowBadge.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofRowContent.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofRowValue.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofTree.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofTreeFormulaFooter.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/ProofTreeNode.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/SupportsTag.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/SupportsTag.js +0 -6
- package/dist/rdfox-explain/proof-tree/index.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/proof-tree-navigation.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/proof-tree-root-view.d.ts.map +0 -1
- package/dist/rdfox-explain/proof-tree/visible-premises.d.ts.map +0 -1
- package/dist/rdfox-explain/rule-presentation.d.ts.map +0 -1
- package/dist/rdfox-explain/tree-model.d.ts.map +0 -1
- package/dist/rdfox-explain/use-fact-measure.d.ts.map +0 -1
- package/dist/test-support.d.ts +0 -9
- package/dist/test-support.d.ts.map +0 -1
- package/dist/test-support.js +0 -18
- /package/dist/components/{rdfox-explain → explain-fact}/OutdatedFactNotice.d.ts +0 -0
- /package/dist/components/{rdfox-explain → explain-fact}/OutdatedFactNotice.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/DatalogCode.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/DatalogCode.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/EntityChip.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainCompactView.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainCompactView.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainFullView.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainFullView.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainStates.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainStates.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainTag.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ExplainTag.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/FactValue.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/FactValue.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/NumDot.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/NumDot.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/PanelLabel.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/PanelLabel.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ProofSubjectHeader.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ProofSubjectHeader.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ProvenanceBadge.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/RuleVariableTypes.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/RuleVariableTypes.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/SubstitutedFactNotice.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/SubstitutedFactNotice.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ValuePill.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/ValuePill.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionCard.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionCard.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/conclusion/ConclusionSubtitle.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/conclusion/index.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/conclusion/index.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/explain-styles.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/explain-styles.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/fact-token.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/fact-token.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/formula-hues.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/formula-hues.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/ExplainInspector.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorBindings.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorBindings.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorFact.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorFact.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorHeader.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/InspectorHeader.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/SupportsSection.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/index.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/inspector/index.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofFactLabel.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofFactLabel.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowBadge.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowBadge.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowContent.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowContent.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowValue.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofRowValue.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTree.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeFormulaFooter.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeFormulaFooter.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeNode.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/ProofTreeNode.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/SupportsTag.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/index.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/index.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-navigation.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-navigation.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-root-view.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/proof-tree-root-view.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/visible-premises.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/proof-tree/visible-premises.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/rule-presentation.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/rule-presentation.js +0 -0
- /package/dist/{rdfox-explain → explain-fact}/use-fact-measure.d.ts +0 -0
- /package/dist/{rdfox-explain → explain-fact}/use-fact-measure.js +0 -0
|
@@ -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" }),
|
|
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": `
|
|
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
|
|
4
|
-
[key: string]:
|
|
3
|
+
export type ExplainFactOutput = {
|
|
4
|
+
[key: string]: ExplainedFact | ExplainedFact[];
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type ExplainedFact = {
|
|
7
7
|
fact?: string;
|
|
8
8
|
type?: "derived" | "explicit" | "false";
|
|
9
|
-
"rule-instances"?:
|
|
9
|
+
"rule-instances-complete"?: boolean;
|
|
10
|
+
"rule-instances"?: ExplainRuleInstance[];
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
};
|
|
12
|
-
export type
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
30
|
-
if (node.
|
|
31
|
-
return
|
|
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
|
-
|
|
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
|
|
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(() =>
|
|
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"}
|