@pierre/diffs 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CodeView.d.ts +4 -4
- package/dist/components/CodeView.d.ts.map +1 -1
- package/dist/components/CodeView.js +8 -6
- package/dist/components/CodeView.js.map +1 -1
- package/dist/components/File.d.ts +4 -15
- package/dist/components/File.d.ts.map +1 -1
- package/dist/components/File.js +4 -0
- package/dist/components/File.js.map +1 -1
- package/dist/components/FileDiff.d.ts +10 -37
- package/dist/components/FileDiff.d.ts.map +1 -1
- package/dist/components/FileDiff.js +19 -12
- package/dist/components/FileDiff.js.map +1 -1
- package/dist/components/FileStream.d.ts +1 -0
- package/dist/components/FileStream.d.ts.map +1 -1
- package/dist/components/UnresolvedFile.d.ts +1 -1
- package/dist/components/UnresolvedFile.d.ts.map +1 -1
- package/dist/components/UnresolvedFile.js +2 -1
- package/dist/components/UnresolvedFile.js.map +1 -1
- package/dist/components/VirtualizedFile.d.ts +2 -8
- package/dist/components/VirtualizedFile.d.ts.map +1 -1
- package/dist/components/VirtualizedFile.js +19 -18
- package/dist/components/VirtualizedFile.js.map +1 -1
- package/dist/components/VirtualizedFileDiff.d.ts +2 -8
- package/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
- package/dist/components/VirtualizedFileDiff.js +19 -15
- package/dist/components/VirtualizedFileDiff.js.map +1 -1
- package/dist/components/Virtualizer.d.ts +1 -5
- package/dist/components/Virtualizer.d.ts.map +1 -1
- package/dist/components/Virtualizer.js.map +1 -1
- package/dist/components/VirtulizerDevelopment.d.ts +0 -1
- package/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
- package/dist/components/web-components.d.ts.map +1 -1
- package/dist/components/web-components.js +2 -1
- package/dist/components/web-components.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/editor/EditStateManager.d.ts +0 -1
- package/dist/editor/EditStateManager.d.ts.map +1 -1
- package/dist/editor/EditStateManager.js.map +1 -1
- package/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts +0 -1
- package/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts.map +1 -1
- package/dist/editor/command.d.ts +2 -1
- package/dist/editor/command.d.ts.map +1 -1
- package/dist/editor/editPrediction.d.ts +3 -2
- package/dist/editor/editPrediction.d.ts.map +1 -1
- package/dist/editor/editPrediction.js +11 -11
- package/dist/editor/editPrediction.js.map +1 -1
- package/dist/editor/editStack.d.ts +0 -1
- package/dist/editor/editStack.d.ts.map +1 -1
- package/dist/editor/editStack.js.map +1 -1
- package/dist/editor/editor.d.ts +1 -5
- package/dist/editor/editor.d.ts.map +1 -1
- package/dist/editor/editor.js +23 -20
- package/dist/editor/editor.js.map +1 -1
- package/dist/editor/editor2.js.map +1 -1
- package/dist/editor/languages.d.ts +0 -1
- package/dist/editor/languages.d.ts.map +1 -1
- package/dist/editor/languages.js +1 -1
- package/dist/editor/languages.js.map +1 -1
- package/dist/editor/lineAnnotations.d.ts +0 -1
- package/dist/editor/lineAnnotations.d.ts.map +1 -1
- package/dist/editor/lineAnnotations.js +2 -1
- package/dist/editor/lineAnnotations.js.map +1 -1
- package/dist/editor/marker.d.ts +0 -1
- package/dist/editor/marker.d.ts.map +1 -1
- package/dist/editor/marker.js +5 -3
- package/dist/editor/marker.js.map +1 -1
- package/dist/editor/matchBrackets.d.ts +0 -1
- package/dist/editor/matchBrackets.d.ts.map +1 -1
- package/dist/editor/pieceTable.d.ts +0 -1
- package/dist/editor/pieceTable.d.ts.map +1 -1
- package/dist/editor/pieceTable.js.map +1 -1
- package/dist/editor/platform.d.ts +1 -5
- package/dist/editor/platform.d.ts.map +1 -1
- package/dist/editor/platform.js.map +1 -1
- package/dist/editor/popover.d.ts +12 -12
- package/dist/editor/popover.d.ts.map +1 -1
- package/dist/editor/popover.js.map +1 -1
- package/dist/editor/searchPanel.d.ts +0 -1
- package/dist/editor/searchPanel.d.ts.map +1 -1
- package/dist/editor/searchPanel.js +16 -12
- package/dist/editor/searchPanel.js.map +1 -1
- package/dist/editor/selection.d.ts +0 -1
- package/dist/editor/selection.d.ts.map +1 -1
- package/dist/editor/selection.js.map +1 -1
- package/dist/editor/selectionAction.d.ts +0 -1
- package/dist/editor/selectionAction.d.ts.map +1 -1
- package/dist/editor/selectionAction.js.map +1 -1
- package/dist/editor/sprite.d.ts.map +1 -1
- package/dist/editor/textDocument.d.ts +0 -1
- package/dist/editor/textDocument.d.ts.map +1 -1
- package/dist/editor/textDocument.js.map +1 -1
- package/dist/editor/textDocumentChangeTransaction.d.ts +0 -1
- package/dist/editor/textDocumentChangeTransaction.d.ts.map +1 -1
- package/dist/editor/textMeasure.d.ts.map +1 -1
- package/dist/editor/textMeasure.js +27 -3
- package/dist/editor/textMeasure.js.map +1 -1
- package/dist/editor/tokenizer.d.ts +1 -11
- package/dist/editor/tokenizer.d.ts.map +1 -1
- package/dist/editor/tokenizer.js +8 -4
- package/dist/editor/tokenizer.js.map +1 -1
- package/dist/editor/types.d.ts +0 -1
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/editor/utils.d.ts.map +1 -1
- package/dist/editor/utils.js +11 -7
- package/dist/editor/utils.js.map +1 -1
- package/dist/highlighter/languages/areLanguagesAttached.d.ts +0 -1
- package/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
- package/dist/highlighter/languages/attachResolvedLanguages.d.ts +1 -0
- package/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
- package/dist/highlighter/languages/attachResolvedLanguages.js +8 -1
- package/dist/highlighter/languages/attachResolvedLanguages.js.map +1 -1
- package/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
- package/dist/highlighter/languages/constants.d.ts +1 -1
- package/dist/highlighter/languages/constants.d.ts.map +1 -1
- package/dist/highlighter/languages/getResolvedLanguages.d.ts +1 -0
- package/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
- package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -0
- package/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
- package/dist/highlighter/languages/hasResolvedLanguages.d.ts +0 -1
- package/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
- package/dist/highlighter/languages/registerCustomLanguage.d.ts +3 -2
- package/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
- package/dist/highlighter/languages/registerCustomLanguage.js +3 -1
- package/dist/highlighter/languages/registerCustomLanguage.js.map +1 -1
- package/dist/highlighter/languages/resolveLanguage.d.ts +1 -0
- package/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
- package/dist/highlighter/languages/resolveLanguages.d.ts +1 -0
- package/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
- package/dist/highlighter/shared_highlighter.d.ts +1 -6
- package/dist/highlighter/shared_highlighter.d.ts.map +1 -1
- package/dist/highlighter/themes/areThemesAttached.d.ts +0 -1
- package/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
- package/dist/highlighter/themes/attachResolvedThemes.d.ts +0 -1
- package/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
- package/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
- package/dist/highlighter/themes/constants.d.ts.map +1 -1
- package/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts +0 -1
- package/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
- package/dist/highlighter/themes/getResolvedThemes.d.ts +0 -1
- package/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
- package/dist/highlighter/themes/hasResolvedThemes.d.ts +0 -1
- package/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
- package/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
- package/dist/highlighter/themes/registerCustomTheme.d.ts +0 -1
- package/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
- package/dist/highlighter/themes/resolveTheme.d.ts +0 -1
- package/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
- package/dist/highlighter/themes/resolveThemes.d.ts +0 -1
- package/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
- package/dist/highlighter/themes/themeResolution.d.ts +0 -1
- package/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
- package/dist/highlighter/themes/themeResolver.d.ts +0 -1
- package/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/managers/InteractionManager.d.ts +2 -26
- package/dist/managers/InteractionManager.d.ts.map +1 -1
- package/dist/managers/InteractionManager.js +1 -3
- package/dist/managers/InteractionManager.js.map +1 -1
- package/dist/managers/ResizeManager.d.ts +1 -4
- package/dist/managers/ResizeManager.d.ts.map +1 -1
- package/dist/managers/ScrollSyncManager.d.ts.map +1 -1
- package/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +0 -1
- package/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -1
- package/dist/react/CodeView.d.ts +9 -1
- package/dist/react/CodeView.d.ts.map +1 -1
- package/dist/react/CodeView.js +39 -33
- package/dist/react/CodeView.js.map +1 -1
- package/dist/react/EditContext.d.ts +2 -5
- package/dist/react/EditContext.d.ts.map +1 -1
- package/dist/react/File.d.ts +1 -23
- package/dist/react/File.d.ts.map +1 -1
- package/dist/react/File.js +13 -12
- package/dist/react/File.js.map +1 -1
- package/dist/react/FileDiff.d.ts +1 -23
- package/dist/react/FileDiff.d.ts.map +1 -1
- package/dist/react/FileDiff.js +13 -12
- package/dist/react/FileDiff.js.map +1 -1
- package/dist/react/MultiFileDiff.d.ts +1 -24
- package/dist/react/MultiFileDiff.d.ts.map +1 -1
- package/dist/react/MultiFileDiff.js +13 -12
- package/dist/react/MultiFileDiff.js.map +1 -1
- package/dist/react/PatchDiff.d.ts +1 -23
- package/dist/react/PatchDiff.d.ts.map +1 -1
- package/dist/react/PatchDiff.js +13 -12
- package/dist/react/PatchDiff.js.map +1 -1
- package/dist/react/UnresolvedFile.d.ts +1 -18
- package/dist/react/UnresolvedFile.d.ts.map +1 -1
- package/dist/react/UnresolvedFile.js +15 -14
- package/dist/react/UnresolvedFile.js.map +1 -1
- package/dist/react/Virtualizer.d.ts +1 -9
- package/dist/react/Virtualizer.d.ts.map +1 -1
- package/dist/react/Virtualizer.js.map +1 -1
- package/dist/react/WorkerPoolContext.d.ts +2 -6
- package/dist/react/WorkerPoolContext.d.ts.map +1 -1
- package/dist/react/constants.d.ts +0 -1
- package/dist/react/constants.d.ts.map +1 -1
- package/dist/react/jsx.d.ts +1 -0
- package/dist/react/jsx.d.ts.map +1 -1
- package/dist/react/types.d.ts +1 -1
- package/dist/react/types.d.ts.map +1 -1
- package/dist/react/utils/assignRef.d.ts +6 -0
- package/dist/react/utils/assignRef.d.ts.map +1 -0
- package/dist/react/utils/assignRef.js +9 -0
- package/dist/react/utils/assignRef.js.map +1 -0
- package/dist/react/utils/renderDiffChildren.d.ts +1 -16
- package/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
- package/dist/react/utils/renderDiffChildren.js.map +1 -1
- package/dist/react/utils/renderFileChildren.d.ts +1 -13
- package/dist/react/utils/renderFileChildren.d.ts.map +1 -1
- package/dist/react/utils/renderFileChildren.js.map +1 -1
- package/dist/react/utils/templateRender.d.ts +0 -1
- package/dist/react/utils/templateRender.d.ts.map +1 -1
- package/dist/react/utils/useFileDiffInstance.d.ts +2 -18
- package/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
- package/dist/react/utils/useFileDiffInstance.js +31 -17
- package/dist/react/utils/useFileDiffInstance.js.map +1 -1
- package/dist/react/utils/useFileInstance.d.ts +2 -16
- package/dist/react/utils/useFileInstance.d.ts.map +1 -1
- package/dist/react/utils/useFileInstance.js +8 -4
- package/dist/react/utils/useFileInstance.js.map +1 -1
- package/dist/react/utils/useStableCallback.d.ts.map +1 -1
- package/dist/react/utils/useUnresolvedFileInstance.d.ts +1 -12
- package/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
- package/dist/renderers/DiffHunksRenderer.d.ts +4 -9
- package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
- package/dist/renderers/DiffHunksRenderer.js +28 -21
- package/dist/renderers/DiffHunksRenderer.js.map +1 -1
- package/dist/renderers/FileRenderer.d.ts +1 -0
- package/dist/renderers/FileRenderer.d.ts.map +1 -1
- package/dist/renderers/FileRenderer.js.map +1 -1
- package/dist/renderers/UnresolvedFileHunksRenderer.d.ts +3 -9
- package/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
- package/dist/shiki-stream/stream.d.ts +0 -1
- package/dist/shiki-stream/stream.d.ts.map +1 -1
- package/dist/shiki-stream/stream.js.map +1 -1
- package/dist/shiki-stream/tokenizer.d.ts +0 -1
- package/dist/shiki-stream/tokenizer.d.ts.map +1 -1
- package/dist/shiki-stream/types.d.ts +0 -1
- package/dist/shiki-stream/types.d.ts.map +1 -1
- package/dist/sprite.d.ts.map +1 -1
- package/dist/ssr/FileDiffReact.d.ts +1 -8
- package/dist/ssr/FileDiffReact.d.ts.map +1 -1
- package/dist/ssr/FileDiffReact.js +8 -3
- package/dist/ssr/FileDiffReact.js.map +1 -1
- package/dist/ssr/preloadDiffs.d.ts +6 -34
- package/dist/ssr/preloadDiffs.d.ts.map +1 -1
- package/dist/ssr/preloadFile.d.ts +1 -6
- package/dist/ssr/preloadFile.d.ts.map +1 -1
- package/dist/ssr/preloadPatchFile.d.ts +1 -5
- package/dist/ssr/preloadPatchFile.d.ts.map +1 -1
- package/dist/ssr/renderHTML.d.ts +0 -1
- package/dist/ssr/renderHTML.d.ts.map +1 -1
- package/dist/string-import.d.ts.map +1 -1
- package/dist/style.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/annotationHelpers.d.ts +0 -1
- package/dist/utils/annotationHelpers.d.ts.map +1 -1
- package/dist/utils/appendItems.d.ts.map +1 -1
- package/dist/utils/applyLineTextWithNewline.d.ts.map +1 -1
- package/dist/utils/areDiffLineAnnotationsEqual.d.ts +0 -1
- package/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
- package/dist/utils/areDiffRenderOptionsEqual.d.ts +0 -1
- package/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
- package/dist/utils/areDiffTargetsEqual.d.ts +0 -1
- package/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
- package/dist/utils/areFileRenderOptionsEqual.d.ts +0 -1
- package/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
- package/dist/utils/areFileTargetsEqual.d.ts +0 -1
- package/dist/utils/areFileTargetsEqual.d.ts.map +1 -1
- package/dist/utils/areFilesEqual.d.ts +0 -1
- package/dist/utils/areFilesEqual.d.ts.map +1 -1
- package/dist/utils/areHunkDataEqual.d.ts +0 -1
- package/dist/utils/areHunkDataEqual.d.ts.map +1 -1
- package/dist/utils/areLineAnnotationsEqual.d.ts +0 -1
- package/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
- package/dist/utils/areManagedSnapshotsEqual.d.ts +0 -1
- package/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
- package/dist/utils/areMergeConflictActionsEqual.d.ts +0 -1
- package/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
- package/dist/utils/areObjectsEqual.d.ts.map +1 -1
- package/dist/utils/areOptionsEqual.d.ts +1 -0
- package/dist/utils/areOptionsEqual.d.ts.map +1 -1
- package/dist/utils/arePrePropertiesEqual.d.ts +0 -1
- package/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
- package/dist/utils/areRenderRangesEqual.d.ts +0 -1
- package/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
- package/dist/utils/areSelectionPointsEqual.d.ts +0 -1
- package/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
- package/dist/utils/areSelectionsEqual.d.ts +0 -1
- package/dist/utils/areSelectionsEqual.d.ts.map +1 -1
- package/dist/utils/areThemesEqual.d.ts +0 -1
- package/dist/utils/areThemesEqual.d.ts.map +1 -1
- package/dist/utils/areVirtualWindowSpecsEqual.d.ts +0 -1
- package/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
- package/dist/utils/areWorkerStatsEqual.d.ts +1 -0
- package/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
- package/dist/utils/awaitWithTimeout.d.ts.map +1 -1
- package/dist/utils/cleanLastNewline.d.ts.map +1 -1
- package/dist/utils/cloneFileDiffMetadata.d.ts +0 -1
- package/dist/utils/cloneFileDiffMetadata.d.ts.map +1 -1
- package/dist/utils/composeCacheKey.d.ts.map +1 -1
- package/dist/utils/computeEstimatedDiffHeights.d.ts +1 -11
- package/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
- package/dist/utils/computeFileOffsets.d.ts.map +1 -1
- package/dist/utils/computeFileOffsets.js +9 -8
- package/dist/utils/computeFileOffsets.js.map +1 -1
- package/dist/utils/computeVirtualFileMetrics.d.ts +0 -1
- package/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
- package/dist/utils/createAnnotationElement.d.ts +0 -1
- package/dist/utils/createAnnotationElement.d.ts.map +1 -1
- package/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
- package/dist/utils/createCodeViewHeaderFooterHostElement.d.ts.map +1 -1
- package/dist/utils/createContentColumn.d.ts +0 -1
- package/dist/utils/createContentColumn.d.ts.map +1 -1
- package/dist/utils/createEmptyRowBuffer.d.ts +0 -1
- package/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
- package/dist/utils/createFileHeaderElement.d.ts +1 -6
- package/dist/utils/createFileHeaderElement.d.ts.map +1 -1
- package/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
- package/dist/utils/createGutterUtilityElement.d.ts +0 -1
- package/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
- package/dist/utils/createNoNewlineElement.d.ts +0 -1
- package/dist/utils/createNoNewlineElement.d.ts.map +1 -1
- package/dist/utils/createPreElement.d.ts +1 -11
- package/dist/utils/createPreElement.d.ts.map +1 -1
- package/dist/utils/createRowNodes.d.ts.map +1 -1
- package/dist/utils/createSeparator.d.ts +1 -10
- package/dist/utils/createSeparator.d.ts.map +1 -1
- package/dist/utils/createSeparator.js +12 -10
- package/dist/utils/createSeparator.js.map +1 -1
- package/dist/utils/createSpanNodeFromToken.d.ts +0 -1
- package/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
- package/dist/utils/createSpanNodeFromToken.js +2 -1
- package/dist/utils/createSpanNodeFromToken.js.map +1 -1
- package/dist/utils/createStyleElement.d.ts +0 -1
- package/dist/utils/createStyleElement.d.ts.map +1 -1
- package/dist/utils/createTransformerWithState.d.ts +0 -1
- package/dist/utils/createTransformerWithState.d.ts.map +1 -1
- package/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
- package/dist/utils/createWindowFromScrollPosition.d.ts +1 -9
- package/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
- package/dist/utils/cssWrappers.d.ts +0 -1
- package/dist/utils/cssWrappers.d.ts.map +1 -1
- package/dist/utils/cssWrappers.js +5 -3
- package/dist/utils/cssWrappers.js.map +1 -1
- package/dist/utils/detachString.d.ts.map +1 -1
- package/dist/utils/diffAcceptRejectHunk.d.ts +0 -1
- package/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
- package/dist/utils/editSessionAnnotations.d.ts +0 -1
- package/dist/utils/editSessionAnnotations.d.ts.map +1 -1
- package/dist/utils/editSessionHunks.d.ts +0 -1
- package/dist/utils/editSessionHunks.d.ts.map +1 -1
- package/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
- package/dist/utils/getDiffFileInput.d.ts +1 -5
- package/dist/utils/getDiffFileInput.d.ts.map +1 -1
- package/dist/utils/getDiffHunksRendererOptions.d.ts +0 -1
- package/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
- package/dist/utils/getFileRendererOptions.d.ts +0 -1
- package/dist/utils/getFileRendererOptions.d.ts.map +1 -1
- package/dist/utils/getFiletypeFromFileName.d.ts +0 -1
- package/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
- package/dist/utils/getFiletypeFromFileName.js.map +1 -1
- package/dist/utils/getHighlighterOptions.d.ts +1 -5
- package/dist/utils/getHighlighterOptions.d.ts.map +1 -1
- package/dist/utils/getHighlighterOptions.js +1 -1
- package/dist/utils/getHighlighterOptions.js.map +1 -1
- package/dist/utils/getHighlighterThemeStyles.d.ts +1 -6
- package/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
- package/dist/utils/getHunkSeparatorSlotName.d.ts +0 -1
- package/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
- package/dist/utils/getHunkSideBoundaries.d.ts.map +1 -1
- package/dist/utils/getIconForType.d.ts +0 -1
- package/dist/utils/getIconForType.d.ts.map +1 -1
- package/dist/utils/getLineAnnotationName.d.ts +0 -1
- package/dist/utils/getLineAnnotationName.d.ts.map +1 -1
- package/dist/utils/getLineEndingType.d.ts.map +1 -1
- package/dist/utils/getLineNodes.d.ts +0 -1
- package/dist/utils/getLineNodes.d.ts.map +1 -1
- package/dist/utils/getMergeConflictActionSlotName.d.ts +1 -5
- package/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
- package/dist/utils/getMergeConflictLineTypes.d.ts +0 -1
- package/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
- package/dist/utils/getOrCreateCodeNode.d.ts +1 -7
- package/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
- package/dist/utils/getSingularPatch.d.ts +0 -1
- package/dist/utils/getSingularPatch.d.ts.map +1 -1
- package/dist/utils/getThemes.d.ts +0 -1
- package/dist/utils/getThemes.d.ts.map +1 -1
- package/dist/utils/getTotalLineCountFromHunks.d.ts +0 -1
- package/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
- package/dist/utils/guardWebKitScrollDuringRebuild.d.ts.map +1 -1
- package/dist/utils/hast_utils.d.ts +2 -12
- package/dist/utils/hast_utils.d.ts.map +1 -1
- package/dist/utils/hostTheme.d.ts +1 -5
- package/dist/utils/hostTheme.d.ts.map +1 -1
- package/dist/utils/hydratePartialDiff.d.ts +0 -1
- package/dist/utils/hydratePartialDiff.d.ts.map +1 -1
- package/dist/utils/includesFileAnnotations.d.ts +0 -1
- package/dist/utils/includesFileAnnotations.d.ts.map +1 -1
- package/dist/utils/isDefaultRenderRange.d.ts +0 -1
- package/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
- package/dist/utils/isDiffPlainText.d.ts +0 -1
- package/dist/utils/isDiffPlainText.d.ts.map +1 -1
- package/dist/utils/isFilePlainText.d.ts +0 -1
- package/dist/utils/isFilePlainText.d.ts.map +1 -1
- package/dist/utils/isGutterUtilityPath.d.ts.map +1 -1
- package/dist/utils/isStyleNode.d.ts.map +1 -1
- package/dist/utils/isWorkerContext.d.ts.map +1 -1
- package/dist/utils/iterateOverDiff.d.ts +1 -10
- package/dist/utils/iterateOverDiff.d.ts.map +1 -1
- package/dist/utils/iterateOverDiff.js +5 -3
- package/dist/utils/iterateOverDiff.js.map +1 -1
- package/dist/utils/lineAnnotationIdentity.d.ts +0 -1
- package/dist/utils/lineAnnotationIdentity.d.ts.map +1 -1
- package/dist/utils/normalizeDiffResolution.d.ts +0 -1
- package/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
- package/dist/utils/parseDiffDecorations.d.ts +2 -13
- package/dist/utils/parseDiffDecorations.d.ts.map +1 -1
- package/dist/utils/parseDiffFromFile.d.ts +0 -1
- package/dist/utils/parseDiffFromFile.d.ts.map +1 -1
- package/dist/utils/parseDiffFromFile.js +2 -1
- package/dist/utils/parseDiffFromFile.js.map +1 -1
- package/dist/utils/parseLineType.d.ts +0 -1
- package/dist/utils/parseLineType.d.ts.map +1 -1
- package/dist/utils/parseMergeConflictDiffFromFile.d.ts +0 -1
- package/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
- package/dist/utils/parsePatchFiles.d.ts +0 -1
- package/dist/utils/parsePatchFiles.d.ts.map +1 -1
- package/dist/utils/parsePatchFiles.js +8 -5
- package/dist/utils/parsePatchFiles.js.map +1 -1
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/prefersReducedMotion.d.ts.map +1 -1
- package/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
- package/dist/utils/processLine.d.ts +0 -1
- package/dist/utils/processLine.d.ts.map +1 -1
- package/dist/utils/realignChangeContent.d.ts +0 -1
- package/dist/utils/realignChangeContent.d.ts.map +1 -1
- package/dist/utils/renderDiffWithHighlighter.d.ts +1 -8
- package/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
- package/dist/utils/renderFileWithHighlighter.d.ts +1 -11
- package/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
- package/dist/utils/resolveConflict.d.ts +0 -1
- package/dist/utils/resolveConflict.d.ts.map +1 -1
- package/dist/utils/resolveRegion.d.ts +0 -1
- package/dist/utils/resolveRegion.d.ts.map +1 -1
- package/dist/utils/roundToDevicePixel.d.ts.map +1 -1
- package/dist/utils/scrollbarGutter.d.ts.map +1 -1
- package/dist/utils/scrollbarGutter.js +2 -1
- package/dist/utils/scrollbarGutter.js.map +1 -1
- package/dist/utils/setLanguageOverride.d.ts +0 -1
- package/dist/utils/setLanguageOverride.d.ts.map +1 -1
- package/dist/utils/setWrapperNodeProps.d.ts +1 -11
- package/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
- package/dist/utils/setWrapperNodeProps.js +1 -3
- package/dist/utils/setWrapperNodeProps.js.map +1 -1
- package/dist/utils/shouldUseTokenTransformer.d.ts +0 -1
- package/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
- package/dist/utils/splitFileContents.d.ts.map +1 -1
- package/dist/utils/trimPatchContext.d.ts.map +1 -1
- package/dist/utils/updateDiffHunks.d.ts +0 -1
- package/dist/utils/updateDiffHunks.d.ts.map +1 -1
- package/dist/utils/virtualDiffLayout.d.ts +10 -55
- package/dist/utils/virtualDiffLayout.d.ts.map +1 -1
- package/dist/utils/wrapTokenFragments.d.ts +0 -1
- package/dist/utils/wrapTokenFragments.d.ts.map +1 -1
- package/dist/worker/WorkerPoolManager.d.ts +2 -17
- package/dist/worker/WorkerPoolManager.d.ts.map +1 -1
- package/dist/worker/WorkerPoolManager.js +48 -43
- package/dist/worker/WorkerPoolManager.js.map +1 -1
- package/dist/worker/getOrCreateWorkerPoolSingleton.d.ts +1 -5
- package/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
- package/dist/worker/types.d.ts +0 -1
- package/dist/worker/types.d.ts.map +1 -1
- package/dist/worker/worker-portable.d.ts +1 -1
- package/dist/worker/worker-portable.js +121 -355
- package/dist/worker/worker-portable.js.map +1 -1
- package/dist/worker/worker.d.ts +1 -1
- package/dist/worker/worker.js +22 -12
- package/dist/worker/worker.js.map +1 -1
- package/package.json +4 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setWrapperNodeProps.d.ts","names":[],"sources":["../../src/utils/setWrapperNodeProps.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"setWrapperNodeProps.d.ts","names":[],"sources":["../../src/utils/setWrapperNodeProps.ts"],"mappings":";;iBAEgB,qBACd,KAAK,kBAEH,MACA,gBACA,mBACA,oBACA,UACA,OACA,YACA,oBACC,sBACF"}
|
|
@@ -16,9 +16,7 @@ function setPreNodeProperties(pre, { type, diffIndicators, disableBackground, di
|
|
|
16
16
|
case "classic":
|
|
17
17
|
pre.setAttribute("data-indicators", diffIndicators);
|
|
18
18
|
break;
|
|
19
|
-
case "none":
|
|
20
|
-
pre.removeAttribute("data-indicators");
|
|
21
|
-
break;
|
|
19
|
+
case "none": pre.removeAttribute("data-indicators");
|
|
22
20
|
}
|
|
23
21
|
if (disableLineNumbers) pre.setAttribute("data-disable-line-numbers", "");
|
|
24
22
|
else pre.removeAttribute("data-disable-line-numbers");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setWrapperNodeProps.js","names":[],"sources":["../../src/utils/setWrapperNodeProps.ts"],"sourcesContent":["import type { PrePropertiesConfig } from '../types';\n\nexport function setPreNodeProperties(\n pre: HTMLPreElement,\n {\n type,\n diffIndicators,\n disableBackground,\n disableLineNumbers,\n overflow,\n split,\n totalLines,\n customProperties,\n }: PrePropertiesConfig\n): HTMLPreElement {\n // NOTE: We always apply custom properties first so the important properties\n // cannot be overridden.\n if (customProperties != null) {\n for (const key in customProperties) {\n const value = customProperties[key];\n if (value != null) {\n pre.setAttribute(key, `${value}`);\n }\n }\n }\n if (type === 'diff') {\n pre.setAttribute('data-diff', '');\n pre.removeAttribute('data-file');\n } else {\n pre.setAttribute('data-file', '');\n pre.removeAttribute('data-diff');\n }\n switch (diffIndicators) {\n case 'bars':\n case 'classic':\n pre.setAttribute('data-indicators', diffIndicators);\n break;\n case 'none':\n pre.removeAttribute('data-indicators');\n break;\n }\n if (disableLineNumbers) {\n pre.setAttribute('data-disable-line-numbers', '');\n } else {\n pre.removeAttribute('data-disable-line-numbers');\n }\n if (disableBackground) {\n pre.removeAttribute('data-background');\n } else {\n pre.setAttribute('data-background', '');\n }\n if (type === 'diff') {\n pre.setAttribute('data-diff-type', split ? 'split' : 'single');\n } else {\n pre.removeAttribute('data-diff-type');\n }\n pre.setAttribute('data-overflow', overflow);\n // Set CSS custom property for line number column width\n pre.style.setProperty(\n '--diffs-min-number-column-width-default',\n `${`${totalLines}`.length}ch`\n );\n return pre;\n}\n"],"mappings":";AAEA,SAAgB,qBACd,KACA,EACE,MACA,gBACA,mBACA,oBACA,UACA,OACA,YACA,oBAEc;CAGhB,IAAI,oBAAoB,MACtB,KAAK,MAAM,OAAO,kBAAkB;EAClC,MAAM,QAAQ,iBAAiB;EAC/B,IAAI,SAAS,MACX,IAAI,aAAa,KAAK,GAAG,OAAO;CAEpC;CAEF,IAAI,SAAS,QAAQ;EACnB,IAAI,aAAa,aAAa,EAAE;EAChC,IAAI,gBAAgB,WAAW;CACjC,OAAO;EACL,IAAI,aAAa,aAAa,EAAE;EAChC,IAAI,gBAAgB,WAAW;CACjC;CACA,QAAQ,gBAAR;EACE,KAAK;EACL,KAAK;GACH,IAAI,aAAa,mBAAmB,cAAc;GAClD;EACF,KAAK
|
|
1
|
+
{"version":3,"file":"setWrapperNodeProps.js","names":[],"sources":["../../src/utils/setWrapperNodeProps.ts"],"sourcesContent":["import type { PrePropertiesConfig } from '../types';\n\nexport function setPreNodeProperties(\n pre: HTMLPreElement,\n {\n type,\n diffIndicators,\n disableBackground,\n disableLineNumbers,\n overflow,\n split,\n totalLines,\n customProperties,\n }: PrePropertiesConfig\n): HTMLPreElement {\n // NOTE: We always apply custom properties first so the important properties\n // cannot be overridden.\n if (customProperties != null) {\n for (const key in customProperties) {\n const value = customProperties[key];\n if (value != null) {\n pre.setAttribute(key, `${value}`);\n }\n }\n }\n if (type === 'diff') {\n pre.setAttribute('data-diff', '');\n pre.removeAttribute('data-file');\n } else {\n pre.setAttribute('data-file', '');\n pre.removeAttribute('data-diff');\n }\n switch (diffIndicators) {\n case 'bars':\n case 'classic':\n pre.setAttribute('data-indicators', diffIndicators);\n break;\n case 'none':\n pre.removeAttribute('data-indicators');\n break;\n }\n if (disableLineNumbers) {\n pre.setAttribute('data-disable-line-numbers', '');\n } else {\n pre.removeAttribute('data-disable-line-numbers');\n }\n if (disableBackground) {\n pre.removeAttribute('data-background');\n } else {\n pre.setAttribute('data-background', '');\n }\n if (type === 'diff') {\n pre.setAttribute('data-diff-type', split ? 'split' : 'single');\n } else {\n pre.removeAttribute('data-diff-type');\n }\n pre.setAttribute('data-overflow', overflow);\n // Set CSS custom property for line number column width\n pre.style.setProperty(\n '--diffs-min-number-column-width-default',\n `${`${totalLines}`.length}ch`\n );\n return pre;\n}\n"],"mappings":";AAEA,SAAgB,qBACd,KACA,EACE,MACA,gBACA,mBACA,oBACA,UACA,OACA,YACA,oBAEc;CAGhB,IAAI,oBAAoB,MACtB,KAAK,MAAM,OAAO,kBAAkB;EAClC,MAAM,QAAQ,iBAAiB;EAC/B,IAAI,SAAS,MACX,IAAI,aAAa,KAAK,GAAG,OAAO;CAEpC;CAEF,IAAI,SAAS,QAAQ;EACnB,IAAI,aAAa,aAAa,EAAE;EAChC,IAAI,gBAAgB,WAAW;CACjC,OAAO;EACL,IAAI,aAAa,aAAa,EAAE;EAChC,IAAI,gBAAgB,WAAW;CACjC;CACA,QAAQ,gBAAR;EACE,KAAK;EACL,KAAK;GACH,IAAI,aAAa,mBAAmB,cAAc;GAClD;EACF,KAAK,QACH,IAAI,gBAAgB,iBAAiB;CAEzC;CACA,IAAI,oBACF,IAAI,aAAa,6BAA6B,EAAE;MAEhD,IAAI,gBAAgB,2BAA2B;CAEjD,IAAI,mBACF,IAAI,gBAAgB,iBAAiB;MAErC,IAAI,aAAa,mBAAmB,EAAE;CAExC,IAAI,SAAS,QACX,IAAI,aAAa,kBAAkB,QAAQ,UAAU,QAAQ;MAE7D,IAAI,gBAAgB,gBAAgB;CAEtC,IAAI,aAAa,iBAAiB,QAAQ;CAE1C,IAAI,MAAM,YACR,2CACA,GAAG,GAAG,aAAa,OAAO,GAC5B;CACA,OAAO;AACT"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { InteractionManagerMode, OnTokenEventProps } from "../managers/InteractionManager.js";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/shouldUseTokenTransformer.d.ts
|
|
4
3
|
interface ShouldUseTokenTransformerProps<TMode extends InteractionManagerMode> {
|
|
5
4
|
onTokenClick?(props: OnTokenEventProps<TMode>, event: MouseEvent): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shouldUseTokenTransformer.d.ts","names":[],"sources":["../../src/utils/shouldUseTokenTransformer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shouldUseTokenTransformer.d.ts","names":[],"sources":["../../src/utils/shouldUseTokenTransformer.ts"],"mappings":";;UAKU,+BAA+B,cAAc;EACrD,cAAc,OAAO,kBAAkB,QAAQ,OAAO;EACtD,cAAc,OAAO,kBAAkB,QAAQ,OAAO;EACtD,cAAc,OAAO,kBAAkB,QAAQ,OAAO;EACtD;;iBAKc,0BACd,wCACA,SAAS,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitFileContents.d.ts","names":[],"sources":["../../src/utils/splitFileContents.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"splitFileContents.d.ts","names":[],"sources":["../../src/utils/splitFileContents.ts"],"mappings":";;;;;;;;iBASgB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trimPatchContext.d.ts","names":[],"sources":["../../src/utils/trimPatchContext.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"trimPatchContext.d.ts","names":[],"sources":["../../src/utils/trimPatchContext.ts"],"mappings":";;;;;;;iBAoBgB,iBAAiB,eAAe"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChangeContent, ContextContent, FileDiffMetadata, Hunk } from "../types.js";
|
|
2
2
|
import { CreatePatchOptionsNonabortable } from "diff";
|
|
3
|
-
|
|
4
3
|
//#region src/utils/updateDiffHunks.d.ts
|
|
5
4
|
type HunkContent = ContextContent | ChangeContent;
|
|
6
5
|
type HunkMetadataUpdate = Pick<FileDiffMetadata, 'hunks' | 'splitLineCount' | 'unifiedLineCount' | 'type'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateDiffHunks.d.ts","names":[],"sources":["../../src/utils/updateDiffHunks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"updateDiffHunks.d.ts","names":[],"sources":["../../src/utils/updateDiffHunks.ts"],"mappings":";;;KAgBK,cAAc,iBAAiB;KAE/B,qBAAqB,KACxB;KAIG,qBAAqB,qBACxB,KAAK;;iBAGS,mBACd,MAAM,kBACN,mBAAmB,iCAClB;iBAwDa,gCACd,MAAM,kBACN;iBAYc,gCACd,MAAM,kBACN,yBACA,mBAAmB,iCAClB;iBAkCa,2BACd,MAAM,kBACN,mBAAmB,iCAClB;;iBAKa,0BACd,MAAM,kBACN,mBAAmB,iCAClB;iBAwBa,gCACd,YAAY,KACV,wFAGF;;iBAyCc,gBACd,MAAM,kBACN,4BAA4B,kBAC5B,mBAAmB,iCAClB;iBA2Ja,4BACd,MAAM,kBACN;iBAiDc,kBACd,SAAS,aACT,wBACA,yBACC;iBAQa,8BAA8B,MAAM;iBAkBpC,8BACd,MAAM,KACJ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FileDiffMetadata, Hunk, HunkExpansionRegion, HunkSeparators, VirtualFileMetrics } from "../types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/virtualDiffLayout.d.ts
|
|
4
3
|
interface ExpandedRegionResult {
|
|
5
4
|
fromStart: number;
|
|
@@ -40,26 +39,11 @@ interface LeadingHunkSeparatorLayoutProps extends HunkSeparatorBaseProps {
|
|
|
40
39
|
hunkIndex: number;
|
|
41
40
|
hunkSpecs: string | undefined;
|
|
42
41
|
}
|
|
43
|
-
declare function getExpandedRegion({
|
|
44
|
-
isPartial,
|
|
45
|
-
rangeSize,
|
|
46
|
-
expandedHunks,
|
|
47
|
-
hunkIndex,
|
|
48
|
-
collapsedContextThreshold
|
|
49
|
-
}: GetExpandedRegionProps): ExpandedRegionResult;
|
|
42
|
+
declare function getExpandedRegion({ isPartial, rangeSize, expandedHunks, hunkIndex, collapsedContextThreshold }: GetExpandedRegionProps): ExpandedRegionResult;
|
|
50
43
|
declare function hasTrailingContext(fileDiff: FileDiffMetadata): boolean;
|
|
51
44
|
declare function hasTrailingContextMismatch(fileDiff: FileDiffMetadata): boolean;
|
|
52
|
-
declare function getTrailingContextRangeSize({
|
|
53
|
-
|
|
54
|
-
errorPrefix
|
|
55
|
-
}: GetTrailingContextRangeSizeProps): number;
|
|
56
|
-
declare function getTrailingExpandedRegion({
|
|
57
|
-
fileDiff,
|
|
58
|
-
hunkIndex,
|
|
59
|
-
expandedHunks,
|
|
60
|
-
collapsedContextThreshold,
|
|
61
|
-
errorPrefix
|
|
62
|
-
}: GetTrailingExpandedRegionProps): ExpandedRegionResult | undefined;
|
|
45
|
+
declare function getTrailingContextRangeSize({ fileDiff, errorPrefix }: GetTrailingContextRangeSizeProps): number;
|
|
46
|
+
declare function getTrailingExpandedRegion({ fileDiff, hunkIndex, expandedHunks, collapsedContextThreshold, errorPrefix }: GetTrailingExpandedRegionProps): ExpandedRegionResult | undefined;
|
|
63
47
|
interface IsAdditionLineRenderableProps {
|
|
64
48
|
fileDiff: FileDiffMetadata;
|
|
65
49
|
/** One-based line number in the new file. */
|
|
@@ -75,12 +59,7 @@ interface IsAdditionLineRenderableProps {
|
|
|
75
59
|
* callers keep their existing missing-row handling. Computed from the same
|
|
76
60
|
* inputs as `iterateOverDiff` so layout math and the oracle cannot diverge.
|
|
77
61
|
*/
|
|
78
|
-
declare function isAdditionLineRenderable({
|
|
79
|
-
fileDiff,
|
|
80
|
-
lineNumber,
|
|
81
|
-
expandedHunks,
|
|
82
|
-
collapsedContextThreshold
|
|
83
|
-
}: IsAdditionLineRenderableProps): boolean;
|
|
62
|
+
declare function isAdditionLineRenderable({ fileDiff, lineNumber, expandedHunks, collapsedContextThreshold }: IsAdditionLineRenderableProps): boolean;
|
|
84
63
|
interface GetNearestRenderableAdditionLineProps extends IsAdditionLineRenderableProps {
|
|
85
64
|
direction: 'up' | 'down';
|
|
86
65
|
}
|
|
@@ -91,37 +70,13 @@ interface GetNearestRenderableAdditionLineProps extends IsAdditionLineRenderable
|
|
|
91
70
|
* over collapsed regions like code folds; it walks the hunk metadata once
|
|
92
71
|
* instead of probing line by line across a gap.
|
|
93
72
|
*/
|
|
94
|
-
declare function getNearestRenderableAdditionLine({
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
expandedHunks,
|
|
99
|
-
collapsedContextThreshold
|
|
100
|
-
}: GetNearestRenderableAdditionLineProps): number | undefined;
|
|
101
|
-
declare function getHunkSeparatorHeight({
|
|
102
|
-
type,
|
|
103
|
-
metrics
|
|
104
|
-
}: HunkSeparatorBaseProps): number;
|
|
105
|
-
declare function getHunkSeparatorGap({
|
|
106
|
-
type,
|
|
107
|
-
metrics
|
|
108
|
-
}: HunkSeparatorBaseProps): number;
|
|
109
|
-
declare function hasLeadingHunkSeparator({
|
|
110
|
-
type,
|
|
111
|
-
hunkIndex,
|
|
112
|
-
hunkSpecs
|
|
113
|
-
}: Omit<LeadingHunkSeparatorLayoutProps, 'metrics'>): boolean;
|
|
73
|
+
declare function getNearestRenderableAdditionLine({ fileDiff, lineNumber, direction, expandedHunks, collapsedContextThreshold }: GetNearestRenderableAdditionLineProps): number | undefined;
|
|
74
|
+
declare function getHunkSeparatorHeight({ type, metrics }: HunkSeparatorBaseProps): number;
|
|
75
|
+
declare function getHunkSeparatorGap({ type, metrics }: HunkSeparatorBaseProps): number;
|
|
76
|
+
declare function hasLeadingHunkSeparator({ type, hunkIndex, hunkSpecs }: Omit<LeadingHunkSeparatorLayoutProps, 'metrics'>): boolean;
|
|
114
77
|
declare function hasTrailingHunkSeparator(type: HunkSeparators): boolean;
|
|
115
|
-
declare function getLeadingHunkSeparatorLayout({
|
|
116
|
-
|
|
117
|
-
metrics,
|
|
118
|
-
hunkIndex,
|
|
119
|
-
hunkSpecs
|
|
120
|
-
}: LeadingHunkSeparatorLayoutProps): HunkSeparatorLayout | undefined;
|
|
121
|
-
declare function getTrailingHunkSeparatorLayout({
|
|
122
|
-
type,
|
|
123
|
-
metrics
|
|
124
|
-
}: HunkSeparatorBaseProps): HunkSeparatorLayout | undefined;
|
|
78
|
+
declare function getLeadingHunkSeparatorLayout({ type, metrics, hunkIndex, hunkSpecs }: LeadingHunkSeparatorLayoutProps): HunkSeparatorLayout | undefined;
|
|
79
|
+
declare function getTrailingHunkSeparatorLayout({ type, metrics }: HunkSeparatorBaseProps): HunkSeparatorLayout | undefined;
|
|
125
80
|
//#endregion
|
|
126
81
|
export { ExpandedRegionResult, GetExpandedRegionProps, GetNearestRenderableAdditionLineProps, GetTrailingContextRangeSizeProps, GetTrailingExpandedRegionProps, HunkSeparatorLayout, IsAdditionLineRenderableProps, getExpandedRegion, getHunkAdditionLineRange, getHunkSeparatorGap, getHunkSeparatorHeight, getLeadingHunkSeparatorLayout, getNearestRenderableAdditionLine, getTrailingContextRangeSize, getTrailingExpandedRegion, getTrailingHunkSeparatorLayout, hasLeadingHunkSeparator, hasTrailingContext, hasTrailingContextMismatch, hasTrailingHunkSeparator, isAdditionLineRenderable };
|
|
127
82
|
//# sourceMappingURL=virtualDiffLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualDiffLayout.d.ts","names":[],"sources":["../../src/utils/virtualDiffLayout.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"virtualDiffLayout.d.ts","names":[],"sources":["../../src/utils/virtualDiffLayout.ts"],"mappings":";;UAaiB;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,eAAe,YAAY;EAC3B;EACA;;UAGe;EACf,UAAU;EACV;;UAGe,uCAAuC;EACtD;EACA,eAAe;EACf;;;iBAIc,yBAAyB,MAAM;UAO9B;EACf;EACA;EACA;EACA;;UAGQ;EACR,MAAM;EACN,SAAS;;UAGD,wCAAwC;EAChD;EACA;;iBAKc,oBACd,WACA,WACA,eACA,WACA,6BACC,yBAAyB;iBA6CZ,mBAAmB,UAAU;iBAsB7B,2BACd,UAAU;iBA4BI,8BACd,UACA,eACC;iBA8Ba,4BACd,UACA,WACA,eACA,2BACA,eACC,iCAAiC;UA0CnB;EACf,UAAU;;EAEV;EACA,eAAe,YAAY;EAC3B;;;;;;;;;;iBAWc,2BACd,UACA,YACA,eACA,6BACC;UA+Cc,8CAA8C;EAC7D;;;;;;;;;iBAUc,mCACd,UACA,YACA,WACA,eACA,6BACC;iBAsEa,yBACd,MACA,WACC;iBAIa,sBACd,MACA,WACC;iBAMa,0BACd,MACA,WACA,aACC,KAAK;iBAaQ,yBAAyB,MAAM;iBAK/B,gCACd,MACA,SACA,WACA,aACC,kCAAkC;iBAmBrB,iCACd,MACA,WACC,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapTokenFragments.d.ts","names":[],"sources":["../../src/utils/wrapTokenFragments.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"wrapTokenFragments.d.ts","names":[],"sources":["../../src/utils/wrapTokenFragments.ts"],"mappings":";;cAIM;cACA;KAED,qCAAqC,kBAAkB;iBAI5C,mBAAmB,WAAW,UAAc"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FileContents, FileDiffMetadata, HighlighterTypes, HunkExpansionRegion, RenderDiffOptions, RenderDiffResult, RenderFileOptions, RenderFileResult, SupportedLanguages, ThemedDiffResult, ThemedFileResult } from "../types.js";
|
|
2
2
|
import { DiffRendererInstance, FileRendererInstance, WorkerInitializationRenderOptions, WorkerPoolOptions, WorkerRenderingOptions, WorkerStats } from "./types.js";
|
|
3
3
|
import { LRUMap } from "lru_map";
|
|
4
|
-
|
|
5
4
|
//#region src/worker/WorkerPoolManager.d.ts
|
|
6
5
|
interface GetCachesResult {
|
|
7
6
|
fileCache: LRUMap<string, RenderFileResult>;
|
|
@@ -33,28 +32,14 @@ declare class WorkerPoolManager {
|
|
|
33
32
|
private diffCache;
|
|
34
33
|
private _queuedBroadcast;
|
|
35
34
|
private lifecycleGeneration;
|
|
36
|
-
constructor(options: WorkerPoolOptions, {
|
|
37
|
-
langs,
|
|
38
|
-
theme,
|
|
39
|
-
useTokenTransformer,
|
|
40
|
-
lineDiffType,
|
|
41
|
-
maxLineDiffLength,
|
|
42
|
-
tokenizeMaxLineLength,
|
|
43
|
-
preferredHighlighter
|
|
44
|
-
}: WorkerInitializationRenderOptions);
|
|
35
|
+
constructor(options: WorkerPoolOptions, { langs, theme, useTokenTransformer, lineDiffType, maxLineDiffLength, tokenizeMaxLineLength, preferredHighlighter }: WorkerInitializationRenderOptions);
|
|
45
36
|
isWorkingPool(): boolean;
|
|
46
37
|
getFileResultCache(file: FileContents): RenderFileResult | undefined;
|
|
47
38
|
getDiffResultCache(diff: FileDiffMetadata): RenderDiffResult | undefined;
|
|
48
39
|
inspectCaches(): GetCachesResult;
|
|
49
40
|
evictFileFromCache(cacheKey: string): boolean;
|
|
50
41
|
evictDiffFromCache(cacheKey: string): boolean;
|
|
51
|
-
setRenderOptions({
|
|
52
|
-
theme,
|
|
53
|
-
useTokenTransformer,
|
|
54
|
-
lineDiffType,
|
|
55
|
-
maxLineDiffLength,
|
|
56
|
-
tokenizeMaxLineLength
|
|
57
|
-
}: Partial<WorkerRenderingOptions>): Promise<void>;
|
|
42
|
+
setRenderOptions({ theme, useTokenTransformer, lineDiffType, maxLineDiffLength, tokenizeMaxLineLength }: Partial<WorkerRenderingOptions>): Promise<void>;
|
|
58
43
|
getPreferredHighlighter(): HighlighterTypes;
|
|
59
44
|
getFileRenderOptions(): RenderFileOptions;
|
|
60
45
|
getDiffRenderOptions(): RenderDiffOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkerPoolManager.d.ts","names":[],"sources":["../../src/worker/WorkerPoolManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkerPoolManager.d.ts","names":[],"sources":["../../src/worker/WorkerPoolManager.ts"],"mappings":";;;;UA+EU;EACR,WAAW,eAAe;EAC1B,WAAW,eAAe;;UAYlB;EACR;;KAKG,qBAAqB,uBAAuB;cAEpC;UAkCD;UAjCF;mBACS;UACT;UACA;UACA;UACA;UACA;UAEA;UACA;UAIA;UAGA;UACA;UAKA;UACA;UACA;UACA;UACA;UACA;UACA;UAEA;EAER,YACU,SAAS,qBAEf,OACA,OACA,qBACA,cACA,mBACA,uBACA,wBACC;EAeE;EAIA,mBAAmB,MAAM,eAAe;EAMxC,mBACL,MAAM,mBACL;EAMI,iBAAiB;EAKjB,mBAAmB;EAQnB,mBAAmB;EAQpB,mBACJ,OACA,qBACA,cACA,mBACA,yBACC,QAAQ,0BAA0B;EA4E9B,2BAA2B;EAI3B,wBAAwB;EAMxB,wBAAwB;UAIjB;EA6CP,wBAAwB,UAAU;EASlC,0BAA0B,UAAU;EAKpC,uBACL,WAAW,OAAO;UASZ;UAKA;EAWD,aAAa,UAAU;EAkBvB;EAIM,WAAW,YAAW,uBAA4B;UAiFjD;UAsFN;UAiBA;EA2BD,iBACL,UAAU,sBACV,MAAM;EAqBD,wBAAwB,MAAM,eAAe;UAe5C;EAgCD,gBACL,MAAM,cACN,sBACA,oBACA,mBACC;EAaI,iBACL,UAAU,sBACV,MAAM;EAqBD,wBAAwB,MAAM,mBAAmB;UAehD;EAgCD,gBACL,MAAM,kBACN,sBACA,oBACA,gBAAgB,YAAY,6BAC5B,qCACC;EAYI;UAqBC;UAIA;UAMA;UAWA;EAOD,YAAY;UAwBX;UA+DA;UA0CA;UAcM;UAyDN;UAuGA;UACA;UAMA;UAYA;UAqBA;UAmCA;UAeA;UAUA;UA8BA;UAOA;UAOA;UAWA;UASA;UAgBA;UAeA;UAWA;UAUA;UAOA;UAMA;UAOA;UAOA;UAkBA;UAQA;UASA;UAMA;UAQA;UAYA;UAYA;UAQA;UAiBA;UAiBA;UAKA;UAIC;UAWD"}
|
|
@@ -115,8 +115,10 @@ var WorkerPoolManager = class {
|
|
|
115
115
|
if (!isCurrentRequest() || areDiffRenderOptionsEqual(newRenderOptions, this.renderOptions)) return;
|
|
116
116
|
const themeNames = getThemes(theme);
|
|
117
117
|
let resolvedThemes = [];
|
|
118
|
-
if (!areThemesEqual(newRenderOptions.theme, this.renderOptions.theme))
|
|
119
|
-
|
|
118
|
+
if (!areThemesEqual(newRenderOptions.theme, this.renderOptions.theme)) {
|
|
119
|
+
if (hasResolvedThemes(themeNames)) resolvedThemes = getResolvedThemes(themeNames);
|
|
120
|
+
else resolvedThemes = await resolveThemes(themeNames);
|
|
121
|
+
}
|
|
120
122
|
if (!isCurrentRequest()) return;
|
|
121
123
|
if (this.highlighter != null) attachResolvedThemes(resolvedThemes, this.highlighter);
|
|
122
124
|
else {
|
|
@@ -622,8 +624,10 @@ var WorkerPoolManager = class {
|
|
|
622
624
|
console.error(error);
|
|
623
625
|
});
|
|
624
626
|
const workerMissingLangs = langs.filter((lang) => !availableWorker.langs.has(lang));
|
|
625
|
-
if (workerMissingLangs.length > 0)
|
|
626
|
-
|
|
627
|
+
if (workerMissingLangs.length > 0) {
|
|
628
|
+
if (hasResolvedLanguages(workerMissingLangs)) task.request.resolvedLanguages = getResolvedLanguages(workerMissingLangs);
|
|
629
|
+
else task.request.resolvedLanguages = await resolveLanguages(workerMissingLangs);
|
|
630
|
+
}
|
|
627
631
|
if (!this.activeTaskById.has(task.id)) {
|
|
628
632
|
if (availableWorker.requestId === task.id) {
|
|
629
633
|
this.cleanWorkerAndTask(availableWorker, task);
|
|
@@ -653,43 +657,46 @@ var WorkerPoolManager = class {
|
|
|
653
657
|
this.rejectRenderTaskCallbacks(task, error);
|
|
654
658
|
} else throw new Error("handleWorkerMessage: unknown task type");
|
|
655
659
|
throw error;
|
|
656
|
-
} else
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
660
|
+
} else {
|
|
661
|
+
if (isRenderTask(task)) for (const { name } of task.request.resolvedLanguages ?? []) managedWorker.langs.add(name);
|
|
662
|
+
switch (response.requestType) {
|
|
663
|
+
case "initialize":
|
|
664
|
+
if (task.type !== "initialize") throw new Error("handleWorkerMessage: task/response dont match");
|
|
665
|
+
this.syncCustomExtensionVersion(managedWorker, task.request);
|
|
666
|
+
task.resolve();
|
|
667
|
+
break;
|
|
668
|
+
case "set-render-options":
|
|
669
|
+
if (task.type !== "set-render-options") throw new Error("handleWorkerMessage: task/response dont match");
|
|
670
|
+
task.resolve();
|
|
671
|
+
break;
|
|
672
|
+
case "file": {
|
|
673
|
+
if (task.type !== "file") throw new Error("handleWorkerMessage: task/response dont match");
|
|
674
|
+
const { result, options } = response;
|
|
675
|
+
if (!this.isCurrentRenderTask(task) || !areFileRenderOptionsEqual(options, this.getFileRenderOptions())) throw IGNORE_RESPONSE;
|
|
676
|
+
const { request } = task;
|
|
677
|
+
this.syncCustomExtensionVersion(managedWorker, request);
|
|
678
|
+
if (task.cacheKeyAtDispatch != null) this.fileCache.set(task.cacheKeyAtDispatch, {
|
|
679
|
+
result,
|
|
680
|
+
options
|
|
681
|
+
});
|
|
682
|
+
this.resolveRenderTaskCallbacks(task);
|
|
683
|
+
this.notifyFileInstances(task, result, options);
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
case "diff": {
|
|
687
|
+
if (task.type !== "diff") throw new Error("handleWorkerMessage: task/response dont match");
|
|
688
|
+
const { result, options } = response;
|
|
689
|
+
if (!this.isCurrentRenderTask(task) || !areDiffRenderOptionsEqual(options, this.getDiffRenderOptions())) throw IGNORE_RESPONSE;
|
|
690
|
+
const { request } = task;
|
|
691
|
+
this.syncCustomExtensionVersion(managedWorker, request);
|
|
692
|
+
if (task.cacheKeyAtDispatch != null) this.diffCache.set(task.cacheKeyAtDispatch, {
|
|
693
|
+
result,
|
|
694
|
+
options
|
|
695
|
+
});
|
|
696
|
+
this.resolveRenderTaskCallbacks(task);
|
|
697
|
+
this.notifyDiffInstances(task, result, options);
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
693
700
|
}
|
|
694
701
|
}
|
|
695
702
|
} catch (error) {
|
|
@@ -728,7 +735,6 @@ var WorkerPoolManager = class {
|
|
|
728
735
|
executeTask(managedWorker, task) {
|
|
729
736
|
if (shouldSyncCustomExtensions(task.request)) this.maybeAttachCustomExtensions(managedWorker, task.request);
|
|
730
737
|
if (!this.activeTaskById.has(task.id)) this.assignWorkerToTask(task, managedWorker);
|
|
731
|
-
for (const lang of getLangsFromTask(task)) managedWorker.langs.add(lang);
|
|
732
738
|
try {
|
|
733
739
|
if (task.type === "file") task.cacheKeyAtDispatch = task.request.file.cacheKey;
|
|
734
740
|
else if (task.type === "diff") task.cacheKeyAtDispatch = task.request.diff.cacheKey;
|
|
@@ -898,7 +904,6 @@ function getLangsFromTask(task) {
|
|
|
898
904
|
case "diff":
|
|
899
905
|
langs.add(task.request.diff.lang ?? getFiletypeFromFileName(task.request.diff.name));
|
|
900
906
|
langs.add(task.request.diff.lang ?? getFiletypeFromFileName(task.request.diff.prevName ?? "-"));
|
|
901
|
-
break;
|
|
902
907
|
}
|
|
903
908
|
langs.delete("text");
|
|
904
909
|
return Array.from(langs);
|