@flanksource/clicky-ui 0.3.55 → 0.3.56
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/NOTICE.md +6 -0
- package/dist/ai.cjs +6 -0
- package/dist/ai.js +3 -1
- package/dist/chat.cjs +2 -0
- package/dist/chat.d.ts +1 -0
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +2 -1
- package/dist/comments/CommentCard.cjs +37 -7
- package/dist/comments/CommentCard.cjs.map +1 -1
- package/dist/comments/CommentCard.d.ts +11 -1
- package/dist/comments/CommentCard.d.ts.map +1 -1
- package/dist/comments/CommentCard.js +37 -7
- package/dist/comments/CommentCard.js.map +1 -1
- package/dist/comments/CommentCardParts.cjs +9 -4
- package/dist/comments/CommentCardParts.cjs.map +1 -1
- package/dist/comments/CommentCardParts.d.ts.map +1 -1
- package/dist/comments/CommentCardParts.js +9 -4
- package/dist/comments/CommentCardParts.js.map +1 -1
- package/dist/comments/CommentComposer.cjs +8 -8
- package/dist/comments/CommentComposer.cjs.map +1 -1
- package/dist/comments/CommentComposer.d.ts.map +1 -1
- package/dist/comments/CommentComposer.js +8 -8
- package/dist/comments/CommentComposer.js.map +1 -1
- package/dist/comments/CommentProvider.cjs +5 -1
- package/dist/comments/CommentProvider.cjs.map +1 -1
- package/dist/comments/CommentProvider.d.ts +1 -1
- package/dist/comments/CommentProvider.d.ts.map +1 -1
- package/dist/comments/CommentProvider.js +5 -1
- package/dist/comments/CommentProvider.js.map +1 -1
- package/dist/comments/CommentSidePanel.cjs +17 -11
- package/dist/comments/CommentSidePanel.cjs.map +1 -1
- package/dist/comments/CommentSidePanel.d.ts +6 -0
- package/dist/comments/CommentSidePanel.d.ts.map +1 -1
- package/dist/comments/CommentSidePanel.js +17 -11
- package/dist/comments/CommentSidePanel.js.map +1 -1
- package/dist/comments/CommentThread.cjs +4 -1
- package/dist/comments/CommentThread.cjs.map +1 -1
- package/dist/comments/CommentThread.d.ts +4 -1
- package/dist/comments/CommentThread.d.ts.map +1 -1
- package/dist/comments/CommentThread.js +4 -1
- package/dist/comments/CommentThread.js.map +1 -1
- package/dist/comments/CommentThreadList.cjs +6 -3
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts +7 -2
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +6 -3
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/comments/MentionTextarea.cjs +1 -1
- package/dist/comments/MentionTextarea.cjs.map +1 -1
- package/dist/comments/MentionTextarea.d.ts.map +1 -1
- package/dist/comments/MentionTextarea.js +1 -1
- package/dist/comments/MentionTextarea.js.map +1 -1
- package/dist/comments/comment-assign.cjs +68 -0
- package/dist/comments/comment-assign.cjs.map +1 -0
- package/dist/comments/comment-assign.d.ts +31 -0
- package/dist/comments/comment-assign.d.ts.map +1 -0
- package/dist/comments/comment-assign.js +67 -0
- package/dist/comments/comment-assign.js.map +1 -0
- package/dist/comments/comment-types.cjs.map +1 -1
- package/dist/comments/comment-types.d.ts +39 -0
- package/dist/comments/comment-types.d.ts.map +1 -1
- package/dist/comments/comment-types.js.map +1 -1
- package/dist/comments/comment-utils.cjs +2 -0
- package/dist/comments/comment-utils.cjs.map +1 -1
- package/dist/comments/comment-utils.d.ts +2 -0
- package/dist/comments/comment-utils.d.ts.map +1 -1
- package/dist/comments/comment-utils.js +2 -0
- package/dist/comments/comment-utils.js.map +1 -1
- package/dist/comments.cjs +3 -0
- package/dist/comments.d.ts +1 -0
- package/dist/comments.d.ts.map +1 -1
- package/dist/comments.js +2 -1
- package/dist/components/ComboboxMenu.cjs +23 -13
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +23 -13
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/FilterBar.cjs +29 -6
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +3 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +29 -6
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/ItemActions.cjs +1 -1
- package/dist/components/ItemActions.cjs.map +1 -1
- package/dist/components/ItemActions.js +1 -1
- package/dist/components/ItemActions.js.map +1 -1
- package/dist/components/ListMenu.cjs +33 -3
- package/dist/components/ListMenu.cjs.map +1 -1
- package/dist/components/ListMenu.d.ts +4 -1
- package/dist/components/ListMenu.d.ts.map +1 -1
- package/dist/components/ListMenu.js +33 -3
- package/dist/components/ListMenu.js.map +1 -1
- package/dist/components/ListMenuItems.cjs +80 -0
- package/dist/components/ListMenuItems.cjs.map +1 -0
- package/dist/components/ListMenuItems.d.ts +8 -0
- package/dist/components/ListMenuItems.d.ts.map +1 -0
- package/dist/components/ListMenuItems.js +80 -0
- package/dist/components/ListMenuItems.js.map +1 -0
- package/dist/components/LocalPathPicker.cjs +182 -0
- package/dist/components/LocalPathPicker.cjs.map +1 -0
- package/dist/components/LocalPathPicker.d.ts +11 -0
- package/dist/components/LocalPathPicker.d.ts.map +1 -0
- package/dist/components/LocalPathPicker.js +182 -0
- package/dist/components/LocalPathPicker.js.map +1 -0
- package/dist/components/LocalPathTree.cjs +89 -0
- package/dist/components/LocalPathTree.cjs.map +1 -0
- package/dist/components/LocalPathTree.d.ts +9 -0
- package/dist/components/LocalPathTree.d.ts.map +1 -0
- package/dist/components/LocalPathTree.js +89 -0
- package/dist/components/LocalPathTree.js.map +1 -0
- package/dist/components/RangeSlider.cjs +10 -30
- package/dist/components/RangeSlider.cjs.map +1 -1
- package/dist/components/RangeSlider.d.ts.map +1 -1
- package/dist/components/RangeSlider.js +4 -24
- package/dist/components/RangeSlider.js.map +1 -1
- package/dist/components/Slider.cjs +79 -0
- package/dist/components/Slider.cjs.map +1 -0
- package/dist/components/Slider.d.ts +23 -0
- package/dist/components/Slider.d.ts.map +1 -0
- package/dist/components/Slider.js +79 -0
- package/dist/components/Slider.js.map +1 -0
- package/dist/components/combobox-types.d.ts +4 -1
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/filter-bar-field-utils.cjs +3 -5
- package/dist/components/filter-bar-field-utils.cjs.map +1 -1
- package/dist/components/filter-bar-field-utils.d.ts.map +1 -1
- package/dist/components/filter-bar-field-utils.js +3 -5
- package/dist/components/filter-bar-field-utils.js.map +1 -1
- package/dist/components/filter-bar-tree-model.cjs +22 -0
- package/dist/components/filter-bar-tree-model.cjs.map +1 -0
- package/dist/components/filter-bar-tree-model.d.ts +33 -0
- package/dist/components/filter-bar-tree-model.d.ts.map +1 -0
- package/dist/components/filter-bar-tree-model.js +21 -0
- package/dist/components/filter-bar-tree-model.js.map +1 -0
- package/dist/components/filter-bar-tree.cjs +84 -0
- package/dist/components/filter-bar-tree.cjs.map +1 -0
- package/dist/components/filter-bar-tree.d.ts +7 -0
- package/dist/components/filter-bar-tree.d.ts.map +1 -0
- package/dist/components/filter-bar-tree.js +84 -0
- package/dist/components/filter-bar-tree.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs +2 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs.map +1 -1
- package/dist/components/json-schema-form-debug-glyph-map.d.ts.map +1 -1
- package/dist/components/json-schema-form-debug-glyph-map.js +2 -0
- package/dist/components/json-schema-form-debug-glyph-map.js.map +1 -1
- package/dist/components/json-schema-form-help-links.cjs +18 -0
- package/dist/components/json-schema-form-help-links.cjs.map +1 -0
- package/dist/components/json-schema-form-help-links.d.ts +5 -0
- package/dist/components/json-schema-form-help-links.d.ts.map +1 -0
- package/dist/components/json-schema-form-help-links.js +18 -0
- package/dist/components/json-schema-form-help-links.js.map +1 -0
- package/dist/components/json-schema-form-help-model.cjs +7 -0
- package/dist/components/json-schema-form-help-model.cjs.map +1 -0
- package/dist/components/json-schema-form-help-model.d.ts +3 -0
- package/dist/components/json-schema-form-help-model.d.ts.map +1 -0
- package/dist/components/json-schema-form-help-model.js +7 -0
- package/dist/components/json-schema-form-help-model.js.map +1 -0
- package/dist/components/json-schema-form-json.cjs +48 -0
- package/dist/components/json-schema-form-json.cjs.map +1 -0
- package/dist/components/json-schema-form-json.d.ts +7 -0
- package/dist/components/json-schema-form-json.d.ts.map +1 -0
- package/dist/components/json-schema-form-json.js +48 -0
- package/dist/components/json-schema-form-json.js.map +1 -0
- package/dist/components/json-schema-form-layout.cjs +7 -5
- package/dist/components/json-schema-form-layout.cjs.map +1 -1
- package/dist/components/json-schema-form-layout.d.ts +2 -2
- package/dist/components/json-schema-form-layout.d.ts.map +1 -1
- package/dist/components/json-schema-form-layout.js +7 -5
- package/dist/components/json-schema-form-layout.js.map +1 -1
- package/dist/components/json-schema-form-object.cjs +2 -13
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +2 -13
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-refs.cjs +1 -1
- package/dist/components/json-schema-form-refs.cjs.map +1 -1
- package/dist/components/json-schema-form-refs.d.ts.map +1 -1
- package/dist/components/json-schema-form-refs.js +1 -1
- package/dist/components/json-schema-form-refs.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +20 -6
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +20 -6
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +22 -2
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +22 -2
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +5 -1
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-union-model.cjs +46 -0
- package/dist/components/json-schema-form-union-model.cjs.map +1 -0
- package/dist/components/json-schema-form-union-model.d.ts +6 -0
- package/dist/components/json-schema-form-union-model.d.ts.map +1 -0
- package/dist/components/json-schema-form-union-model.js +43 -0
- package/dist/components/json-schema-form-union-model.js.map +1 -0
- package/dist/components/json-schema-form-union.cjs +52 -0
- package/dist/components/json-schema-form-union.cjs.map +1 -0
- package/dist/components/json-schema-form-union.d.ts +7 -0
- package/dist/components/json-schema-form-union.d.ts.map +1 -0
- package/dist/components/json-schema-form-union.js +52 -0
- package/dist/components/json-schema-form-union.js.map +1 -0
- package/dist/components/list-menu-virtual.cjs +5 -0
- package/dist/components/list-menu-virtual.cjs.map +1 -0
- package/dist/components/list-menu-virtual.d.ts +12 -0
- package/dist/components/list-menu-virtual.d.ts.map +1 -0
- package/dist/components/list-menu-virtual.js +6 -0
- package/dist/components/list-menu-virtual.js.map +1 -0
- package/dist/components/local-path.cjs +12 -0
- package/dist/components/local-path.cjs.map +1 -0
- package/dist/components/local-path.d.ts +14 -0
- package/dist/components/local-path.d.ts.map +1 -0
- package/dist/components/local-path.js +12 -0
- package/dist/components/local-path.js.map +1 -0
- package/dist/components/slider-shared.cjs +32 -0
- package/dist/components/slider-shared.cjs.map +1 -0
- package/dist/components/slider-shared.d.ts +18 -0
- package/dist/components/slider-shared.d.ts.map +1 -0
- package/dist/components/slider-shared.js +27 -0
- package/dist/components/slider-shared.js.map +1 -0
- package/dist/components.cjs +8 -0
- package/dist/components.d.ts +6 -1
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +5 -1
- package/dist/connections/ConnectionsPage.cjs +51 -19
- package/dist/connections/ConnectionsPage.cjs.map +1 -1
- package/dist/connections/ConnectionsPage.d.ts +9 -1
- package/dist/connections/ConnectionsPage.d.ts.map +1 -1
- package/dist/connections/ConnectionsPage.js +52 -20
- package/dist/connections/ConnectionsPage.js.map +1 -1
- package/dist/connections/connectionDashboard.cjs +13 -8
- package/dist/connections/connectionDashboard.cjs.map +1 -1
- package/dist/connections/connectionDashboard.d.ts +8 -3
- package/dist/connections/connectionDashboard.d.ts.map +1 -1
- package/dist/connections/connectionDashboard.js +14 -9
- package/dist/connections/connectionDashboard.js.map +1 -1
- package/dist/connections/connectionDashboardModel.cjs.map +1 -1
- package/dist/connections/connectionDashboardModel.d.ts +4 -0
- package/dist/connections/connectionDashboardModel.d.ts.map +1 -1
- package/dist/connections/connectionDashboardModel.js.map +1 -1
- package/dist/connections/connectionDashboardRow.cjs +75 -55
- package/dist/connections/connectionDashboardRow.cjs.map +1 -1
- package/dist/connections/connectionDashboardRow.d.ts +3 -2
- package/dist/connections/connectionDashboardRow.d.ts.map +1 -1
- package/dist/connections/connectionDashboardRow.js +75 -55
- package/dist/connections/connectionDashboardRow.js.map +1 -1
- package/dist/connections/connectionNamespaceField.cjs +17 -0
- package/dist/connections/connectionNamespaceField.cjs.map +1 -0
- package/dist/connections/connectionNamespaceField.d.ts +10 -0
- package/dist/connections/connectionNamespaceField.d.ts.map +1 -0
- package/dist/connections/connectionNamespaceField.js +17 -0
- package/dist/connections/connectionNamespaceField.js.map +1 -0
- package/dist/connections/connectionSchemaFormExtensions.cjs +98 -0
- package/dist/connections/connectionSchemaFormExtensions.cjs.map +1 -0
- package/dist/connections/connectionSchemaFormExtensions.d.ts +41 -0
- package/dist/connections/connectionSchemaFormExtensions.d.ts.map +1 -0
- package/dist/connections/connectionSchemaFormExtensions.js +96 -0
- package/dist/connections/connectionSchemaFormExtensions.js.map +1 -0
- package/dist/connections/connectionsPageModel.cjs +11 -0
- package/dist/connections/connectionsPageModel.cjs.map +1 -1
- package/dist/connections/connectionsPageModel.d.ts +5 -0
- package/dist/connections/connectionsPageModel.d.ts.map +1 -1
- package/dist/connections/connectionsPageModel.js +11 -1
- package/dist/connections/connectionsPageModel.js.map +1 -1
- package/dist/connections.cjs +5 -0
- package/dist/connections.d.ts +2 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +3 -2
- package/dist/data/AvatarBadge.cjs +3 -3
- package/dist/data/AvatarBadge.cjs.map +1 -1
- package/dist/data/AvatarBadge.js +3 -3
- package/dist/data/AvatarBadge.js.map +1 -1
- package/dist/data/CodeDiff.cjs +2 -0
- package/dist/data/CodeDiff.cjs.map +1 -1
- package/dist/data/CodeDiff.js +2 -0
- package/dist/data/CodeDiff.js.map +1 -1
- package/dist/data/DataTable.cjs +3 -2
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +3 -2
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/Gauge.cjs +1 -1
- package/dist/data/Gauge.cjs.map +1 -1
- package/dist/data/Gauge.js +1 -1
- package/dist/data/Gauge.js.map +1 -1
- package/dist/data/HighlightedTokens.cjs +2 -10
- package/dist/data/HighlightedTokens.cjs.map +1 -1
- package/dist/data/HighlightedTokens.d.ts.map +1 -1
- package/dist/data/HighlightedTokens.js +1 -9
- package/dist/data/HighlightedTokens.js.map +1 -1
- package/dist/data/Markdown.cjs +38 -11
- package/dist/data/Markdown.cjs.map +1 -1
- package/dist/data/Markdown.d.ts +9 -1
- package/dist/data/Markdown.d.ts.map +1 -1
- package/dist/data/Markdown.js +39 -12
- package/dist/data/Markdown.js.map +1 -1
- package/dist/data/MultiGaugeBar.cjs +157 -0
- package/dist/data/MultiGaugeBar.cjs.map +1 -0
- package/dist/data/MultiGaugeBar.d.ts +29 -0
- package/dist/data/MultiGaugeBar.d.ts.map +1 -0
- package/dist/data/MultiGaugeBar.js +157 -0
- package/dist/data/MultiGaugeBar.js.map +1 -0
- package/dist/data/OpenInFilesLink.cjs +27 -0
- package/dist/data/OpenInFilesLink.cjs.map +1 -0
- package/dist/data/OpenInFilesLink.d.ts +15 -0
- package/dist/data/OpenInFilesLink.d.ts.map +1 -0
- package/dist/data/OpenInFilesLink.js +27 -0
- package/dist/data/OpenInFilesLink.js.map +1 -0
- package/dist/data/ProgressBar.cjs +5 -3
- package/dist/data/ProgressBar.cjs.map +1 -1
- package/dist/data/ProgressBar.d.ts +5 -1
- package/dist/data/ProgressBar.d.ts.map +1 -1
- package/dist/data/ProgressBar.js +5 -3
- package/dist/data/ProgressBar.js.map +1 -1
- package/dist/data/ProgressBars.cjs +13 -5
- package/dist/data/ProgressBars.cjs.map +1 -1
- package/dist/data/ProgressBars.d.ts +6 -1
- package/dist/data/ProgressBars.d.ts.map +1 -1
- package/dist/data/ProgressBars.js +13 -5
- package/dist/data/ProgressBars.js.map +1 -1
- package/dist/data/Properties.cjs +3 -3
- package/dist/data/Properties.cjs.map +1 -1
- package/dist/data/Properties.js +3 -3
- package/dist/data/Properties.js.map +1 -1
- package/dist/data/TaskProgress.cjs +14 -6
- package/dist/data/TaskProgress.cjs.map +1 -1
- package/dist/data/TaskProgress.d.ts +3 -1
- package/dist/data/TaskProgress.d.ts.map +1 -1
- package/dist/data/TaskProgress.js +14 -6
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/TaskPrompts.cjs +96 -0
- package/dist/data/TaskPrompts.cjs.map +1 -0
- package/dist/data/TaskPrompts.d.ts +6 -0
- package/dist/data/TaskPrompts.d.ts.map +1 -0
- package/dist/data/TaskPrompts.js +96 -0
- package/dist/data/TaskPrompts.js.map +1 -0
- package/dist/data/TaskSnapshot.cjs.map +1 -1
- package/dist/data/TaskSnapshot.d.ts +3 -0
- package/dist/data/TaskSnapshot.d.ts.map +1 -1
- package/dist/data/TaskSnapshot.js.map +1 -1
- package/dist/data/TimeseriesCoreBars.cjs +7 -3
- package/dist/data/TimeseriesCoreBars.cjs.map +1 -1
- package/dist/data/TimeseriesCoreBars.d.ts.map +1 -1
- package/dist/data/TimeseriesCoreBars.js +8 -4
- package/dist/data/TimeseriesCoreBars.js.map +1 -1
- package/dist/data/TimeseriesGauge.cjs +12 -5
- package/dist/data/TimeseriesGauge.cjs.map +1 -1
- package/dist/data/TimeseriesGauge.d.ts.map +1 -1
- package/dist/data/TimeseriesGauge.js +13 -6
- package/dist/data/TimeseriesGauge.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +10 -9
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +11 -10
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +62 -10
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +40 -1
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +62 -11
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/WorkloadCard.cjs +7 -3
- package/dist/data/WorkloadCard.cjs.map +1 -1
- package/dist/data/WorkloadCard.d.ts +3 -1
- package/dist/data/WorkloadCard.d.ts.map +1 -1
- package/dist/data/WorkloadCard.js +7 -3
- package/dist/data/WorkloadCard.js.map +1 -1
- package/dist/data/WorkloadCard.model.cjs.map +1 -1
- package/dist/data/WorkloadCard.model.d.ts +2 -0
- package/dist/data/WorkloadCard.model.d.ts.map +1 -1
- package/dist/data/WorkloadCard.model.js.map +1 -1
- package/dist/data/ai/ChatWindow.placement.cjs +2 -1
- package/dist/data/ai/ChatWindow.placement.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.placement.d.ts +1 -1
- package/dist/data/ai/ChatWindow.placement.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.placement.js +2 -1
- package/dist/data/ai/ChatWindow.placement.js.map +1 -1
- package/dist/data/ai/SpecRuntimeBar.cjs +2 -2
- package/dist/data/ai/SpecRuntimeBar.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeBar.d.ts +4 -1
- package/dist/data/ai/SpecRuntimeBar.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeBar.js +2 -2
- package/dist/data/ai/SpecRuntimeBar.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PromptSection.cjs +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PromptSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PromptSection.js +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PromptSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.cjs +2 -2
- package/dist/data/ai/SpecRuntimeEditor.model.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.d.ts +2 -2
- package/dist/data/ai/SpecRuntimeEditor.model.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.js +2 -2
- package/dist/data/ai/SpecRuntimeEditor.model.js.map +1 -1
- package/dist/data/ai/ThreadPicker.cjs +2 -2
- package/dist/data/ai/ThreadPicker.cjs.map +1 -1
- package/dist/data/ai/ThreadPicker.js +2 -2
- package/dist/data/ai/ThreadPicker.js.map +1 -1
- package/dist/data/ai/index.d.ts +2 -0
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/use-prompt-run-stream.cjs +126 -0
- package/dist/data/ai/use-prompt-run-stream.cjs.map +1 -0
- package/dist/data/ai/use-prompt-run-stream.d.ts +52 -0
- package/dist/data/ai/use-prompt-run-stream.d.ts.map +1 -0
- package/dist/data/ai/use-prompt-run-stream.js +126 -0
- package/dist/data/ai/use-prompt-run-stream.js.map +1 -0
- package/dist/data/cache-browser/CacheBrowser.cjs +1 -0
- package/dist/data/cache-browser/CacheBrowser.cjs.map +1 -1
- package/dist/data/cache-browser/CacheBrowser.d.ts.map +1 -1
- package/dist/data/cache-browser/CacheBrowser.js +1 -0
- package/dist/data/cache-browser/CacheBrowser.js.map +1 -1
- package/dist/data/charts/BarChart.cjs +194 -0
- package/dist/data/charts/BarChart.cjs.map +1 -0
- package/dist/data/charts/BarChart.d.ts +19 -0
- package/dist/data/charts/BarChart.d.ts.map +1 -0
- package/dist/data/charts/BarChart.js +194 -0
- package/dist/data/charts/BarChart.js.map +1 -0
- package/dist/data/charts/ChartLegend.cjs +54 -0
- package/dist/data/charts/ChartLegend.cjs.map +1 -0
- package/dist/data/charts/ChartLegend.d.ts +17 -0
- package/dist/data/charts/ChartLegend.d.ts.map +1 -0
- package/dist/data/charts/ChartLegend.js +54 -0
- package/dist/data/charts/ChartLegend.js.map +1 -0
- package/dist/data/charts/Sparkline.cjs +56 -0
- package/dist/data/charts/Sparkline.cjs.map +1 -0
- package/dist/data/charts/Sparkline.d.ts +15 -0
- package/dist/data/charts/Sparkline.d.ts.map +1 -0
- package/dist/data/charts/Sparkline.js +56 -0
- package/dist/data/charts/Sparkline.js.map +1 -0
- package/dist/data/charts/StackedBarChart.cjs +241 -0
- package/dist/data/charts/StackedBarChart.cjs.map +1 -0
- package/dist/data/charts/StackedBarChart.d.ts +20 -0
- package/dist/data/charts/StackedBarChart.d.ts.map +1 -0
- package/dist/data/charts/StackedBarChart.js +241 -0
- package/dist/data/charts/StackedBarChart.js.map +1 -0
- package/dist/data/charts/TrendChart.cjs +157 -0
- package/dist/data/charts/TrendChart.cjs.map +1 -0
- package/dist/data/charts/TrendChart.d.ts +20 -0
- package/dist/data/charts/TrendChart.d.ts.map +1 -0
- package/dist/data/charts/TrendChart.js +157 -0
- package/dist/data/charts/TrendChart.js.map +1 -0
- package/dist/data/charts/chart-marks.cjs +115 -0
- package/dist/data/charts/chart-marks.cjs.map +1 -0
- package/dist/data/charts/chart-marks.d.ts +39 -0
- package/dist/data/charts/chart-marks.d.ts.map +1 -0
- package/dist/data/charts/chart-marks.js +112 -0
- package/dist/data/charts/chart-marks.js.map +1 -0
- package/dist/data/charts/chart-palette.cjs +74 -0
- package/dist/data/charts/chart-palette.cjs.map +1 -0
- package/dist/data/charts/chart-palette.d.ts +58 -0
- package/dist/data/charts/chart-palette.d.ts.map +1 -0
- package/dist/data/charts/chart-palette.js +72 -0
- package/dist/data/charts/chart-palette.js.map +1 -0
- package/dist/data/charts/chart-scale.cjs +115 -0
- package/dist/data/charts/chart-scale.cjs.map +1 -0
- package/dist/data/charts/chart-scale.d.ts +41 -0
- package/dist/data/charts/chart-scale.d.ts.map +1 -0
- package/dist/data/charts/chart-scale.js +104 -0
- package/dist/data/charts/chart-scale.js.map +1 -0
- package/dist/data/charts/chart.test-utils.d.ts +7 -0
- package/dist/data/charts/chart.test-utils.d.ts.map +1 -0
- package/dist/data/charts/index.d.ts +7 -0
- package/dist/data/charts/index.d.ts.map +1 -0
- package/dist/data/chat/MessageActions.cjs +1 -1
- package/dist/data/chat/MessageActions.cjs.map +1 -1
- package/dist/data/chat/MessageActions.js +1 -1
- package/dist/data/chat/MessageActions.js.map +1 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.cjs +1 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.js +1 -1
- package/dist/data/diagnostics/DiagnosticsTree.cjs +1 -1
- package/dist/data/diagnostics/DiagnosticsTree.cjs.map +1 -1
- package/dist/data/diagnostics/DiagnosticsTree.js +1 -1
- package/dist/data/diagnostics/DiagnosticsTree.js.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.cjs +9 -2
- package/dist/data/diagnostics/FrameSourceWindow.cjs.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.d.ts +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.d.ts.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.js +9 -2
- package/dist/data/diagnostics/FrameSourceWindow.js.map +1 -1
- package/dist/data/diagnostics/ProblemActions.cjs +37 -0
- package/dist/data/diagnostics/ProblemActions.cjs.map +1 -0
- package/dist/data/diagnostics/ProblemActions.d.ts +6 -0
- package/dist/data/diagnostics/ProblemActions.d.ts.map +1 -0
- package/dist/data/diagnostics/ProblemActions.js +37 -0
- package/dist/data/diagnostics/ProblemActions.js.map +1 -0
- package/dist/data/diagnostics/ProblemFacet.cjs +33 -0
- package/dist/data/diagnostics/ProblemFacet.cjs.map +1 -0
- package/dist/data/diagnostics/ProblemFacet.d.ts +9 -0
- package/dist/data/diagnostics/ProblemFacet.d.ts.map +1 -0
- package/dist/data/diagnostics/ProblemFacet.js +33 -0
- package/dist/data/diagnostics/ProblemFacet.js.map +1 -0
- package/dist/data/diagnostics/ProblemRow.cjs +62 -0
- package/dist/data/diagnostics/ProblemRow.cjs.map +1 -0
- package/dist/data/diagnostics/ProblemRow.d.ts +14 -0
- package/dist/data/diagnostics/ProblemRow.d.ts.map +1 -0
- package/dist/data/diagnostics/ProblemRow.js +62 -0
- package/dist/data/diagnostics/ProblemRow.js.map +1 -0
- package/dist/data/diagnostics/ProblemViewOptions.cjs +18 -0
- package/dist/data/diagnostics/ProblemViewOptions.cjs.map +1 -0
- package/dist/data/diagnostics/ProblemViewOptions.d.ts +6 -0
- package/dist/data/diagnostics/ProblemViewOptions.d.ts.map +1 -0
- package/dist/data/diagnostics/ProblemViewOptions.js +18 -0
- package/dist/data/diagnostics/ProblemViewOptions.js.map +1 -0
- package/dist/data/diagnostics/StackFrameRow.cjs +1 -1
- package/dist/data/diagnostics/StackFrameRow.cjs.map +1 -1
- package/dist/data/diagnostics/StackFrameRow.js +1 -1
- package/dist/data/diagnostics/StackFrameRow.js.map +1 -1
- package/dist/data/diagnostics/diagnostic-identity.cjs +14 -0
- package/dist/data/diagnostics/diagnostic-identity.cjs.map +1 -0
- package/dist/data/diagnostics/diagnostic-identity.d.ts +3 -0
- package/dist/data/diagnostics/diagnostic-identity.d.ts.map +1 -0
- package/dist/data/diagnostics/diagnostic-identity.js +14 -0
- package/dist/data/diagnostics/diagnostic-identity.js.map +1 -0
- package/dist/data/diagnostics/use-problem-expansion.cjs +16 -0
- package/dist/data/diagnostics/use-problem-expansion.cjs.map +1 -0
- package/dist/data/diagnostics/use-problem-expansion.d.ts +3 -0
- package/dist/data/diagnostics/use-problem-expansion.d.ts.map +1 -0
- package/dist/data/diagnostics/use-problem-expansion.js +16 -0
- package/dist/data/diagnostics/use-problem-expansion.js.map +1 -0
- package/dist/data/git/GitChangeList.cjs +9 -6
- package/dist/data/git/GitChangeList.cjs.map +1 -1
- package/dist/data/git/GitChangeList.d.ts +6 -0
- package/dist/data/git/GitChangeList.d.ts.map +1 -1
- package/dist/data/git/GitChangeList.js +9 -6
- package/dist/data/git/GitChangeList.js.map +1 -1
- package/dist/data/git/pickers/GitPickersDemo.d.ts.map +1 -1
- package/dist/data/git/pickers/ReferencePicker.cjs +1 -0
- package/dist/data/git/pickers/ReferencePicker.cjs.map +1 -1
- package/dist/data/git/pickers/ReferencePicker.js +1 -0
- package/dist/data/git/pickers/ReferencePicker.js.map +1 -1
- package/dist/data/lint/LintDetail.cjs +230 -189
- package/dist/data/lint/LintDetail.cjs.map +1 -1
- package/dist/data/lint/LintDetail.d.ts +25 -3
- package/dist/data/lint/LintDetail.d.ts.map +1 -1
- package/dist/data/lint/LintDetail.js +231 -192
- package/dist/data/lint/LintDetail.js.map +1 -1
- package/dist/data/lint/LintFilterBar.cjs +78 -83
- package/dist/data/lint/LintFilterBar.cjs.map +1 -1
- package/dist/data/lint/LintFilterBar.d.ts +23 -6
- package/dist/data/lint/LintFilterBar.d.ts.map +1 -1
- package/dist/data/lint/LintFilterBar.js +78 -85
- package/dist/data/lint/LintFilterBar.js.map +1 -1
- package/dist/data/lint/LintIgnoreMenu.cjs +59 -0
- package/dist/data/lint/LintIgnoreMenu.cjs.map +1 -0
- package/dist/data/lint/LintIgnoreMenu.d.ts +20 -0
- package/dist/data/lint/LintIgnoreMenu.d.ts.map +1 -0
- package/dist/data/lint/LintIgnoreMenu.js +58 -0
- package/dist/data/lint/LintIgnoreMenu.js.map +1 -0
- package/dist/data/lint/LintResults.cjs +59 -14
- package/dist/data/lint/LintResults.cjs.map +1 -1
- package/dist/data/lint/LintResults.d.ts +25 -1
- package/dist/data/lint/LintResults.d.ts.map +1 -1
- package/dist/data/lint/LintResults.fixtures.d.ts +19 -0
- package/dist/data/lint/LintResults.fixtures.d.ts.map +1 -1
- package/dist/data/lint/LintResults.js +60 -15
- package/dist/data/lint/LintResults.js.map +1 -1
- package/dist/data/lint/LintTable.cjs +156 -0
- package/dist/data/lint/LintTable.cjs.map +1 -0
- package/dist/data/lint/LintTable.d.ts +13 -0
- package/dist/data/lint/LintTable.d.ts.map +1 -0
- package/dist/data/lint/LintTable.js +156 -0
- package/dist/data/lint/LintTable.js.map +1 -0
- package/dist/data/lint/LintTreeNode.cjs +42 -19
- package/dist/data/lint/LintTreeNode.cjs.map +1 -1
- package/dist/data/lint/LintTreeNode.d.ts +7 -2
- package/dist/data/lint/LintTreeNode.d.ts.map +1 -1
- package/dist/data/lint/LintTreeNode.js +44 -21
- package/dist/data/lint/LintTreeNode.js.map +1 -1
- package/dist/data/lint/ViolationSnippet.cjs +113 -0
- package/dist/data/lint/ViolationSnippet.cjs.map +1 -0
- package/dist/data/lint/ViolationSnippet.d.ts +20 -0
- package/dist/data/lint/ViolationSnippet.d.ts.map +1 -0
- package/dist/data/lint/ViolationSnippet.js +112 -0
- package/dist/data/lint/ViolationSnippet.js.map +1 -0
- package/dist/data/lint/actions.cjs +44 -16
- package/dist/data/lint/actions.cjs.map +1 -1
- package/dist/data/lint/actions.d.ts +7 -3
- package/dist/data/lint/actions.d.ts.map +1 -1
- package/dist/data/lint/actions.js +44 -16
- package/dist/data/lint/actions.js.map +1 -1
- package/dist/data/lint/grouping.cjs +105 -8
- package/dist/data/lint/grouping.cjs.map +1 -1
- package/dist/data/lint/grouping.d.ts +21 -1
- package/dist/data/lint/grouping.d.ts.map +1 -1
- package/dist/data/lint/grouping.js +105 -10
- package/dist/data/lint/grouping.js.map +1 -1
- package/dist/data/lint/ignore-menu-items.cjs +18 -0
- package/dist/data/lint/ignore-menu-items.cjs.map +1 -0
- package/dist/data/lint/ignore-menu-items.d.ts +6 -0
- package/dist/data/lint/ignore-menu-items.d.ts.map +1 -0
- package/dist/data/lint/ignore-menu-items.js +17 -0
- package/dist/data/lint/ignore-menu-items.js.map +1 -0
- package/dist/data/lint/index.d.ts +7 -5
- package/dist/data/lint/index.d.ts.map +1 -1
- package/dist/data/lint/stats.cjs +19 -4
- package/dist/data/lint/stats.cjs.map +1 -1
- package/dist/data/lint/stats.d.ts +13 -3
- package/dist/data/lint/stats.d.ts.map +1 -1
- package/dist/data/lint/stats.js +17 -5
- package/dist/data/lint/stats.js.map +1 -1
- package/dist/data/lint/types.cjs +8 -0
- package/dist/data/lint/types.cjs.map +1 -1
- package/dist/data/lint/types.d.ts +47 -0
- package/dist/data/lint/types.d.ts.map +1 -1
- package/dist/data/lint/types.js +8 -1
- package/dist/data/lint/types.js.map +1 -1
- package/dist/data/lint/violation-menu-items.cjs +31 -0
- package/dist/data/lint/violation-menu-items.cjs.map +1 -0
- package/dist/data/lint/violation-menu-items.d.ts +12 -0
- package/dist/data/lint/violation-menu-items.d.ts.map +1 -0
- package/dist/data/lint/violation-menu-items.js +31 -0
- package/dist/data/lint/violation-menu-items.js.map +1 -0
- package/dist/data/markdown-source-blocks.cjs +38 -0
- package/dist/data/markdown-source-blocks.cjs.map +1 -0
- package/dist/data/markdown-source-blocks.d.ts +32 -0
- package/dist/data/markdown-source-blocks.d.ts.map +1 -0
- package/dist/data/markdown-source-blocks.js +35 -0
- package/dist/data/markdown-source-blocks.js.map +1 -0
- package/dist/data/test-runner/FilterFacet.cjs +52 -0
- package/dist/data/test-runner/FilterFacet.cjs.map +1 -0
- package/dist/data/test-runner/FilterFacet.d.ts +13 -0
- package/dist/data/test-runner/FilterFacet.d.ts.map +1 -0
- package/dist/data/test-runner/FilterFacet.js +52 -0
- package/dist/data/test-runner/FilterFacet.js.map +1 -0
- package/dist/data/test-runner/MatrixMarks.cjs +19 -29
- package/dist/data/test-runner/MatrixMarks.cjs.map +1 -1
- package/dist/data/test-runner/MatrixMarks.d.ts +4 -4
- package/dist/data/test-runner/MatrixMarks.d.ts.map +1 -1
- package/dist/data/test-runner/MatrixMarks.js +19 -29
- package/dist/data/test-runner/MatrixMarks.js.map +1 -1
- package/dist/data/test-runner/TestAttemptDetail.cjs +1 -1
- package/dist/data/test-runner/TestAttemptDetail.js +1 -1
- package/dist/data/test-runner/TestDetailPanel.cjs +11 -0
- package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.d.ts.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.js +11 -0
- package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
- package/dist/data/test-runner/TestFilterBar.cjs +3 -44
- package/dist/data/test-runner/TestFilterBar.cjs.map +1 -1
- package/dist/data/test-runner/TestFilterBar.d.ts.map +1 -1
- package/dist/data/test-runner/TestFilterBar.js +3 -44
- package/dist/data/test-runner/TestFilterBar.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +7 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +3 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/test-runner/types.d.ts +2 -0
- package/dist/data/test-runner/types.d.ts.map +1 -1
- package/dist/data/timeseries-query.cjs +98 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +31 -5
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +98 -3
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/timeseries-stream-provider.cjs +38 -0
- package/dist/data/timeseries-stream-provider.cjs.map +1 -0
- package/dist/data/timeseries-stream-provider.d.ts +26 -0
- package/dist/data/timeseries-stream-provider.d.ts.map +1 -0
- package/dist/data/timeseries-stream-provider.js +38 -0
- package/dist/data/timeseries-stream-provider.js.map +1 -0
- package/dist/data/timeseries-stream.cjs +304 -0
- package/dist/data/timeseries-stream.cjs.map +1 -0
- package/dist/data/timeseries-stream.d.ts +81 -0
- package/dist/data/timeseries-stream.d.ts.map +1 -0
- package/dist/data/timeseries-stream.fixtures.d.ts +36 -0
- package/dist/data/timeseries-stream.fixtures.d.ts.map +1 -0
- package/dist/data/timeseries-stream.js +296 -0
- package/dist/data/timeseries-stream.js.map +1 -0
- package/dist/data/token-style.cjs +13 -0
- package/dist/data/token-style.cjs.map +1 -0
- package/dist/data/token-style.d.ts +4 -0
- package/dist/data/token-style.d.ts.map +1 -0
- package/dist/data/token-style.js +13 -0
- package/dist/data/token-style.js.map +1 -0
- package/dist/data/traces/ProcessTraceDetail.cjs +1 -1
- package/dist/data/traces/ProcessTraceDetail.js +1 -1
- package/dist/data/traces/index.d.ts +1 -1
- package/dist/data/traces/index.d.ts.map +1 -1
- package/dist/data/use-data-table-virtual.d.ts +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data/workload-panel/MemoryStack.cjs +49 -0
- package/dist/data/workload-panel/MemoryStack.cjs.map +1 -0
- package/dist/data/workload-panel/MemoryStack.d.ts +11 -0
- package/dist/data/workload-panel/MemoryStack.d.ts.map +1 -0
- package/dist/data/workload-panel/MemoryStack.js +48 -0
- package/dist/data/workload-panel/MemoryStack.js.map +1 -0
- package/dist/data/workload-panel/Metrics.cjs +197 -0
- package/dist/data/workload-panel/Metrics.cjs.map +1 -0
- package/dist/data/workload-panel/Metrics.d.ts +11 -0
- package/dist/data/workload-panel/Metrics.d.ts.map +1 -0
- package/dist/data/workload-panel/Metrics.js +196 -0
- package/dist/data/workload-panel/Metrics.js.map +1 -0
- package/dist/data/workload-panel/WorkloadPanel.cjs +66 -0
- package/dist/data/workload-panel/WorkloadPanel.cjs.map +1 -0
- package/dist/data/workload-panel/WorkloadPanel.d.ts +3 -0
- package/dist/data/workload-panel/WorkloadPanel.d.ts.map +1 -0
- package/dist/data/workload-panel/WorkloadPanel.js +66 -0
- package/dist/data/workload-panel/WorkloadPanel.js.map +1 -0
- package/dist/data/workload-panel/fixtures.d.ts +60 -0
- package/dist/data/workload-panel/fixtures.d.ts.map +1 -0
- package/dist/data/workload-panel/model.cjs +137 -0
- package/dist/data/workload-panel/model.cjs.map +1 -0
- package/dist/data/workload-panel/model.d.ts +53 -0
- package/dist/data/workload-panel/model.d.ts.map +1 -0
- package/dist/data/workload-panel/model.js +133 -0
- package/dist/data/workload-panel/model.js.map +1 -0
- package/dist/data/workload-panel/types.d.ts +56 -0
- package/dist/data/workload-panel/types.d.ts.map +1 -0
- package/dist/data.cjs +57 -6
- package/dist/data.d.ts +9 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +27 -10
- package/dist/file-findings/AnnotatedCode.cjs +243 -0
- package/dist/file-findings/AnnotatedCode.cjs.map +1 -0
- package/dist/file-findings/AnnotatedCode.d.ts +30 -0
- package/dist/file-findings/AnnotatedCode.d.ts.map +1 -0
- package/dist/file-findings/AnnotatedCode.js +243 -0
- package/dist/file-findings/AnnotatedCode.js.map +1 -0
- package/dist/file-findings/FileFindingsView.cjs +213 -0
- package/dist/file-findings/FileFindingsView.cjs.map +1 -0
- package/dist/file-findings/FileFindingsView.d.ts +35 -0
- package/dist/file-findings/FileFindingsView.d.ts.map +1 -0
- package/dist/file-findings/FileFindingsView.js +213 -0
- package/dist/file-findings/FileFindingsView.js.map +1 -0
- package/dist/file-findings/LazyAnnotatedCode.cjs +22 -0
- package/dist/file-findings/LazyAnnotatedCode.cjs.map +1 -0
- package/dist/file-findings/LazyAnnotatedCode.d.ts +5 -0
- package/dist/file-findings/LazyAnnotatedCode.d.ts.map +1 -0
- package/dist/file-findings/LazyAnnotatedCode.js +22 -0
- package/dist/file-findings/LazyAnnotatedCode.js.map +1 -0
- package/dist/file-findings/adapters.cjs +155 -0
- package/dist/file-findings/adapters.cjs.map +1 -0
- package/dist/file-findings/adapters.d.ts +24 -0
- package/dist/file-findings/adapters.d.ts.map +1 -0
- package/dist/file-findings/adapters.js +153 -0
- package/dist/file-findings/adapters.js.map +1 -0
- package/dist/file-findings/file-review/CommentDraft.cjs +97 -0
- package/dist/file-findings/file-review/CommentDraft.cjs.map +1 -0
- package/dist/file-findings/file-review/CommentDraft.d.ts +25 -0
- package/dist/file-findings/file-review/CommentDraft.d.ts.map +1 -0
- package/dist/file-findings/file-review/CommentDraft.js +97 -0
- package/dist/file-findings/file-review/CommentDraft.js.map +1 -0
- package/dist/file-findings/file-review/FileReview.cjs +863 -0
- package/dist/file-findings/file-review/FileReview.cjs.map +1 -0
- package/dist/file-findings/file-review/FileReview.d.ts +79 -0
- package/dist/file-findings/file-review/FileReview.d.ts.map +1 -0
- package/dist/file-findings/file-review/FileReview.fixtures.d.ts +25 -0
- package/dist/file-findings/file-review/FileReview.fixtures.d.ts.map +1 -0
- package/dist/file-findings/file-review/FileReview.js +863 -0
- package/dist/file-findings/file-review/FileReview.js.map +1 -0
- package/dist/file-findings/file-review/InlineAuthors.cjs +77 -0
- package/dist/file-findings/file-review/InlineAuthors.cjs.map +1 -0
- package/dist/file-findings/file-review/InlineAuthors.d.ts +9 -0
- package/dist/file-findings/file-review/InlineAuthors.d.ts.map +1 -0
- package/dist/file-findings/file-review/InlineAuthors.js +77 -0
- package/dist/file-findings/file-review/InlineAuthors.js.map +1 -0
- package/dist/file-findings/file-review/InlineThread.cjs +77 -0
- package/dist/file-findings/file-review/InlineThread.cjs.map +1 -0
- package/dist/file-findings/file-review/InlineThread.d.ts +27 -0
- package/dist/file-findings/file-review/InlineThread.d.ts.map +1 -0
- package/dist/file-findings/file-review/InlineThread.js +77 -0
- package/dist/file-findings/file-review/InlineThread.js.map +1 -0
- package/dist/file-findings/file-review/ProblemsList.cjs +164 -0
- package/dist/file-findings/file-review/ProblemsList.cjs.map +1 -0
- package/dist/file-findings/file-review/ProblemsList.d.ts +15 -0
- package/dist/file-findings/file-review/ProblemsList.d.ts.map +1 -0
- package/dist/file-findings/file-review/ProblemsList.js +164 -0
- package/dist/file-findings/file-review/ProblemsList.js.map +1 -0
- package/dist/file-findings/file-review/SourceView.cjs +179 -0
- package/dist/file-findings/file-review/SourceView.cjs.map +1 -0
- package/dist/file-findings/file-review/SourceView.d.ts +29 -0
- package/dist/file-findings/file-review/SourceView.d.ts.map +1 -0
- package/dist/file-findings/file-review/SourceView.js +179 -0
- package/dist/file-findings/file-review/SourceView.js.map +1 -0
- package/dist/file-findings/file-review/blame.cjs +35 -0
- package/dist/file-findings/file-review/blame.cjs.map +1 -0
- package/dist/file-findings/file-review/blame.d.ts +28 -0
- package/dist/file-findings/file-review/blame.d.ts.map +1 -0
- package/dist/file-findings/file-review/blame.js +33 -0
- package/dist/file-findings/file-review/blame.js.map +1 -0
- package/dist/file-findings/file-review/geometry.cjs +101 -0
- package/dist/file-findings/file-review/geometry.cjs.map +1 -0
- package/dist/file-findings/file-review/geometry.d.ts +45 -0
- package/dist/file-findings/file-review/geometry.d.ts.map +1 -0
- package/dist/file-findings/file-review/geometry.js +98 -0
- package/dist/file-findings/file-review/geometry.js.map +1 -0
- package/dist/file-findings/file-review/hooks.cjs +101 -0
- package/dist/file-findings/file-review/hooks.cjs.map +1 -0
- package/dist/file-findings/file-review/hooks.d.ts +22 -0
- package/dist/file-findings/file-review/hooks.d.ts.map +1 -0
- package/dist/file-findings/file-review/hooks.js +99 -0
- package/dist/file-findings/file-review/hooks.js.map +1 -0
- package/dist/file-findings/file-review/marks.cjs +52 -0
- package/dist/file-findings/file-review/marks.cjs.map +1 -0
- package/dist/file-findings/file-review/marks.d.ts +23 -0
- package/dist/file-findings/file-review/marks.d.ts.map +1 -0
- package/dist/file-findings/file-review/marks.js +47 -0
- package/dist/file-findings/file-review/marks.js.map +1 -0
- package/dist/file-findings/file-review/problem-filters.cjs +14 -0
- package/dist/file-findings/file-review/problem-filters.cjs.map +1 -0
- package/dist/file-findings/file-review/problem-filters.d.ts +10 -0
- package/dist/file-findings/file-review/problem-filters.d.ts.map +1 -0
- package/dist/file-findings/file-review/problem-filters.js +13 -0
- package/dist/file-findings/file-review/problem-filters.js.map +1 -0
- package/dist/file-findings/file-review/quote-anchor.cjs +234 -0
- package/dist/file-findings/file-review/quote-anchor.cjs.map +1 -0
- package/dist/file-findings/file-review/quote-anchor.d.ts +54 -0
- package/dist/file-findings/file-review/quote-anchor.d.ts.map +1 -0
- package/dist/file-findings/file-review/quote-anchor.js +226 -0
- package/dist/file-findings/file-review/quote-anchor.js.map +1 -0
- package/dist/file-findings/file-review/source-anchor.cjs +104 -0
- package/dist/file-findings/file-review/source-anchor.cjs.map +1 -0
- package/dist/file-findings/file-review/source-anchor.d.ts +27 -0
- package/dist/file-findings/file-review/source-anchor.d.ts.map +1 -0
- package/dist/file-findings/file-review/source-anchor.js +99 -0
- package/dist/file-findings/file-review/source-anchor.js.map +1 -0
- package/dist/file-findings/file-review/source-marks.cjs +71 -0
- package/dist/file-findings/file-review/source-marks.cjs.map +1 -0
- package/dist/file-findings/file-review/source-marks.d.ts +27 -0
- package/dist/file-findings/file-review/source-marks.d.ts.map +1 -0
- package/dist/file-findings/file-review/source-marks.js +68 -0
- package/dist/file-findings/file-review/source-marks.js.map +1 -0
- package/dist/file-findings/findings-comments.cjs +136 -0
- package/dist/file-findings/findings-comments.cjs.map +1 -0
- package/dist/file-findings/findings-comments.d.ts +28 -0
- package/dist/file-findings/findings-comments.d.ts.map +1 -0
- package/dist/file-findings/findings-comments.js +131 -0
- package/dist/file-findings/findings-comments.js.map +1 -0
- package/dist/file-findings/findings-languages.cjs +53 -0
- package/dist/file-findings/findings-languages.cjs.map +1 -0
- package/dist/file-findings/findings-languages.d.ts +11 -0
- package/dist/file-findings/findings-languages.d.ts.map +1 -0
- package/dist/file-findings/findings-languages.js +53 -0
- package/dist/file-findings/findings-languages.js.map +1 -0
- package/dist/file-findings/mdx-source.cjs +48 -0
- package/dist/file-findings/mdx-source.cjs.map +1 -0
- package/dist/file-findings/mdx-source.d.ts +7 -0
- package/dist/file-findings/mdx-source.d.ts.map +1 -0
- package/dist/file-findings/mdx-source.js +48 -0
- package/dist/file-findings/mdx-source.js.map +1 -0
- package/dist/file-findings/monaco-language.cjs +73 -0
- package/dist/file-findings/monaco-language.cjs.map +1 -0
- package/dist/file-findings/monaco-language.d.ts +11 -0
- package/dist/file-findings/monaco-language.d.ts.map +1 -0
- package/dist/file-findings/monaco-language.js +72 -0
- package/dist/file-findings/monaco-language.js.map +1 -0
- package/dist/file-findings/severity-counts.cjs +20 -0
- package/dist/file-findings/severity-counts.cjs.map +1 -0
- package/dist/file-findings/severity-counts.d.ts +5 -0
- package/dist/file-findings/severity-counts.d.ts.map +1 -0
- package/dist/file-findings/severity-counts.js +19 -0
- package/dist/file-findings/severity-counts.js.map +1 -0
- package/dist/file-findings/types.cjs +12 -0
- package/dist/file-findings/types.cjs.map +1 -0
- package/dist/file-findings/types.d.ts +43 -0
- package/dist/file-findings/types.d.ts.map +1 -0
- package/dist/file-findings/types.js +11 -0
- package/dist/file-findings/types.js.map +1 -0
- package/dist/file-findings.cjs +47 -0
- package/dist/file-findings.d.ts +15 -0
- package/dist/file-findings.d.ts.map +1 -0
- package/dist/file-findings.js +15 -0
- package/dist/hooks/event-hub.cjs +22 -8
- package/dist/hooks/event-hub.cjs.map +1 -1
- package/dist/hooks/event-hub.d.ts.map +1 -1
- package/dist/hooks/event-hub.js +22 -8
- package/dist/hooks/event-hub.js.map +1 -1
- package/dist/icons/components/UiBrowser.cjs +51 -0
- package/dist/icons/components/UiBrowser.cjs.map +1 -0
- package/dist/icons/components/UiBrowser.d.ts +15 -0
- package/dist/icons/components/UiBrowser.d.ts.map +1 -0
- package/dist/icons/components/UiBrowser.js +48 -0
- package/dist/icons/components/UiBrowser.js.map +1 -0
- package/dist/icons/components/UiCreditCard.cjs +51 -0
- package/dist/icons/components/UiCreditCard.cjs.map +1 -0
- package/dist/icons/components/UiCreditCard.d.ts +15 -0
- package/dist/icons/components/UiCreditCard.d.ts.map +1 -0
- package/dist/icons/components/UiCreditCard.js +48 -0
- package/dist/icons/components/UiCreditCard.js.map +1 -0
- package/dist/icons/components/UiShoppingCart.cjs +51 -0
- package/dist/icons/components/UiShoppingCart.cjs.map +1 -0
- package/dist/icons/components/UiShoppingCart.d.ts +15 -0
- package/dist/icons/components/UiShoppingCart.d.ts.map +1 -0
- package/dist/icons/components/UiShoppingCart.js +48 -0
- package/dist/icons/components/UiShoppingCart.js.map +1 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +6 -0
- package/dist/icons/registry.cjs.map +1 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +6 -0
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons.cjs +9 -0
- package/dist/icons.js +4 -1
- package/dist/index.cjs +75 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -12
- package/dist/layout/AppShell.cjs +37 -21
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +13 -2
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js +37 -21
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +7 -6
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.d.ts.map +1 -1
- package/dist/layout/AppShell.nav.js +7 -6
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/SplitPane.cjs +16 -6
- package/dist/layout/SplitPane.cjs.map +1 -1
- package/dist/layout/SplitPane.d.ts +12 -2
- package/dist/layout/SplitPane.d.ts.map +1 -1
- package/dist/layout/SplitPane.js +16 -6
- package/dist/layout/SplitPane.js.map +1 -1
- package/dist/layout/Workspace.cjs +37 -33
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +37 -33
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +3 -3
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.js +3 -3
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/breakpoints.cjs +102 -0
- package/dist/lib/breakpoints.cjs.map +1 -0
- package/dist/lib/breakpoints.d.ts +36 -0
- package/dist/lib/breakpoints.d.ts.map +1 -0
- package/dist/lib/breakpoints.js +99 -0
- package/dist/lib/breakpoints.js.map +1 -0
- package/dist/lib/combobox.cjs +2 -1
- package/dist/lib/combobox.cjs.map +1 -1
- package/dist/lib/combobox.d.ts +1 -1
- package/dist/lib/combobox.d.ts.map +1 -1
- package/dist/lib/combobox.js +2 -1
- package/dist/lib/combobox.js.map +1 -1
- package/dist/lib/path-tree.cjs +21 -0
- package/dist/lib/path-tree.cjs.map +1 -1
- package/dist/lib/path-tree.d.ts +15 -0
- package/dist/lib/path-tree.d.ts.map +1 -1
- package/dist/lib/path-tree.js +21 -1
- package/dist/lib/path-tree.js.map +1 -1
- package/dist/overlay/Modal.cjs +2 -1
- package/dist/overlay/Modal.cjs.map +1 -1
- package/dist/overlay/Modal.d.ts.map +1 -1
- package/dist/overlay/Modal.js +2 -1
- package/dist/overlay/Modal.js.map +1 -1
- package/dist/overlay/dropdownMenuContext.d.ts +1 -1
- package/dist/profiles/editor/profileEditor.cjs +1 -1
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.js +1 -1
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +2 -2
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +2 -2
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/query/prometheusResults.cjs +24 -36
- package/dist/profiles/query/prometheusResults.cjs.map +1 -1
- package/dist/profiles/query/prometheusResults.d.ts.map +1 -1
- package/dist/profiles/query/prometheusResults.js +24 -36
- package/dist/profiles/query/prometheusResults.js.map +1 -1
- package/dist/rpc/CommandForm.cjs +1 -1
- package/dist/rpc/CommandForm.cjs.map +1 -1
- package/dist/rpc/CommandForm.js +1 -1
- package/dist/rpc/CommandForm.js.map +1 -1
- package/dist/rpc/classify.cjs +1 -1
- package/dist/rpc/classify.cjs.map +1 -1
- package/dist/rpc/classify.d.ts.map +1 -1
- package/dist/rpc/classify.js +1 -1
- package/dist/rpc/classify.js.map +1 -1
- package/dist/rpc/useOperations.d.ts +24 -24
- package/dist/rpc.cjs +0 -2
- package/dist/rpc.d.ts +0 -1
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +1 -2
- package/dist/styles.css +1 -1
- package/dist/utils.cjs +6 -0
- package/dist/utils.d.ts +2 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -2
- package/package.json +9 -3
- package/schemas/json-schema-form.schema.json +9 -1
|
@@ -0,0 +1,863 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { DEFAULT_COMMENT_STATUSES } from "../../comments/comment-types.js";
|
|
3
|
+
import { getRoots, selectAnchorThreads } from "../../comments/comment-utils.js";
|
|
4
|
+
import { resolveCommentStage, selectCommentThreadsByStage } from "../../lib/comment-stage.js";
|
|
5
|
+
import { UiEye } from "../../icons/components/UiEye.js";
|
|
6
|
+
import { UiDotsVertical } from "../../icons/components/UiDotsVertical.js";
|
|
7
|
+
import { UiCheck } from "../../icons/components/UiCheck.js";
|
|
8
|
+
import { UiFileCode } from "../../icons/components/UiFileCode.js";
|
|
9
|
+
import { UiGitCommit } from "../../icons/components/UiGitCommit.js";
|
|
10
|
+
import { UiListChecks } from "../../icons/components/UiListChecks.js";
|
|
11
|
+
import { useResolvedTheme } from "../../hooks/use-theme.js";
|
|
12
|
+
import { Icon } from "../../data/Icon.js";
|
|
13
|
+
import { Button } from "../../components/button.js";
|
|
14
|
+
import { DropdownMenu } from "../../overlay/DropdownMenu.js";
|
|
15
|
+
import { highlightToLines, languageFromPath } from "../../data/code-highlight.js";
|
|
16
|
+
import { Markdown } from "../../data/Markdown.js";
|
|
17
|
+
import { Tabs } from "../../layout/Tabs.js";
|
|
18
|
+
import { ProblemActions } from "../../data/diagnostics/ProblemActions.js";
|
|
19
|
+
import { CommentThread } from "../../comments/CommentThread.js";
|
|
20
|
+
import { FINDINGS_COMMENT_CONFIG, findingsToComments, lineAnchor } from "../findings-comments.js";
|
|
21
|
+
import { AnnotatedCode } from "../LazyAnnotatedCode.js";
|
|
22
|
+
import { blankMdxPreamble } from "../mdx-source.js";
|
|
23
|
+
import { describeQuote, locateSelection, locateSourceSelection, parseQuoteAnchor, quoteAnchor, sourceSpans } from "./quote-anchor.js";
|
|
24
|
+
import { layoutCards } from "./geometry.js";
|
|
25
|
+
import { useAnchorBoxes, useCardHeights, useNarrow } from "./hooks.js";
|
|
26
|
+
import { SEVERITY_MARK, SEVERITY_RANK, severityOf, squiggle } from "./marks.js";
|
|
27
|
+
import { ProblemsList } from "./ProblemsList.js";
|
|
28
|
+
import { blameLines } from "./blame.js";
|
|
29
|
+
import { markAnchors, sourceRangeOf, sourceSpanOf } from "./source-marks.js";
|
|
30
|
+
import { SourceView } from "./SourceView.js";
|
|
31
|
+
import { describeSource, locateSource, parseSourceAnchor, resolveSource, sourceAnchor } from "./source-anchor.js";
|
|
32
|
+
import { InlineThread } from "./InlineThread.js";
|
|
33
|
+
import { InlineAuthors } from "./InlineAuthors.js";
|
|
34
|
+
import { CommentDraft } from "./CommentDraft.js";
|
|
35
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
36
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
+
// src/file-findings/file-review/FileReview.tsx
|
|
38
|
+
var DEFAULT_CONFIG = { statuses: DEFAULT_COMMENT_STATUSES };
|
|
39
|
+
var ESTIMATED_CARD_HEIGHT = 96;
|
|
40
|
+
/** How long the pointer rests on a highlight before its inline box opens. */
|
|
41
|
+
var HOVER_OPEN_MS = 450;
|
|
42
|
+
/** Grace period for the pointer to travel from a highlight into its inline box. */
|
|
43
|
+
var HOVER_CLOSE_MS = 300;
|
|
44
|
+
/** Width left of a block, over its severity bar, that previews a finding on hover. */
|
|
45
|
+
var BAR_HOVER_WIDTH = 16;
|
|
46
|
+
var NO_FINDINGS = [];
|
|
47
|
+
var NO_COMMENTS = [];
|
|
48
|
+
var NO_CALLBACKS = {};
|
|
49
|
+
/** Findings anchor on their line (`lineAnchor`); people's threads on a quote. */
|
|
50
|
+
var FINDING_ANCHOR_PREFIX = lineAnchor(1).replace(/\d+$/, "");
|
|
51
|
+
var isFindingAnchor = (anchor) => anchor.startsWith(FINDING_ANCHOR_PREFIX);
|
|
52
|
+
var isMarkdownPath = (path) => /\.mdx?$/i.test(path);
|
|
53
|
+
/** Anchors on quoted text: words in rendered markdown (`q:`) or characters in a source file (`s:`). */
|
|
54
|
+
var isTextAnchor = (anchor) => anchor.startsWith("q:") || anchor.startsWith("s:");
|
|
55
|
+
var quoteDraft = (locator) => ({
|
|
56
|
+
anchor: quoteAnchor(locator),
|
|
57
|
+
label: describeQuote(locator)
|
|
58
|
+
});
|
|
59
|
+
function boxClass({ mode, active }) {
|
|
60
|
+
if (mode === "block") return cn("border-l-[3px] border-amber-400", active ? "bg-amber-200/50 [[data-theme=dark]_&]:bg-amber-400/20" : "bg-amber-100/30 [[data-theme=dark]_&]:bg-amber-400/5");
|
|
61
|
+
return cn("rounded-sm", active ? "bg-amber-300 [[data-theme=dark]_&]:bg-amber-400/50" : "bg-amber-200/60 [[data-theme=dark]_&]:bg-amber-400/25");
|
|
62
|
+
}
|
|
63
|
+
function anchorLabel(anchor, found) {
|
|
64
|
+
const label = anchor.startsWith("q:") ? describeQuote(parseQuoteAnchor(anchor)) : anchor.startsWith("s:") ? describeSource(parseSourceAnchor(anchor)) : anchor.replace("line:", "line ");
|
|
65
|
+
return found ? label : `Text not found · ${label}`;
|
|
66
|
+
}
|
|
67
|
+
var WORD = /[\p{L}\p{N}'’-]/u;
|
|
68
|
+
/** The word under a viewport point, or null when the point is not over a word. */
|
|
69
|
+
function wordAt(x, y) {
|
|
70
|
+
const caret = document.caretRangeFromPoint?.(x, y);
|
|
71
|
+
const node = caret?.startContainer;
|
|
72
|
+
if (!caret || !node || node.nodeType !== Node.TEXT_NODE) return null;
|
|
73
|
+
const text = node.textContent ?? "";
|
|
74
|
+
let start = caret.startOffset;
|
|
75
|
+
let end = caret.startOffset;
|
|
76
|
+
while (start > 0 && WORD.test(text[start - 1])) start--;
|
|
77
|
+
while (end < text.length && WORD.test(text[end])) end++;
|
|
78
|
+
if (start === end) return null;
|
|
79
|
+
const range = document.createRange();
|
|
80
|
+
range.setStart(node, start);
|
|
81
|
+
range.setEnd(node, end);
|
|
82
|
+
return range;
|
|
83
|
+
}
|
|
84
|
+
var LAYOUTS = [{
|
|
85
|
+
id: "inline",
|
|
86
|
+
label: "Inline comments"
|
|
87
|
+
}, {
|
|
88
|
+
id: "margin",
|
|
89
|
+
label: "Comment sidebar"
|
|
90
|
+
}];
|
|
91
|
+
var SIDEBAR_ALIGNS = [{
|
|
92
|
+
id: "line",
|
|
93
|
+
label: "Align to line"
|
|
94
|
+
}, {
|
|
95
|
+
id: "stack",
|
|
96
|
+
label: "Stacked list"
|
|
97
|
+
}];
|
|
98
|
+
/** Space kept above a target scrolled into view. */
|
|
99
|
+
var REVEAL_OFFSET = 48;
|
|
100
|
+
/**
|
|
101
|
+
* Google Docs-style review of one file. Markdown gets a rendered Preview with
|
|
102
|
+
* threads in the margin or inline; any file gets a syntax-highlighted Source
|
|
103
|
+
* listing with threads under their lines. Each feature is on when its prop is
|
|
104
|
+
* given: lint `findings` (rail, squiggles, Problems), people's `comments`
|
|
105
|
+
* (quote highlights and threads), text selection to comment, `blame`, and an
|
|
106
|
+
* editable source.
|
|
107
|
+
*/
|
|
108
|
+
function FileReview({ path, source: raw, view, onViewChange, findings: findingsProp, problemFilters, onProblemFiltersChange, comments, mode = "text", selectToComment = false, authorFilter = false, layout = "margin", onLayoutChange, onSourceChange, blame, line, onLineChange, getFindingActions, toolbar, className }) {
|
|
109
|
+
const lint = findingsProp !== void 0;
|
|
110
|
+
const findings = findingsProp ?? NO_FINDINGS;
|
|
111
|
+
const prose = isMarkdownPath(path);
|
|
112
|
+
if (view === "problems" && !lint) throw new Error("FileReview: view \"problems\" needs `findings`");
|
|
113
|
+
if (view === "problems" && (!problemFilters || !onProblemFiltersChange)) throw new Error("FileReview: view \"problems\" needs `problemFilters` and `onProblemFiltersChange`");
|
|
114
|
+
if (view === "preview" && !prose) throw new Error(`FileReview: view "preview" needs a markdown file, got ${path}`);
|
|
115
|
+
const [showBlame, setShowBlame] = useState(false);
|
|
116
|
+
const [showFindings, setShowFindings] = useState(true);
|
|
117
|
+
const blaming = showBlame && blame !== void 0;
|
|
118
|
+
const editing = onSourceChange !== void 0 && !blaming;
|
|
119
|
+
const people = comments?.items ?? NO_COMMENTS;
|
|
120
|
+
const callbacks = comments?.callbacks ?? NO_CALLBACKS;
|
|
121
|
+
const hostConfig = comments?.config ?? DEFAULT_CONFIG;
|
|
122
|
+
const config = useMemo(() => ({
|
|
123
|
+
...hostConfig,
|
|
124
|
+
statuses: [...hostConfig.statuses, ...FINDINGS_COMMENT_CONFIG.statuses],
|
|
125
|
+
facets: [...hostConfig.facets ?? [], ...(FINDINGS_COMMENT_CONFIG.facets ?? []).filter((facet) => facet.key !== "severity")]
|
|
126
|
+
}), [hostConfig]);
|
|
127
|
+
const canComment = selectToComment && Boolean(callbacks.onCreate);
|
|
128
|
+
const source = useMemo(() => path.endsWith(".mdx") ? blankMdxPreamble(raw) : raw, [path, raw]);
|
|
129
|
+
const sourceLines = useMemo(() => source.split("\n"), [source]);
|
|
130
|
+
const blamed = useMemo(() => blaming ? blameLines(blame, sourceLines.length) : null, [
|
|
131
|
+
blaming,
|
|
132
|
+
blame,
|
|
133
|
+
sourceLines.length
|
|
134
|
+
]);
|
|
135
|
+
const theme = useResolvedTheme();
|
|
136
|
+
const tokenized = view === "source" && !editing || view === "problems";
|
|
137
|
+
const [tokens, setTokens] = useState(null);
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
if (!tokenized) return;
|
|
140
|
+
let current = true;
|
|
141
|
+
const shiki = theme === "dark" ? "github-dark" : "github-light";
|
|
142
|
+
highlightToLines(source, {
|
|
143
|
+
lang: languageFromPath(path),
|
|
144
|
+
theme: shiki
|
|
145
|
+
}).then((lines) => current && setTokens({
|
|
146
|
+
source,
|
|
147
|
+
lines
|
|
148
|
+
}));
|
|
149
|
+
return () => {
|
|
150
|
+
current = false;
|
|
151
|
+
};
|
|
152
|
+
}, [
|
|
153
|
+
tokenized,
|
|
154
|
+
source,
|
|
155
|
+
path,
|
|
156
|
+
theme
|
|
157
|
+
]);
|
|
158
|
+
const sourceTokens = tokens?.source === source ? tokens.lines : null;
|
|
159
|
+
const [align, setAlign] = useState("line");
|
|
160
|
+
const [focused, setFocused] = useState(null);
|
|
161
|
+
const [hovered, setHovered] = useState(null);
|
|
162
|
+
const [draft, setDraft] = useState(null);
|
|
163
|
+
const [filter, setFilter] = useState("all");
|
|
164
|
+
const [editorLine, setEditorLine] = useState(void 0);
|
|
165
|
+
/** A finding picked from Source or Problems: the preview scrolls to it once its box is measured. */
|
|
166
|
+
const [revealing, setRevealing] = useState(null);
|
|
167
|
+
const scroller = useRef(null);
|
|
168
|
+
/** The rendered document's own scroll pane, beside the sidebar's (wide layouts only). */
|
|
169
|
+
const bodyPane = useRef(null);
|
|
170
|
+
const sidebarPane = useRef(null);
|
|
171
|
+
const outer = useRef(null);
|
|
172
|
+
const origin = useRef(null);
|
|
173
|
+
const markdown = useRef(null);
|
|
174
|
+
const narrow = useNarrow(outer);
|
|
175
|
+
const { heights, refFor } = useCardHeights();
|
|
176
|
+
const findingComments = useMemo(() => findingsToComments(findings), [findings]);
|
|
177
|
+
const all = useMemo(() => [...findingComments, ...people], [findingComments, people]);
|
|
178
|
+
const findingById = useMemo(() => new Map(findingComments.map((c, i) => [c.id, findings[i]])), [findingComments, findings]);
|
|
179
|
+
const renderRootDetails = useMemo(() => {
|
|
180
|
+
if (!getFindingActions) return void 0;
|
|
181
|
+
return (comment) => {
|
|
182
|
+
const finding = findingById.get(comment.id);
|
|
183
|
+
return finding ? /* @__PURE__ */ jsx(ProblemActions, { items: getFindingActions(finding) }) : null;
|
|
184
|
+
};
|
|
185
|
+
}, [getFindingActions, findingById]);
|
|
186
|
+
const filtered = useMemo(() => all.filter((c) => c.parentId || filter === "all" || (c.author?.kind ?? "user") === filter), [all, filter]);
|
|
187
|
+
const open = useMemo(() => selectCommentThreadsByStage(filtered, config, "active"), [filtered, config]);
|
|
188
|
+
const resolvedCount = getRoots(filtered).filter((c) => resolveCommentStage(config, c.status) !== "active").length;
|
|
189
|
+
const threadAnchors = useMemo(() => [...new Set(getRoots(open).map((c) => c.anchor ?? ""))].filter(Boolean), [open]);
|
|
190
|
+
const draftAnchor = draft?.expanded ? draft.anchor : null;
|
|
191
|
+
const unposted = draftAnchor && !threadAnchors.includes(draftAnchor) ? draftAnchor : null;
|
|
192
|
+
const anchors = useMemo(() => unposted ? [...threadAnchors, unposted] : threadAnchors, [threadAnchors, unposted]);
|
|
193
|
+
const severity = useMemo(() => {
|
|
194
|
+
const worst = /* @__PURE__ */ new Map();
|
|
195
|
+
for (const c of getRoots(open)) {
|
|
196
|
+
if (!c.anchor || !isFindingAnchor(c.anchor)) continue;
|
|
197
|
+
const level = severityOf(c.status);
|
|
198
|
+
const current = worst.get(c.anchor);
|
|
199
|
+
if (!current || SEVERITY_RANK[level] > SEVERITY_RANK[current]) worst.set(c.anchor, level);
|
|
200
|
+
}
|
|
201
|
+
return worst;
|
|
202
|
+
}, [open]);
|
|
203
|
+
const { boxes, height, width } = useAnchorBoxes({
|
|
204
|
+
origin,
|
|
205
|
+
markdown,
|
|
206
|
+
anchors,
|
|
207
|
+
mode,
|
|
208
|
+
visible: view === "preview"
|
|
209
|
+
});
|
|
210
|
+
const sourceOrigin = useRef(null);
|
|
211
|
+
const [sourceWidth, setSourceWidth] = useState(0);
|
|
212
|
+
const [sourceMarks, setSourceMarks] = useState([]);
|
|
213
|
+
useLayoutEffect(() => {
|
|
214
|
+
if (view !== "source" || !sourceOrigin.current) return;
|
|
215
|
+
const root = markdown.current;
|
|
216
|
+
const mark = () => setSourceMarks(anchors.flatMap((anchor) => {
|
|
217
|
+
if (anchor.startsWith("s:")) return [{
|
|
218
|
+
anchor,
|
|
219
|
+
spans: resolveSource(source, parseSourceAnchor(anchor))
|
|
220
|
+
}];
|
|
221
|
+
if (root && anchor.startsWith("q:")) return [{
|
|
222
|
+
anchor,
|
|
223
|
+
spans: sourceSpans(root, sourceLines, parseQuoteAnchor(anchor))
|
|
224
|
+
}];
|
|
225
|
+
return [];
|
|
226
|
+
}).filter((m) => m.spans.length > 0));
|
|
227
|
+
mark();
|
|
228
|
+
const renders = new MutationObserver(mark);
|
|
229
|
+
if (root) renders.observe(root, {
|
|
230
|
+
childList: true,
|
|
231
|
+
subtree: true,
|
|
232
|
+
characterData: true
|
|
233
|
+
});
|
|
234
|
+
const el = sourceOrigin.current;
|
|
235
|
+
const resizes = new ResizeObserver(() => setSourceWidth(el.offsetWidth));
|
|
236
|
+
resizes.observe(el);
|
|
237
|
+
return () => {
|
|
238
|
+
renders.disconnect();
|
|
239
|
+
resizes.disconnect();
|
|
240
|
+
};
|
|
241
|
+
}, [
|
|
242
|
+
view,
|
|
243
|
+
anchors,
|
|
244
|
+
source,
|
|
245
|
+
sourceLines,
|
|
246
|
+
editing
|
|
247
|
+
]);
|
|
248
|
+
const hoverTimer = useRef(null);
|
|
249
|
+
/** The anchor the pointer is heading for; `hovered` catches up once the timer fires. */
|
|
250
|
+
const intended = useRef(null);
|
|
251
|
+
const inlineAnchor = focused ?? hovered;
|
|
252
|
+
useEffect(() => () => clearTimeout(hoverTimer.current ?? void 0), []);
|
|
253
|
+
/** The hovered or pinned quote thread in Source, floating under its highlighted words. */
|
|
254
|
+
const [sourceThread, setSourceThread] = useState(null);
|
|
255
|
+
useLayoutEffect(() => {
|
|
256
|
+
const root = sourceOrigin.current;
|
|
257
|
+
if (view !== "source" || !root || !inlineAnchor || !isTextAnchor(inlineAnchor)) return setSourceThread(null);
|
|
258
|
+
const base = root.getBoundingClientRect();
|
|
259
|
+
const boxes = [...root.querySelectorAll("[data-source-comment]")].filter((el) => markAnchors(el).includes(inlineAnchor)).flatMap((el) => [...el.getClientRects()]).map((r) => ({
|
|
260
|
+
top: r.top - base.top,
|
|
261
|
+
left: r.left - base.left,
|
|
262
|
+
width: r.width,
|
|
263
|
+
height: r.height
|
|
264
|
+
}));
|
|
265
|
+
setSourceThread(boxes.length > 0 ? {
|
|
266
|
+
anchor: inlineAnchor,
|
|
267
|
+
boxes
|
|
268
|
+
} : null);
|
|
269
|
+
}, [
|
|
270
|
+
view,
|
|
271
|
+
inlineAnchor,
|
|
272
|
+
sourceMarks,
|
|
273
|
+
sourceWidth
|
|
274
|
+
]);
|
|
275
|
+
const target = revealing ? boxes.get(revealing)?.[0] : void 0;
|
|
276
|
+
useEffect(() => {
|
|
277
|
+
const pane = (narrow ? scroller : bodyPane).current;
|
|
278
|
+
if (view !== "preview" || !target || !pane || !origin.current) return;
|
|
279
|
+
const top = origin.current.getBoundingClientRect().top - pane.getBoundingClientRect().top + pane.scrollTop + target.top;
|
|
280
|
+
if (!(top >= pane.scrollTop && top + target.height <= pane.scrollTop + pane.clientHeight)) pane.scrollTop = top - REVEAL_OFFSET;
|
|
281
|
+
setRevealing(null);
|
|
282
|
+
}, [
|
|
283
|
+
view,
|
|
284
|
+
target,
|
|
285
|
+
narrow
|
|
286
|
+
]);
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
const pane = scroller.current;
|
|
289
|
+
if (view !== "source" || !revealing || !pane) return;
|
|
290
|
+
const line = isFindingAnchor(revealing) ? revealing.slice(FINDING_ANCHOR_PREFIX.length) : null;
|
|
291
|
+
const row = line ? pane.querySelector(`[data-source-line="${line}"]`) : null;
|
|
292
|
+
if (row) {
|
|
293
|
+
const top = row.getBoundingClientRect().top - pane.getBoundingClientRect().top + pane.scrollTop;
|
|
294
|
+
if (!(top >= pane.scrollTop && top + row.offsetHeight <= pane.scrollTop + pane.clientHeight)) pane.scrollTop = top - REVEAL_OFFSET;
|
|
295
|
+
}
|
|
296
|
+
setRevealing(null);
|
|
297
|
+
}, [view, revealing]);
|
|
298
|
+
const sidebarScrolls = layout === "margin" && !narrow;
|
|
299
|
+
/** Aligned cards sit at their anchor's offset, so matching the document's scroll puts each level with its line. */
|
|
300
|
+
const levelSidebar = () => {
|
|
301
|
+
if (sidebarScrolls && align === "line" && sidebarPane.current && bodyPane.current) sidebarPane.current.scrollTop = bodyPane.current.scrollTop;
|
|
302
|
+
};
|
|
303
|
+
useEffect(levelSidebar, [
|
|
304
|
+
focused,
|
|
305
|
+
align,
|
|
306
|
+
sidebarScrolls
|
|
307
|
+
]);
|
|
308
|
+
useEffect(() => {
|
|
309
|
+
const pane = sidebarPane.current;
|
|
310
|
+
if (!sidebarScrolls || align !== "stack" || !focused || !pane) return;
|
|
311
|
+
const card = [...pane.querySelectorAll("[data-card-anchor]")].find((el) => el.dataset.cardAnchor === focused);
|
|
312
|
+
if (!card) return;
|
|
313
|
+
const top = card.getBoundingClientRect().top - pane.getBoundingClientRect().top + pane.scrollTop;
|
|
314
|
+
if (!(top >= pane.scrollTop && top + card.offsetHeight <= pane.scrollTop + pane.clientHeight)) pane.scrollTop = top - REVEAL_OFFSET;
|
|
315
|
+
}, [
|
|
316
|
+
focused,
|
|
317
|
+
align,
|
|
318
|
+
sidebarScrolls
|
|
319
|
+
]);
|
|
320
|
+
/** Picking a card focuses its thread and brings the anchored text into view. */
|
|
321
|
+
function focusCard(anchor) {
|
|
322
|
+
setFocused(anchor);
|
|
323
|
+
setRevealing(anchor);
|
|
324
|
+
if (isFindingAnchor(anchor)) onLineChange?.(Number(anchor.slice(FINDING_ANCHOR_PREFIX.length)));
|
|
325
|
+
}
|
|
326
|
+
function openFinding(finding) {
|
|
327
|
+
const anchor = lineAnchor(finding.line);
|
|
328
|
+
onViewChange(prose ? "preview" : "source");
|
|
329
|
+
setFocused(anchor);
|
|
330
|
+
setRevealing(anchor);
|
|
331
|
+
if (!prose) setEditorLine(finding.line);
|
|
332
|
+
onLineChange?.(finding.line);
|
|
333
|
+
}
|
|
334
|
+
useEffect(() => {
|
|
335
|
+
if (line === void 0) return;
|
|
336
|
+
const anchor = lineAnchor(line);
|
|
337
|
+
setFocused(anchor);
|
|
338
|
+
setRevealing(anchor);
|
|
339
|
+
setEditorLine(line);
|
|
340
|
+
}, [line]);
|
|
341
|
+
const documentOrder = [...boxes.keys()];
|
|
342
|
+
const tops = layoutCards({
|
|
343
|
+
cards: threadAnchors.map((anchor) => ({
|
|
344
|
+
anchor,
|
|
345
|
+
desired: boxes.get(anchor)?.[0]?.top ?? height,
|
|
346
|
+
order: boxes.has(anchor) ? documentOrder.indexOf(anchor) : documentOrder.length,
|
|
347
|
+
height: heights[anchor] ?? ESTIMATED_CARD_HEIGHT
|
|
348
|
+
})),
|
|
349
|
+
focused
|
|
350
|
+
});
|
|
351
|
+
const railHeight = Math.max(height, ...threadAnchors.map((a) => (tops.get(a) ?? 0) + (heights[a] ?? ESTIMATED_CARD_HEIGHT)));
|
|
352
|
+
const ordered = [...threadAnchors].sort((a, b) => (tops.get(a) ?? 0) - (tops.get(b) ?? 0));
|
|
353
|
+
/**
|
|
354
|
+
* The anchor under the pointer, preferring an exact quote over the block holding it.
|
|
355
|
+
* A click takes the whole block; a hover only an exact quote or a block's severity
|
|
356
|
+
* bar, so reading a paragraph with a finding in it does not open anything.
|
|
357
|
+
*/
|
|
358
|
+
function anchorAt(event, intent) {
|
|
359
|
+
const base = event.currentTarget.getBoundingClientRect();
|
|
360
|
+
const x = event.clientX - base.left;
|
|
361
|
+
const y = event.clientY - base.top;
|
|
362
|
+
const hits = [...boxes].filter(([anchor, list]) => {
|
|
363
|
+
if (anchor === unposted) return false;
|
|
364
|
+
if (isFindingAnchor(anchor)) {
|
|
365
|
+
const last = list[list.length - 1];
|
|
366
|
+
return x <= BAR_HOVER_WIDTH && y >= list[0].top && y <= last.top + last.height || intent === "click" && list.some((b) => y >= b.top && y <= b.top + b.height && x >= b.left && x <= b.left + b.width);
|
|
367
|
+
}
|
|
368
|
+
return list.some((b) => {
|
|
369
|
+
if (y < b.top || y > b.top + b.height) return false;
|
|
370
|
+
const exact = mode === "text";
|
|
371
|
+
if (intent === "click" || exact) return x >= b.left - (exact ? 0 : 12) && x <= b.left + b.width;
|
|
372
|
+
return x >= b.left - BAR_HOVER_WIDTH && x <= b.left;
|
|
373
|
+
});
|
|
374
|
+
}).map(([anchor]) => anchor);
|
|
375
|
+
return hits.find((a) => a.startsWith("q:")) ?? hits[0] ?? null;
|
|
376
|
+
}
|
|
377
|
+
const fromInlineThread = (event) => event.target.closest("[data-inline-thread], [data-comment-draft], [data-source-thread]") !== null;
|
|
378
|
+
/**
|
|
379
|
+
* The anchor a selection makes. In markdown, a Source selection is mapped onto
|
|
380
|
+
* the rendered text so the thread shows in Preview too; in any other file it
|
|
381
|
+
* anchors on the source characters.
|
|
382
|
+
*/
|
|
383
|
+
function locate(surface, range) {
|
|
384
|
+
if (!prose) {
|
|
385
|
+
const covered = sourceRangeOf(range);
|
|
386
|
+
const locator = covered && locateSource(source, covered.start, covered.end);
|
|
387
|
+
return locator ? {
|
|
388
|
+
anchor: sourceAnchor(locator),
|
|
389
|
+
label: describeSource(locator)
|
|
390
|
+
} : null;
|
|
391
|
+
}
|
|
392
|
+
if (!markdown.current) return null;
|
|
393
|
+
if (surface === "preview") {
|
|
394
|
+
const locator = locateSelection(markdown.current, range);
|
|
395
|
+
return locator && quoteDraft(locator);
|
|
396
|
+
}
|
|
397
|
+
const span = sourceSpanOf(range);
|
|
398
|
+
const locator = span && locateSourceSelection(markdown.current, sourceLines, span);
|
|
399
|
+
return locator && quoteDraft(locator);
|
|
400
|
+
}
|
|
401
|
+
const surfaceOrigin = (surface) => (surface === "preview" ? origin : sourceOrigin).current;
|
|
402
|
+
function focusAt(event) {
|
|
403
|
+
if (!window.getSelection()?.isCollapsed || fromInlineThread(event) || event.target.closest("button, a")) return;
|
|
404
|
+
setFocused(anchorAt(event, "click"));
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Hover intent: the pointer has to rest on a highlight before its box opens,
|
|
408
|
+
* and leaving starts a grace period so the pointer can still reach the box.
|
|
409
|
+
* Re-targeting only on a change keeps continuous movement from resetting the timer.
|
|
410
|
+
*/
|
|
411
|
+
function hoverTo(anchor) {
|
|
412
|
+
if (anchor === intended.current) return;
|
|
413
|
+
intended.current = anchor;
|
|
414
|
+
clearTimeout(hoverTimer.current ?? void 0);
|
|
415
|
+
hoverTimer.current = setTimeout(() => setHovered(anchor), anchor ? HOVER_OPEN_MS : HOVER_CLOSE_MS);
|
|
416
|
+
}
|
|
417
|
+
function keepHover(anchor) {
|
|
418
|
+
clearTimeout(hoverTimer.current ?? void 0);
|
|
419
|
+
intended.current = anchor;
|
|
420
|
+
}
|
|
421
|
+
function closeInlineThread() {
|
|
422
|
+
clearTimeout(hoverTimer.current ?? void 0);
|
|
423
|
+
intended.current = null;
|
|
424
|
+
setFocused(null);
|
|
425
|
+
setHovered(null);
|
|
426
|
+
}
|
|
427
|
+
/** Source previews a thread while the pointer rests on its highlighted words. */
|
|
428
|
+
function hoverSourceAt(event) {
|
|
429
|
+
if (fromInlineThread(event)) return;
|
|
430
|
+
const selecting = event.buttons !== 0 || !window.getSelection()?.isCollapsed;
|
|
431
|
+
const mark = event.target.closest("[data-source-comment]");
|
|
432
|
+
hoverTo(selecting || !mark ? null : markAnchors(mark)[0]);
|
|
433
|
+
}
|
|
434
|
+
/** Clicking away from a highlight and its box unpins it. */
|
|
435
|
+
function unpinSourceAt(event) {
|
|
436
|
+
if (fromInlineThread(event) || event.target.closest("[data-source-comment], button, a")) return;
|
|
437
|
+
if (focused && isTextAnchor(focused) && window.getSelection()?.isCollapsed) closeInlineThread();
|
|
438
|
+
}
|
|
439
|
+
function hoverAt(event) {
|
|
440
|
+
if (layout !== "inline" || fromInlineThread(event)) return;
|
|
441
|
+
hoverTo(event.buttons !== 0 || !window.getSelection()?.isCollapsed ? null : anchorAt(event, "hover"));
|
|
442
|
+
}
|
|
443
|
+
function offerComment(event, surface) {
|
|
444
|
+
if (!canComment || fromInlineThread(event) || event.target.closest("[data-comment-author]")) return;
|
|
445
|
+
const selection = window.getSelection();
|
|
446
|
+
const range = selection && !selection.isCollapsed && selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
|
|
447
|
+
const locator = range ? locate(surface, range) : null;
|
|
448
|
+
if (!range || !locator) {
|
|
449
|
+
setDraft((current) => current?.expanded ? current : null);
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const base = surfaceOrigin(surface).getBoundingClientRect();
|
|
453
|
+
const rect = range.getBoundingClientRect();
|
|
454
|
+
setDraft({
|
|
455
|
+
...locator,
|
|
456
|
+
position: {
|
|
457
|
+
top: rect.top - base.top,
|
|
458
|
+
bottom: rect.bottom - base.top,
|
|
459
|
+
left: rect.left - base.left + rect.width / 2
|
|
460
|
+
},
|
|
461
|
+
expanded: false,
|
|
462
|
+
surface
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Right-click offers Comment at the pointer: on the selection when the pointer
|
|
467
|
+
* is inside it, else on the word under the pointer, which it selects.
|
|
468
|
+
*/
|
|
469
|
+
function commentMenu(event, surface) {
|
|
470
|
+
if (!canComment || fromInlineThread(event) || event.target.closest("[data-comment-author], button, a")) return;
|
|
471
|
+
const selection = window.getSelection();
|
|
472
|
+
const current = selection && !selection.isCollapsed && selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
|
|
473
|
+
const inside = current && [...current.getClientRects()].some((r) => event.clientX >= r.left && event.clientX <= r.right && event.clientY >= r.top && event.clientY <= r.bottom);
|
|
474
|
+
const range = inside ? current : wordAt(event.clientX, event.clientY);
|
|
475
|
+
const locator = range ? locate(surface, range) : null;
|
|
476
|
+
if (!range || !locator) return;
|
|
477
|
+
event.preventDefault();
|
|
478
|
+
if (!inside) {
|
|
479
|
+
selection?.removeAllRanges();
|
|
480
|
+
selection?.addRange(range);
|
|
481
|
+
}
|
|
482
|
+
const base = surfaceOrigin(surface).getBoundingClientRect();
|
|
483
|
+
const rect = range.getBoundingClientRect();
|
|
484
|
+
setDraft({
|
|
485
|
+
...locator,
|
|
486
|
+
position: {
|
|
487
|
+
top: rect.top - base.top,
|
|
488
|
+
bottom: rect.bottom - base.top,
|
|
489
|
+
left: event.clientX - base.left
|
|
490
|
+
},
|
|
491
|
+
expanded: false,
|
|
492
|
+
surface
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
/** The pill morphs into its composer card; the measured highlight replaces the browser selection. */
|
|
496
|
+
function expandDraft() {
|
|
497
|
+
setDraft((current) => current && {
|
|
498
|
+
...current,
|
|
499
|
+
expanded: true
|
|
500
|
+
});
|
|
501
|
+
window.getSelection()?.removeAllRanges();
|
|
502
|
+
}
|
|
503
|
+
const closeDraft = useCallback(() => setDraft(null), []);
|
|
504
|
+
/** An open card follows its measured highlight, so a reflow (width, layout) keeps it beside the text. */
|
|
505
|
+
function draftPosition(current) {
|
|
506
|
+
const list = current.expanded && current.surface === "preview" ? boxes.get(current.anchor) : void 0;
|
|
507
|
+
const first = list?.[0];
|
|
508
|
+
const last = list?.at(-1);
|
|
509
|
+
if (!first || !last) return current.position;
|
|
510
|
+
return {
|
|
511
|
+
top: first.top,
|
|
512
|
+
bottom: last.top + last.height,
|
|
513
|
+
left: first.left + first.width / 2
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
function renderDraft(current, containerWidth) {
|
|
517
|
+
const onCreate = callbacks.onCreate;
|
|
518
|
+
if (!onCreate) return null;
|
|
519
|
+
const { anchor, label } = current;
|
|
520
|
+
return /* @__PURE__ */ jsx(CommentDraft, {
|
|
521
|
+
anchor,
|
|
522
|
+
label,
|
|
523
|
+
position: draftPosition(current),
|
|
524
|
+
containerWidth,
|
|
525
|
+
expanded: current.expanded,
|
|
526
|
+
config,
|
|
527
|
+
onExpand: expandDraft,
|
|
528
|
+
onClose: closeDraft,
|
|
529
|
+
onCreate: async (input) => {
|
|
530
|
+
await onCreate(input);
|
|
531
|
+
setDraft(null);
|
|
532
|
+
setFocused(anchor);
|
|
533
|
+
}
|
|
534
|
+
}, anchor);
|
|
535
|
+
}
|
|
536
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
537
|
+
ref: outer,
|
|
538
|
+
"data-file-review": path,
|
|
539
|
+
className: cn("flex min-h-0 flex-col gap-2", className ?? "h-[600px]"),
|
|
540
|
+
children: [
|
|
541
|
+
/* @__PURE__ */ jsxs("div", {
|
|
542
|
+
className: "flex shrink-0 flex-wrap items-center gap-2 text-xs text-muted-foreground",
|
|
543
|
+
children: [
|
|
544
|
+
toolbar,
|
|
545
|
+
(comments || lint) && /* @__PURE__ */ jsxs("span", { children: [
|
|
546
|
+
getRoots(open).length,
|
|
547
|
+
" open · ",
|
|
548
|
+
resolvedCount,
|
|
549
|
+
" resolved (hidden)"
|
|
550
|
+
] }),
|
|
551
|
+
comments && layout === "inline" && /* @__PURE__ */ jsx("span", { children: "· hover a highlight to view or reply" }),
|
|
552
|
+
canComment && /* @__PURE__ */ jsx("span", { children: "· select or right-click text to comment" }),
|
|
553
|
+
authorFilter && /* @__PURE__ */ jsx("div", {
|
|
554
|
+
role: "radiogroup",
|
|
555
|
+
"aria-label": "Authors",
|
|
556
|
+
className: "ml-auto inline-flex rounded-md border border-border p-0.5",
|
|
557
|
+
children: [
|
|
558
|
+
"all",
|
|
559
|
+
"user",
|
|
560
|
+
"agent"
|
|
561
|
+
].map((value) => /* @__PURE__ */ jsx("button", {
|
|
562
|
+
type: "button",
|
|
563
|
+
role: "radio",
|
|
564
|
+
"aria-checked": filter === value,
|
|
565
|
+
onClick: () => setFilter(value),
|
|
566
|
+
className: cn("rounded px-2 py-0.5 font-medium", filter === value ? "bg-primary text-primary-foreground" : "hover:text-foreground"),
|
|
567
|
+
children: value === "all" ? "All" : value === "user" ? "People" : "Tools"
|
|
568
|
+
}, value))
|
|
569
|
+
})
|
|
570
|
+
]
|
|
571
|
+
}),
|
|
572
|
+
/* @__PURE__ */ jsxs("div", {
|
|
573
|
+
className: "flex shrink-0 items-center border-b border-border",
|
|
574
|
+
children: [
|
|
575
|
+
/* @__PURE__ */ jsx(Tabs, {
|
|
576
|
+
className: "min-w-0 flex-1 border-b-0",
|
|
577
|
+
value: view,
|
|
578
|
+
onChange: (id) => {
|
|
579
|
+
onViewChange(id);
|
|
580
|
+
setDraft(null);
|
|
581
|
+
},
|
|
582
|
+
tabs: [
|
|
583
|
+
...prose ? [{
|
|
584
|
+
id: "preview",
|
|
585
|
+
label: "Preview",
|
|
586
|
+
icon: UiEye
|
|
587
|
+
}] : [],
|
|
588
|
+
{
|
|
589
|
+
id: "source",
|
|
590
|
+
label: "Source",
|
|
591
|
+
icon: UiFileCode
|
|
592
|
+
},
|
|
593
|
+
...lint ? [{
|
|
594
|
+
id: "problems",
|
|
595
|
+
label: "Problems",
|
|
596
|
+
icon: UiListChecks,
|
|
597
|
+
count: findings.length
|
|
598
|
+
}] : []
|
|
599
|
+
]
|
|
600
|
+
}),
|
|
601
|
+
lint && findings.length > 0 && view === "source" && !editing && /* @__PURE__ */ jsxs(Button, {
|
|
602
|
+
size: "sm",
|
|
603
|
+
variant: showFindings ? "secondary" : "ghost",
|
|
604
|
+
"aria-pressed": showFindings,
|
|
605
|
+
title: showFindings ? "Show only the gutter marks; pick one to read its findings" : "Show each line's findings underneath it",
|
|
606
|
+
onClick: () => setShowFindings((shown) => !shown),
|
|
607
|
+
className: "shrink-0 gap-1.5",
|
|
608
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: UiListChecks }), "Findings"]
|
|
609
|
+
}),
|
|
610
|
+
blame && view === "source" && /* @__PURE__ */ jsxs(Button, {
|
|
611
|
+
size: "sm",
|
|
612
|
+
variant: showBlame ? "secondary" : "ghost",
|
|
613
|
+
"aria-pressed": showBlame,
|
|
614
|
+
title: showBlame ? "Hide who last changed each line" : "Show who last changed each line",
|
|
615
|
+
onClick: () => setShowBlame((shown) => !shown),
|
|
616
|
+
className: "shrink-0 gap-1.5",
|
|
617
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: UiGitCommit }), "Blame"]
|
|
618
|
+
}),
|
|
619
|
+
comments && onLayoutChange && prose && view !== "problems" && /* @__PURE__ */ jsx(DropdownMenu, {
|
|
620
|
+
align: "right",
|
|
621
|
+
icon: UiDotsVertical,
|
|
622
|
+
hideChevron: true,
|
|
623
|
+
variant: "ghost",
|
|
624
|
+
size: "sm",
|
|
625
|
+
title: "View options",
|
|
626
|
+
menuLabel: "View options",
|
|
627
|
+
className: "shrink-0",
|
|
628
|
+
items: [...LAYOUTS.map((entry) => ({
|
|
629
|
+
label: entry.label,
|
|
630
|
+
group: "Comments",
|
|
631
|
+
icon: UiCheck,
|
|
632
|
+
iconClassName: entry.id === layout ? void 0 : "invisible",
|
|
633
|
+
onSelect: () => onLayoutChange(entry.id)
|
|
634
|
+
})), ...layout === "margin" ? SIDEBAR_ALIGNS.map((entry) => ({
|
|
635
|
+
label: entry.label,
|
|
636
|
+
group: "Sidebar cards",
|
|
637
|
+
icon: UiCheck,
|
|
638
|
+
iconClassName: entry.id === align ? void 0 : "invisible",
|
|
639
|
+
onSelect: () => setAlign(entry.id)
|
|
640
|
+
})) : []]
|
|
641
|
+
})
|
|
642
|
+
]
|
|
643
|
+
}),
|
|
644
|
+
/* @__PURE__ */ jsxs("div", {
|
|
645
|
+
ref: scroller,
|
|
646
|
+
className: cn("relative min-h-0 flex-1 rounded-md border border-border bg-background", editing && view === "source" ? "overflow-hidden" : "overflow-y-auto"),
|
|
647
|
+
children: [
|
|
648
|
+
editing && view === "source" && /* @__PURE__ */ jsx(AnnotatedCode, {
|
|
649
|
+
path,
|
|
650
|
+
source: raw,
|
|
651
|
+
findings,
|
|
652
|
+
line: editorLine,
|
|
653
|
+
onLineChange: setEditorLine,
|
|
654
|
+
onChange: onSourceChange,
|
|
655
|
+
inlineChips: true
|
|
656
|
+
}),
|
|
657
|
+
!editing && view === "source" && /* @__PURE__ */ jsxs("div", {
|
|
658
|
+
ref: sourceOrigin,
|
|
659
|
+
className: "relative",
|
|
660
|
+
onMouseUp: (event) => event.button === 0 && offerComment(event, "source"),
|
|
661
|
+
onContextMenu: (event) => commentMenu(event, "source"),
|
|
662
|
+
onClick: unpinSourceAt,
|
|
663
|
+
onMouseMove: hoverSourceAt,
|
|
664
|
+
onMouseLeave: () => hoverTo(null),
|
|
665
|
+
children: [
|
|
666
|
+
/* @__PURE__ */ jsx(SourceView, {
|
|
667
|
+
source,
|
|
668
|
+
tokens: sourceTokens,
|
|
669
|
+
blame: blamed,
|
|
670
|
+
findings,
|
|
671
|
+
showFindings,
|
|
672
|
+
marks: sourceMarks,
|
|
673
|
+
comments: open,
|
|
674
|
+
selected: inlineAnchor ?? draftAnchor,
|
|
675
|
+
onSelect: (f) => {
|
|
676
|
+
setFocused(lineAnchor(f.line));
|
|
677
|
+
onLineChange?.(f.line);
|
|
678
|
+
},
|
|
679
|
+
getFindingActions,
|
|
680
|
+
onFocus: setFocused
|
|
681
|
+
}),
|
|
682
|
+
draft?.surface === "source" && renderDraft(draft, sourceWidth),
|
|
683
|
+
sourceThread && /* @__PURE__ */ jsx(InlineThread, {
|
|
684
|
+
seamless: true,
|
|
685
|
+
anchor: sourceThread.anchor,
|
|
686
|
+
label: anchorLabel(sourceThread.anchor, true),
|
|
687
|
+
boxes: sourceThread.boxes,
|
|
688
|
+
containerWidth: sourceWidth,
|
|
689
|
+
thread: selectAnchorThreads(open, sourceThread.anchor),
|
|
690
|
+
config,
|
|
691
|
+
callbacks,
|
|
692
|
+
pinned: focused === sourceThread.anchor,
|
|
693
|
+
onPin: () => setFocused(sourceThread.anchor),
|
|
694
|
+
onClose: closeInlineThread,
|
|
695
|
+
onPointerEnter: () => keepHover(sourceThread.anchor),
|
|
696
|
+
onPointerLeave: () => hoverTo(null)
|
|
697
|
+
}, sourceThread.anchor)
|
|
698
|
+
]
|
|
699
|
+
}),
|
|
700
|
+
view === "problems" && problemFilters && onProblemFiltersChange && /* @__PURE__ */ jsx(ProblemsList, {
|
|
701
|
+
source,
|
|
702
|
+
tokens: sourceTokens,
|
|
703
|
+
findings,
|
|
704
|
+
filters: problemFilters,
|
|
705
|
+
onFiltersChange: onProblemFiltersChange,
|
|
706
|
+
onOpen: openFinding,
|
|
707
|
+
openLabel: prose ? "Open in preview" : "Open in source",
|
|
708
|
+
getFindingActions
|
|
709
|
+
}),
|
|
710
|
+
prose && /* @__PURE__ */ jsxs("div", {
|
|
711
|
+
className: cn("flex", narrow ? "flex-col gap-4 p-4" : "h-full", view !== "preview" && "hidden"),
|
|
712
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
713
|
+
ref: bodyPane,
|
|
714
|
+
onScroll: levelSidebar,
|
|
715
|
+
className: cn("min-w-0 flex-1", !narrow && "overflow-y-auto p-4"),
|
|
716
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
717
|
+
ref: origin,
|
|
718
|
+
className: "relative",
|
|
719
|
+
onMouseUp: (event) => event.button === 0 && offerComment(event, "preview"),
|
|
720
|
+
onContextMenu: (event) => commentMenu(event, "preview"),
|
|
721
|
+
onClick: focusAt,
|
|
722
|
+
onMouseMove: hoverAt,
|
|
723
|
+
onMouseLeave: () => layout === "inline" && hoverTo(null),
|
|
724
|
+
children: [
|
|
725
|
+
[...boxes].flatMap(([anchor, list]) => {
|
|
726
|
+
const active = anchor === focused || anchor === hovered || anchor === draftAnchor;
|
|
727
|
+
if (isFindingAnchor(anchor)) {
|
|
728
|
+
const level = severity.get(anchor);
|
|
729
|
+
if (!level) throw new Error(`lint anchor ${anchor} has no open finding`);
|
|
730
|
+
const mark = SEVERITY_MARK[level];
|
|
731
|
+
const first = list[0];
|
|
732
|
+
return [/* @__PURE__ */ jsx("span", {
|
|
733
|
+
"data-lint-rail": level,
|
|
734
|
+
"aria-hidden": true,
|
|
735
|
+
className: cn("pointer-events-none absolute z-20 flex size-4 items-center justify-center rounded-sm", mark.tone, active && mark.tint),
|
|
736
|
+
style: {
|
|
737
|
+
top: first.top + first.height / 2 - 8,
|
|
738
|
+
left: 0
|
|
739
|
+
},
|
|
740
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
741
|
+
icon: mark.icon,
|
|
742
|
+
className: "text-[13px]"
|
|
743
|
+
})
|
|
744
|
+
}, `${anchor}:rail`), ...list.map((box, i) => /* @__PURE__ */ jsx("div", {
|
|
745
|
+
"data-anchor-box": anchor,
|
|
746
|
+
"data-lint-squiggle": level,
|
|
747
|
+
"aria-hidden": true,
|
|
748
|
+
className: cn("pointer-events-none absolute z-0 transition-colors", active && mark.tint),
|
|
749
|
+
style: {
|
|
750
|
+
top: box.top,
|
|
751
|
+
left: box.left,
|
|
752
|
+
width: box.width,
|
|
753
|
+
height: box.height + 3
|
|
754
|
+
},
|
|
755
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
756
|
+
className: "absolute inset-x-0 bottom-0 h-[3px]",
|
|
757
|
+
style: {
|
|
758
|
+
backgroundImage: squiggle(mark.stroke),
|
|
759
|
+
backgroundRepeat: "repeat-x",
|
|
760
|
+
backgroundSize: "6px 3px"
|
|
761
|
+
}
|
|
762
|
+
})
|
|
763
|
+
}, `${anchor}:${i}`))];
|
|
764
|
+
}
|
|
765
|
+
return list.map((box, i) => /* @__PURE__ */ jsx("div", {
|
|
766
|
+
"data-anchor-box": anchor,
|
|
767
|
+
"aria-hidden": true,
|
|
768
|
+
className: cn("pointer-events-none absolute z-0 transition-colors", boxClass({
|
|
769
|
+
mode,
|
|
770
|
+
active
|
|
771
|
+
})),
|
|
772
|
+
style: mode === "text" ? {
|
|
773
|
+
top: box.top,
|
|
774
|
+
left: box.left,
|
|
775
|
+
width: box.width,
|
|
776
|
+
height: box.height
|
|
777
|
+
} : {
|
|
778
|
+
top: box.top - 2,
|
|
779
|
+
left: box.left - 10,
|
|
780
|
+
width: box.width + 10,
|
|
781
|
+
height: box.height + 4
|
|
782
|
+
}
|
|
783
|
+
}, `${anchor}:${i}`));
|
|
784
|
+
}),
|
|
785
|
+
/* @__PURE__ */ jsx("div", {
|
|
786
|
+
ref: markdown,
|
|
787
|
+
"data-annotated-markdown": "",
|
|
788
|
+
className: "relative z-10 pl-4",
|
|
789
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
790
|
+
sourceBlocks: true,
|
|
791
|
+
text: source
|
|
792
|
+
})
|
|
793
|
+
}),
|
|
794
|
+
comments && layout === "inline" && /* @__PURE__ */ jsx(InlineAuthors, {
|
|
795
|
+
markdown,
|
|
796
|
+
comments: open,
|
|
797
|
+
focused,
|
|
798
|
+
onFocus: setFocused
|
|
799
|
+
}),
|
|
800
|
+
draft?.surface === "preview" && renderDraft(draft, width),
|
|
801
|
+
layout === "inline" && inlineAnchor && /* @__PURE__ */ jsx(InlineThread, {
|
|
802
|
+
anchor: inlineAnchor,
|
|
803
|
+
label: anchorLabel(inlineAnchor, true),
|
|
804
|
+
boxes: boxes.get(inlineAnchor) ?? [],
|
|
805
|
+
containerWidth: width,
|
|
806
|
+
thread: selectAnchorThreads(open, inlineAnchor),
|
|
807
|
+
config,
|
|
808
|
+
callbacks: isFindingAnchor(inlineAnchor) ? NO_CALLBACKS : callbacks,
|
|
809
|
+
renderRootDetails,
|
|
810
|
+
pinned: focused === inlineAnchor,
|
|
811
|
+
onPin: () => setFocused(inlineAnchor),
|
|
812
|
+
onClose: closeInlineThread,
|
|
813
|
+
onPointerEnter: () => keepHover(inlineAnchor),
|
|
814
|
+
onPointerLeave: () => hoverTo(null)
|
|
815
|
+
}, inlineAnchor)
|
|
816
|
+
]
|
|
817
|
+
})
|
|
818
|
+
}), layout === "margin" && /* @__PURE__ */ jsx("div", {
|
|
819
|
+
ref: sidebarPane,
|
|
820
|
+
"data-comment-sidebar": narrow ? "below" : align,
|
|
821
|
+
className: cn(narrow ? "w-full" : "w-[316px] shrink-0 overflow-y-auto overscroll-contain border-l border-border py-4 pl-2 pr-4"),
|
|
822
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
823
|
+
className: cn("relative", (narrow || align === "stack") && "space-y-2"),
|
|
824
|
+
style: sidebarScrolls && align === "line" ? { height: railHeight } : void 0,
|
|
825
|
+
children: ordered.map((anchor) => {
|
|
826
|
+
const thread = selectAnchorThreads(open, anchor);
|
|
827
|
+
const isFocused = anchor === focused;
|
|
828
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
829
|
+
ref: refFor(anchor),
|
|
830
|
+
"data-card-anchor": anchor,
|
|
831
|
+
onMouseEnter: () => setHovered(anchor),
|
|
832
|
+
onMouseLeave: () => setHovered(null),
|
|
833
|
+
onClick: () => focusCard(anchor),
|
|
834
|
+
className: cn("rounded-lg border bg-card transition-[top,transform] duration-150", sidebarScrolls && align === "line" && "absolute inset-x-0", isFocused ? "z-10 -translate-x-2 border-primary/50 shadow-lg" : "border-border shadow-sm"),
|
|
835
|
+
style: sidebarScrolls && align === "line" ? { top: tops.get(anchor) ?? 0 } : void 0,
|
|
836
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
837
|
+
className: "truncate px-2 pt-2 text-[11px] text-muted-foreground",
|
|
838
|
+
children: anchorLabel(anchor, boxes.has(anchor))
|
|
839
|
+
}), /* @__PURE__ */ jsx(CommentThread, {
|
|
840
|
+
comments: thread,
|
|
841
|
+
config,
|
|
842
|
+
anchor,
|
|
843
|
+
compact: true,
|
|
844
|
+
defaultExpanded: isFocused || isFindingAnchor(anchor),
|
|
845
|
+
hideComposer: thread.length > 0,
|
|
846
|
+
autoFocusComposer: thread.length === 0,
|
|
847
|
+
composerPlaceholder: "Add a comment…",
|
|
848
|
+
...isFindingAnchor(anchor) ? NO_CALLBACKS : callbacks,
|
|
849
|
+
...renderRootDetails ? { renderRootDetails } : {}
|
|
850
|
+
})]
|
|
851
|
+
}, `${anchor}:${isFocused}`);
|
|
852
|
+
})
|
|
853
|
+
})
|
|
854
|
+
})]
|
|
855
|
+
})
|
|
856
|
+
]
|
|
857
|
+
})
|
|
858
|
+
]
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
export { FileReview };
|
|
862
|
+
|
|
863
|
+
//# sourceMappingURL=FileReview.js.map
|