@flanksource/clicky-ui 0.3.44 → 0.3.45
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 -0
- package/dist/ai.cjs +4 -2
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +3 -1
- package/dist/components/MdxEditorField.cjs +40 -22
- package/dist/components/MdxEditorField.cjs.map +1 -1
- package/dist/components/MdxEditorField.d.ts.map +1 -1
- package/dist/components/MdxEditorField.js +41 -23
- package/dist/components/MdxEditorField.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +6 -1
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +6 -1
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/data/CodeBlock.cjs +3 -2
- package/dist/data/CodeBlock.cjs.map +1 -1
- package/dist/data/CodeBlock.d.ts +3 -1
- package/dist/data/CodeBlock.d.ts.map +1 -1
- package/dist/data/CodeBlock.js +3 -2
- package/dist/data/CodeBlock.js.map +1 -1
- package/dist/data/GraphDiagram.cjs +18 -6
- package/dist/data/GraphDiagram.cjs.map +1 -1
- package/dist/data/GraphDiagram.d.ts +9 -1
- package/dist/data/GraphDiagram.d.ts.map +1 -1
- package/dist/data/GraphDiagram.js +18 -6
- package/dist/data/GraphDiagram.js.map +1 -1
- package/dist/data/GraphDiagramNodes.cjs +38 -29
- package/dist/data/GraphDiagramNodes.cjs.map +1 -1
- package/dist/data/GraphDiagramNodes.d.ts +8 -2
- package/dist/data/GraphDiagramNodes.d.ts.map +1 -1
- package/dist/data/GraphDiagramNodes.js +38 -29
- package/dist/data/GraphDiagramNodes.js.map +1 -1
- package/dist/data/JsonView.cjs +118 -49
- package/dist/data/JsonView.cjs.map +1 -1
- package/dist/data/JsonView.d.ts +13 -10
- package/dist/data/JsonView.d.ts.map +1 -1
- package/dist/data/JsonView.js +118 -49
- package/dist/data/JsonView.js.map +1 -1
- package/dist/data/MarkdownEditor.cjs +2 -2
- package/dist/data/MarkdownEditor.cjs.map +1 -1
- package/dist/data/MarkdownEditor.js +2 -2
- package/dist/data/MarkdownEditor.js.map +1 -1
- package/dist/data/ai/AdvancedChatConfig.cjs +90 -249
- package/dist/data/ai/AdvancedChatConfig.cjs.map +1 -1
- package/dist/data/ai/AdvancedChatConfig.d.ts +2 -5
- package/dist/data/ai/AdvancedChatConfig.d.ts.map +1 -1
- package/dist/data/ai/AdvancedChatConfig.js +91 -250
- package/dist/data/ai/AdvancedChatConfig.js.map +1 -1
- package/dist/data/ai/ChatButton.cjs +2 -0
- package/dist/data/ai/ChatButton.cjs.map +1 -1
- package/dist/data/ai/ChatButton.d.ts +1 -1
- package/dist/data/ai/ChatButton.d.ts.map +1 -1
- package/dist/data/ai/ChatButton.js +2 -0
- package/dist/data/ai/ChatButton.js.map +1 -1
- package/dist/data/ai/ChatFab.cjs +5 -1
- package/dist/data/ai/ChatFab.cjs.map +1 -1
- package/dist/data/ai/ChatFab.d.ts +5 -1
- package/dist/data/ai/ChatFab.d.ts.map +1 -1
- package/dist/data/ai/ChatFab.js +5 -1
- package/dist/data/ai/ChatFab.js.map +1 -1
- package/dist/data/ai/ChatWindow.cjs +2 -8
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +2 -8
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindow.runtime.cjs +0 -5
- package/dist/data/ai/ChatWindow.runtime.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.runtime.d.ts +0 -2
- package/dist/data/ai/ChatWindow.runtime.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.runtime.js +0 -5
- package/dist/data/ai/ChatWindow.runtime.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs +2 -2
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.js +2 -2
- package/dist/data/ai/PromptRunEditor/runtimeActions.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.cjs +3 -6
- package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.js +3 -6
- package/dist/data/ai/SessionInspector.approvals.js.map +1 -1
- package/dist/data/ai/SessionViewer.cjs +13 -4
- package/dist/data/ai/SessionViewer.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +5 -1
- package/dist/data/ai/SessionViewer.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.header.cjs +1 -1
- package/dist/data/ai/SessionViewer.header.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.header.js +1 -1
- package/dist/data/ai/SessionViewer.header.js.map +1 -1
- package/dist/data/ai/SessionViewer.js +13 -4
- package/dist/data/ai/SessionViewer.js.map +1 -1
- package/dist/data/ai/SessionViewer.model.cjs +2 -0
- package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.model.d.ts +1 -0
- package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.model.js +2 -0
- package/dist/data/ai/SessionViewer.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +41 -27
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts +4 -2
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +41 -27
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.tokens.cjs +35 -0
- package/dist/data/ai/SessionViewer.tokens.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.tokens.d.ts +5 -0
- package/dist/data/ai/SessionViewer.tokens.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.tokens.js +35 -0
- package/dist/data/ai/SessionViewer.tokens.js.map +1 -0
- package/dist/data/ai/SessionViewer.tool-cost.cjs +128 -0
- package/dist/data/ai/SessionViewer.tool-cost.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.tool-cost.d.ts +6 -0
- package/dist/data/ai/SessionViewer.tool-cost.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.tool-cost.js +128 -0
- package/dist/data/ai/SessionViewer.tool-cost.js.map +1 -0
- package/dist/data/ai/SessionViewer.tool-details.cjs +3 -1
- package/dist/data/ai/SessionViewer.tool-details.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-details.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-details.js +3 -1
- package/dist/data/ai/SessionViewer.tool-details.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs +55 -35
- package/dist/data/ai/SessionViewer.tool-row.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts +2 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.js +55 -35
- package/dist/data/ai/SessionViewer.tool-row.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +4 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.cjs +18 -1
- package/dist/data/ai/SessionViewerMenu.cjs.map +1 -1
- package/dist/data/ai/SessionViewerMenu.d.ts +6 -1
- package/dist/data/ai/SessionViewerMenu.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.js +18 -1
- package/dist/data/ai/SessionViewerMenu.js.map +1 -1
- package/dist/data/ai/ToolPreferences.cjs +149 -143
- package/dist/data/ai/ToolPreferences.cjs.map +1 -1
- package/dist/data/ai/ToolPreferences.d.ts +20 -6
- package/dist/data/ai/ToolPreferences.d.ts.map +1 -1
- package/dist/data/ai/ToolPreferences.js +151 -146
- package/dist/data/ai/ToolPreferences.js.map +1 -1
- package/dist/data/ai/ToolPreferences.model.cjs +14 -10
- package/dist/data/ai/ToolPreferences.model.cjs.map +1 -1
- package/dist/data/ai/ToolPreferences.model.d.ts +1 -0
- package/dist/data/ai/ToolPreferences.model.d.ts.map +1 -1
- package/dist/data/ai/ToolPreferences.model.js +15 -11
- package/dist/data/ai/ToolPreferences.model.js.map +1 -1
- package/dist/data/ai/ToolPreferencesList.cjs +1 -0
- package/dist/data/ai/ToolPreferencesList.cjs.map +1 -1
- package/dist/data/ai/ToolPreferencesList.d.ts +4 -1
- package/dist/data/ai/ToolPreferencesList.d.ts.map +1 -1
- package/dist/data/ai/ToolPreferencesList.js +2 -1
- package/dist/data/ai/ToolPreferencesList.js.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.cjs +52 -53
- package/dist/data/ai/ToolSchemaBrowser.cjs.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.d.ts +6 -3
- package/dist/data/ai/ToolSchemaBrowser.d.ts.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.directory-header.cjs +9 -13
- package/dist/data/ai/ToolSchemaBrowser.directory-header.cjs.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.directory-header.d.ts +5 -2
- package/dist/data/ai/ToolSchemaBrowser.directory-header.d.ts.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.directory-header.js +9 -13
- package/dist/data/ai/ToolSchemaBrowser.directory-header.js.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.js +53 -54
- package/dist/data/ai/ToolSchemaBrowser.js.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.model.cjs +19 -27
- package/dist/data/ai/ToolSchemaBrowser.model.cjs.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.model.d.ts +9 -6
- package/dist/data/ai/ToolSchemaBrowser.model.d.ts.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.model.js +20 -28
- package/dist/data/ai/ToolSchemaBrowser.model.js.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.sidebar.cjs +12 -213
- package/dist/data/ai/ToolSchemaBrowser.sidebar.cjs.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.sidebar.d.ts +1 -3
- package/dist/data/ai/ToolSchemaBrowser.sidebar.d.ts.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.sidebar.js +13 -214
- package/dist/data/ai/ToolSchemaBrowser.sidebar.js.map +1 -1
- package/dist/data/ai/ToolSchemaBrowser.strategies.cjs +54 -0
- package/dist/data/ai/ToolSchemaBrowser.strategies.cjs.map +1 -0
- package/dist/data/ai/ToolSchemaBrowser.strategies.d.ts +9 -0
- package/dist/data/ai/ToolSchemaBrowser.strategies.d.ts.map +1 -0
- package/dist/data/ai/ToolSchemaBrowser.strategies.js +54 -0
- package/dist/data/ai/ToolSchemaBrowser.strategies.js.map +1 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.cjs +179 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.cjs.map +1 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.d.ts +20 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.d.ts.map +1 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.js +179 -0
- package/dist/data/ai/ToolSchemaBrowser.tree.js.map +1 -0
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.cjs +8 -28
- package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.js +9 -29
- package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.js.map +1 -1
- package/dist/data/ai/session-token-sizing.d.ts +32 -0
- package/dist/data/ai/session-token-sizing.d.ts.map +1 -0
- package/dist/data/ai/use-session-token-sizing.cjs +73 -0
- package/dist/data/ai/use-session-token-sizing.cjs.map +1 -0
- package/dist/data/ai/use-session-token-sizing.d.ts +21 -0
- package/dist/data/ai/use-session-token-sizing.d.ts.map +1 -0
- package/dist/data/ai/use-session-token-sizing.js +73 -0
- package/dist/data/ai/use-session-token-sizing.js.map +1 -0
- package/dist/data/call-graph/CallGraph.cjs +250 -0
- package/dist/data/call-graph/CallGraph.cjs.map +1 -0
- package/dist/data/call-graph/CallGraph.d.ts +69 -0
- package/dist/data/call-graph/CallGraph.d.ts.map +1 -0
- package/dist/data/call-graph/CallGraph.js +250 -0
- package/dist/data/call-graph/CallGraph.js.map +1 -0
- package/dist/data/call-graph/CallGraphGlyphs.cjs +39 -0
- package/dist/data/call-graph/CallGraphGlyphs.cjs.map +1 -0
- package/dist/data/call-graph/CallGraphGlyphs.d.ts +19 -0
- package/dist/data/call-graph/CallGraphGlyphs.d.ts.map +1 -0
- package/dist/data/call-graph/CallGraphGlyphs.js +39 -0
- package/dist/data/call-graph/CallGraphGlyphs.js.map +1 -0
- package/dist/data/call-graph/CallGraphMembers.cjs +50 -0
- package/dist/data/call-graph/CallGraphMembers.cjs.map +1 -0
- package/dist/data/call-graph/CallGraphMembers.d.ts +22 -0
- package/dist/data/call-graph/CallGraphMembers.d.ts.map +1 -0
- package/dist/data/call-graph/CallGraphMembers.js +50 -0
- package/dist/data/call-graph/CallGraphMembers.js.map +1 -0
- package/dist/data/call-graph/CallGraphParts.cjs +204 -0
- package/dist/data/call-graph/CallGraphParts.cjs.map +1 -0
- package/dist/data/call-graph/CallGraphParts.d.ts +44 -0
- package/dist/data/call-graph/CallGraphParts.d.ts.map +1 -0
- package/dist/data/call-graph/CallGraphParts.js +204 -0
- package/dist/data/call-graph/CallGraphParts.js.map +1 -0
- package/dist/data/call-graph/CallGraphToolbar.cjs +186 -0
- package/dist/data/call-graph/CallGraphToolbar.cjs.map +1 -0
- package/dist/data/call-graph/CallGraphToolbar.d.ts +45 -0
- package/dist/data/call-graph/CallGraphToolbar.d.ts.map +1 -0
- package/dist/data/call-graph/CallGraphToolbar.js +186 -0
- package/dist/data/call-graph/CallGraphToolbar.js.map +1 -0
- package/dist/data/call-graph/call-graph-exclude.cjs +75 -0
- package/dist/data/call-graph/call-graph-exclude.cjs.map +1 -0
- package/dist/data/call-graph/call-graph-exclude.d.ts +31 -0
- package/dist/data/call-graph/call-graph-exclude.d.ts.map +1 -0
- package/dist/data/call-graph/call-graph-exclude.js +75 -0
- package/dist/data/call-graph/call-graph-exclude.js.map +1 -0
- package/dist/data/call-graph/call-graph-labels.cjs +96 -0
- package/dist/data/call-graph/call-graph-labels.cjs.map +1 -0
- package/dist/data/call-graph/call-graph-labels.d.ts +53 -0
- package/dist/data/call-graph/call-graph-labels.d.ts.map +1 -0
- package/dist/data/call-graph/call-graph-labels.js +96 -0
- package/dist/data/call-graph/call-graph-labels.js.map +1 -0
- package/dist/data/call-graph/call-graph-model.cjs +161 -0
- package/dist/data/call-graph/call-graph-model.cjs.map +1 -0
- package/dist/data/call-graph/call-graph-model.d.ts +102 -0
- package/dist/data/call-graph/call-graph-model.d.ts.map +1 -0
- package/dist/data/call-graph/call-graph-model.js +161 -0
- package/dist/data/call-graph/call-graph-model.js.map +1 -0
- package/dist/data/call-graph/call-graph-vocabulary.cjs +177 -0
- package/dist/data/call-graph/call-graph-vocabulary.cjs.map +1 -0
- package/dist/data/call-graph/call-graph-vocabulary.d.ts +72 -0
- package/dist/data/call-graph/call-graph-vocabulary.d.ts.map +1 -0
- package/dist/data/call-graph/call-graph-vocabulary.js +177 -0
- package/dist/data/call-graph/call-graph-vocabulary.js.map +1 -0
- package/dist/data/call-graph/call-graph.fixtures.d.ts +63 -0
- package/dist/data/call-graph/call-graph.fixtures.d.ts.map +1 -0
- package/dist/data/call-graph/index.d.ts +7 -0
- package/dist/data/call-graph/index.d.ts.map +1 -0
- package/dist/data/call-graph/types.cjs +5 -0
- package/dist/data/call-graph/types.cjs.map +1 -0
- package/dist/data/call-graph/types.d.ts +135 -0
- package/dist/data/call-graph/types.d.ts.map +1 -0
- package/dist/data/call-graph/types.js +5 -0
- package/dist/data/call-graph/types.js.map +1 -0
- package/dist/data/call-graph/use-call-graph.cjs +93 -0
- package/dist/data/call-graph/use-call-graph.cjs.map +1 -0
- package/dist/data/call-graph/use-call-graph.d.ts +24 -0
- package/dist/data/call-graph/use-call-graph.d.ts.map +1 -0
- package/dist/data/call-graph/use-call-graph.js +93 -0
- package/dist/data/call-graph/use-call-graph.js.map +1 -0
- package/dist/data/chat/Chat.cjs +39 -15
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.fixtures.cjs +2 -2
- package/dist/data/chat/Chat.fixtures.cjs.map +1 -1
- package/dist/data/chat/Chat.fixtures.js +2 -2
- package/dist/data/chat/Chat.fixtures.js.map +1 -1
- package/dist/data/chat/Chat.js +40 -16
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.cjs +3 -6
- package/dist/data/chat/ChatRuntimeToolbar.cjs.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.d.ts.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.js +3 -6
- package/dist/data/chat/ChatRuntimeToolbar.js.map +1 -1
- package/dist/data/chat/ContextMeter.bar.cjs +5 -8
- package/dist/data/chat/ContextMeter.bar.cjs.map +1 -1
- package/dist/data/chat/ContextMeter.bar.d.ts +1 -1
- package/dist/data/chat/ContextMeter.bar.d.ts.map +1 -1
- package/dist/data/chat/ContextMeter.bar.js +5 -8
- package/dist/data/chat/ContextMeter.bar.js.map +1 -1
- package/dist/data/chat/ContextMeter.cjs +18 -19
- package/dist/data/chat/ContextMeter.cjs.map +1 -1
- package/dist/data/chat/ContextMeter.d.ts +1 -1
- package/dist/data/chat/ContextMeter.d.ts.map +1 -1
- package/dist/data/chat/ContextMeter.js +18 -19
- package/dist/data/chat/ContextMeter.js.map +1 -1
- package/dist/data/chat/Conversation.cjs +2 -1
- package/dist/data/chat/Conversation.cjs.map +1 -1
- package/dist/data/chat/Conversation.d.ts +4 -1
- package/dist/data/chat/Conversation.d.ts.map +1 -1
- package/dist/data/chat/Conversation.js +2 -1
- package/dist/data/chat/Conversation.js.map +1 -1
- package/dist/data/chat/Message.cjs +39 -12
- package/dist/data/chat/Message.cjs.map +1 -1
- package/dist/data/chat/Message.d.ts +1 -1
- package/dist/data/chat/Message.d.ts.map +1 -1
- package/dist/data/chat/Message.js +40 -13
- package/dist/data/chat/Message.js.map +1 -1
- package/dist/data/chat/ToolCall.cjs +60 -5
- package/dist/data/chat/ToolCall.cjs.map +1 -1
- package/dist/data/chat/ToolCall.d.ts +7 -2
- package/dist/data/chat/ToolCall.d.ts.map +1 -1
- package/dist/data/chat/ToolCall.js +60 -5
- package/dist/data/chat/ToolCall.js.map +1 -1
- package/dist/data/chat/approval.cjs.map +1 -1
- package/dist/data/chat/approval.d.ts +2 -2
- package/dist/data/chat/approval.d.ts.map +1 -1
- package/dist/data/chat/approval.js.map +1 -1
- package/dist/data/chat/tool-policy.cjs +59 -2
- package/dist/data/chat/tool-policy.cjs.map +1 -1
- package/dist/data/chat/tool-policy.d.ts +9 -0
- package/dist/data/chat/tool-policy.d.ts.map +1 -1
- package/dist/data/chat/tool-policy.js +59 -2
- package/dist/data/chat/tool-policy.js.map +1 -1
- package/dist/data/chat/types.cjs +6 -0
- package/dist/data/chat/types.cjs.map +1 -1
- package/dist/data/chat/types.d.ts +13 -4
- package/dist/data/chat/types.d.ts.map +1 -1
- package/dist/data/chat/types.js +7 -1
- package/dist/data/chat/types.js.map +1 -1
- package/dist/data/chat/usage-snapshot.cjs +11 -6
- package/dist/data/chat/usage-snapshot.cjs.map +1 -1
- package/dist/data/chat/usage-snapshot.d.ts +0 -1
- package/dist/data/chat/usage-snapshot.d.ts.map +1 -1
- package/dist/data/chat/usage-snapshot.js +11 -6
- package/dist/data/chat/usage-snapshot.js.map +1 -1
- package/dist/data/diagnostics/StackFrameRow.cjs +3 -3
- package/dist/data/diagnostics/StackFrameRow.cjs.map +1 -1
- package/dist/data/diagnostics/StackFrameRow.js +3 -3
- package/dist/data/diagnostics/StackFrameRow.js.map +1 -1
- package/dist/data/graph-columns-layout.cjs +26 -10
- package/dist/data/graph-columns-layout.cjs.map +1 -1
- package/dist/data/graph-columns-layout.d.ts +8 -0
- package/dist/data/graph-columns-layout.d.ts.map +1 -1
- package/dist/data/graph-columns-layout.js +26 -10
- package/dist/data/graph-columns-layout.js.map +1 -1
- package/dist/data/graph-diagram-model.cjs.map +1 -1
- package/dist/data/graph-diagram-model.d.ts +5 -0
- package/dist/data/graph-diagram-model.d.ts.map +1 -1
- package/dist/data/graph-diagram-model.js.map +1 -1
- package/dist/data/graph-edge-routing.cjs +9 -3
- package/dist/data/graph-edge-routing.cjs.map +1 -1
- package/dist/data/graph-edge-routing.d.ts +2 -0
- package/dist/data/graph-edge-routing.d.ts.map +1 -1
- package/dist/data/graph-edge-routing.js +9 -3
- package/dist/data/graph-edge-routing.js.map +1 -1
- package/dist/data/json-view/JsonSource.cjs +84 -0
- package/dist/data/json-view/JsonSource.cjs.map +1 -0
- package/dist/data/json-view/JsonSource.d.ts +7 -0
- package/dist/data/json-view/JsonSource.d.ts.map +1 -0
- package/dist/data/json-view/JsonSource.js +84 -0
- package/dist/data/json-view/JsonSource.js.map +1 -0
- package/dist/data/json-view/parse-prefix.cjs +132 -0
- package/dist/data/json-view/parse-prefix.cjs.map +1 -0
- package/dist/data/json-view/parse-prefix.d.ts +11 -0
- package/dist/data/json-view/parse-prefix.d.ts.map +1 -0
- package/dist/data/json-view/parse-prefix.js +132 -0
- package/dist/data/json-view/parse-prefix.js.map +1 -0
- package/dist/data/json-view/parse-source.cjs +62 -0
- package/dist/data/json-view/parse-source.cjs.map +1 -0
- package/dist/data/json-view/parse-source.d.ts +16 -0
- package/dist/data/json-view/parse-source.d.ts.map +1 -0
- package/dist/data/json-view/parse-source.js +62 -0
- package/dist/data/json-view/parse-source.js.map +1 -0
- package/dist/data/json-view/story-fixtures.d.ts +6 -0
- package/dist/data/json-view/story-fixtures.d.ts.map +1 -0
- package/dist/data/json-view/types.d.ts +14 -0
- package/dist/data/json-view/types.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.cjs +2 -5
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.d.ts +2 -4
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.fields.cjs +2 -2
- package/dist/data/runtime/RuntimeBar.fields.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.fields.js +2 -2
- package/dist/data/runtime/RuntimeBar.fields.js.map +1 -1
- package/dist/data/runtime/RuntimeBar.js +2 -5
- package/dist/data/runtime/RuntimeBar.js.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.cjs +4 -1
- package/dist/data/runtime/RuntimeBar.selection.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.js +5 -2
- package/dist/data/runtime/RuntimeBar.selection.js.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.cjs +1 -5
- package/dist/data/runtime/RuntimeBarActions.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts +1 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.js +1 -5
- package/dist/data/runtime/RuntimeBarActions.js.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.cjs +6 -14
- package/dist/data/runtime/RuntimeBarIdentity.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.d.ts +0 -1
- package/dist/data/runtime/RuntimeBarIdentity.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.js +6 -14
- package/dist/data/runtime/RuntimeBarIdentity.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +8 -27
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +8 -27
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.cjs +1 -5
- package/dist/data/runtime/RuntimeBarSegment.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.js +1 -5
- package/dist/data/runtime/RuntimeBarSegment.js.map +1 -1
- package/dist/data/runtime/use-runtime-bar-overflow.cjs +4 -10
- package/dist/data/runtime/use-runtime-bar-overflow.cjs.map +1 -1
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts +1 -2
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts.map +1 -1
- package/dist/data/runtime/use-runtime-bar-overflow.js +4 -10
- package/dist/data/runtime/use-runtime-bar-overflow.js.map +1 -1
- package/dist/data/test-runner/TestRunner.fixtures.d.ts +0 -20
- package/dist/data/test-runner/TestRunner.fixtures.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.large-fixtures.d.ts +22 -0
- package/dist/data/test-runner/TestRunner.large-fixtures.d.ts.map +1 -0
- package/dist/data/use-pan-zoom.cjs +23 -10
- package/dist/data/use-pan-zoom.cjs.map +1 -1
- package/dist/data/use-pan-zoom.d.ts +16 -2
- package/dist/data/use-pan-zoom.d.ts.map +1 -1
- package/dist/data/use-pan-zoom.js +23 -10
- package/dist/data/use-pan-zoom.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +26 -2
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +1 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +24 -0
- package/dist/data.js.map +1 -1
- package/dist/index.cjs +28 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/Workspace.cjs +13 -4
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +7 -2
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +13 -4
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/lib/permission-strategies.cjs +71 -11
- package/dist/lib/permission-strategies.cjs.map +1 -1
- package/dist/lib/permission-strategies.d.ts +3 -0
- package/dist/lib/permission-strategies.d.ts.map +1 -1
- package/dist/lib/permission-strategies.js +71 -11
- package/dist/lib/permission-strategies.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -3
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.cjs +0 -57
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.cjs.map +0 -1
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.d.ts +0 -7
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.d.ts.map +0 -1
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.js +0 -57
- package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.js.map +0 -1
- package/dist/data/runtime/RuntimeBar.context.cjs +0 -8
- package/dist/data/runtime/RuntimeBar.context.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBar.context.d.ts +0 -2
- package/dist/data/runtime/RuntimeBar.context.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBar.context.js +0 -8
- package/dist/data/runtime/RuntimeBar.context.js.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IconComponent } from '../../icons.js';
|
|
2
|
+
import { CallGraph, CallGraphNode } from './types.js';
|
|
3
|
+
export interface CallGraphGlyph {
|
|
4
|
+
id: string;
|
|
5
|
+
/** The legend's name for it. */
|
|
6
|
+
name: string;
|
|
7
|
+
icon: IconComponent;
|
|
8
|
+
/** Drawn instead of `icon` in the dark theme, for coloured artwork. */
|
|
9
|
+
darkIcon?: IconComponent;
|
|
10
|
+
}
|
|
11
|
+
export interface CallGraphVocabulary {
|
|
12
|
+
/** Every glyph the vocabulary draws, in legend order. */
|
|
13
|
+
glyphs: readonly CallGraphGlyph[];
|
|
14
|
+
/** The id of the one glyph a node shows. */
|
|
15
|
+
glyphOf(graph: CallGraph, node: CallGraphNode): string;
|
|
16
|
+
/** What the node is, in words: `method`, `external function`, `copybook`. */
|
|
17
|
+
kindOf(graph: CallGraph, node: CallGraphNode): string;
|
|
18
|
+
/** The node has a body the source walks: it can be expanded and opened. */
|
|
19
|
+
hasSource(node: CallGraphNode): boolean;
|
|
20
|
+
/** The graph can be drawn around the node: Focus is offered for it, with or without a source. */
|
|
21
|
+
canRoot(node: CallGraphNode): boolean;
|
|
22
|
+
/** A table, column, procedure, entity or field: its details count readers and writers. */
|
|
23
|
+
isData(node: CallGraphNode): boolean;
|
|
24
|
+
/** Drawn dimmed: the node leads nowhere further. */
|
|
25
|
+
muted(node: CallGraphNode): boolean;
|
|
26
|
+
/** The node's status line in its details. */
|
|
27
|
+
status(node: CallGraphNode): string;
|
|
28
|
+
/** The node a data node stands for, such as the column behind a field, offered as a Focus link. */
|
|
29
|
+
backing?(node: CallGraphNode): {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
/** What a group is, and the icon its box caption shows. */
|
|
34
|
+
group: {
|
|
35
|
+
noun: string;
|
|
36
|
+
plural: string;
|
|
37
|
+
icon: IconComponent;
|
|
38
|
+
patternHint: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** The glyph with that id, failing on one the vocabulary does not list. */
|
|
42
|
+
export declare function requireGlyph(vocabulary: CallGraphVocabulary, id: string): CallGraphGlyph;
|
|
43
|
+
/** The glyphs the graph's nodes use, once each, in legend order. */
|
|
44
|
+
export declare function usedGlyphs(graph: CallGraph, vocabulary: CallGraphVocabulary): CallGraphGlyph[];
|
|
45
|
+
/** The node's tooltip: its kind, its label and its group's full label. */
|
|
46
|
+
export declare function nodeTitle(graph: CallGraph, node: CallGraphNode, vocabulary: CallGraphVocabulary): string;
|
|
47
|
+
export declare function callsItself(graph: CallGraph, node: CallGraphNode): boolean;
|
|
48
|
+
export declare function siteKey(site: {
|
|
49
|
+
path?: string;
|
|
50
|
+
line?: number;
|
|
51
|
+
column?: number;
|
|
52
|
+
}): string;
|
|
53
|
+
export declare const DATA_KIND_WORDS: Readonly<Record<string, string>>;
|
|
54
|
+
export declare const CALL_GRAPH_DATA_GLYPHS: readonly CallGraphGlyph[];
|
|
55
|
+
export declare function isDataNode(node: CallGraphNode): boolean;
|
|
56
|
+
export declare function dataNodeStatus(node: CallGraphNode): string;
|
|
57
|
+
/** The column behind a field, by its `column` property. */
|
|
58
|
+
export declare function dataNodeBacking(node: CallGraphNode): {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
} | undefined;
|
|
62
|
+
export declare function isBuiltin(node: CallGraphNode): boolean;
|
|
63
|
+
/** A symbol declared outside the indexed snapshots: it has no source, so it cannot be opened or expanded. */
|
|
64
|
+
export declare function isExternal(node: CallGraphNode): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The index has no kind for an interface method: it is a `method`. It shows in the graph as the target
|
|
67
|
+
* of a call whose site also carries a dispatch edge from the same caller, because the source adds that
|
|
68
|
+
* dispatch edge to each implementation of the interface method called there.
|
|
69
|
+
*/
|
|
70
|
+
export declare function interfaceMethods(graph: CallGraph): Set<string>;
|
|
71
|
+
export declare const UIR_CALL_GRAPH_VOCABULARY: CallGraphVocabulary;
|
|
72
|
+
//# sourceMappingURL=call-graph-vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-graph-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/data/call-graph/call-graph-vocabulary.ts"],"names":[],"mappings":"AAIA,OAAO,EAqBL,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC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
|
2
|
+
import { UiSqlColumn } from "../../icons/components/UiSqlColumn.js";
|
|
3
|
+
import { UiSqlStoredProc } from "../../icons/components/UiSqlStoredProc.js";
|
|
4
|
+
import { UiTableProperties } from "../../icons/components/UiTableProperties.js";
|
|
5
|
+
import { UiField } from "../../icons/components/UiField.js";
|
|
6
|
+
import { UiPackage } from "../../icons/components/UiPackage.js";
|
|
7
|
+
import { UiFunction } from "../../icons/components/UiFunction.js";
|
|
8
|
+
import { UiMethod } from "../../icons/components/UiMethod.js";
|
|
9
|
+
import { UiInterface } from "../../icons/components/UiInterface.js";
|
|
10
|
+
import { UiMethod11Dark, UiMethod11 } from "../../icons/components/UiMethod11.js";
|
|
11
|
+
import { UiFunction1Dark, UiFunction1 } from "../../icons/components/UiFunction1.js";
|
|
12
|
+
import { UiFunctionSquare } from "../../icons/components/UiFunctionSquare.js";
|
|
13
|
+
import { UiTypeParameter } from "../../icons/components/UiTypeParameter.js";
|
|
14
|
+
import { UiVariable } from "../../icons/components/UiVariable.js";
|
|
15
|
+
import { UiConstant } from "../../icons/components/UiConstant.js";
|
|
16
|
+
import { UiUnknown } from "../../icons/components/UiUnknown.js";
|
|
17
|
+
import { UiSymbolDark, UiSymbol } from "../../icons/components/UiSymbol.js";
|
|
18
|
+
function requireGlyph(vocabulary, id) {
|
|
19
|
+
const glyph = vocabulary.glyphs.find((candidate) => candidate.id === id);
|
|
20
|
+
if (!glyph) throw new Error(`call graph: the vocabulary has no glyph "${id}"`);
|
|
21
|
+
return glyph;
|
|
22
|
+
}
|
|
23
|
+
function usedGlyphs(graph, vocabulary) {
|
|
24
|
+
const used = new Set(graph.nodes.map((node) => vocabulary.glyphOf(graph, node)));
|
|
25
|
+
return vocabulary.glyphs.filter((glyph) => used.has(glyph.id));
|
|
26
|
+
}
|
|
27
|
+
function nodeTitle(graph, node, vocabulary) {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const group = ((_b = (_a = graph.groups) == null ? void 0 : _a.find((candidate) => candidate.id === node.group)) == null ? void 0 : _b.label) ?? node.group;
|
|
30
|
+
return `${vocabulary.kindOf(graph, node)} ${node.label}${group ? ` in ${group}` : ""}`;
|
|
31
|
+
}
|
|
32
|
+
function callsItself(graph, node) {
|
|
33
|
+
return graph.edges.some((edge) => edge.from === node.id && edge.to === node.id);
|
|
34
|
+
}
|
|
35
|
+
function siteKey(site) {
|
|
36
|
+
return `${site.path}:${site.line}:${site.column}`;
|
|
37
|
+
}
|
|
38
|
+
const UIR_KINDS = /* @__PURE__ */ new Map([
|
|
39
|
+
["func", { glyph: "func", words: "function" }],
|
|
40
|
+
["method", { glyph: "method", words: "method" }],
|
|
41
|
+
["builtin", { glyph: "builtin", words: "builtin" }],
|
|
42
|
+
["type", { glyph: "type", words: "type" }],
|
|
43
|
+
["field", { glyph: "field", words: "field" }],
|
|
44
|
+
["var", { glyph: "var", words: "variable" }],
|
|
45
|
+
["const", { glyph: "const", words: "constant" }],
|
|
46
|
+
["package", { glyph: "package", words: "package scope" }]
|
|
47
|
+
]);
|
|
48
|
+
const DATA_KIND_WORDS = {
|
|
49
|
+
table: "table",
|
|
50
|
+
column: "column",
|
|
51
|
+
procedure: "stored procedure",
|
|
52
|
+
entity: "entity",
|
|
53
|
+
field: "field"
|
|
54
|
+
};
|
|
55
|
+
const CALL_GRAPH_DATA_GLYPHS = [
|
|
56
|
+
{ id: "table", name: "table", icon: UiSqlTable },
|
|
57
|
+
{ id: "column", name: "column", icon: UiSqlColumn },
|
|
58
|
+
{ id: "procedure", name: "stored procedure", icon: UiSqlStoredProc },
|
|
59
|
+
{ id: "entity", name: "entity", icon: UiTableProperties },
|
|
60
|
+
{ id: "field", name: "field", icon: UiField }
|
|
61
|
+
];
|
|
62
|
+
function isDataNode(node) {
|
|
63
|
+
return Object.hasOwn(DATA_KIND_WORDS, node.kind);
|
|
64
|
+
}
|
|
65
|
+
function dataName(node) {
|
|
66
|
+
const prefix = `${node.kind}:`;
|
|
67
|
+
return node.id.startsWith(prefix) ? node.id.slice(prefix.length) : node.label;
|
|
68
|
+
}
|
|
69
|
+
function dataNodeStatus(node) {
|
|
70
|
+
const name = dataName(node);
|
|
71
|
+
switch (node.kind) {
|
|
72
|
+
case "table":
|
|
73
|
+
return `Table ${name}`;
|
|
74
|
+
case "column":
|
|
75
|
+
return `Column ${name}`;
|
|
76
|
+
case "procedure":
|
|
77
|
+
return `Stored procedure ${name}`;
|
|
78
|
+
case "entity":
|
|
79
|
+
return `${name} fields`;
|
|
80
|
+
}
|
|
81
|
+
const entity = name.includes(".") ? name.slice(0, name.indexOf(".")) : node.group ?? "";
|
|
82
|
+
const { column, storage } = node.properties ?? {};
|
|
83
|
+
if (column) return `${entity} field → ${column}`;
|
|
84
|
+
if (storage) return `${entity} field, dynamic, stored in ${storage}`;
|
|
85
|
+
return `${entity} field`;
|
|
86
|
+
}
|
|
87
|
+
function dataNodeBacking(node) {
|
|
88
|
+
var _a;
|
|
89
|
+
const column = node.kind === "field" ? (_a = node.properties) == null ? void 0 : _a.column : void 0;
|
|
90
|
+
return column ? { id: `column:${column}`, label: column } : void 0;
|
|
91
|
+
}
|
|
92
|
+
function isBuiltin(node) {
|
|
93
|
+
return node.kind === "builtin";
|
|
94
|
+
}
|
|
95
|
+
function isPackageScope(node) {
|
|
96
|
+
return node.kind === "package";
|
|
97
|
+
}
|
|
98
|
+
function isExternal(node) {
|
|
99
|
+
return !node.location && !node.unresolved && !isBuiltin(node) && !isPackageScope(node) && !isDataNode(node);
|
|
100
|
+
}
|
|
101
|
+
function interfaceMethods(graph) {
|
|
102
|
+
const dispatched = new Set(
|
|
103
|
+
graph.edges.filter((edge) => edge.type === "dispatch").flatMap((edge) => edge.sites.map((site) => `${edge.from} ${siteKey(site)}`))
|
|
104
|
+
);
|
|
105
|
+
return new Set(
|
|
106
|
+
graph.edges.filter((edge) => edge.type === "call" && edge.sites.some((site) => dispatched.has(`${edge.from} ${siteKey(site)}`))).map((edge) => edge.to)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function uirGlyph(graph, node) {
|
|
110
|
+
var _a;
|
|
111
|
+
if (node.unresolved) return "unresolved";
|
|
112
|
+
if (isBuiltin(node)) return "builtin";
|
|
113
|
+
if (isPackageScope(node)) return "package";
|
|
114
|
+
if (isDataNode(node)) return node.kind;
|
|
115
|
+
if (callsItself(graph, node)) return "recursive";
|
|
116
|
+
if (isExternal(node) && node.kind === "func") return "external_func";
|
|
117
|
+
if (interfaceMethods(graph).has(node.id)) return "interface_method";
|
|
118
|
+
return ((_a = UIR_KINDS.get(node.kind)) == null ? void 0 : _a.glyph) ?? "symbol";
|
|
119
|
+
}
|
|
120
|
+
function uirKind(graph, node) {
|
|
121
|
+
var _a;
|
|
122
|
+
if (node.unresolved) return "unresolved call";
|
|
123
|
+
const kind = interfaceMethods(graph).has(node.id) ? "interface method" : ((_a = UIR_KINDS.get(node.kind)) == null ? void 0 : _a.words) ?? DATA_KIND_WORDS[node.kind] ?? node.kind.replaceAll("_", " ");
|
|
124
|
+
return [isExternal(node) ? "external" : "", callsItself(graph, node) ? "recursive" : "", kind].filter(Boolean).join(" ");
|
|
125
|
+
}
|
|
126
|
+
function uirStatus(node) {
|
|
127
|
+
if (node.unresolved) return "Unresolved: the index has no target for this call";
|
|
128
|
+
if (isBuiltin(node)) return "Builtin: no source";
|
|
129
|
+
if (isExternal(node)) return "External: declared outside the indexed snapshots";
|
|
130
|
+
if (node.location) return "Indexed";
|
|
131
|
+
return isDataNode(node) ? dataNodeStatus(node) : "Package scope: calls made outside any declaration";
|
|
132
|
+
}
|
|
133
|
+
const UIR_CALL_GRAPH_VOCABULARY = {
|
|
134
|
+
glyphs: [
|
|
135
|
+
{ id: "func", name: "function", icon: UiFunction },
|
|
136
|
+
{ id: "method", name: "method", icon: UiMethod },
|
|
137
|
+
{ id: "interface_method", name: "interface method", icon: UiInterface },
|
|
138
|
+
{ id: "recursive", name: "calls itself", icon: UiMethod11, darkIcon: UiMethod11Dark },
|
|
139
|
+
{ id: "external_func", name: "external function", icon: UiFunction1, darkIcon: UiFunction1Dark },
|
|
140
|
+
{ id: "builtin", name: "builtin", icon: UiFunctionSquare },
|
|
141
|
+
{ id: "type", name: "type", icon: UiTypeParameter },
|
|
142
|
+
{ id: "field", name: "field", icon: UiField },
|
|
143
|
+
{ id: "var", name: "variable", icon: UiVariable },
|
|
144
|
+
{ id: "const", name: "constant", icon: UiConstant },
|
|
145
|
+
{ id: "package", name: "package scope", icon: UiPackage },
|
|
146
|
+
// uir's `field` is already a glyph of its own: a struct field is data too.
|
|
147
|
+
...CALL_GRAPH_DATA_GLYPHS.filter((glyph) => glyph.id !== "field"),
|
|
148
|
+
{ id: "unresolved", name: "unresolved call", icon: UiUnknown },
|
|
149
|
+
{ id: "symbol", name: "other symbol", icon: UiSymbol, darkIcon: UiSymbolDark }
|
|
150
|
+
],
|
|
151
|
+
glyphOf: uirGlyph,
|
|
152
|
+
kindOf: uirKind,
|
|
153
|
+
hasSource: (node) => Boolean(node.location),
|
|
154
|
+
canRoot: (node) => Boolean(node.location) || isDataNode(node),
|
|
155
|
+
isData: isDataNode,
|
|
156
|
+
muted: (node) => Boolean(node.unresolved) || isBuiltin(node) || isExternal(node),
|
|
157
|
+
status: uirStatus,
|
|
158
|
+
backing: dataNodeBacking,
|
|
159
|
+
group: { noun: "package", plural: "packages", icon: UiPackage, patternHint: "example.com/module/..." }
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
CALL_GRAPH_DATA_GLYPHS,
|
|
163
|
+
DATA_KIND_WORDS,
|
|
164
|
+
UIR_CALL_GRAPH_VOCABULARY,
|
|
165
|
+
callsItself,
|
|
166
|
+
dataNodeBacking,
|
|
167
|
+
dataNodeStatus,
|
|
168
|
+
interfaceMethods,
|
|
169
|
+
isBuiltin,
|
|
170
|
+
isDataNode,
|
|
171
|
+
isExternal,
|
|
172
|
+
nodeTitle,
|
|
173
|
+
requireGlyph,
|
|
174
|
+
siteKey,
|
|
175
|
+
usedGlyphs
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=call-graph-vocabulary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-graph-vocabulary.js","sources":["../../../src/data/call-graph/call-graph-vocabulary.ts"],"sourcesContent":["// What a node kind means and how it is drawn. A host whose source names its own kinds (OIPA's\n// transactions, copybooks and functions) passes its own vocabulary; the default is the one uir's\n// `graph.Build` reports without a Theme: uir node types, a builtin, a package scope and an index\n// location for every node with a source.\nimport {\n UiConstant,\n UiField,\n UiFunction,\n UiFunction1,\n UiFunction1Dark,\n UiFunctionSquare,\n UiInterface,\n UiMethod,\n UiMethod11,\n UiMethod11Dark,\n UiPackage,\n UiSqlColumn,\n UiSqlStoredProc,\n UiSqlTable,\n UiSymbol,\n UiSymbolDark,\n UiTableProperties,\n UiTypeParameter,\n UiUnknown,\n UiVariable,\n type IconComponent,\n} from \"../../icons\";\nimport type { CallGraph, CallGraphNode } from \"./types\";\n\nexport interface CallGraphGlyph {\n id: string;\n /** The legend's name for it. */\n name: string;\n icon: IconComponent;\n /** Drawn instead of `icon` in the dark theme, for coloured artwork. */\n darkIcon?: IconComponent;\n}\n\nexport interface CallGraphVocabulary {\n /** Every glyph the vocabulary draws, in legend order. */\n glyphs: readonly CallGraphGlyph[];\n /** The id of the one glyph a node shows. */\n glyphOf(graph: CallGraph, node: CallGraphNode): string;\n /** What the node is, in words: `method`, `external function`, `copybook`. */\n kindOf(graph: CallGraph, node: CallGraphNode): string;\n /** The node has a body the source walks: it can be expanded and opened. */\n hasSource(node: CallGraphNode): boolean;\n /** The graph can be drawn around the node: Focus is offered for it, with or without a source. */\n canRoot(node: CallGraphNode): boolean;\n /** A table, column, procedure, entity or field: its details count readers and writers. */\n isData(node: CallGraphNode): boolean;\n /** Drawn dimmed: the node leads nowhere further. */\n muted(node: CallGraphNode): boolean;\n /** The node's status line in its details. */\n status(node: CallGraphNode): string;\n /** The node a data node stands for, such as the column behind a field, offered as a Focus link. */\n backing?(node: CallGraphNode): { id: string; label: string } | undefined;\n /** What a group is, and the icon its box caption shows. */\n group: { noun: string; plural: string; icon: IconComponent; patternHint: string };\n}\n\n/** The glyph with that id, failing on one the vocabulary does not list. */\nexport function requireGlyph(vocabulary: CallGraphVocabulary, id: string): CallGraphGlyph {\n const glyph = vocabulary.glyphs.find((candidate) => candidate.id === id);\n if (!glyph) throw new Error(`call graph: the vocabulary has no glyph \"${id}\"`);\n return glyph;\n}\n\n/** The glyphs the graph's nodes use, once each, in legend order. */\nexport function usedGlyphs(graph: CallGraph, vocabulary: CallGraphVocabulary): CallGraphGlyph[] {\n const used = new Set(graph.nodes.map((node) => vocabulary.glyphOf(graph, node)));\n return vocabulary.glyphs.filter((glyph) => used.has(glyph.id));\n}\n\n/** The node's tooltip: its kind, its label and its group's full label. */\nexport function nodeTitle(graph: CallGraph, node: CallGraphNode, vocabulary: CallGraphVocabulary): string {\n const group = graph.groups?.find((candidate) => candidate.id === node.group)?.label ?? node.group;\n return `${vocabulary.kindOf(graph, node)} ${node.label}${group ? ` in ${group}` : \"\"}`;\n}\n\nexport function callsItself(graph: CallGraph, node: CallGraphNode): boolean {\n return graph.edges.some((edge) => edge.from === node.id && edge.to === node.id);\n}\n\nexport function siteKey(site: { path?: string; line?: number; column?: number }): string {\n return `${site.path}:${site.line}:${site.column}`;\n}\n\n// uir node types that have a glyph of their own, and the words for each.\nconst UIR_KINDS = new Map<string, { glyph: string; words: string }>([\n [\"func\", { glyph: \"func\", words: \"function\" }],\n [\"method\", { glyph: \"method\", words: \"method\" }],\n [\"builtin\", { glyph: \"builtin\", words: \"builtin\" }],\n [\"type\", { glyph: \"type\", words: \"type\" }],\n [\"field\", { glyph: \"field\", words: \"field\" }],\n [\"var\", { glyph: \"var\", words: \"variable\" }],\n [\"const\", { glyph: \"const\", words: \"constant\" }],\n [\"package\", { glyph: \"package\", words: \"package scope\" }],\n]);\n\n// Data access, as the graph's data model names it: `table:AsPolicy`, `column:AsPolicy.STATUSCODE`,\n// `procedure:Update_ClassGroup`, `entity:Policy` and `field:Policy.StatusCode`, a field carrying\n// `column` (its `x-oipa-column`) or `storage` (the table a dynamic field is kept in).\n\nexport const DATA_KIND_WORDS: Readonly<Record<string, string>> = {\n table: \"table\",\n column: \"column\",\n procedure: \"stored procedure\",\n entity: \"entity\",\n field: \"field\",\n};\n\nexport const CALL_GRAPH_DATA_GLYPHS: readonly CallGraphGlyph[] = [\n { id: \"table\", name: \"table\", icon: UiSqlTable },\n { id: \"column\", name: \"column\", icon: UiSqlColumn },\n { id: \"procedure\", name: \"stored procedure\", icon: UiSqlStoredProc },\n { id: \"entity\", name: \"entity\", icon: UiTableProperties },\n { id: \"field\", name: \"field\", icon: UiField },\n];\n\nexport function isDataNode(node: CallGraphNode): boolean {\n return Object.hasOwn(DATA_KIND_WORDS, node.kind);\n}\n\n/** The data node's name: its id after `<kind>:`, else its label. */\nfunction dataName(node: CallGraphNode): string {\n const prefix = `${node.kind}:`;\n return node.id.startsWith(prefix) ? node.id.slice(prefix.length) : node.label;\n}\n\nexport function dataNodeStatus(node: CallGraphNode): string {\n const name = dataName(node);\n switch (node.kind) {\n case \"table\": return `Table ${name}`;\n case \"column\": return `Column ${name}`;\n case \"procedure\": return `Stored procedure ${name}`;\n case \"entity\": return `${name} fields`;\n }\n const entity = name.includes(\".\") ? name.slice(0, name.indexOf(\".\")) : (node.group ?? \"\");\n const { column, storage } = node.properties ?? {};\n if (column) return `${entity} field → ${column}`;\n if (storage) return `${entity} field, dynamic, stored in ${storage}`;\n return `${entity} field`;\n}\n\n/** The column behind a field, by its `column` property. */\nexport function dataNodeBacking(node: CallGraphNode): { id: string; label: string } | undefined {\n const column = node.kind === \"field\" ? node.properties?.column : undefined;\n return column ? { id: `column:${column}`, label: column } : undefined;\n}\n\nexport function isBuiltin(node: CallGraphNode): boolean {\n return node.kind === \"builtin\";\n}\n\n/** The node standing for the calls a package makes outside any declaration. */\nfunction isPackageScope(node: CallGraphNode): boolean {\n return node.kind === \"package\";\n}\n\n/** A symbol declared outside the indexed snapshots: it has no source, so it cannot be opened or expanded. */\nexport function isExternal(node: CallGraphNode): boolean {\n return !node.location && !node.unresolved && !isBuiltin(node) && !isPackageScope(node) && !isDataNode(node);\n}\n\n/**\n * The index has no kind for an interface method: it is a `method`. It shows in the graph as the target\n * of a call whose site also carries a dispatch edge from the same caller, because the source adds that\n * dispatch edge to each implementation of the interface method called there.\n */\nexport function interfaceMethods(graph: CallGraph): Set<string> {\n const dispatched = new Set(\n graph.edges.filter((edge) => edge.type === \"dispatch\").flatMap((edge) => edge.sites.map((site) => `${edge.from} ${siteKey(site)}`)),\n );\n return new Set(\n graph.edges\n .filter((edge) => edge.type === \"call\" && edge.sites.some((site) => dispatched.has(`${edge.from} ${siteKey(site)}`)))\n .map((edge) => edge.to),\n );\n}\n\n/**\n * The one glyph a node shows. An unresolved call, a builtin and a package scope are what they are;\n * after those, a symbol that calls itself, an external function and an interface method outrank the\n * plain kind. An external method keeps the method glyph: its dimmed box already says it has no source.\n */\nfunction uirGlyph(graph: CallGraph, node: CallGraphNode): string {\n if (node.unresolved) return \"unresolved\";\n if (isBuiltin(node)) return \"builtin\";\n if (isPackageScope(node)) return \"package\";\n if (isDataNode(node)) return node.kind;\n if (callsItself(graph, node)) return \"recursive\";\n if (isExternal(node) && node.kind === \"func\") return \"external_func\";\n if (interfaceMethods(graph).has(node.id)) return \"interface_method\";\n return UIR_KINDS.get(node.kind)?.glyph ?? \"symbol\";\n}\n\nfunction uirKind(graph: CallGraph, node: CallGraphNode): string {\n if (node.unresolved) return \"unresolved call\";\n const kind = interfaceMethods(graph).has(node.id) ? \"interface method\" : (UIR_KINDS.get(node.kind)?.words ?? DATA_KIND_WORDS[node.kind] ?? node.kind.replaceAll(\"_\", \" \"));\n return [isExternal(node) ? \"external\" : \"\", callsItself(graph, node) ? \"recursive\" : \"\", kind].filter(Boolean).join(\" \");\n}\n\nfunction uirStatus(node: CallGraphNode): string {\n if (node.unresolved) return \"Unresolved: the index has no target for this call\";\n if (isBuiltin(node)) return \"Builtin: no source\";\n if (isExternal(node)) return \"External: declared outside the indexed snapshots\";\n if (node.location) return \"Indexed\";\n return isDataNode(node) ? dataNodeStatus(node) : \"Package scope: calls made outside any declaration\";\n}\n\nexport const UIR_CALL_GRAPH_VOCABULARY: CallGraphVocabulary = {\n glyphs: [\n { id: \"func\", name: \"function\", icon: UiFunction },\n { id: \"method\", name: \"method\", icon: UiMethod },\n { id: \"interface_method\", name: \"interface method\", icon: UiInterface },\n { id: \"recursive\", name: \"calls itself\", icon: UiMethod11, darkIcon: UiMethod11Dark },\n { id: \"external_func\", name: \"external function\", icon: UiFunction1, darkIcon: UiFunction1Dark },\n { id: \"builtin\", name: \"builtin\", icon: UiFunctionSquare },\n { id: \"type\", name: \"type\", icon: UiTypeParameter },\n { id: \"field\", name: \"field\", icon: UiField },\n { id: \"var\", name: \"variable\", icon: UiVariable },\n { id: \"const\", name: \"constant\", icon: UiConstant },\n { id: \"package\", name: \"package scope\", icon: UiPackage },\n // uir's `field` is already a glyph of its own: a struct field is data too.\n ...CALL_GRAPH_DATA_GLYPHS.filter((glyph) => glyph.id !== \"field\"),\n { id: \"unresolved\", name: \"unresolved call\", icon: UiUnknown },\n { id: \"symbol\", name: \"other symbol\", icon: UiSymbol, darkIcon: UiSymbolDark },\n ],\n glyphOf: uirGlyph,\n kindOf: uirKind,\n hasSource: (node) => Boolean(node.location),\n canRoot: (node) => Boolean(node.location) || isDataNode(node),\n isData: isDataNode,\n muted: (node) => Boolean(node.unresolved) || isBuiltin(node) || isExternal(node),\n status: uirStatus,\n backing: dataNodeBacking,\n group: { noun: \"package\", plural: \"packages\", icon: UiPackage, patternHint: \"example.com/module/...\" },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8DO,SAAS,aAAa,YAAiC,IAA4B;AACxF,QAAM,QAAQ,WAAW,OAAO,KAAK,CAAC,cAAc,UAAU,OAAO,EAAE;AACvE,MAAI,CAAC,MAAO,OAAM,IAAI,MAAM,4CAA4C,EAAE,GA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A,IACvC,EAAE,IAAI,WAAW,MAAM,iBAAiB,MAAM,UAAA;AAAA;AAAA,IAE9C,GAAG,uBAAuB,OAAO,CAAC,UAAU,MAAM,OAAO,OAAO;AAAA,IAChE,EAAE,IAAI,cAAc,MAAM,mBAAmB,MAAM,UAAA;AAAA,IACnD,EAAE,IAAI,UAAU,MAAM,gBAAgB,MAAM,UAAU,UAAU,aAAA;AAAA,EAAa;AAAA,EAE/E,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW,CAAC,SAAS,QAAQ,KAAK,QAAQ;AAAA,EAC1C,SAAS,CAAC,SAAS,QAAQ,KAAK,QAAQ,KAAK,WAAW,IAAI;AAAA,EAC5D,QAAQ;AAAA,EACR,OAAO,CAAC,SAAS,QAAQ,KAAK,UAAU,KAAK,UAAU,IAAI,KAAK,WAAW,IAAI;AAAA,EAC/E,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO,EAAE,MAAM,WAAW,QAAQ,YAAY,MAAM,WAAW,aAAa,yBAAA;AAC9E;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CallGraphVocabulary } from './call-graph-vocabulary.js';
|
|
2
|
+
import { CallGraph, CallGraphAccess, CallGraphGroupFact, CallGraphSite } from './types.js';
|
|
3
|
+
/** A uir response: the graph plus the package facts and effective exclusions it reports. */
|
|
4
|
+
export type GoGraph = CallGraph & {
|
|
5
|
+
exclude: string[];
|
|
6
|
+
packages: CallGraphGroupFact[];
|
|
7
|
+
};
|
|
8
|
+
export declare const GO_DEFAULT_EXCLUDE: string[];
|
|
9
|
+
export declare const GO_ROOT: string;
|
|
10
|
+
export declare const GO_EXPANDABLE: {
|
|
11
|
+
id: string;
|
|
12
|
+
type: string;
|
|
13
|
+
method: string;
|
|
14
|
+
path: string;
|
|
15
|
+
line: number;
|
|
16
|
+
depth: number;
|
|
17
|
+
in: number;
|
|
18
|
+
out: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function goGraph(exclude?: string[]): GoGraph;
|
|
21
|
+
/** One hop of callees around moduleScopes: rooted at it, so its depths count from it. */
|
|
22
|
+
export declare function goModuleScopesExpansion(exclude?: string[]): GoGraph;
|
|
23
|
+
export declare const OIPA_IDS: {
|
|
24
|
+
readonly transaction: "transaction:6A1F0C52-0000-4000-8000-000000000001";
|
|
25
|
+
readonly packet: "business-rule:6A1F0C52-0000-4000-8000-000000000002";
|
|
26
|
+
readonly premium: "business-rule:6A1F0C52-0000-4000-8000-000000000003";
|
|
27
|
+
readonly planCopybook: "business-rule:6A1F0C52-0000-4000-8000-000000000004";
|
|
28
|
+
readonly productCopybook: "business-rule:6A1F0C52-0000-4000-8000-000000000005";
|
|
29
|
+
readonly unresolved: "unresolved:function:LegacyRates";
|
|
30
|
+
readonly formatAmount: "business-rule:6A1F0C52-0000-4000-8000-000000000006";
|
|
31
|
+
readonly lookupRate: "business-rule:6A1F0C52-0000-4000-8000-000000000007";
|
|
32
|
+
};
|
|
33
|
+
/** A graph as oipa-cli serves it without guards: those are fetched for the selected edge only. */
|
|
34
|
+
export declare function oipaGraph(): CallGraph;
|
|
35
|
+
/** One hop of callees around the plan copybook. */
|
|
36
|
+
export declare function oipaPlanCopybookExpansion(): CallGraph;
|
|
37
|
+
/** How a host names OIPA's kinds: every resolved node has a body to walk, located or not. */
|
|
38
|
+
export declare const OIPA_VOCABULARY: CallGraphVocabulary;
|
|
39
|
+
export declare const DATA_IDS: {
|
|
40
|
+
readonly install: "transaction:6A1F0C52-0000-4000-8000-000000000001";
|
|
41
|
+
readonly packet: "business-rule:6A1F0C52-0000-4000-8000-000000000002";
|
|
42
|
+
readonly proc: "procedure:Update_ClassGroup";
|
|
43
|
+
readonly policyStatus: "field:Policy.PolicyStatus";
|
|
44
|
+
readonly planGuid: "column:AsPolicy.PLANGUID";
|
|
45
|
+
readonly statusCode: "column:AsPolicy.STATUSCODE";
|
|
46
|
+
readonly classGroupStatus: "column:AsClassGroup.STATUSCODE";
|
|
47
|
+
readonly schemeNumber: "field:Policy.SchemeNumber";
|
|
48
|
+
readonly activity: "table:AsActivity";
|
|
49
|
+
readonly client: "table:AsClient";
|
|
50
|
+
};
|
|
51
|
+
/** The AsClient columns one SQL math variable reads: more than an edge shows as chips at first. */
|
|
52
|
+
export declare const DATA_CLIENT_COLUMNS: string[];
|
|
53
|
+
/**
|
|
54
|
+
* SchemeInstall's data access as a host serves it: collapsed into tables and entities unless `columns`,
|
|
55
|
+
* and only the edge types `access` asks for. The totals count the edges the filter keeps.
|
|
56
|
+
*/
|
|
57
|
+
export declare function oipaDataGraph({ access, columns }: {
|
|
58
|
+
access: readonly CallGraphAccess[];
|
|
59
|
+
columns: boolean;
|
|
60
|
+
}): CallGraph;
|
|
61
|
+
/** The guards oipa-cli computes on request, per edge: one site is guarded by its packet `Rule IF=`. */
|
|
62
|
+
export declare const OIPA_GUARDS: Record<string, CallGraphSite[]>;
|
|
63
|
+
//# sourceMappingURL=call-graph.fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-graph.fixtures.d.ts","sourceRoot":"","sources":["../../../src/data/call-graph/call-graph.fixtures.ts"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAiB,kBAAkB,EAAiB,aAAa,EAAE,MAAM,SAAS,CAAC;AAqC3H,4FAA4F;AAC5F,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,kBAAkB,EAAE,CAAA;CAAE,CAAC;AAExF,eAAO,MAAM,kBAAkB,UAAoC,CAAC;AACpE,eAAO,MAAM,OAAO,QAAyB,CAAC;AAC9C,eAAO,MAAM,aAAa;;;;;;;;;CAA2B,CAAC;AAEtD,wBAAgB,OAAO,CAAC,OAAO,GAAE,MAAM,EAAuB,GAAG,OAAO,CAwBvE;AAED,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,MAAM,EAAuB,GAAG,OAAO,CAgBvF;AAiBD,eAAO,MAAM,QAAQ;;;;;;;;;CASX,CAAC;AAKX,kGAAkG;AAClG,wBAAgB,SAAS,IAAI,SAAS,CAqBrC;AAED,mDAAmD;AACnD,wBAAgB,yBAAyB,IAAI,SAAS,CAerD;AAUD,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,mBA0B7B,CAAC;AAIF,eAAO,MAAM,QAAQ;;;;;;;;;;;CAWX,CAAC;AAEX,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,UAAoI,CAAC;AA0CrK;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAuBtH;AAED,uGAAuG;AACvG,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAEvD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CallGraph, type CallGraphProps } from './CallGraph.js';
|
|
2
|
+
export { CALL_GRAPH_ACCESS } from './types.js';
|
|
3
|
+
export type { CallGraph as CallGraphData, CallGraphAccess, CallGraphDirection, CallGraphEdge, CallGraphEdgeLabels, CallGraphEdgeType, CallGraphFetchParams, CallGraphGroup, CallGraphGroupFact, CallGraphIdentifier, CallGraphLocation, CallGraphNode, CallGraphOmitted, CallGraphSelection, CallGraphSite, } from './types.js';
|
|
4
|
+
export { CALL_GRAPH_DATA_GLYPHS, callsItself, DATA_KIND_WORDS as CALL_GRAPH_DATA_KIND_WORDS, dataNodeBacking, dataNodeStatus, interfaceMethods, isDataNode, UIR_CALL_GRAPH_VOCABULARY, type CallGraphGlyph, type CallGraphVocabulary, } from './call-graph-vocabulary.js';
|
|
5
|
+
export { callGraphGroupFacts, EXCLUDE_EXTERNAL as CALL_GRAPH_EXCLUDE_EXTERNAL, formatExclude as formatCallGraphExclude, matchesExclude as matchesCallGraphExclude, parseExclude as parseCallGraphExclude, type ExcludeMatcher as CallGraphExcludeMatcher, } from './call-graph-exclude.js';
|
|
6
|
+
export { CALL_GRAPH_DEFAULT_DEPTH, CALL_GRAPH_MAX_DEPTH, mergeGraph as mergeCallGraph, toggleAccess as toggleCallGraphAccess, } from './call-graph-model.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/call-graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EACV,SAAS,IAAI,aAAa,EAC1B,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,eAAe,IAAI,0BAA0B,EAC7C,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,IAAI,2BAA2B,EAC/C,aAAa,IAAI,sBAAsB,EACvC,cAAc,IAAI,uBAAuB,EACzC,YAAY,IAAI,qBAAqB,EACrC,KAAK,cAAc,IAAI,uBAAuB,GAC/C,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,UAAU,IAAI,cAAc,EAC5B,YAAY,IAAI,qBAAqB,GACtC,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../src/data/call-graph/types.ts"],"sourcesContent":["// The call graph as uir's `graph.Graph` serialises it (github.com/flanksource/uir/graph, model.go). The\n// field names are its JSON tags, so a host hands a response straight in. Nothing here is specific to a\n// language: what a node kind means and how it is drawn comes from a CallGraphVocabulary.\n\n/** Which side of the root a graph walks. */\nexport type CallGraphDirection = \"callees\" | \"callers\" | \"both\";\n\n/** A call site behind an edge. `guards` are the conditions that must hold to reach it, outermost first. */\nexport interface CallGraphSite {\n path?: string;\n line?: number;\n column?: number;\n /** The call as written. */\n text?: string;\n guards?: string[];\n}\n\n/** uir.Identifier: where a node sits in a module, package, type and method. */\nexport interface CallGraphIdentifier {\n id?: string;\n module?: string;\n package?: string;\n type?: string;\n method?: string;\n field?: string;\n signature?: string;\n node_type?: string;\n}\n\n/** Where a node is declared, in the terms an index addresses it by. */\nexport interface CallGraphLocation {\n root_key?: string;\n checkout_path?: string;\n snapshot_id?: string;\n source_id?: string;\n path?: string;\n identity_key?: string;\n line?: number;\n column?: number;\n}\n\nexport interface CallGraphNode {\n id: string;\n identifier: CallGraphIdentifier;\n kind: string;\n label: string;\n /** A `CallGraphGroup` id. */\n group?: string;\n /** 0 for a root, negative for its callers and positive for its callees. */\n depth: number;\n /** Incoming edges: a total on the side the walk asked about, else the edges drawn. */\n in: number;\n /** Outgoing edges: a total on the side the walk asked about, else the edges drawn. */\n out: number;\n /** A target the source could not place; drawn as a leaf. */\n unresolved?: boolean;\n location?: CallGraphLocation;\n tone?: string;\n icon?: string;\n properties?: Record<string, string>;\n}\n\n/** A call, a call one of several targets is chosen for at run time, or a read or write of data. */\nexport type CallGraphEdgeType = \"call\" | \"dispatch\" | \"read\" | \"write\";\n\n/** What `fetchGraph` asks the graph to follow: `call` covers dispatch too. */\nexport type CallGraphAccess = \"call\" | \"read\" | \"write\";\n\nexport const CALL_GRAPH_ACCESS: readonly CallGraphAccess[] = [\"call\", \"read\", \"write\"];\n\nexport interface CallGraphEdge {\n /** `from|to|type`. */\n id: string;\n from: string;\n to: string;\n type: CallGraphEdgeType;\n /** The construct behind the edge, such as `copybook`, `attached`, `sql` or `copyto`. */\n kind?: string;\n sites: CallGraphSite[];\n /**\n * Facts about the edge, such as the plans that select a dispatch target, or `columns`/`fields`: the\n * members a read or write of a collapsed table or entity touches, comma separated.\n */\n properties?: Record<string, string>;\n}\n\nexport interface CallGraphGroup {\n id: string;\n label: string;\n parent?: string;\n}\n\n/** What the graph leaves out. */\nexport interface CallGraphOmitted {\n node_limit?: boolean;\n beyond_depth?: number;\n unresolved?: number;\n unreadable_source?: string[];\n /** Distinct nodes the exclusions left out, per group. */\n excluded?: Record<string, number>;\n}\n\nexport interface CallGraph {\n roots: string[];\n nodes: CallGraphNode[];\n edges: CallGraphEdge[];\n groups?: CallGraphGroup[];\n omitted: CallGraphOmitted;\n}\n\n/** What `fetchGraph` is asked for. `exclude` undefined takes the host's defaults; `[]` excludes nothing. */\nexport interface CallGraphFetchParams {\n root: string;\n direction: CallGraphDirection;\n depth: number;\n exclude: string[] | undefined;\n /** The edge types to follow, never empty. Filtered by the host, so the `+N` counts agree. */\n access: CallGraphAccess[];\n /** Columns and fields as nodes of their own, rather than collapsed into their table or entity. */\n columns: boolean;\n /** `load` draws the graph around `root`; `expand` loads one more hop around a drawn node, to merge in. */\n purpose: \"load\" | \"expand\";\n signal: AbortSignal;\n}\n\n/** A group the graph reached, drawn or excluded; `nodes` counts both. */\nexport interface CallGraphGroupFact {\n name: string;\n /** Shown instead of `name`. */\n label?: string;\n /** Outside the indexed scope: \"Hide all external\" covers it. */\n external?: boolean;\n nodes: number;\n excluded: boolean;\n}\n\nexport interface CallGraphSelection {\n kind: \"node\" | \"edge\";\n id: string;\n}\n\n/** The guards fetched for a selected edge whose response came without them. */\nexport type SiteGuardsState = { status: \"loading\" } | { status: \"loaded\"; sites: CallGraphSite[] } | { status: \"failed\"; error: string };\n\n/** The words an edge's type is drawn with: its pill's accessible name, its tooltip and its legend entry. */\nexport type CallGraphEdgeLabels = Record<CallGraphEdgeType, string>;\n"],"names":[],"mappings":";;AAoEO,MAAM,oBAAgD,CAAC,QAAQ,QAAQ,OAAO;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/** Which side of the root a graph walks. */
|
|
2
|
+
export type CallGraphDirection = "callees" | "callers" | "both";
|
|
3
|
+
/** A call site behind an edge. `guards` are the conditions that must hold to reach it, outermost first. */
|
|
4
|
+
export interface CallGraphSite {
|
|
5
|
+
path?: string;
|
|
6
|
+
line?: number;
|
|
7
|
+
column?: number;
|
|
8
|
+
/** The call as written. */
|
|
9
|
+
text?: string;
|
|
10
|
+
guards?: string[];
|
|
11
|
+
}
|
|
12
|
+
/** uir.Identifier: where a node sits in a module, package, type and method. */
|
|
13
|
+
export interface CallGraphIdentifier {
|
|
14
|
+
id?: string;
|
|
15
|
+
module?: string;
|
|
16
|
+
package?: string;
|
|
17
|
+
type?: string;
|
|
18
|
+
method?: string;
|
|
19
|
+
field?: string;
|
|
20
|
+
signature?: string;
|
|
21
|
+
node_type?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Where a node is declared, in the terms an index addresses it by. */
|
|
24
|
+
export interface CallGraphLocation {
|
|
25
|
+
root_key?: string;
|
|
26
|
+
checkout_path?: string;
|
|
27
|
+
snapshot_id?: string;
|
|
28
|
+
source_id?: string;
|
|
29
|
+
path?: string;
|
|
30
|
+
identity_key?: string;
|
|
31
|
+
line?: number;
|
|
32
|
+
column?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface CallGraphNode {
|
|
35
|
+
id: string;
|
|
36
|
+
identifier: CallGraphIdentifier;
|
|
37
|
+
kind: string;
|
|
38
|
+
label: string;
|
|
39
|
+
/** A `CallGraphGroup` id. */
|
|
40
|
+
group?: string;
|
|
41
|
+
/** 0 for a root, negative for its callers and positive for its callees. */
|
|
42
|
+
depth: number;
|
|
43
|
+
/** Incoming edges: a total on the side the walk asked about, else the edges drawn. */
|
|
44
|
+
in: number;
|
|
45
|
+
/** Outgoing edges: a total on the side the walk asked about, else the edges drawn. */
|
|
46
|
+
out: number;
|
|
47
|
+
/** A target the source could not place; drawn as a leaf. */
|
|
48
|
+
unresolved?: boolean;
|
|
49
|
+
location?: CallGraphLocation;
|
|
50
|
+
tone?: string;
|
|
51
|
+
icon?: string;
|
|
52
|
+
properties?: Record<string, string>;
|
|
53
|
+
}
|
|
54
|
+
/** A call, a call one of several targets is chosen for at run time, or a read or write of data. */
|
|
55
|
+
export type CallGraphEdgeType = "call" | "dispatch" | "read" | "write";
|
|
56
|
+
/** What `fetchGraph` asks the graph to follow: `call` covers dispatch too. */
|
|
57
|
+
export type CallGraphAccess = "call" | "read" | "write";
|
|
58
|
+
export declare const CALL_GRAPH_ACCESS: readonly CallGraphAccess[];
|
|
59
|
+
export interface CallGraphEdge {
|
|
60
|
+
/** `from|to|type`. */
|
|
61
|
+
id: string;
|
|
62
|
+
from: string;
|
|
63
|
+
to: string;
|
|
64
|
+
type: CallGraphEdgeType;
|
|
65
|
+
/** The construct behind the edge, such as `copybook`, `attached`, `sql` or `copyto`. */
|
|
66
|
+
kind?: string;
|
|
67
|
+
sites: CallGraphSite[];
|
|
68
|
+
/**
|
|
69
|
+
* Facts about the edge, such as the plans that select a dispatch target, or `columns`/`fields`: the
|
|
70
|
+
* members a read or write of a collapsed table or entity touches, comma separated.
|
|
71
|
+
*/
|
|
72
|
+
properties?: Record<string, string>;
|
|
73
|
+
}
|
|
74
|
+
export interface CallGraphGroup {
|
|
75
|
+
id: string;
|
|
76
|
+
label: string;
|
|
77
|
+
parent?: string;
|
|
78
|
+
}
|
|
79
|
+
/** What the graph leaves out. */
|
|
80
|
+
export interface CallGraphOmitted {
|
|
81
|
+
node_limit?: boolean;
|
|
82
|
+
beyond_depth?: number;
|
|
83
|
+
unresolved?: number;
|
|
84
|
+
unreadable_source?: string[];
|
|
85
|
+
/** Distinct nodes the exclusions left out, per group. */
|
|
86
|
+
excluded?: Record<string, number>;
|
|
87
|
+
}
|
|
88
|
+
export interface CallGraph {
|
|
89
|
+
roots: string[];
|
|
90
|
+
nodes: CallGraphNode[];
|
|
91
|
+
edges: CallGraphEdge[];
|
|
92
|
+
groups?: CallGraphGroup[];
|
|
93
|
+
omitted: CallGraphOmitted;
|
|
94
|
+
}
|
|
95
|
+
/** What `fetchGraph` is asked for. `exclude` undefined takes the host's defaults; `[]` excludes nothing. */
|
|
96
|
+
export interface CallGraphFetchParams {
|
|
97
|
+
root: string;
|
|
98
|
+
direction: CallGraphDirection;
|
|
99
|
+
depth: number;
|
|
100
|
+
exclude: string[] | undefined;
|
|
101
|
+
/** The edge types to follow, never empty. Filtered by the host, so the `+N` counts agree. */
|
|
102
|
+
access: CallGraphAccess[];
|
|
103
|
+
/** Columns and fields as nodes of their own, rather than collapsed into their table or entity. */
|
|
104
|
+
columns: boolean;
|
|
105
|
+
/** `load` draws the graph around `root`; `expand` loads one more hop around a drawn node, to merge in. */
|
|
106
|
+
purpose: "load" | "expand";
|
|
107
|
+
signal: AbortSignal;
|
|
108
|
+
}
|
|
109
|
+
/** A group the graph reached, drawn or excluded; `nodes` counts both. */
|
|
110
|
+
export interface CallGraphGroupFact {
|
|
111
|
+
name: string;
|
|
112
|
+
/** Shown instead of `name`. */
|
|
113
|
+
label?: string;
|
|
114
|
+
/** Outside the indexed scope: "Hide all external" covers it. */
|
|
115
|
+
external?: boolean;
|
|
116
|
+
nodes: number;
|
|
117
|
+
excluded: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface CallGraphSelection {
|
|
120
|
+
kind: "node" | "edge";
|
|
121
|
+
id: string;
|
|
122
|
+
}
|
|
123
|
+
/** The guards fetched for a selected edge whose response came without them. */
|
|
124
|
+
export type SiteGuardsState = {
|
|
125
|
+
status: "loading";
|
|
126
|
+
} | {
|
|
127
|
+
status: "loaded";
|
|
128
|
+
sites: CallGraphSite[];
|
|
129
|
+
} | {
|
|
130
|
+
status: "failed";
|
|
131
|
+
error: string;
|
|
132
|
+
};
|
|
133
|
+
/** The words an edge's type is drawn with: its pill's accessible name, its tooltip and its legend entry. */
|
|
134
|
+
export type CallGraphEdgeLabels = Record<CallGraphEdgeType, string>;
|
|
135
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data/call-graph/types.ts"],"names":[],"mappings":"AAIA,4CAA4C;AAC5C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhE,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,C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B;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,+EAA+E;AAC/E,MAAM,MAAM,eAAe,GAAG;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzI,4GAA4G;AAC5G,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/data/call-graph/types.ts"],"sourcesContent":["// The call graph as uir's `graph.Graph` serialises it (github.com/flanksource/uir/graph, model.go). The\n// field names are its JSON tags, so a host hands a response straight in. Nothing here is specific to a\n// language: what a node kind means and how it is drawn comes from a CallGraphVocabulary.\n\n/** Which side of the root a graph walks. */\nexport type CallGraphDirection = \"callees\" | \"callers\" | \"both\";\n\n/** A call site behind an edge. `guards` are the conditions that must hold to reach it, outermost first. */\nexport interface CallGraphSite {\n path?: string;\n line?: number;\n column?: number;\n /** The call as written. */\n text?: string;\n guards?: string[];\n}\n\n/** uir.Identifier: where a node sits in a module, package, type and method. */\nexport interface CallGraphIdentifier {\n id?: string;\n module?: string;\n package?: string;\n type?: string;\n method?: string;\n field?: string;\n signature?: string;\n node_type?: string;\n}\n\n/** Where a node is declared, in the terms an index addresses it by. */\nexport interface CallGraphLocation {\n root_key?: string;\n checkout_path?: string;\n snapshot_id?: string;\n source_id?: string;\n path?: string;\n identity_key?: string;\n line?: number;\n column?: number;\n}\n\nexport interface CallGraphNode {\n id: string;\n identifier: CallGraphIdentifier;\n kind: string;\n label: string;\n /** A `CallGraphGroup` id. */\n group?: string;\n /** 0 for a root, negative for its callers and positive for its callees. */\n depth: number;\n /** Incoming edges: a total on the side the walk asked about, else the edges drawn. */\n in: number;\n /** Outgoing edges: a total on the side the walk asked about, else the edges drawn. */\n out: number;\n /** A target the source could not place; drawn as a leaf. */\n unresolved?: boolean;\n location?: CallGraphLocation;\n tone?: string;\n icon?: string;\n properties?: Record<string, string>;\n}\n\n/** A call, a call one of several targets is chosen for at run time, or a read or write of data. */\nexport type CallGraphEdgeType = \"call\" | \"dispatch\" | \"read\" | \"write\";\n\n/** What `fetchGraph` asks the graph to follow: `call` covers dispatch too. */\nexport type CallGraphAccess = \"call\" | \"read\" | \"write\";\n\nexport const CALL_GRAPH_ACCESS: readonly CallGraphAccess[] = [\"call\", \"read\", \"write\"];\n\nexport interface CallGraphEdge {\n /** `from|to|type`. */\n id: string;\n from: string;\n to: string;\n type: CallGraphEdgeType;\n /** The construct behind the edge, such as `copybook`, `attached`, `sql` or `copyto`. */\n kind?: string;\n sites: CallGraphSite[];\n /**\n * Facts about the edge, such as the plans that select a dispatch target, or `columns`/`fields`: the\n * members a read or write of a collapsed table or entity touches, comma separated.\n */\n properties?: Record<string, string>;\n}\n\nexport interface CallGraphGroup {\n id: string;\n label: string;\n parent?: string;\n}\n\n/** What the graph leaves out. */\nexport interface CallGraphOmitted {\n node_limit?: boolean;\n beyond_depth?: number;\n unresolved?: number;\n unreadable_source?: string[];\n /** Distinct nodes the exclusions left out, per group. */\n excluded?: Record<string, number>;\n}\n\nexport interface CallGraph {\n roots: string[];\n nodes: CallGraphNode[];\n edges: CallGraphEdge[];\n groups?: CallGraphGroup[];\n omitted: CallGraphOmitted;\n}\n\n/** What `fetchGraph` is asked for. `exclude` undefined takes the host's defaults; `[]` excludes nothing. */\nexport interface CallGraphFetchParams {\n root: string;\n direction: CallGraphDirection;\n depth: number;\n exclude: string[] | undefined;\n /** The edge types to follow, never empty. Filtered by the host, so the `+N` counts agree. */\n access: CallGraphAccess[];\n /** Columns and fields as nodes of their own, rather than collapsed into their table or entity. */\n columns: boolean;\n /** `load` draws the graph around `root`; `expand` loads one more hop around a drawn node, to merge in. */\n purpose: \"load\" | \"expand\";\n signal: AbortSignal;\n}\n\n/** A group the graph reached, drawn or excluded; `nodes` counts both. */\nexport interface CallGraphGroupFact {\n name: string;\n /** Shown instead of `name`. */\n label?: string;\n /** Outside the indexed scope: \"Hide all external\" covers it. */\n external?: boolean;\n nodes: number;\n excluded: boolean;\n}\n\nexport interface CallGraphSelection {\n kind: \"node\" | \"edge\";\n id: string;\n}\n\n/** The guards fetched for a selected edge whose response came without them. */\nexport type SiteGuardsState = { status: \"loading\" } | { status: \"loaded\"; sites: CallGraphSite[] } | { status: \"failed\"; error: string };\n\n/** The words an edge's type is drawn with: its pill's accessible name, its tooltip and its legend entry. */\nexport type CallGraphEdgeLabels = Record<CallGraphEdgeType, string>;\n"],"names":[],"mappings":"AAoEO,MAAM,oBAAgD,CAAC,QAAQ,QAAQ,OAAO;"}
|