@openclaw/diffs 2026.9.4 → 2026.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/{browser.runtime-DTKAejqd.js → .setup/browser.runtime-VjaO3wrj.mjs} +1 -1
- package/dist/assets/viewer-runtime.js +50 -56
- package/dist/index.js +44 -18
- package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts +117 -70
- package/node_modules/@pierre/diffs/dist/components/CodeView.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/CodeView.js +197 -65
- package/node_modules/@pierre/diffs/dist/components/CodeView.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/File.d.ts +81 -29
- package/node_modules/@pierre/diffs/dist/components/File.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/File.js +244 -66
- package/node_modules/@pierre/diffs/dist/components/File.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts +109 -57
- package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileDiff.js +445 -112
- package/node_modules/@pierre/diffs/dist/components/FileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/components/FileStream.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileStream.js +1 -1
- package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts +3 -3
- package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js +4 -3
- package/node_modules/@pierre/diffs/dist/components/UnresolvedFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts +18 -14
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js +153 -62
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts +17 -16
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js +197 -105
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/components/Virtualizer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/Virtualizer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts +1 -2
- package/node_modules/@pierre/diffs/dist/components/VirtulizerDevelopment.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/web-components.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/web-components.js +2 -1
- package/node_modules/@pierre/diffs/dist/components/web-components.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/constants.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/constants.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/edit/index.d.ts +7 -4
- package/node_modules/@pierre/diffs/dist/edit/index.js +5 -1
- package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts +55 -0
- package/node_modules/@pierre/diffs/dist/editor/EditStateManager.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js +135 -0
- package/node_modules/@pierre/diffs/dist/editor/EditStateManager.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts +6 -0
- package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js +16 -0
- package/node_modules/@pierre/diffs/dist/editor/cloneRetainedDiffSessionSnapshot.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/command.d.ts +2 -1
- package/node_modules/@pierre/diffs/dist/editor/command.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts +77 -0
- package/node_modules/@pierre/diffs/dist/editor/editPrediction.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/editPrediction.js +365 -0
- package/node_modules/@pierre/diffs/dist/editor/editPrediction.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts +19 -41
- package/node_modules/@pierre/diffs/dist/editor/editStack.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editStack.js +67 -4
- package/node_modules/@pierre/diffs/dist/editor/editStack.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editor.d.ts +117 -32
- package/node_modules/@pierre/diffs/dist/editor/editor.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editor.js +1125 -396
- package/node_modules/@pierre/diffs/dist/editor/editor.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editor2.js +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editor2.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/languages.d.ts +3 -4
- package/node_modules/@pierre/diffs/dist/editor/languages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/languages.js +1 -1
- package/node_modules/@pierre/diffs/dist/editor/languages.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts +3 -4
- package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js +18 -8
- package/node_modules/@pierre/diffs/dist/editor/lineAnnotations.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/marker.d.ts +2 -3
- package/node_modules/@pierre/diffs/dist/editor/marker.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/marker.js +5 -3
- package/node_modules/@pierre/diffs/dist/editor/marker.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts +2 -3
- package/node_modules/@pierre/diffs/dist/editor/matchBrackets.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/matchBrackets.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts +1 -2
- package/node_modules/@pierre/diffs/dist/editor/pieceTable.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/pieceTable.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/platform.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/editor/platform.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/platform.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/popover.d.ts +12 -12
- package/node_modules/@pierre/diffs/dist/editor/popover.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/popover.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts +2 -3
- package/node_modules/@pierre/diffs/dist/editor/searchPanel.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/searchPanel.js +17 -13
- package/node_modules/@pierre/diffs/dist/editor/searchPanel.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/selection.d.ts +32 -24
- package/node_modules/@pierre/diffs/dist/editor/selection.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/selection.js +3 -3
- package/node_modules/@pierre/diffs/dist/editor/selection.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts +3 -4
- package/node_modules/@pierre/diffs/dist/editor/selectionAction.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/selectionAction.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/sprite.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts +11 -9
- package/node_modules/@pierre/diffs/dist/editor/textDocument.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textDocument.js +28 -5
- package/node_modules/@pierre/diffs/dist/editor/textDocument.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts +14 -0
- package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js +12 -0
- package/node_modules/@pierre/diffs/dist/editor/textDocumentChangeTransaction.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts +5 -0
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.js +10 -0
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts +2 -12
- package/node_modules/@pierre/diffs/dist/editor/tokenizer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/tokenizer.js +8 -4
- package/node_modules/@pierre/diffs/dist/editor/tokenizer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/types.d.ts +266 -0
- package/node_modules/@pierre/diffs/dist/editor/types.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/editor/types.js +0 -0
- package/node_modules/@pierre/diffs/dist/editor/utils.d.ts +2 -1
- package/node_modules/@pierre/diffs/dist/editor/utils.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/utils.js +15 -8
- package/node_modules/@pierre/diffs/dist/editor/utils.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/areLanguagesAttached.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/cleanUpResolvedLanguages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/constants.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedLanguages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/highlighter/languages/getResolvedOrResolveLanguage.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/hasResolvedLanguages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguage.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/highlighter/languages/resolveLanguages.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts +7 -8
- package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js +7 -3
- package/node_modules/@pierre/diffs/dist/highlighter/shared_highlighter.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/areThemesAttached.js +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/attachResolvedThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/cleanUpResolvedThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/constants.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedOrResolveTheme.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/getResolvedThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/hasResolvedThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomCSSVariableTheme.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/registerCustomTheme.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveTheme.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/resolveThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolution.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/index.d.ts +9 -6
- package/node_modules/@pierre/diffs/dist/index.js +22 -21
- package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts +2 -26
- package/node_modules/@pierre/diffs/dist/managers/InteractionManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js +8 -3
- package/node_modules/@pierre/diffs/dist/managers/InteractionManager.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts +1 -4
- package/node_modules/@pierre/diffs/dist/managers/ResizeManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/managers/ScrollSyncManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/managers/UniversalRenderingManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts +45 -26
- package/node_modules/@pierre/diffs/dist/react/CodeView.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/CodeView.js +52 -45
- package/node_modules/@pierre/diffs/dist/react/CodeView.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts +8 -14
- package/node_modules/@pierre/diffs/dist/react/EditContext.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/EditContext.js +2 -9
- package/node_modules/@pierre/diffs/dist/react/EditContext.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/File.d.ts +5 -23
- package/node_modules/@pierre/diffs/dist/react/File.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/File.js +19 -14
- package/node_modules/@pierre/diffs/dist/react/File.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts +5 -22
- package/node_modules/@pierre/diffs/dist/react/FileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/FileDiff.js +19 -14
- package/node_modules/@pierre/diffs/dist/react/FileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts +3 -23
- package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js +19 -22
- package/node_modules/@pierre/diffs/dist/react/MultiFileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts +2 -21
- package/node_modules/@pierre/diffs/dist/react/PatchDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/PatchDiff.js +19 -14
- package/node_modules/@pierre/diffs/dist/react/PatchDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts +4 -21
- package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js +15 -14
- package/node_modules/@pierre/diffs/dist/react/UnresolvedFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts +1 -9
- package/node_modules/@pierre/diffs/dist/react/Virtualizer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/Virtualizer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts +2 -6
- package/node_modules/@pierre/diffs/dist/react/WorkerPoolContext.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/constants.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/react/constants.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/index.d.ts +8 -5
- package/node_modules/@pierre/diffs/dist/react/jsx.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/react/jsx.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/types.d.ts +47 -10
- package/node_modules/@pierre/diffs/dist/react/types.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts +6 -0
- package/node_modules/@pierre/diffs/dist/react/utils/assignRef.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js +9 -0
- package/node_modules/@pierre/diffs/dist/react/utils/assignRef.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts +11 -24
- package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js +2 -2
- package/node_modules/@pierre/diffs/dist/react/utils/renderDiffChildren.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts +11 -21
- package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js +2 -2
- package/node_modules/@pierre/diffs/dist/react/utils/renderFileChildren.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/react/utils/templateRender.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts +16 -20
- package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js +126 -22
- package/node_modules/@pierre/diffs/dist/react/utils/useFileDiffInstance.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts +11 -19
- package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js +88 -25
- package/node_modules/@pierre/diffs/dist/react/utils/useFileInstance.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useStableCallback.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts +1 -12
- package/node_modules/@pierre/diffs/dist/react/utils/useUnresolvedFileInstance.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts +34 -24
- package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js +188 -118
- package/node_modules/@pierre/diffs/dist/renderers/DiffHunksRenderer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts +28 -11
- package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js +141 -67
- package/node_modules/@pierre/diffs/dist/renderers/FileRenderer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts +5 -11
- package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js +2 -2
- package/node_modules/@pierre/diffs/dist/renderers/UnresolvedFileHunksRenderer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/stream.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/stream.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js +2 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/tokenizer.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/shiki-stream/types.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/sprite.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts +1 -8
- package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js +8 -3
- package/node_modules/@pierre/diffs/dist/ssr/FileDiffReact.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/index.d.ts +2 -2
- package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts +19 -47
- package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadDiffs.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts +5 -10
- package/node_modules/@pierre/diffs/dist/ssr/preloadFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts +3 -7
- package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/preloadPatchFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/ssr/renderHTML.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/string-import.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/style.js +1 -1
- package/node_modules/@pierre/diffs/dist/style.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/types.d.ts +13 -264
- package/node_modules/@pierre/diffs/dist/types.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/annotationHelpers.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts +5 -0
- package/node_modules/@pierre/diffs/dist/utils/appendItems.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/appendItems.js +8 -0
- package/node_modules/@pierre/diffs/dist/utils/appendItems.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/applyLineTextWithNewline.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffLineAnnotationsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffRenderOptionsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areDiffTargetsEqual.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areFileRenderOptionsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts +6 -0
- package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js +8 -0
- package/node_modules/@pierre/diffs/dist/utils/areFileTargetsEqual.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areFilesEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areHunkDataEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areLineAnnotationsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts +1 -2
- package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areManagedSnapshotsEqual.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areMergeConflictActionsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areObjectsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts +4 -3
- package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areOptionsEqual.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/arePrePropertiesEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areRenderRangesEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areSelectionPointsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areSelectionsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areThemesEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/utils/areWorkerStatsEqual.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/awaitWithTimeout.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/cleanLastNewline.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts +3 -3
- package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js +8 -5
- package/node_modules/@pierre/diffs/dist/utils/cloneFileDiffMetadata.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts +6 -0
- package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js +10 -0
- package/node_modules/@pierre/diffs/dist/utils/composeCacheKey.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts +1 -11
- package/node_modules/@pierre/diffs/dist/utils/computeEstimatedDiffHeights.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js +9 -8
- package/node_modules/@pierre/diffs/dist/utils/computeFileOffsets.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/computeVirtualFileMetrics.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createAnnotationElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createAnnotationWrapperNode.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createCodeViewHeaderFooterHostElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createContentColumn.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createEmptyRowBuffer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts +1 -6
- package/node_modules/@pierre/diffs/dist/utils/createFileHeaderElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityContentNode.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createGutterUtilityElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createNoNewlineElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts +1 -11
- package/node_modules/@pierre/diffs/dist/utils/createPreElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createRowNodes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts +1 -10
- package/node_modules/@pierre/diffs/dist/utils/createSeparator.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createSeparator.js +12 -10
- package/node_modules/@pierre/diffs/dist/utils/createSeparator.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js +2 -1
- package/node_modules/@pierre/diffs/dist/utils/createSpanNodeFromToken.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createStyleElement.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/createTransformerWithState.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createUnsafeCSSStyleNode.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts +1 -9
- package/node_modules/@pierre/diffs/dist/utils/createWindowFromScrollPosition.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/cssWrappers.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js +5 -3
- package/node_modules/@pierre/diffs/dist/utils/cssWrappers.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/detachString.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/diffAcceptRejectHunk.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts +68 -0
- package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js +64 -0
- package/node_modules/@pierre/diffs/dist/utils/editSessionAnnotations.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts +5 -4
- package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js +7 -5
- package/node_modules/@pierre/diffs/dist/utils/editSessionHunks.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/formatCSSVariablePrefix.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/utils/getDiffFileInput.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts +1 -2
- package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getDiffHunksRendererOptions.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts +1 -2
- package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getFileRendererOptions.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getFiletypeFromFileName.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterOptions.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts +1 -6
- package/node_modules/@pierre/diffs/dist/utils/getHighlighterThemeStyles.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getHunkSeparatorSlotName.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getIconForType.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getLineAnnotationName.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getLineEndingType.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getLineNodes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/utils/getMergeConflictActionSlotName.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getMergeConflictLineTypes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts +1 -7
- package/node_modules/@pierre/diffs/dist/utils/getOrCreateCodeNode.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getSingularPatch.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getThemes.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/getTotalLineCountFromHunks.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/guardWebKitScrollDuringRebuild.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts +2 -12
- package/node_modules/@pierre/diffs/dist/utils/hast_utils.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/utils/hostTheme.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js +2 -1
- package/node_modules/@pierre/diffs/dist/utils/hydratePartialDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/includesFileAnnotations.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/isDefaultRenderRange.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/isDiffPlainText.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/isFilePlainText.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isGutterUtilityPath.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isStyleNode.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/isWorkerContext.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts +1 -10
- package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js +5 -3
- package/node_modules/@pierre/diffs/dist/utils/iterateOverDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts +15 -0
- package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.d.ts.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js +17 -0
- package/node_modules/@pierre/diffs/dist/utils/lineAnnotationIdentity.js.map +1 -0
- package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/normalizeDiffResolution.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts +2 -13
- package/node_modules/@pierre/diffs/dist/utils/parseDiffDecorations.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts +2 -3
- package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js +8 -7
- package/node_modules/@pierre/diffs/dist/utils/parseDiffFromFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/parseLineType.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/parseMergeConflictDiffFromFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts +6 -4
- package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js +42 -14
- package/node_modules/@pierre/diffs/dist/utils/parsePatchFiles.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/platform.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/prefersReducedMotion.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/prerenderHTMLIfNecessary.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/processLine.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/realignChangeContent.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts +1 -8
- package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js +6 -5
- package/node_modules/@pierre/diffs/dist/utils/renderDiffWithHighlighter.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts +1 -11
- package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js +7 -4
- package/node_modules/@pierre/diffs/dist/utils/renderFileWithHighlighter.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/resolveConflict.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/resolveRegion.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/roundToDevicePixel.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js +2 -1
- package/node_modules/@pierre/diffs/dist/utils/scrollbarGutter.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/setLanguageOverride.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts +1 -11
- package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js +1 -3
- package/node_modules/@pierre/diffs/dist/utils/setWrapperNodeProps.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/shouldUseTokenTransformer.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/splitFileContents.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js +3 -2
- package/node_modules/@pierre/diffs/dist/utils/trimPatchContext.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/updateDiffHunks.js +1 -1
- package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts +10 -55
- package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/utils/virtualDiffLayout.js +1 -1
- package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts +0 -1
- package/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts +6 -20
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js +52 -11
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts +1 -5
- package/node_modules/@pierre/diffs/dist/worker/getOrCreateWorkerPoolSingleton.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/types.d.ts +5 -1
- package/node_modules/@pierre/diffs/dist/worker/types.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker-portable.d.ts +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker-portable.js +125 -358
- package/node_modules/@pierre/diffs/dist/worker/worker-portable.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker.d.ts +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker.js +28 -17
- package/node_modules/@pierre/diffs/dist/worker/worker.js.map +1 -1
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/deserialize.js +12 -2
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/cjs/serialize.js +5 -1
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/deserialize.js +12 -2
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/esm/serialize.js +5 -1
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/package.json +1 -1
- package/node_modules/@pierre/diffs/node_modules/@ungap/structured-clone/structured-json.js +1 -1
- package/node_modules/@pierre/diffs/package.json +12 -5
- package/node_modules/playwright-core/browsers.json +9 -32
- package/node_modules/playwright-core/lib/coreBundle.js +5402 -4419
- package/node_modules/playwright-core/lib/server/electron/loader.js +0 -2
- package/node_modules/playwright-core/lib/serverRegistry.js +1674 -7082
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +8 -297
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +19 -6
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +1 -1
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +9 -1
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +17 -3
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +9 -5
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +2 -1
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +5 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +1 -1
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +4 -11
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +6 -2
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +2 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +2 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +6 -3
- package/node_modules/playwright-core/lib/tools/utils/extension.js +13 -2
- package/node_modules/playwright-core/lib/utilsBundle.js +1934 -7341
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +8 -297
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/{recorder/assets/codeMirrorModule-CwYYHbcZ.js → dashboard/assets/codeMirrorModule-CQ8RZGBm.js} +1 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +2 -2
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +1 -1
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +4 -4
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +2 -2
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-rXmQmLUY.js → codeMirrorModule-BbkfBe3n.js} +1 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/{xtermModule-BuZfJS5v.js → xtermModule-DywYcAf8.js} +1 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +3 -3
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.C7UW1sC9.css → uiMode.CyMfwkXJ.css} +1 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +4 -4
- package/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright-core/types/protocol.d.ts +201 -398
- package/node_modules/playwright-core/types/types.d.ts +771 -327
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +19 -3
- package/package.json +10 -8
- package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts +0 -15
- package/node_modules/@pierre/diffs/dist/editor/stateStorage.d.ts.map +0 -1
- package/node_modules/@pierre/diffs/dist/editor/stateStorage.js +0 -65
- package/node_modules/@pierre/diffs/dist/editor/stateStorage.js.map +0 -1
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +0 -11
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +0 -1
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-DYjdXIbE.js +0 -129
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-B-dXF5JN.js +0 -181
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/index.KZ4wOW1K.js +0 -1
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Dzuouizj.js +0 -5
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{viewer-assets-D3qrnaxI.js → .setup/viewer-assets-D3qrnaxI.mjs} +0 -0
|
@@ -26,17 +26,19 @@ function createSeparator({ type, content, expandIndex, chunked = false, slotName
|
|
|
26
26
|
}));
|
|
27
27
|
if ((type === "line-info" || type === "line-info-basic") && content != null) {
|
|
28
28
|
const contentChildren = [];
|
|
29
|
-
if (expandIndex != null)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} else {
|
|
33
|
-
if (!isFirstHunk) {
|
|
34
|
-
contentChildren.push(createExpandButton("up"));
|
|
35
|
-
buttonCount++;
|
|
36
|
-
}
|
|
37
|
-
if (!isLastHunk) {
|
|
38
|
-
contentChildren.push(createExpandButton("down"));
|
|
29
|
+
if (expandIndex != null) {
|
|
30
|
+
if (!chunked) {
|
|
31
|
+
contentChildren.push(createExpandButton(!isFirstHunk && !isLastHunk ? "both" : isFirstHunk ? "down" : "up"));
|
|
39
32
|
buttonCount++;
|
|
33
|
+
} else {
|
|
34
|
+
if (!isFirstHunk) {
|
|
35
|
+
contentChildren.push(createExpandButton("up"));
|
|
36
|
+
buttonCount++;
|
|
37
|
+
}
|
|
38
|
+
if (!isLastHunk) {
|
|
39
|
+
contentChildren.push(createExpandButton("down"));
|
|
40
|
+
buttonCount++;
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
contentChildren.push(createHastElement({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSeparator.js","names":[],"sources":["../../src/utils/createSeparator.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport type { ExpansionDirections, HunkSeparators } from '../types';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\ninterface CreateSeparatorProps {\n type: HunkSeparators;\n content?: string;\n expandIndex?: number;\n chunked?: boolean;\n slotName?: string;\n isFirstHunk: boolean;\n isLastHunk: boolean;\n}\n\nfunction createExpandButton(type: ExpansionDirections) {\n return createHastElement({\n tagName: 'div',\n children: [\n createIconElement({\n name: type === 'both' ? 'diffs-icon-expand-all' : 'diffs-icon-expand',\n properties: { 'data-icon': '' },\n }),\n ],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-both': type === 'both' ? '' : undefined,\n 'data-expand-up': type === 'up' ? '' : undefined,\n 'data-expand-down': type === 'down' ? '' : undefined,\n },\n });\n}\n\nexport function createSeparator({\n type,\n content,\n expandIndex,\n chunked = false,\n slotName,\n isFirstHunk,\n isLastHunk,\n}: CreateSeparatorProps): HASTElement {\n let buttonCount = 0;\n const children = [];\n if (type === 'metadata' && content != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement(content)],\n properties: { 'data-separator-wrapper': '' },\n })\n );\n }\n if ((type === 'line-info' || type === 'line-info-basic') && content != null) {\n const contentChildren: ElementContent[] = [];\n if (expandIndex != null) {\n if (!chunked) {\n contentChildren.push(\n createExpandButton(\n !isFirstHunk && !isLastHunk ? 'both' : isFirstHunk ? 'down' : 'up'\n )\n );\n buttonCount++;\n } else {\n if (!isFirstHunk) {\n contentChildren.push(createExpandButton('up'));\n buttonCount++;\n }\n if (!isLastHunk) {\n contentChildren.push(createExpandButton('down'));\n buttonCount++;\n }\n }\n }\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(content)],\n properties: { 'data-unmodified-lines': '' },\n }),\n ],\n properties: { 'data-separator-content': '' },\n })\n );\n if (chunked && expandIndex != null) {\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement('Expand all')],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-all-button': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: contentChildren,\n properties: {\n 'data-separator-wrapper': '',\n 'data-separator-multi-button': buttonCount > 1 ? '' : undefined,\n },\n })\n );\n }\n if (type === 'custom' && slotName != null) {\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: slotName },\n })\n );\n }\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-separator': children.length === 0 ? 'simple' : type,\n 'data-expand-index': expandIndex,\n 'data-separator-first': isFirstHunk ? '' : undefined,\n 'data-separator-last': isLastHunk ? '' : undefined,\n },\n });\n}\n"],"mappings":";;AAmBA,SAAS,mBAAmB,MAA2B;CACrD,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,MAAM,SAAS,SAAS,0BAA0B;GAClD,YAAY,EAAE,aAAa,GAAG;EAChC,CAAC,CACH;EACA,YAAY;GACV,MAAM;GACN,sBAAsB;GACtB,oBAAoB,SAAS,SAAS,KAAK,KAAA;GAC3C,kBAAkB,SAAS,OAAO,KAAK,KAAA;GACvC,oBAAoB,SAAS,SAAS,KAAK,KAAA;EAC7C;CACF,CAAC;AACH;AAEA,SAAgB,gBAAgB,EAC9B,MACA,SACA,aACA,UAAU,OACV,UACA,aACA,cACoC;CACpC,IAAI,cAAc;CAClB,MAAM,WAAW,CAAC;CAClB,IAAI,SAAS,cAAc,WAAW,MACpC,SAAS,KACP,kBAAkB;EAChB,SAAS;EACT,UAAU,CAAC,sBAAsB,OAAO,CAAC;EACzC,YAAY,EAAE,0BAA0B,GAAG;CAC7C,CAAC,CACH;CAEF,KAAK,SAAS,eAAe,SAAS,sBAAsB,WAAW,MAAM;EAC3E,MAAM,kBAAoC,CAAC;EAC3C,IAAI,eAAe,
|
|
1
|
+
{"version":3,"file":"createSeparator.js","names":[],"sources":["../../src/utils/createSeparator.ts"],"sourcesContent":["import type { ElementContent, Element as HASTElement } from 'hast';\n\nimport type { ExpansionDirections, HunkSeparators } from '../types';\nimport {\n createHastElement,\n createIconElement,\n createTextNodeElement,\n} from './hast_utils';\n\ninterface CreateSeparatorProps {\n type: HunkSeparators;\n content?: string;\n expandIndex?: number;\n chunked?: boolean;\n slotName?: string;\n isFirstHunk: boolean;\n isLastHunk: boolean;\n}\n\nfunction createExpandButton(type: ExpansionDirections) {\n return createHastElement({\n tagName: 'div',\n children: [\n createIconElement({\n name: type === 'both' ? 'diffs-icon-expand-all' : 'diffs-icon-expand',\n properties: { 'data-icon': '' },\n }),\n ],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-both': type === 'both' ? '' : undefined,\n 'data-expand-up': type === 'up' ? '' : undefined,\n 'data-expand-down': type === 'down' ? '' : undefined,\n },\n });\n}\n\nexport function createSeparator({\n type,\n content,\n expandIndex,\n chunked = false,\n slotName,\n isFirstHunk,\n isLastHunk,\n}: CreateSeparatorProps): HASTElement {\n let buttonCount = 0;\n const children = [];\n if (type === 'metadata' && content != null) {\n children.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement(content)],\n properties: { 'data-separator-wrapper': '' },\n })\n );\n }\n if ((type === 'line-info' || type === 'line-info-basic') && content != null) {\n const contentChildren: ElementContent[] = [];\n if (expandIndex != null) {\n if (!chunked) {\n contentChildren.push(\n createExpandButton(\n !isFirstHunk && !isLastHunk ? 'both' : isFirstHunk ? 'down' : 'up'\n )\n );\n buttonCount++;\n } else {\n if (!isFirstHunk) {\n contentChildren.push(createExpandButton('up'));\n buttonCount++;\n }\n if (!isLastHunk) {\n contentChildren.push(createExpandButton('down'));\n buttonCount++;\n }\n }\n }\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [\n createHastElement({\n tagName: 'span',\n children: [createTextNodeElement(content)],\n properties: { 'data-unmodified-lines': '' },\n }),\n ],\n properties: { 'data-separator-content': '' },\n })\n );\n if (chunked && expandIndex != null) {\n contentChildren.push(\n createHastElement({\n tagName: 'div',\n children: [createTextNodeElement('Expand all')],\n properties: {\n role: 'button',\n 'data-expand-button': '',\n 'data-expand-all-button': '',\n },\n })\n );\n }\n children.push(\n createHastElement({\n tagName: 'div',\n children: contentChildren,\n properties: {\n 'data-separator-wrapper': '',\n 'data-separator-multi-button': buttonCount > 1 ? '' : undefined,\n },\n })\n );\n }\n if (type === 'custom' && slotName != null) {\n children.push(\n createHastElement({\n tagName: 'slot',\n properties: { name: slotName },\n })\n );\n }\n return createHastElement({\n tagName: 'div',\n children,\n properties: {\n 'data-separator': children.length === 0 ? 'simple' : type,\n 'data-expand-index': expandIndex,\n 'data-separator-first': isFirstHunk ? '' : undefined,\n 'data-separator-last': isLastHunk ? '' : undefined,\n },\n });\n}\n"],"mappings":";;AAmBA,SAAS,mBAAmB,MAA2B;CACrD,OAAO,kBAAkB;EACvB,SAAS;EACT,UAAU,CACR,kBAAkB;GAChB,MAAM,SAAS,SAAS,0BAA0B;GAClD,YAAY,EAAE,aAAa,GAAG;EAChC,CAAC,CACH;EACA,YAAY;GACV,MAAM;GACN,sBAAsB;GACtB,oBAAoB,SAAS,SAAS,KAAK,KAAA;GAC3C,kBAAkB,SAAS,OAAO,KAAK,KAAA;GACvC,oBAAoB,SAAS,SAAS,KAAK,KAAA;EAC7C;CACF,CAAC;AACH;AAEA,SAAgB,gBAAgB,EAC9B,MACA,SACA,aACA,UAAU,OACV,UACA,aACA,cACoC;CACpC,IAAI,cAAc;CAClB,MAAM,WAAW,CAAC;CAClB,IAAI,SAAS,cAAc,WAAW,MACpC,SAAS,KACP,kBAAkB;EAChB,S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,KAAK,KAAA;GAC3C,uBAAuB,aAAa,KAAK,KAAA;EAC3C;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSpanNodeFromToken.d.ts","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createSpanNodeFromToken.d.ts","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"mappings":";;iBAMgB,oBAAoB,OAAO,cAAc"}
|
|
@@ -2,7 +2,8 @@ import { getTokenStyleObject, stringifyTokenStyle } from "shiki";
|
|
|
2
2
|
//#region src/utils/createSpanNodeFromToken.ts
|
|
3
3
|
function createSpanFromToken(token) {
|
|
4
4
|
const element = document.createElement("span");
|
|
5
|
-
|
|
5
|
+
const style = token.htmlStyle ?? getTokenStyleObject(token);
|
|
6
|
+
element.style = stringifyTokenStyle(style);
|
|
6
7
|
element.textContent = token.content;
|
|
7
8
|
return element;
|
|
8
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSpanNodeFromToken.js","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"sourcesContent":["import {\n getTokenStyleObject,\n stringifyTokenStyle,\n type ThemedToken,\n} from 'shiki';\n\nexport function createSpanFromToken(token: ThemedToken): HTMLSpanElement {\n const element = document.createElement('span');\n const style = token.htmlStyle ?? getTokenStyleObject(token);\n element.style = stringifyTokenStyle(style);\n element.textContent = token.content;\n return element;\n}\n"],"mappings":";;AAMA,SAAgB,oBAAoB,OAAqC;CACvE,MAAM,UAAU,SAAS,cAAc,MAAM;
|
|
1
|
+
{"version":3,"file":"createSpanNodeFromToken.js","names":[],"sources":["../../src/utils/createSpanNodeFromToken.ts"],"sourcesContent":["import {\n getTokenStyleObject,\n stringifyTokenStyle,\n type ThemedToken,\n} from 'shiki';\n\nexport function createSpanFromToken(token: ThemedToken): HTMLSpanElement {\n const element = document.createElement('span');\n const style = token.htmlStyle ?? getTokenStyleObject(token);\n element.style = stringifyTokenStyle(style);\n element.textContent = token.content;\n return element;\n}\n"],"mappings":";;AAMA,SAAgB,oBAAoB,OAAqC;CACvE,MAAM,UAAU,SAAS,cAAc,MAAM;CAC7C,MAAM,QAAQ,MAAM,aAAa,oBAAoB,KAAK;CAC1D,QAAQ,QAAQ,oBAAoB,KAAK;CACzC,QAAQ,cAAc,MAAM;CAC5B,OAAO;AACT"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Element } from "../node_modules/.pnpm/@types_hast@3.0.4/node_modules/@types/hast/index.js";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/createStyleElement.d.ts
|
|
4
3
|
declare function createStyleElement(content: string, isCoreCSS?: boolean): Element;
|
|
5
4
|
declare function createThemeStyleElement(content: string): Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStyleElement.d.ts","names":[],"sources":["../../src/utils/createStyleElement.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createStyleElement.d.ts","names":[],"sources":["../../src/utils/createStyleElement.ts"],"mappings":";;iBAUgB,mBACd,iBACA,sBACC;iBAea,wBAAwB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTransformerWithState.d.ts","names":[],"sources":["../../src/utils/createTransformerWithState.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTransformerWithState.d.ts","names":[],"sources":["../../src/utils/createTransformerWithState.ts"],"mappings":";;;UAYU;EACR,OAAO;EACP,cAAc;EACd,SAAS;;iBAOK,2BACd,+BACA,0BACC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUnsafeCSSStyleNode.d.ts","names":[],"sources":["../../src/utils/createUnsafeCSSStyleNode.ts"],"mappings":";iBAEgB,
|
|
1
|
+
{"version":3,"file":"createUnsafeCSSStyleNode.d.ts","names":[],"sources":["../../src/utils/createUnsafeCSSStyleNode.ts"],"mappings":";iBAEgB,4BAA4B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { VirtualWindowSpecs } from "../types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/createWindowFromScrollPosition.d.ts
|
|
4
3
|
interface WindowFromScrollPositionProps {
|
|
5
4
|
scrollTop: number;
|
|
@@ -9,14 +8,7 @@ interface WindowFromScrollPositionProps {
|
|
|
9
8
|
fitPerfectlyOverscroll?: number;
|
|
10
9
|
overscrollSize: number;
|
|
11
10
|
}
|
|
12
|
-
declare function createWindowFromScrollPosition({
|
|
13
|
-
scrollTop,
|
|
14
|
-
scrollHeight,
|
|
15
|
-
height,
|
|
16
|
-
fitPerfectly,
|
|
17
|
-
fitPerfectlyOverscroll,
|
|
18
|
-
overscrollSize
|
|
19
|
-
}: WindowFromScrollPositionProps): VirtualWindowSpecs;
|
|
11
|
+
declare function createWindowFromScrollPosition({ scrollTop, scrollHeight, height, fitPerfectly, fitPerfectlyOverscroll, overscrollSize }: WindowFromScrollPositionProps): VirtualWindowSpecs;
|
|
20
12
|
//#endregion
|
|
21
13
|
export { createWindowFromScrollPosition };
|
|
22
14
|
//# sourceMappingURL=createWindowFromScrollPosition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWindowFromScrollPosition.d.ts","names":[],"sources":["../../src/utils/createWindowFromScrollPosition.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createWindowFromScrollPosition.d.ts","names":[],"sources":["../../src/utils/createWindowFromScrollPosition.ts"],"mappings":";;UAEU;EACR;EACA;EACA;EACA;EACA;EACA;;iBAGc,iCACd,WACA,cACA,QACA,cACA,wBACA,kBACC,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssWrappers.d.ts","names":[],"sources":["../../src/utils/cssWrappers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cssWrappers.d.ts","names":[],"sources":["../../src/utils/cssWrappers.ts"],"mappings":";;iBAUgB,YAAY;iBAQZ,cAAc;iBAOd,aACd,kBACA,YAAW,YACX;iBAmBc,yBACd,kBACA"}
|
|
@@ -18,11 +18,13 @@ function wrapUnsafeCSS(unsafeCSS) {
|
|
|
18
18
|
}`;
|
|
19
19
|
}
|
|
20
20
|
function wrapThemeCSS(themeCSS, themeType = "system", scrollbarGutter) {
|
|
21
|
+
const colorSchemeRule = themeType === "system" ? "" : `
|
|
22
|
+
color-scheme: ${themeType};`;
|
|
23
|
+
const scrollbarGutterVar = createMeasuredScrollbarGutterDeclaration(scrollbarGutter);
|
|
21
24
|
return `${LAYER_ORDER}
|
|
22
25
|
@layer rendered {
|
|
23
|
-
:host {${
|
|
24
|
-
|
|
25
|
-
${createMeasuredScrollbarGutterDeclaration(scrollbarGutter)}
|
|
26
|
+
:host {${colorSchemeRule}
|
|
27
|
+
${scrollbarGutterVar}
|
|
26
28
|
${themeCSS}
|
|
27
29
|
}
|
|
28
30
|
}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssWrappers.js","names":["rawStyles"],"sources":["../../src/utils/cssWrappers.ts"],"sourcesContent":["import { DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY } from '../constants';\nimport rawStyles from '../style.css?inline';\nimport type { ThemeTypes } from '../types';\nimport { createMeasuredScrollbarGutterDeclaration } from './scrollbarGutter';\n\nconst LAYER_ORDER = `@layer base, theme, rendered, unsafe;`;\nconst SCROLLBAR_GUTTER_DECLARATION_PATTERN = new RegExp(\n `${escapeRegExp(DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY)}\\\\s*:\\\\s*[^;]+;`\n);\n\nexport function wrapCoreCSS(mainCSS: string) {\n return `${LAYER_ORDER}\n${rawStyles}\n@layer theme {\n ${mainCSS}\n}`;\n}\n\nexport function wrapUnsafeCSS(unsafeCSS: string) {\n return `${LAYER_ORDER}\n@layer unsafe {\n ${unsafeCSS}\n}`;\n}\n\nexport function wrapThemeCSS(\n themeCSS: string,\n themeType: ThemeTypes = 'system',\n scrollbarGutter?: number\n) {\n const colorSchemeRule =\n themeType === 'system'\n ? ''\n : `\n color-scheme: ${themeType};`;\n const scrollbarGutterVar =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n\n return `${LAYER_ORDER}\n@layer rendered {\n :host {${colorSchemeRule}\n ${scrollbarGutterVar}\n ${themeCSS}\n }\n}`;\n}\n\nexport function patchScrollbarGutterSize(\n themeCSS: string,\n scrollbarGutter: number | undefined\n): string {\n const scrollbarGutterRule =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n return themeCSS.replace(\n SCROLLBAR_GUTTER_DECLARATION_PATTERN,\n scrollbarGutterRule\n );\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"],"mappings":";;;;AAKA,MAAM,cAAc;AACpB,MAAM,uCAAuC,IAAI,OAC/C,GAAG,aAAa,wCAAwC,EAAE,gBAC5D;AAEA,SAAgB,YAAY,SAAiB;CAC3C,OAAO,GAAG,YAAY;EACtBA,cAAU;;IAER,QAAQ;;AAEZ;AAEA,SAAgB,cAAc,WAAmB;CAC/C,OAAO,GAAG,YAAY;;IAEpB,UAAU;;AAEd;AAEA,SAAgB,aACd,UACA,YAAwB,UACxB,iBACA;
|
|
1
|
+
{"version":3,"file":"cssWrappers.js","names":["rawStyles"],"sources":["../../src/utils/cssWrappers.ts"],"sourcesContent":["import { DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY } from '../constants';\nimport rawStyles from '../style.css?inline';\nimport type { ThemeTypes } from '../types';\nimport { createMeasuredScrollbarGutterDeclaration } from './scrollbarGutter';\n\nconst LAYER_ORDER = `@layer base, theme, rendered, unsafe;`;\nconst SCROLLBAR_GUTTER_DECLARATION_PATTERN = new RegExp(\n `${escapeRegExp(DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY)}\\\\s*:\\\\s*[^;]+;`\n);\n\nexport function wrapCoreCSS(mainCSS: string) {\n return `${LAYER_ORDER}\n${rawStyles}\n@layer theme {\n ${mainCSS}\n}`;\n}\n\nexport function wrapUnsafeCSS(unsafeCSS: string) {\n return `${LAYER_ORDER}\n@layer unsafe {\n ${unsafeCSS}\n}`;\n}\n\nexport function wrapThemeCSS(\n themeCSS: string,\n themeType: ThemeTypes = 'system',\n scrollbarGutter?: number\n) {\n const colorSchemeRule =\n themeType === 'system'\n ? ''\n : `\n color-scheme: ${themeType};`;\n const scrollbarGutterVar =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n\n return `${LAYER_ORDER}\n@layer rendered {\n :host {${colorSchemeRule}\n ${scrollbarGutterVar}\n ${themeCSS}\n }\n}`;\n}\n\nexport function patchScrollbarGutterSize(\n themeCSS: string,\n scrollbarGutter: number | undefined\n): string {\n const scrollbarGutterRule =\n createMeasuredScrollbarGutterDeclaration(scrollbarGutter);\n return themeCSS.replace(\n SCROLLBAR_GUTTER_DECLARATION_PATTERN,\n scrollbarGutterRule\n );\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"],"mappings":";;;;AAKA,MAAM,cAAc;AACpB,MAAM,uCAAuC,IAAI,OAC/C,GAAG,aAAa,wCAAwC,EAAE,gBAC5D;AAEA,SAAgB,YAAY,SAAiB;CAC3C,OAAO,GAAG,YAAY;EACtBA,cAAU;;IAER,QAAQ;;AAEZ;AAEA,SAAgB,cAAc,WAAmB;CAC/C,OAAO,GAAG,YAAY;;IAEpB,UAAU;;AAEd;AAEA,SAAgB,aACd,UACA,YAAwB,UACxB,iBACA;CACA,MAAM,kBACJ,cAAc,WACV,KACA;kBACU,UAAU;CAC1B,MAAM,qBACJ,yCAAyC,eAAe;CAE1D,OAAO,GAAG,YAAY;;WAEb,gBAAgB;IACvB,mBAAmB;IACnB,SAAS;;;AAGb;AAEA,SAAgB,yBACd,UACA,iBACQ;CACR,MAAM,sBACJ,yCAAyC,eAAe;CAC1D,OAAO,SAAS,QACd,sCACA,mBACF;AACF;AAEA,SAAS,aAAa,OAAuB;CAC3C,OAAO,MAAM,QAAQ,uBAAuB,MAAM;AACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachString.d.ts","names":[],"sources":["../../src/utils/detachString.ts"],"mappings":";iBAQgB
|
|
1
|
+
{"version":3,"file":"detachString.d.ts","names":[],"sources":["../../src/utils/detachString.ts"],"mappings":";iBAQgB;iBAQA,aAAa"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiffAcceptRejectHunkConfig, DiffAcceptRejectHunkType, FileDiffMetadata } from "../types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/diffAcceptRejectHunk.d.ts
|
|
4
3
|
type DiffAcceptRejectHunkOptions = DiffAcceptRejectHunkType | DiffAcceptRejectHunkConfig;
|
|
5
4
|
declare function diffAcceptRejectHunk(diff: FileDiffMetadata, hunkIndex: number, options: DiffAcceptRejectHunkOptions): FileDiffMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diffAcceptRejectHunk.d.ts","names":[],"sources":["../../src/utils/diffAcceptRejectHunk.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"diffAcceptRejectHunk.d.ts","names":[],"sources":["../../src/utils/diffAcceptRejectHunk.ts"],"mappings":";;KAQK,8BACD,2BACA;iBAEY,qBACd,MAAM,kBACN,mBACA,SAAS,8BACR"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LineAnnotationPosition } from "./lineAnnotationIdentity.js";
|
|
2
|
+
//#region src/utils/editSessionAnnotations.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Annotation state for an active edit session. Like the private
|
|
5
|
+
* `editSessionFile`/`editSessionDiff` render models, we avoid mutating the
|
|
6
|
+
* original annotations and instead create a duplicate set that we mutate as
|
|
7
|
+
* needed while the user is editing the file or diff. When editing is
|
|
8
|
+
* finished, we can either revert back to the old state, or inherit the new
|
|
9
|
+
* mutated annotations.
|
|
10
|
+
*
|
|
11
|
+
* `current` holds the annotations actually rendered; the editor replaces
|
|
12
|
+
* them as edits move annotations between lines. `provided` is the last
|
|
13
|
+
* annotations array the component rendered with. When a render is called with
|
|
14
|
+
* annotations, we check whether it's a new array or the existing annotations
|
|
15
|
+
* we've previously rendered. If new, we fully replace whatever the edit
|
|
16
|
+
* session derived since there's no way to really reasonably rectify existing
|
|
17
|
+
* state. If it's the same as `provided` or `current`, we continue assuming
|
|
18
|
+
* `current` is the latest source of truth.
|
|
19
|
+
*
|
|
20
|
+
* `slotNames` map is a hack to keep annotation content attached while lines
|
|
21
|
+
* move around. Normally slotNames are derived from the target line number (and
|
|
22
|
+
* possibly side of the diff). Doing this while editing would force every
|
|
23
|
+
* annotation that gets moved to remount which is not ideal. So by keeping a
|
|
24
|
+
* reference map of annotation to slot name, we can keep invalid slot names
|
|
25
|
+
* until editing is completed, and then either revert back to our original
|
|
26
|
+
* annotations or update them with their new slot names (which will currently
|
|
27
|
+
* trigger a remount). In a future update we'll add a better ID system for
|
|
28
|
+
* annotations so we don't need to depend on this flawed keying architecture.
|
|
29
|
+
*/
|
|
30
|
+
interface EditSessionAnnotations<TAnnotation> {
|
|
31
|
+
provided: TAnnotation[];
|
|
32
|
+
current: TAnnotation[];
|
|
33
|
+
slotNames: Map<object, string>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates session state when an editor attaches. The array is kept as-is for
|
|
37
|
+
* both `provided` and `current`, and we record each annotation's slot name
|
|
38
|
+
* before any edits can move it.
|
|
39
|
+
*
|
|
40
|
+
* `previousSession` covers a whole new file or diff arriving mid-edit. The
|
|
41
|
+
* annotations that come with it describe the new document, so we rebuild the
|
|
42
|
+
* session around them — but any annotation the outgoing session already
|
|
43
|
+
* named keeps that name, since the caller's content is already rendered into
|
|
44
|
+
* a slot with it. Names for annotations that didn't survive the swap are
|
|
45
|
+
* simply dropped.
|
|
46
|
+
*/
|
|
47
|
+
declare function adoptEditSessionAnnotations<TAnnotation extends LineAnnotationPosition>(annotations: TAnnotation[], getName: (annotation: TAnnotation) => string, previousSession?: EditSessionAnnotations<TAnnotation>): EditSessionAnnotations<TAnnotation>;
|
|
48
|
+
/**
|
|
49
|
+
* Handles the caller passing a brand new annotations array while editing is
|
|
50
|
+
* active. We take it exactly as given — line numbers are read against the
|
|
51
|
+
* document as currently edited, and there's no merging with what the session
|
|
52
|
+
* had — so it replaces both `provided` and `current`. Annotations we've seen
|
|
53
|
+
* before keep their recorded slot names; new ones record a name for wherever
|
|
54
|
+
* they landed.
|
|
55
|
+
*/
|
|
56
|
+
declare function writeEditSessionAnnotations<TAnnotation extends LineAnnotationPosition>(session: EditSessionAnnotations<TAnnotation>, annotations: TAnnotation[], getName: (annotation: TAnnotation) => string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Every slot name an editable component renders resolves through here. With
|
|
59
|
+
* no active session this is just the normal position-derived name. During a
|
|
60
|
+
* session we return the recorded name instead, and an annotation we've never
|
|
61
|
+
* seen records its name the first time anyone asks. That way everything that
|
|
62
|
+
* writes slot names — the renderers, the editor, the light-DOM wrappers —
|
|
63
|
+
* lands on the same name for the same annotation.
|
|
64
|
+
*/
|
|
65
|
+
declare function resolveEditSessionSlotName<TAnnotation extends LineAnnotationPosition>(session: EditSessionAnnotations<TAnnotation> | undefined, annotation: TAnnotation, getName: (annotation: TAnnotation) => string): string;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { EditSessionAnnotations, adoptEditSessionAnnotations, resolveEditSessionSlotName, writeEditSessionAnnotations };
|
|
68
|
+
//# sourceMappingURL=editSessionAnnotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editSessionAnnotations.d.ts","names":[],"sources":["../../src/utils/editSessionAnnotations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCiB,uBAAuB;EACtC,UAAU;EACV,SAAS;EACT,WAAW;;;;;;;;;;;;;;iBAeG,4BACd,oBAAoB,wBAEpB,aAAa,eACb,UAAU,YAAY,wBACtB,kBAAkB,uBAAuB,eACxC,uBAAuB;;;;;;;;;iBAoBV,4BACd,oBAAoB,wBAEpB,SAAS,uBAAuB,cAChC,aAAa,eACb,UAAU,YAAY;;;;;;;;;iBAoBR,2BACd,oBAAoB,wBAEpB,SAAS,uBAAuB,0BAChC,YAAY,aACZ,UAAU,YAAY"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getLineAnnotationSource } from "./lineAnnotationIdentity.js";
|
|
2
|
+
//#region src/utils/editSessionAnnotations.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates session state when an editor attaches. The array is kept as-is for
|
|
5
|
+
* both `provided` and `current`, and we record each annotation's slot name
|
|
6
|
+
* before any edits can move it.
|
|
7
|
+
*
|
|
8
|
+
* `previousSession` covers a whole new file or diff arriving mid-edit. The
|
|
9
|
+
* annotations that come with it describe the new document, so we rebuild the
|
|
10
|
+
* session around them — but any annotation the outgoing session already
|
|
11
|
+
* named keeps that name, since the caller's content is already rendered into
|
|
12
|
+
* a slot with it. Names for annotations that didn't survive the swap are
|
|
13
|
+
* simply dropped.
|
|
14
|
+
*/
|
|
15
|
+
function adoptEditSessionAnnotations(annotations, getName, previousSession) {
|
|
16
|
+
const slotNames = /* @__PURE__ */ new Map();
|
|
17
|
+
for (const annotation of annotations) {
|
|
18
|
+
const source = getLineAnnotationSource(annotation);
|
|
19
|
+
slotNames.set(source, previousSession?.slotNames.get(source) ?? getName(annotation));
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
provided: annotations,
|
|
23
|
+
current: annotations,
|
|
24
|
+
slotNames
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Handles the caller passing a brand new annotations array while editing is
|
|
29
|
+
* active. We take it exactly as given — line numbers are read against the
|
|
30
|
+
* document as currently edited, and there's no merging with what the session
|
|
31
|
+
* had — so it replaces both `provided` and `current`. Annotations we've seen
|
|
32
|
+
* before keep their recorded slot names; new ones record a name for wherever
|
|
33
|
+
* they landed.
|
|
34
|
+
*/
|
|
35
|
+
function writeEditSessionAnnotations(session, annotations, getName) {
|
|
36
|
+
for (const annotation of annotations) {
|
|
37
|
+
const source = getLineAnnotationSource(annotation);
|
|
38
|
+
if (!session.slotNames.has(source)) session.slotNames.set(source, getName(annotation));
|
|
39
|
+
}
|
|
40
|
+
session.provided = annotations;
|
|
41
|
+
session.current = annotations;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Every slot name an editable component renders resolves through here. With
|
|
45
|
+
* no active session this is just the normal position-derived name. During a
|
|
46
|
+
* session we return the recorded name instead, and an annotation we've never
|
|
47
|
+
* seen records its name the first time anyone asks. That way everything that
|
|
48
|
+
* writes slot names — the renderers, the editor, the light-DOM wrappers —
|
|
49
|
+
* lands on the same name for the same annotation.
|
|
50
|
+
*/
|
|
51
|
+
function resolveEditSessionSlotName(session, annotation, getName) {
|
|
52
|
+
if (session == null) return getName(annotation);
|
|
53
|
+
const source = getLineAnnotationSource(annotation);
|
|
54
|
+
let name = session.slotNames.get(source);
|
|
55
|
+
if (name == null) {
|
|
56
|
+
name = getName(annotation);
|
|
57
|
+
session.slotNames.set(source, name);
|
|
58
|
+
}
|
|
59
|
+
return name;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { adoptEditSessionAnnotations, resolveEditSessionSlotName, writeEditSessionAnnotations };
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=editSessionAnnotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editSessionAnnotations.js","names":[],"sources":["../../src/utils/editSessionAnnotations.ts"],"sourcesContent":["import {\n getLineAnnotationSource,\n type LineAnnotationPosition,\n} from './lineAnnotationIdentity';\n\n/**\n * Annotation state for an active edit session. Like the private\n * `editSessionFile`/`editSessionDiff` render models, we avoid mutating the\n * original annotations and instead create a duplicate set that we mutate as\n * needed while the user is editing the file or diff. When editing is\n * finished, we can either revert back to the old state, or inherit the new\n * mutated annotations.\n *\n * `current` holds the annotations actually rendered; the editor replaces\n * them as edits move annotations between lines. `provided` is the last\n * annotations array the component rendered with. When a render is called with\n * annotations, we check whether it's a new array or the existing annotations\n * we've previously rendered. If new, we fully replace whatever the edit\n * session derived since there's no way to really reasonably rectify existing\n * state. If it's the same as `provided` or `current`, we continue assuming\n * `current` is the latest source of truth.\n *\n * `slotNames` map is a hack to keep annotation content attached while lines\n * move around. Normally slotNames are derived from the target line number (and\n * possibly side of the diff). Doing this while editing would force every\n * annotation that gets moved to remount which is not ideal. So by keeping a\n * reference map of annotation to slot name, we can keep invalid slot names\n * until editing is completed, and then either revert back to our original\n * annotations or update them with their new slot names (which will currently\n * trigger a remount). In a future update we'll add a better ID system for\n * annotations so we don't need to depend on this flawed keying architecture.\n */\n\nexport interface EditSessionAnnotations<TAnnotation> {\n provided: TAnnotation[];\n current: TAnnotation[];\n slotNames: Map<object, string>;\n}\n\n/**\n * Creates session state when an editor attaches. The array is kept as-is for\n * both `provided` and `current`, and we record each annotation's slot name\n * before any edits can move it.\n *\n * `previousSession` covers a whole new file or diff arriving mid-edit. The\n * annotations that come with it describe the new document, so we rebuild the\n * session around them — but any annotation the outgoing session already\n * named keeps that name, since the caller's content is already rendered into\n * a slot with it. Names for annotations that didn't survive the swap are\n * simply dropped.\n */\nexport function adoptEditSessionAnnotations<\n TAnnotation extends LineAnnotationPosition,\n>(\n annotations: TAnnotation[],\n getName: (annotation: TAnnotation) => string,\n previousSession?: EditSessionAnnotations<TAnnotation>\n): EditSessionAnnotations<TAnnotation> {\n const slotNames = new Map<object, string>();\n for (const annotation of annotations) {\n const source = getLineAnnotationSource(annotation);\n slotNames.set(\n source,\n previousSession?.slotNames.get(source) ?? getName(annotation)\n );\n }\n return { provided: annotations, current: annotations, slotNames };\n}\n\n/**\n * Handles the caller passing a brand new annotations array while editing is\n * active. We take it exactly as given — line numbers are read against the\n * document as currently edited, and there's no merging with what the session\n * had — so it replaces both `provided` and `current`. Annotations we've seen\n * before keep their recorded slot names; new ones record a name for wherever\n * they landed.\n */\nexport function writeEditSessionAnnotations<\n TAnnotation extends LineAnnotationPosition,\n>(\n session: EditSessionAnnotations<TAnnotation>,\n annotations: TAnnotation[],\n getName: (annotation: TAnnotation) => string\n): void {\n for (const annotation of annotations) {\n const source = getLineAnnotationSource(annotation);\n if (!session.slotNames.has(source)) {\n session.slotNames.set(source, getName(annotation));\n }\n }\n session.provided = annotations;\n session.current = annotations;\n}\n\n/**\n * Every slot name an editable component renders resolves through here. With\n * no active session this is just the normal position-derived name. During a\n * session we return the recorded name instead, and an annotation we've never\n * seen records its name the first time anyone asks. That way everything that\n * writes slot names — the renderers, the editor, the light-DOM wrappers —\n * lands on the same name for the same annotation.\n */\nexport function resolveEditSessionSlotName<\n TAnnotation extends LineAnnotationPosition,\n>(\n session: EditSessionAnnotations<TAnnotation> | undefined,\n annotation: TAnnotation,\n getName: (annotation: TAnnotation) => string\n): string {\n if (session == null) {\n return getName(annotation);\n }\n const source = getLineAnnotationSource(annotation);\n let name = session.slotNames.get(source);\n if (name == null) {\n name = getName(annotation);\n session.slotNames.set(source, name);\n }\n return name;\n}\n"],"mappings":";;;;;;;;;;;;;;AAmDA,SAAgB,4BAGd,aACA,SACA,iBACqC;CACrC,MAAM,4BAAY,IAAI,IAAoB;CAC1C,KAAK,MAAM,cAAc,aAAa;EACpC,MAAM,SAAS,wBAAwB,UAAU;EACjD,UAAU,IACR,QACA,iBAAiB,UAAU,IAAI,MAAM,KAAK,QAAQ,UAAU,CAC9D;CACF;CACA,OAAO;EAAE,UAAU;EAAa,SAAS;EAAa;CAAU;AAClE;;;;;;;;;AAUA,SAAgB,4BAGd,SACA,aACA,SACM;CACN,KAAK,MAAM,cAAc,aAAa;EACpC,MAAM,SAAS,wBAAwB,UAAU;EACjD,IAAI,CAAC,QAAQ,UAAU,IAAI,MAAM,GAC/B,QAAQ,UAAU,IAAI,QAAQ,QAAQ,UAAU,CAAC;CAErD;CACA,QAAQ,WAAW;CACnB,QAAQ,UAAU;AACpB;;;;;;;;;AAUA,SAAgB,2BAGd,SACA,YACA,SACQ;CACR,IAAI,WAAW,MACb,OAAO,QAAQ,UAAU;CAE3B,MAAM,SAAS,wBAAwB,UAAU;CACjD,IAAI,OAAO,QAAQ,UAAU,IAAI,MAAM;CACvC,IAAI,QAAQ,MAAM;EAChB,OAAO,QAAQ,UAAU;EACzB,QAAQ,UAAU,IAAI,QAAQ,IAAI;CACpC;CACA,OAAO;AACT"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FileDiffMetadata, HunkExpansionRegion } from "../types.js";
|
|
2
2
|
import { CreatePatchOptionsNonabortable } from "diff";
|
|
3
|
-
|
|
4
3
|
//#region src/utils/editSessionHunks.d.ts
|
|
5
4
|
interface DivergenceCore {
|
|
6
5
|
start: number;
|
|
@@ -56,9 +55,11 @@ declare function captureExpansionAnchors(diff: FileDiffMetadata, expandedHunks:
|
|
|
56
55
|
*/
|
|
57
56
|
declare function rebuildExpansionFromAnchors(diff: FileDiffMetadata, anchors: ExpansionAnchorRange[]): Map<number, HunkExpansionRegion>;
|
|
58
57
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* the
|
|
58
|
+
* While editing, hunk updates keep a lightweight session-specific shape and
|
|
59
|
+
* mark the diff with `editSessionDirty`. Called at session end, this
|
|
60
|
+
* recomputes the hunks in full from the diff's current lines — the same
|
|
61
|
+
* hunks a non-session edit would have produced — and clears the flag.
|
|
62
|
+
* Returns true when a recompute ran.
|
|
62
63
|
*/
|
|
63
64
|
declare function finishEditSessionForDiff(diff: FileDiffMetadata, parseDiffOptions?: CreatePatchOptionsNonabortable): boolean;
|
|
64
65
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editSessionHunks.d.ts","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"editSessionHunks.d.ts","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"mappings":";;;UA8BiB;EACf;EACA;EACA;;UAGQ;EACR;EACA;;;UAIe;EACf,SAAS,MAAM;;;;;;;iBA2BD,qBAAqB;;;;;iBAWrB,mBACd,yBACA,0BACC;;;;;;iBA2Ba,oBACd,MAAM,kBACN,mBAAmB,iCAClB;;;;;iBAmCa,yBACd,MAAM,kBACN,4BAA4B,kBAC5B,mBAAmB,gCACnB,wBAAwB,8BACvB;;iBAwHa,kCACd,eAAe,YAAY,sBAC3B,QAAQ,sBACP,YAAY;;;;;;;KA6BH,wBAAwB,eAAe;;iBAGnC,wBACd,MAAM,kBACN,eAAe,YAAY,sBAC3B,oCACC;;;;;;;iBAoDa,4BACd,MAAM,kBACN,SAAS,yBACR,YAAY;;;;;;;;iBAgDC,yBACd,MAAM,kBACN,mBAAmB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getHunkSideStartBoundary } from "./getHunkSideBoundaries.js";
|
|
2
|
-
import { parseDiffFromFile } from "./parseDiffFromFile.js";
|
|
3
2
|
import { getExpandedRegion, getTrailingExpandedRegion } from "./virtualDiffLayout.js";
|
|
3
|
+
import { parseDiffFromFile } from "./parseDiffFromFile.js";
|
|
4
4
|
import { offsetHunkContent, preserveTrailingEditorBlankLine, recomputeDiffHunks, recomputeDiffHunksForEdit, recomputeDiffRenderLineCounts, recomputeHunkRenderLineCounts, syncHunkNoEOFCRFromFullFile } from "./updateDiffHunks.js";
|
|
5
5
|
//#region src/utils/editSessionHunks.ts
|
|
6
6
|
const deletionLineSetCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -198,13 +198,15 @@ function rebuildExpansionFromAnchors(diff, anchors) {
|
|
|
198
198
|
return rebuilt;
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* the
|
|
201
|
+
* While editing, hunk updates keep a lightweight session-specific shape and
|
|
202
|
+
* mark the diff with `editSessionDirty`. Called at session end, this
|
|
203
|
+
* recomputes the hunks in full from the diff's current lines — the same
|
|
204
|
+
* hunks a non-session edit would have produced — and clears the flag.
|
|
205
|
+
* Returns true when a recompute ran.
|
|
204
206
|
*/
|
|
205
207
|
function finishEditSessionForDiff(diff, parseDiffOptions) {
|
|
206
208
|
if (diff.editSessionDirty !== true) return false;
|
|
207
|
-
diff.editSessionDirty
|
|
209
|
+
delete diff.editSessionDirty;
|
|
208
210
|
Object.assign(diff, diff.additionLines.length <= 1 && diff.additionLines.join("") === "" ? recomputeDiffHunks(diff, parseDiffOptions) : recomputeDiffHunksForEdit(diff, parseDiffOptions));
|
|
209
211
|
return true;
|
|
210
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editSessionHunks.js","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"sourcesContent":["import type { CreatePatchOptionsNonabortable } from 'diff';\n\nimport type {\n ChangeContent,\n ContextContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport { parseDiffFromFile } from './parseDiffFromFile';\nimport {\n offsetHunkContent,\n preserveTrailingEditorBlankLine,\n recomputeDiffHunks,\n recomputeDiffHunksForEdit,\n recomputeDiffRenderLineCounts,\n recomputeHunkRenderLineCounts,\n syncHunkNoEOFCRFromFullFile,\n} from './updateDiffHunks';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\n// While an editor is attached to a FileDiff, each hunk is a persistent region\n// identified by its old-side range. Structural passes rebuild those regions\n// from one canonical old/current diff; a reverted region remains as context so\n// its rows keep rendering until the genuine session-exit recompute.\n\nexport interface DivergenceCore {\n start: number;\n deletionEnd: number;\n additionEnd: number;\n}\n\ninterface PreviousRegionSpan {\n firstIndex: number;\n lastIndex: number;\n}\n\n/** Maps rebuilt regions back to the previous skeleton for expansion remapping. */\nexport interface SessionRegionChange {\n regions: Array<PreviousRegionSpan | undefined>;\n}\n\ninterface RegionBounds {\n additionStart: number;\n additionEnd: number;\n deletionStart: number;\n deletionEnd: number;\n}\n\ninterface RegionPlan {\n deletionStart: number;\n deletionEnd: number;\n blocks: ChangeContent[];\n previousSpan: PreviousRegionSpan | undefined;\n}\n\nconst deletionLineSetCache = new WeakMap<\n FileDiffMetadata,\n { lines: string[]; set: Set<string> }\n>();\n\n/**\n * Drops the editor document's phantom trailing empty line (a document ending\n * in a newline exposes one extra empty line the parsed diff never contains)\n * so session line arrays compare like parse-derived ones.\n */\nexport function normalizeEditorLines(lines: string[]): string[] {\n if (lines.length > 1 && lines[lines.length - 1] === '') {\n return lines.slice(0, -1);\n }\n return lines;\n}\n\n/**\n * Find the complete old/current divergence core. The old side is immutable\n * during an edit session, so this result needs no prior-pass snapshot.\n */\nexport function findDivergenceCore(\n deletionLines: string[],\n additionLines: string[]\n): DivergenceCore | undefined {\n const maxStart = Math.min(deletionLines.length, additionLines.length);\n let start = 0;\n while (start < maxStart && deletionLines[start] === additionLines[start]) {\n start++;\n }\n let deletionEnd = deletionLines.length;\n let additionEnd = additionLines.length;\n while (\n deletionEnd > start &&\n additionEnd > start &&\n deletionLines[deletionEnd - 1] === additionLines[additionEnd - 1]\n ) {\n deletionEnd--;\n additionEnd--;\n }\n if (start === deletionEnd && start === additionEnd) {\n return undefined;\n }\n return { start, deletionEnd, additionEnd };\n}\n\n/**\n * Rebuild the session skeleton as a pure function of the immutable old lines,\n * current new lines, and old-side ranges of the previous regions. One\n * canonical parse supplies the same change blocks that session exit will use.\n */\nexport function rebuildSessionHunks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): SessionRegionChange | undefined {\n const previousHunks = diff.hunks;\n const editorAdditionLines = diff.additionLines;\n const canonicalAdditionLines = normalizeEditorLines(editorAdditionLines);\n const canonicalDiff =\n canonicalAdditionLines === editorAdditionLines\n ? diff\n : { ...diff, additionLines: canonicalAdditionLines };\n const blocks = parseCanonicalChangeBlocks(canonicalDiff, parseDiffOptions);\n const plans = buildRegionPlans(\n previousHunks,\n blocks,\n diff.deletionLines.length\n );\n\n const nextHunks = buildRegionHunks(canonicalDiff, plans);\n diff.additionLines = canonicalAdditionLines;\n diff.hunks = nextHunks;\n diff.editSessionDirty = true;\n finalizeSessionHunks(diff);\n preserveTrailingEditorBlankLine(diff, editorAdditionLines);\n const layoutChanged = hasRegionOrSplitLayoutChanged(\n previousHunks,\n diff.hunks\n );\n if (!layoutChanged) {\n return undefined;\n }\n return { regions: plans.map((plan) => plan.previousSpan) };\n}\n\n/**\n * Keep a cheap content-only path when a same-line-count pass cannot alter the\n * canonical blocks. Gap, ambiguous, or multi-region edits rebuild statelessly.\n */\nexport function applySessionChangedLines(\n diff: FileDiffMetadata,\n changedAdditionLineIndexes: Iterable<number>,\n parseDiffOptions?: CreatePatchOptionsNonabortable,\n previousAdditionLines?: ReadonlyMap<number, string>\n): SessionRegionChange | undefined {\n const lines = Array.from(new Set(changedAdditionLineIndexes))\n .filter((line) => line >= 0 && line < diff.additionLines.length)\n .sort((a, b) => a - b);\n if (lines.length === 0) {\n return undefined;\n }\n\n const { hunks } = diff;\n let regionIndex: number | undefined;\n let hunkIndex = 0;\n for (const line of lines) {\n while (hunkIndex < hunks.length) {\n const hunk = hunks[hunkIndex];\n const start = getHunkAdditionStart(hunk);\n if (line < start + hunk.additionCount) break;\n hunkIndex++;\n }\n const hunk = hunks[hunkIndex];\n const start = hunk == null ? undefined : getHunkAdditionStart(hunk);\n if (\n start == null ||\n line < start ||\n (regionIndex != null && regionIndex !== hunkIndex)\n ) {\n return rebuildSessionHunks(diff, parseDiffOptions);\n }\n regionIndex = hunkIndex;\n }\n\n if (regionIndex == null) {\n return undefined;\n }\n if (\n canRetainCanonicalBlocks(\n diff,\n lines,\n regionIndex,\n previousAdditionLines,\n parseDiffOptions\n )\n ) {\n diff.editSessionDirty = true;\n return undefined;\n }\n return rebuildSessionHunks(diff, parseDiffOptions);\n}\n\n// Existing balanced change blocks remain canonical when every edited line was\n// unmatched before and stays unmatched now: the old/new equality matrix is\n// unchanged, and similarity realignment never reorders a balanced block.\nfunction canRetainCanonicalBlocks(\n diff: FileDiffMetadata,\n changedLines: number[],\n regionIndex: number,\n previousAdditionLines: ReadonlyMap<number, string> | undefined,\n parseDiffOptions: CreatePatchOptionsNonabortable | undefined\n): boolean {\n if (\n previousAdditionLines == null ||\n parseDiffOptions?.ignoreWhitespace === true ||\n parseDiffOptions?.stripTrailingCr === true\n ) {\n return false;\n }\n const deletionLineSet = getDeletionLineSet(diff);\n const hunk = diff.hunks[regionIndex];\n if (hunk.hunkContent.some(isPureChange)) {\n return false;\n }\n for (const line of changedLines) {\n const previousLine = previousAdditionLines.get(line);\n const additionLine = diff.additionLines[line];\n if (\n previousLine == null ||\n additionLine == null ||\n deletionLineSet.has(previousLine) ||\n deletionLineSet.has(additionLine)\n ) {\n return false;\n }\n let insideBalancedChange = false;\n for (const content of hunk.hunkContent) {\n if (\n content.type === 'change' &&\n content.additions === content.deletions &&\n line >= content.additionLineIndex &&\n line < content.additionLineIndex + content.additions\n ) {\n insideBalancedChange = true;\n break;\n }\n }\n if (!insideBalancedChange) {\n return false;\n }\n }\n return true;\n}\n\nfunction getDeletionLineSet(diff: FileDiffMetadata): Set<string> {\n const cached = deletionLineSetCache.get(diff);\n if (cached?.lines === diff.deletionLines) {\n return cached.set;\n }\n const set = new Set(diff.deletionLines);\n deletionLineSetCache.set(diff, { lines: diff.deletionLines, set });\n return set;\n}\n\nfunction isPureChange(\n content: ContextContent | ChangeContent | undefined\n): boolean {\n return (\n content?.type === 'change' &&\n (content.additions === 0 || content.deletions === 0)\n );\n}\n\n/** Preserve expansion at the surviving outer edges of rebuilt old-side gaps. */\nexport function remapExpandedHunksForRegionChange(\n expandedHunks: Map<number, HunkExpansionRegion>,\n change: SessionRegionChange\n): Map<number, HunkExpansionRegion> {\n const remapped = new Map<number, HunkExpansionRegion>();\n const { regions } = change;\n for (let key = 0; key <= regions.length; key++) {\n const previous = regions[key - 1];\n const next = regions[key];\n const fromStartSource =\n key === 0\n ? expandedHunks.get(0)\n : previous == null\n ? undefined\n : expandedHunks.get(previous.lastIndex + 1);\n const fromEndSource =\n next == null ? undefined : expandedHunks.get(next.firstIndex);\n const fromStart = fromStartSource?.fromStart ?? 0;\n const fromEnd = fromEndSource?.fromEnd ?? 0;\n if (fromStart > 0 || fromEnd > 0) {\n remapped.set(key, { fromStart, fromEnd });\n }\n }\n return remapped;\n}\n\n/**\n * An expanded gap-edge slice in old-side (deletion-line) coordinates as a\n * `[start, end)` range. Old-side coordinates survive the exit recompute\n * unchanged — edits only touch the new side — so these anchor best-effort\n * expansion preservation across the recompute.\n */\nexport type ExpansionAnchorRange = [start: number, end: number];\n\n/** Snapshot the expanded gap-edge slices before the exit recompute. */\nexport function captureExpansionAnchors(\n diff: FileDiffMetadata,\n expandedHunks: Map<number, HunkExpansionRegion>,\n collapsedContextThreshold: number\n): ExpansionAnchorRange[] {\n const anchors: ExpansionAnchorRange[] = [];\n if (diff.isPartial) {\n return anchors;\n }\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const region = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n // Gaps at or below the threshold render on their own; only explicit\n // expansion state needs preserving.\n if (region.rangeSize <= collapsedContextThreshold) {\n continue;\n }\n const gapEnd = getHunkDeletionStart(hunk);\n const gapStart = gapEnd - region.rangeSize;\n if (region.fromStart > 0) {\n anchors.push([gapStart, gapStart + region.fromStart]);\n }\n if (region.fromEnd > 0) {\n anchors.push([gapEnd - region.fromEnd, gapEnd]);\n }\n }\n const trailingRegion = getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: diff.hunks.length - 1,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'captureExpansionAnchors',\n });\n if (\n trailingRegion != null &&\n trailingRegion.fromStart > 0 &&\n trailingRegion.rangeSize > collapsedContextThreshold\n ) {\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n const gapStart = getHunkDeletionStart(lastHunk) + lastHunk.deletionCount;\n anchors.push([gapStart, gapStart + trailingRegion.fromStart]);\n }\n return anchors;\n}\n\n/**\n * Rebuild gap expansion state against the recomputed hunks: for each new\n * gap, an anchor touching the gap's start edge restores `fromStart`, one\n * touching its end edge restores `fromEnd`, and anchors for gaps that no\n * longer exist drop.\n */\nexport function rebuildExpansionFromAnchors(\n diff: FileDiffMetadata,\n anchors: ExpansionAnchorRange[]\n): Map<number, HunkExpansionRegion> {\n const rebuilt = new Map<number, HunkExpansionRegion>();\n if (anchors.length === 0) {\n return rebuilt;\n }\n const applyGap = (key: number, gapStart: number, gapEnd: number) => {\n if (gapEnd <= gapStart) {\n return;\n }\n let fromStart = 0;\n let fromEnd = 0;\n for (const [start, end] of anchors) {\n if (end <= gapStart || start >= gapEnd) {\n continue;\n }\n if (start <= gapStart) {\n fromStart = Math.max(fromStart, Math.min(end, gapEnd) - gapStart);\n }\n if (end >= gapEnd) {\n fromEnd = Math.max(fromEnd, gapEnd - Math.max(start, gapStart));\n }\n }\n if (fromStart > 0 || fromEnd > 0) {\n rebuilt.set(key, { fromStart, fromEnd });\n }\n };\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const gapEnd = getHunkDeletionStart(hunk);\n applyGap(hunkIndex, gapEnd - Math.max(hunk.collapsedBefore, 0), gapEnd);\n }\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n if (lastHunk != null && !diff.isPartial && diff.deletionLines.length > 0) {\n applyGap(\n diff.hunks.length,\n getHunkDeletionStart(lastHunk) + lastHunk.deletionCount,\n diff.deletionLines.length\n );\n }\n return rebuilt;\n}\n\n/**\n * Genuine session exit: when session passes reshaped the hunks, run the real\n * full recompute so exit state matches a non-session edit pipeline, and clear\n * the marker. Returns true when a recompute ran.\n */\nexport function finishEditSessionForDiff(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): boolean {\n if (diff.editSessionDirty !== true) {\n return false;\n }\n diff.editSessionDirty = undefined;\n // The empty editor row only hosts a caret; it is not file content after exit.\n Object.assign(\n diff,\n diff.additionLines.length <= 1 && diff.additionLines.join('') === ''\n ? recomputeDiffHunks(diff, parseDiffOptions)\n : recomputeDiffHunksForEdit(diff, parseDiffOptions)\n );\n return true;\n}\n\n// Parse the complete old/current files once with the same context policy as\n// session exit. Equal boundary lines affect Myers tie-breaking, while parsed\n// context is required for the blank-run alignment post-pass; only canonical\n// change blocks are retained. Running cursors normalize unified N,0 indexes.\nfunction parseCanonicalChangeBlocks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): ChangeContent[] {\n if (findDivergenceCore(diff.deletionLines, diff.additionLines) == null) {\n return [];\n }\n const parsed = parseDiffFromFile(\n {\n name: diff.prevName ?? diff.name,\n contents: diff.deletionLines.join(''),\n },\n {\n name: diff.name,\n contents: diff.additionLines.join(''),\n lang: diff.lang,\n },\n parseDiffOptions\n );\n\n const blocks: ChangeContent[] = [];\n let coveredAdditions = 0;\n let coveredDeletions = 0;\n for (const hunk of parsed.hunks) {\n const contextLines =\n hunk.additionCount > 0\n ? hunk.additionLineIndex - coveredAdditions\n : hunk.deletionLineIndex - coveredDeletions;\n coveredAdditions += contextLines;\n coveredDeletions += contextLines;\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n coveredAdditions += content.lines;\n coveredDeletions += content.lines;\n continue;\n }\n const block = offsetHunkContent(content, 0, 0) as ChangeContent;\n if (block.additions === 0) {\n block.additionLineIndex = coveredAdditions;\n }\n if (block.deletions === 0) {\n block.deletionLineIndex = coveredDeletions;\n }\n blocks.push(block);\n coveredAdditions += block.additions;\n coveredDeletions += block.deletions;\n }\n }\n return blocks;\n}\n\n// Co-walk canonical blocks and previous old-side regions. A block touching a\n// region grows it; touching several merges them; a block wholly in a gap gets\n// its own region. Pure insertions/deletions absorb one adjacent context line\n// when available so the region stays renderable on both sides and after undo.\nfunction buildRegionPlans(\n previousHunks: Hunk[],\n blocks: ChangeContent[],\n deletionLineCount: number\n): RegionPlan[] {\n const previousPlans = previousHunks.map((hunk, index): RegionPlan => {\n const deletionStart = getHunkDeletionStart(hunk);\n return {\n deletionStart,\n deletionEnd: deletionStart + hunk.deletionCount,\n blocks: [],\n previousSpan: { firstIndex: index, lastIndex: index },\n };\n });\n const plans: RegionPlan[] = [];\n let previousIndex = 0;\n\n for (const block of blocks) {\n const blockStart = block.deletionLineIndex;\n const blockEnd = blockStart + block.deletions;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionEnd < blockStart\n ) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n\n let plan =\n plans.length > 0 &&\n blockTouchesRegion(blockStart, blockEnd, plans[plans.length - 1])\n ? plans.pop()\n : undefined;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionStart <= blockEnd\n ) {\n plan = mergeRegionPlans(plan, previousPlans[previousIndex]);\n previousIndex++;\n }\n\n if (plan == null) {\n let deletionStart = blockStart;\n let deletionEnd = blockEnd;\n if (\n (block.deletions === 0 || block.additions === 0) &&\n deletionLineCount > block.deletions\n ) {\n const previousEnd = plans[plans.length - 1]?.deletionEnd ?? 0;\n const nextStart =\n previousPlans[previousIndex]?.deletionStart ?? deletionLineCount;\n if (blockStart > previousEnd) {\n deletionStart--;\n } else if (blockEnd < nextStart) {\n deletionEnd++;\n }\n }\n plan = {\n deletionStart,\n deletionEnd,\n blocks: [],\n previousSpan: undefined,\n };\n }\n plan.deletionStart = Math.min(plan.deletionStart, blockStart);\n plan.deletionEnd = Math.max(plan.deletionEnd, blockEnd);\n plan.blocks.push(block);\n plans.push(plan);\n }\n\n while (previousIndex < previousPlans.length) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n return plans;\n}\n\nfunction blockTouchesRegion(\n blockStart: number,\n blockEnd: number,\n region: RegionPlan\n): boolean {\n return blockStart <= region.deletionEnd && blockEnd >= region.deletionStart;\n}\n\nfunction mergeRegionPlans(\n target: RegionPlan | undefined,\n source: RegionPlan\n): RegionPlan {\n if (target == null) {\n return source;\n }\n target.deletionStart = Math.min(target.deletionStart, source.deletionStart);\n target.deletionEnd = Math.max(target.deletionEnd, source.deletionEnd);\n target.blocks.push(...source.blocks);\n if (source.previousSpan != null) {\n target.previousSpan ??= { ...source.previousSpan };\n target.previousSpan.firstIndex = Math.min(\n target.previousSpan.firstIndex,\n source.previousSpan.firstIndex\n );\n target.previousSpan.lastIndex = Math.max(\n target.previousSpan.lastIndex,\n source.previousSpan.lastIndex\n );\n }\n return target;\n}\n\n// One paired-context walk constructs every region's new-side range. There is\n// no downstream coordinate shifting: each boundary is derived from the\n// canonical blocks that precede it.\nfunction buildRegionHunks(diff: FileDiffMetadata, plans: RegionPlan[]): Hunk[] {\n const hunks: Hunk[] = [];\n let deletionCursor = 0;\n let additionCursor = 0;\n for (const plan of plans) {\n const contextBefore = plan.deletionStart - deletionCursor;\n if (contextBefore < 0) {\n throw new Error('buildRegionHunks: overlapping old-side regions');\n }\n deletionCursor += contextBefore;\n additionCursor += contextBefore;\n const additionStart = additionCursor;\n const hunkContent: Array<ContextContent | ChangeContent> = [];\n\n for (const canonicalBlock of plan.blocks) {\n const deletionContext = canonicalBlock.deletionLineIndex - deletionCursor;\n const additionContext = canonicalBlock.additionLineIndex - additionCursor;\n if (deletionContext < 0 || deletionContext !== additionContext) {\n throw new Error('buildRegionHunks: canonical block context mismatch');\n }\n pushContext(hunkContent, deletionContext, additionCursor, deletionCursor);\n deletionCursor += deletionContext;\n additionCursor += additionContext;\n hunkContent.push({ ...canonicalBlock });\n deletionCursor += canonicalBlock.deletions;\n additionCursor += canonicalBlock.additions;\n }\n\n const trailingContext = plan.deletionEnd - deletionCursor;\n if (trailingContext < 0) {\n throw new Error('buildRegionHunks: block exceeds its old-side region');\n }\n pushContext(hunkContent, trailingContext, additionCursor, deletionCursor);\n deletionCursor += trailingContext;\n additionCursor += trailingContext;\n hunks.push(\n createRegionHunk(\n diff,\n {\n additionStart,\n additionEnd: additionCursor,\n deletionStart: plan.deletionStart,\n deletionEnd: plan.deletionEnd,\n },\n hunkContent\n )\n );\n }\n\n if (\n diff.deletionLines.length - deletionCursor !==\n diff.additionLines.length - additionCursor\n ) {\n throw new Error('buildRegionHunks: trailing context mismatch');\n }\n return hunks;\n}\n\nfunction createRegionHunk(\n diff: FileDiffMetadata,\n bounds: RegionBounds,\n hunkContent: Array<ContextContent | ChangeContent>\n): Hunk {\n const additionCount = bounds.additionEnd - bounds.additionStart;\n const deletionCount = bounds.deletionEnd - bounds.deletionStart;\n let additionLines = 0;\n let deletionLines = 0;\n for (const content of hunkContent) {\n if (content.type === 'change') {\n additionLines += content.additions;\n deletionLines += content.deletions;\n }\n }\n const hunk: Hunk = {\n collapsedBefore: 0,\n additionStart: getUnifiedStart(bounds.additionStart, additionCount),\n additionCount,\n additionLines,\n additionLineIndex: getUnifiedLineIndex(bounds.additionStart, additionCount),\n deletionStart: getUnifiedStart(bounds.deletionStart, deletionCount),\n deletionCount,\n deletionLines,\n deletionLineIndex: getUnifiedLineIndex(bounds.deletionStart, deletionCount),\n hunkContent,\n hunkSpecs: `@@ -${getUnifiedStart(bounds.deletionStart, deletionCount)},${deletionCount} +${getUnifiedStart(bounds.additionStart, additionCount)},${additionCount} @@`,\n splitLineStart: 0,\n splitLineCount: 0,\n unifiedLineStart: 0,\n unifiedLineCount: 0,\n noEOFCRAdditions: false,\n noEOFCRDeletions: false,\n };\n recomputeHunkRenderLineCounts(hunk);\n return hunk;\n}\n\nfunction pushContext(\n hunkContent: Array<ContextContent | ChangeContent>,\n lines: number,\n additionLineIndex: number,\n deletionLineIndex: number\n): void {\n if (lines > 0) {\n hunkContent.push({\n type: 'context',\n lines,\n additionLineIndex,\n deletionLineIndex,\n });\n }\n}\n\nfunction hasRegionOrSplitLayoutChanged(\n previous: Hunk[],\n next: Hunk[]\n): boolean {\n if (previous.length !== next.length) {\n return true;\n }\n for (let index = 0; index < previous.length; index++) {\n const previousHunk = previous[index];\n const nextHunk = next[index];\n if (\n getHunkDeletionStart(previousHunk) !== getHunkDeletionStart(nextHunk) ||\n previousHunk.deletionCount !== nextHunk.deletionCount ||\n getHunkAdditionStart(previousHunk) !== getHunkAdditionStart(nextHunk) ||\n previousHunk.additionCount !== nextHunk.additionCount ||\n previousHunk.splitLineCount !== nextHunk.splitLineCount ||\n !haveSameSplitRowMapping(previousHunk, nextHunk)\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction haveSameSplitRowMapping(previous: Hunk, next: Hunk): boolean {\n const previousRows = iterateSplitRowMapping(previous);\n const nextRows = iterateSplitRowMapping(next);\n while (true) {\n const previousRow = previousRows.next();\n const nextRow = nextRows.next();\n if (previousRow.done === true || nextRow.done === true) {\n return previousRow.done === nextRow.done;\n }\n if (\n previousRow.value[0] !== nextRow.value[0] ||\n previousRow.value[1] !== nextRow.value[1]\n ) {\n return false;\n }\n }\n}\n\nfunction* iterateSplitRowMapping(\n hunk: Hunk\n): Generator<\n [deletionLine: number | undefined, additionLine: number | undefined]\n> {\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n for (let offset = 0; offset < content.lines; offset++) {\n yield [\n content.deletionLineIndex + offset,\n content.additionLineIndex + offset,\n ];\n }\n continue;\n }\n const rowCount = Math.max(content.deletions, content.additions);\n for (let offset = 0; offset < rowCount; offset++) {\n yield [\n offset < content.deletions\n ? content.deletionLineIndex + offset\n : undefined,\n offset < content.additions\n ? content.additionLineIndex + offset\n : undefined,\n ];\n }\n }\n}\n\nfunction getHunkAdditionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.additionStart, hunk.additionCount);\n}\n\nfunction getHunkDeletionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.deletionStart, hunk.deletionCount);\n}\n\nfunction getUnifiedStart(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex : lineIndex + 1;\n}\n\nfunction getUnifiedLineIndex(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex - 1 : lineIndex;\n}\n\nfunction finalizeSessionHunks(diff: FileDiffMetadata): void {\n recomputeDiffRenderLineCounts(diff);\n for (let index = 0; index < diff.hunks.length; index++) {\n syncHunkNoEOFCRFromFullFile(diff, index);\n }\n}\n"],"mappings":";;;;;AA4DA,MAAM,uCAAuB,IAAI,QAG/B;;;;;;AAOF,SAAgB,qBAAqB,OAA2B;CAC9D,IAAI,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,OAAO,IAClD,OAAO,MAAM,MAAM,GAAG,EAAE;CAE1B,OAAO;AACT;;;;;AAMA,SAAgB,mBACd,eACA,eAC4B;CAC5B,MAAM,WAAW,KAAK,IAAI,cAAc,QAAQ,cAAc,MAAM;CACpE,IAAI,QAAQ;CACZ,OAAO,QAAQ,YAAY,cAAc,WAAW,cAAc,QAChE;CAEF,IAAI,cAAc,cAAc;CAChC,IAAI,cAAc,cAAc;CAChC,OACE,cAAc,SACd,cAAc,SACd,cAAc,cAAc,OAAO,cAAc,cAAc,IAC/D;EACA;EACA;CACF;CACA,IAAI,UAAU,eAAe,UAAU,aACrC;CAEF,OAAO;EAAE;EAAO;EAAa;CAAY;AAC3C;;;;;;AAOA,SAAgB,oBACd,MACA,kBACiC;CACjC,MAAM,gBAAgB,KAAK;CAC3B,MAAM,sBAAsB,KAAK;CACjC,MAAM,yBAAyB,qBAAqB,mBAAmB;CACvE,MAAM,gBACJ,2BAA2B,sBACvB,OACA;EAAE,GAAG;EAAM,eAAe;CAAuB;CAEvD,MAAM,QAAQ,iBACZ,eAFa,2BAA2B,eAAe,gBAGlD,GACL,KAAK,cAAc,MACrB;CAEA,MAAM,YAAY,iBAAiB,eAAe,KAAK;CACvD,KAAK,gBAAgB;CACrB,KAAK,QAAQ;CACb,KAAK,mBAAmB;CACxB,qBAAqB,IAAI;CACzB,gCAAgC,MAAM,mBAAmB;CAKzD,IAAI,CAJkB,8BACpB,eACA,KAAK,KAEU,GACf;CAEF,OAAO,EAAE,SAAS,MAAM,KAAK,SAAS,KA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Q,oBAAoB,MAC9B;GAEF;EACF;EACA,MAAM,WAAW,KAAK,IAAI,QAAQ,WAAW,QAAQ,SAAS;EAC9D,KAAK,IAAI,SAAS,GAAG,SAAS,UAAU,UACtC,MAAM,CACJ,SAAS,QAAQ,YACb,QAAQ,oBAAoB,SAC5B,KAAA,GACJ,SAAS,QAAQ,YACb,QAAQ,oBAAoB,SAC5B,KAAA,CACN;CAEJ;AACF;AAEA,SAAS,qBAAqB,MAAoB;CAChD,OAAO,yBAAyB,KAAK,eAAe,KAAK,aAAa;AACxE;AAEA,SAAS,qBAAqB,MAAoB;CAChD,OAAO,yBAAyB,KAAK,eAAe,KAAK,aAAa;AACxE;AAEA,SAAS,gBAAgB,WAAmB,OAAuB;CACjE,OAAO,UAAU,IAAI,YAAY,YAAY;AAC/C;AAEA,SAAS,oBAAoB,WAAmB,OAAuB;CACrE,OAAO,UAAU,IAAI,YAAY,IAAI;AACvC;AAEA,SAAS,qBAAqB,MAA8B;CAC1D,8BAA8B,IAAI;CAClC,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,MAAM,QAAQ,SAC7C,4BAA4B,MAAM,KAAK;AAE3C"}
|
|
1
|
+
{"version":3,"file":"editSessionHunks.js","names":[],"sources":["../../src/utils/editSessionHunks.ts"],"sourcesContent":["import type { CreatePatchOptionsNonabortable } from 'diff';\n\nimport type {\n ChangeContent,\n ContextContent,\n FileDiffMetadata,\n Hunk,\n HunkExpansionRegion,\n} from '../types';\nimport { getHunkSideStartBoundary } from './getHunkSideBoundaries';\nimport { parseDiffFromFile } from './parseDiffFromFile';\nimport {\n offsetHunkContent,\n preserveTrailingEditorBlankLine,\n recomputeDiffHunks,\n recomputeDiffHunksForEdit,\n recomputeDiffRenderLineCounts,\n recomputeHunkRenderLineCounts,\n syncHunkNoEOFCRFromFullFile,\n} from './updateDiffHunks';\nimport {\n getExpandedRegion,\n getTrailingExpandedRegion,\n} from './virtualDiffLayout';\n\n// While an editor is attached to a FileDiff, each hunk is a persistent region\n// identified by its old-side range. Structural passes rebuild those regions\n// from one canonical old/current diff; a reverted region remains as context so\n// its rows keep rendering until the session-exit recompute.\n\nexport interface DivergenceCore {\n start: number;\n deletionEnd: number;\n additionEnd: number;\n}\n\ninterface PreviousRegionSpan {\n firstIndex: number;\n lastIndex: number;\n}\n\n/** Maps rebuilt regions back to the previous skeleton for expansion remapping. */\nexport interface SessionRegionChange {\n regions: Array<PreviousRegionSpan | undefined>;\n}\n\ninterface RegionBounds {\n additionStart: number;\n additionEnd: number;\n deletionStart: number;\n deletionEnd: number;\n}\n\ninterface RegionPlan {\n deletionStart: number;\n deletionEnd: number;\n blocks: ChangeContent[];\n previousSpan: PreviousRegionSpan | undefined;\n}\n\nconst deletionLineSetCache = new WeakMap<\n FileDiffMetadata,\n { lines: string[]; set: Set<string> }\n>();\n\n/**\n * Drops the editor document's phantom trailing empty line (a document ending\n * in a newline exposes one extra empty line the parsed diff never contains)\n * so session line arrays compare like parse-derived ones.\n */\nexport function normalizeEditorLines(lines: string[]): string[] {\n if (lines.length > 1 && lines[lines.length - 1] === '') {\n return lines.slice(0, -1);\n }\n return lines;\n}\n\n/**\n * Find the complete old/current divergence core. The old side is immutable\n * during an edit session, so this result needs no prior-pass snapshot.\n */\nexport function findDivergenceCore(\n deletionLines: string[],\n additionLines: string[]\n): DivergenceCore | undefined {\n const maxStart = Math.min(deletionLines.length, additionLines.length);\n let start = 0;\n while (start < maxStart && deletionLines[start] === additionLines[start]) {\n start++;\n }\n let deletionEnd = deletionLines.length;\n let additionEnd = additionLines.length;\n while (\n deletionEnd > start &&\n additionEnd > start &&\n deletionLines[deletionEnd - 1] === additionLines[additionEnd - 1]\n ) {\n deletionEnd--;\n additionEnd--;\n }\n if (start === deletionEnd && start === additionEnd) {\n return undefined;\n }\n return { start, deletionEnd, additionEnd };\n}\n\n/**\n * Rebuild the session skeleton as a pure function of the immutable old lines,\n * current new lines, and old-side ranges of the previous regions. One\n * canonical parse supplies the same change blocks that session exit will use.\n */\nexport function rebuildSessionHunks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): SessionRegionChange | undefined {\n const previousHunks = diff.hunks;\n const editorAdditionLines = diff.additionLines;\n const canonicalAdditionLines = normalizeEditorLines(editorAdditionLines);\n const canonicalDiff =\n canonicalAdditionLines === editorAdditionLines\n ? diff\n : { ...diff, additionLines: canonicalAdditionLines };\n const blocks = parseCanonicalChangeBlocks(canonicalDiff, parseDiffOptions);\n const plans = buildRegionPlans(\n previousHunks,\n blocks,\n diff.deletionLines.length\n );\n\n const nextHunks = buildRegionHunks(canonicalDiff, plans);\n diff.additionLines = canonicalAdditionLines;\n diff.hunks = nextHunks;\n diff.editSessionDirty = true;\n finalizeSessionHunks(diff);\n preserveTrailingEditorBlankLine(diff, editorAdditionLines);\n const layoutChanged = hasRegionOrSplitLayoutChanged(\n previousHunks,\n diff.hunks\n );\n if (!layoutChanged) {\n return undefined;\n }\n return { regions: plans.map((plan) => plan.previousSpan) };\n}\n\n/**\n * Keep a cheap content-only path when a same-line-count pass cannot alter the\n * canonical blocks. Gap, ambiguous, or multi-region edits rebuild statelessly.\n */\nexport function applySessionChangedLines(\n diff: FileDiffMetadata,\n changedAdditionLineIndexes: Iterable<number>,\n parseDiffOptions?: CreatePatchOptionsNonabortable,\n previousAdditionLines?: ReadonlyMap<number, string>\n): SessionRegionChange | undefined {\n const lines = Array.from(new Set(changedAdditionLineIndexes))\n .filter((line) => line >= 0 && line < diff.additionLines.length)\n .sort((a, b) => a - b);\n if (lines.length === 0) {\n return undefined;\n }\n\n const { hunks } = diff;\n let regionIndex: number | undefined;\n let hunkIndex = 0;\n for (const line of lines) {\n while (hunkIndex < hunks.length) {\n const hunk = hunks[hunkIndex];\n const start = getHunkAdditionStart(hunk);\n if (line < start + hunk.additionCount) break;\n hunkIndex++;\n }\n const hunk = hunks[hunkIndex];\n const start = hunk == null ? undefined : getHunkAdditionStart(hunk);\n if (\n start == null ||\n line < start ||\n (regionIndex != null && regionIndex !== hunkIndex)\n ) {\n return rebuildSessionHunks(diff, parseDiffOptions);\n }\n regionIndex = hunkIndex;\n }\n\n if (regionIndex == null) {\n return undefined;\n }\n if (\n canRetainCanonicalBlocks(\n diff,\n lines,\n regionIndex,\n previousAdditionLines,\n parseDiffOptions\n )\n ) {\n diff.editSessionDirty = true;\n return undefined;\n }\n return rebuildSessionHunks(diff, parseDiffOptions);\n}\n\n// Existing balanced change blocks remain canonical when every edited line was\n// unmatched before and stays unmatched now: the old/new equality matrix is\n// unchanged, and similarity realignment never reorders a balanced block.\nfunction canRetainCanonicalBlocks(\n diff: FileDiffMetadata,\n changedLines: number[],\n regionIndex: number,\n previousAdditionLines: ReadonlyMap<number, string> | undefined,\n parseDiffOptions: CreatePatchOptionsNonabortable | undefined\n): boolean {\n if (\n previousAdditionLines == null ||\n parseDiffOptions?.ignoreWhitespace === true ||\n parseDiffOptions?.stripTrailingCr === true\n ) {\n return false;\n }\n const deletionLineSet = getDeletionLineSet(diff);\n const hunk = diff.hunks[regionIndex];\n if (hunk.hunkContent.some(isPureChange)) {\n return false;\n }\n for (const line of changedLines) {\n const previousLine = previousAdditionLines.get(line);\n const additionLine = diff.additionLines[line];\n if (\n previousLine == null ||\n additionLine == null ||\n deletionLineSet.has(previousLine) ||\n deletionLineSet.has(additionLine)\n ) {\n return false;\n }\n let insideBalancedChange = false;\n for (const content of hunk.hunkContent) {\n if (\n content.type === 'change' &&\n content.additions === content.deletions &&\n line >= content.additionLineIndex &&\n line < content.additionLineIndex + content.additions\n ) {\n insideBalancedChange = true;\n break;\n }\n }\n if (!insideBalancedChange) {\n return false;\n }\n }\n return true;\n}\n\nfunction getDeletionLineSet(diff: FileDiffMetadata): Set<string> {\n const cached = deletionLineSetCache.get(diff);\n if (cached?.lines === diff.deletionLines) {\n return cached.set;\n }\n const set = new Set(diff.deletionLines);\n deletionLineSetCache.set(diff, { lines: diff.deletionLines, set });\n return set;\n}\n\nfunction isPureChange(\n content: ContextContent | ChangeContent | undefined\n): boolean {\n return (\n content?.type === 'change' &&\n (content.additions === 0 || content.deletions === 0)\n );\n}\n\n/** Preserve expansion at the surviving outer edges of rebuilt old-side gaps. */\nexport function remapExpandedHunksForRegionChange(\n expandedHunks: Map<number, HunkExpansionRegion>,\n change: SessionRegionChange\n): Map<number, HunkExpansionRegion> {\n const remapped = new Map<number, HunkExpansionRegion>();\n const { regions } = change;\n for (let key = 0; key <= regions.length; key++) {\n const previous = regions[key - 1];\n const next = regions[key];\n const fromStartSource =\n key === 0\n ? expandedHunks.get(0)\n : previous == null\n ? undefined\n : expandedHunks.get(previous.lastIndex + 1);\n const fromEndSource =\n next == null ? undefined : expandedHunks.get(next.firstIndex);\n const fromStart = fromStartSource?.fromStart ?? 0;\n const fromEnd = fromEndSource?.fromEnd ?? 0;\n if (fromStart > 0 || fromEnd > 0) {\n remapped.set(key, { fromStart, fromEnd });\n }\n }\n return remapped;\n}\n\n/**\n * An expanded gap-edge slice in old-side (deletion-line) coordinates as a\n * `[start, end)` range. Old-side coordinates survive the exit recompute\n * unchanged — edits only touch the new side — so these anchor best-effort\n * expansion preservation across the recompute.\n */\nexport type ExpansionAnchorRange = [start: number, end: number];\n\n/** Snapshot the expanded gap-edge slices before the exit recompute. */\nexport function captureExpansionAnchors(\n diff: FileDiffMetadata,\n expandedHunks: Map<number, HunkExpansionRegion>,\n collapsedContextThreshold: number\n): ExpansionAnchorRange[] {\n const anchors: ExpansionAnchorRange[] = [];\n if (diff.isPartial) {\n return anchors;\n }\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const region = getExpandedRegion({\n isPartial: diff.isPartial,\n rangeSize: hunk.collapsedBefore,\n expandedHunks,\n hunkIndex,\n collapsedContextThreshold,\n });\n // Gaps at or below the threshold render on their own; only explicit\n // expansion state needs preserving.\n if (region.rangeSize <= collapsedContextThreshold) {\n continue;\n }\n const gapEnd = getHunkDeletionStart(hunk);\n const gapStart = gapEnd - region.rangeSize;\n if (region.fromStart > 0) {\n anchors.push([gapStart, gapStart + region.fromStart]);\n }\n if (region.fromEnd > 0) {\n anchors.push([gapEnd - region.fromEnd, gapEnd]);\n }\n }\n const trailingRegion = getTrailingExpandedRegion({\n fileDiff: diff,\n hunkIndex: diff.hunks.length - 1,\n expandedHunks,\n collapsedContextThreshold,\n errorPrefix: 'captureExpansionAnchors',\n });\n if (\n trailingRegion != null &&\n trailingRegion.fromStart > 0 &&\n trailingRegion.rangeSize > collapsedContextThreshold\n ) {\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n const gapStart = getHunkDeletionStart(lastHunk) + lastHunk.deletionCount;\n anchors.push([gapStart, gapStart + trailingRegion.fromStart]);\n }\n return anchors;\n}\n\n/**\n * Rebuild gap expansion state against the recomputed hunks: for each new\n * gap, an anchor touching the gap's start edge restores `fromStart`, one\n * touching its end edge restores `fromEnd`, and anchors for gaps that no\n * longer exist drop.\n */\nexport function rebuildExpansionFromAnchors(\n diff: FileDiffMetadata,\n anchors: ExpansionAnchorRange[]\n): Map<number, HunkExpansionRegion> {\n const rebuilt = new Map<number, HunkExpansionRegion>();\n if (anchors.length === 0) {\n return rebuilt;\n }\n const applyGap = (key: number, gapStart: number, gapEnd: number) => {\n if (gapEnd <= gapStart) {\n return;\n }\n let fromStart = 0;\n let fromEnd = 0;\n for (const [start, end] of anchors) {\n if (end <= gapStart || start >= gapEnd) {\n continue;\n }\n if (start <= gapStart) {\n fromStart = Math.max(fromStart, Math.min(end, gapEnd) - gapStart);\n }\n if (end >= gapEnd) {\n fromEnd = Math.max(fromEnd, gapEnd - Math.max(start, gapStart));\n }\n }\n if (fromStart > 0 || fromEnd > 0) {\n rebuilt.set(key, { fromStart, fromEnd });\n }\n };\n for (const [hunkIndex, hunk] of diff.hunks.entries()) {\n const gapEnd = getHunkDeletionStart(hunk);\n applyGap(hunkIndex, gapEnd - Math.max(hunk.collapsedBefore, 0), gapEnd);\n }\n const lastHunk = diff.hunks[diff.hunks.length - 1];\n if (lastHunk != null && !diff.isPartial && diff.deletionLines.length > 0) {\n applyGap(\n diff.hunks.length,\n getHunkDeletionStart(lastHunk) + lastHunk.deletionCount,\n diff.deletionLines.length\n );\n }\n return rebuilt;\n}\n\n/**\n * While editing, hunk updates keep a lightweight session-specific shape and\n * mark the diff with `editSessionDirty`. Called at session end, this\n * recomputes the hunks in full from the diff's current lines — the same\n * hunks a non-session edit would have produced — and clears the flag.\n * Returns true when a recompute ran.\n */\nexport function finishEditSessionForDiff(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): boolean {\n if (diff.editSessionDirty !== true) {\n return false;\n }\n delete diff.editSessionDirty;\n // The empty editor row only hosts a caret; it is not file content after exit.\n Object.assign(\n diff,\n diff.additionLines.length <= 1 && diff.additionLines.join('') === ''\n ? recomputeDiffHunks(diff, parseDiffOptions)\n : recomputeDiffHunksForEdit(diff, parseDiffOptions)\n );\n return true;\n}\n\n// Parse the complete old/current files once with the same context policy as\n// session exit. Equal boundary lines affect Myers tie-breaking, while parsed\n// context is required for the blank-run alignment post-pass; only canonical\n// change blocks are retained. Running cursors normalize unified N,0 indexes.\nfunction parseCanonicalChangeBlocks(\n diff: FileDiffMetadata,\n parseDiffOptions?: CreatePatchOptionsNonabortable\n): ChangeContent[] {\n if (findDivergenceCore(diff.deletionLines, diff.additionLines) == null) {\n return [];\n }\n const parsed = parseDiffFromFile(\n {\n name: diff.prevName ?? diff.name,\n contents: diff.deletionLines.join(''),\n },\n {\n name: diff.name,\n contents: diff.additionLines.join(''),\n lang: diff.lang,\n },\n parseDiffOptions\n );\n\n const blocks: ChangeContent[] = [];\n let coveredAdditions = 0;\n let coveredDeletions = 0;\n for (const hunk of parsed.hunks) {\n const contextLines =\n hunk.additionCount > 0\n ? hunk.additionLineIndex - coveredAdditions\n : hunk.deletionLineIndex - coveredDeletions;\n coveredAdditions += contextLines;\n coveredDeletions += contextLines;\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n coveredAdditions += content.lines;\n coveredDeletions += content.lines;\n continue;\n }\n const block = offsetHunkContent(content, 0, 0) as ChangeContent;\n if (block.additions === 0) {\n block.additionLineIndex = coveredAdditions;\n }\n if (block.deletions === 0) {\n block.deletionLineIndex = coveredDeletions;\n }\n blocks.push(block);\n coveredAdditions += block.additions;\n coveredDeletions += block.deletions;\n }\n }\n return blocks;\n}\n\n// Co-walk canonical blocks and previous old-side regions. A block touching a\n// region grows it; touching several merges them; a block wholly in a gap gets\n// its own region. Pure insertions/deletions absorb one adjacent context line\n// when available so the region stays renderable on both sides and after undo.\nfunction buildRegionPlans(\n previousHunks: Hunk[],\n blocks: ChangeContent[],\n deletionLineCount: number\n): RegionPlan[] {\n const previousPlans = previousHunks.map((hunk, index): RegionPlan => {\n const deletionStart = getHunkDeletionStart(hunk);\n return {\n deletionStart,\n deletionEnd: deletionStart + hunk.deletionCount,\n blocks: [],\n previousSpan: { firstIndex: index, lastIndex: index },\n };\n });\n const plans: RegionPlan[] = [];\n let previousIndex = 0;\n\n for (const block of blocks) {\n const blockStart = block.deletionLineIndex;\n const blockEnd = blockStart + block.deletions;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionEnd < blockStart\n ) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n\n let plan =\n plans.length > 0 &&\n blockTouchesRegion(blockStart, blockEnd, plans[plans.length - 1])\n ? plans.pop()\n : undefined;\n while (\n previousIndex < previousPlans.length &&\n previousPlans[previousIndex].deletionStart <= blockEnd\n ) {\n plan = mergeRegionPlans(plan, previousPlans[previousIndex]);\n previousIndex++;\n }\n\n if (plan == null) {\n let deletionStart = blockStart;\n let deletionEnd = blockEnd;\n if (\n (block.deletions === 0 || block.additions === 0) &&\n deletionLineCount > block.deletions\n ) {\n const previousEnd = plans[plans.length - 1]?.deletionEnd ?? 0;\n const nextStart =\n previousPlans[previousIndex]?.deletionStart ?? deletionLineCount;\n if (blockStart > previousEnd) {\n deletionStart--;\n } else if (blockEnd < nextStart) {\n deletionEnd++;\n }\n }\n plan = {\n deletionStart,\n deletionEnd,\n blocks: [],\n previousSpan: undefined,\n };\n }\n plan.deletionStart = Math.min(plan.deletionStart, blockStart);\n plan.deletionEnd = Math.max(plan.deletionEnd, blockEnd);\n plan.blocks.push(block);\n plans.push(plan);\n }\n\n while (previousIndex < previousPlans.length) {\n plans.push(previousPlans[previousIndex]);\n previousIndex++;\n }\n return plans;\n}\n\nfunction blockTouchesRegion(\n blockStart: number,\n blockEnd: number,\n region: RegionPlan\n): boolean {\n return blockStart <= region.deletionEnd && blockEnd >= region.deletionStart;\n}\n\nfunction mergeRegionPlans(\n target: RegionPlan | undefined,\n source: RegionPlan\n): RegionPlan {\n if (target == null) {\n return source;\n }\n target.deletionStart = Math.min(target.deletionStart, source.deletionStart);\n target.deletionEnd = Math.max(target.deletionEnd, source.deletionEnd);\n target.blocks.push(...source.blocks);\n if (source.previousSpan != null) {\n target.previousSpan ??= { ...source.previousSpan };\n target.previousSpan.firstIndex = Math.min(\n target.previousSpan.firstIndex,\n source.previousSpan.firstIndex\n );\n target.previousSpan.lastIndex = Math.max(\n target.previousSpan.lastIndex,\n source.previousSpan.lastIndex\n );\n }\n return target;\n}\n\n// One paired-context walk constructs every region's new-side range. There is\n// no downstream coordinate shifting: each boundary is derived from the\n// canonical blocks that precede it.\nfunction buildRegionHunks(diff: FileDiffMetadata, plans: RegionPlan[]): Hunk[] {\n const hunks: Hunk[] = [];\n let deletionCursor = 0;\n let additionCursor = 0;\n for (const plan of plans) {\n const contextBefore = plan.deletionStart - deletionCursor;\n if (contextBefore < 0) {\n throw new Error('buildRegionHunks: overlapping old-side regions');\n }\n deletionCursor += contextBefore;\n additionCursor += contextBefore;\n const additionStart = additionCursor;\n const hunkContent: Array<ContextContent | ChangeContent> = [];\n\n for (const canonicalBlock of plan.blocks) {\n const deletionContext = canonicalBlock.deletionLineIndex - deletionCursor;\n const additionContext = canonicalBlock.additionLineIndex - additionCursor;\n if (deletionContext < 0 || deletionContext !== additionContext) {\n throw new Error('buildRegionHunks: canonical block context mismatch');\n }\n pushContext(hunkContent, deletionContext, additionCursor, deletionCursor);\n deletionCursor += deletionContext;\n additionCursor += additionContext;\n hunkContent.push({ ...canonicalBlock });\n deletionCursor += canonicalBlock.deletions;\n additionCursor += canonicalBlock.additions;\n }\n\n const trailingContext = plan.deletionEnd - deletionCursor;\n if (trailingContext < 0) {\n throw new Error('buildRegionHunks: block exceeds its old-side region');\n }\n pushContext(hunkContent, trailingContext, additionCursor, deletionCursor);\n deletionCursor += trailingContext;\n additionCursor += trailingContext;\n hunks.push(\n createRegionHunk(\n diff,\n {\n additionStart,\n additionEnd: additionCursor,\n deletionStart: plan.deletionStart,\n deletionEnd: plan.deletionEnd,\n },\n hunkContent\n )\n );\n }\n\n if (\n diff.deletionLines.length - deletionCursor !==\n diff.additionLines.length - additionCursor\n ) {\n throw new Error('buildRegionHunks: trailing context mismatch');\n }\n return hunks;\n}\n\nfunction createRegionHunk(\n diff: FileDiffMetadata,\n bounds: RegionBounds,\n hunkContent: Array<ContextContent | ChangeContent>\n): Hunk {\n const additionCount = bounds.additionEnd - bounds.additionStart;\n const deletionCount = bounds.deletionEnd - bounds.deletionStart;\n let additionLines = 0;\n let deletionLines = 0;\n for (const content of hunkContent) {\n if (content.type === 'change') {\n additionLines += content.additions;\n deletionLines += content.deletions;\n }\n }\n const hunk: Hunk = {\n collapsedBefore: 0,\n additionStart: getUnifiedStart(bounds.additionStart, additionCount),\n additionCount,\n additionLines,\n additionLineIndex: getUnifiedLineIndex(bounds.additionStart, additionCount),\n deletionStart: getUnifiedStart(bounds.deletionStart, deletionCount),\n deletionCount,\n deletionLines,\n deletionLineIndex: getUnifiedLineIndex(bounds.deletionStart, deletionCount),\n hunkContent,\n hunkSpecs: `@@ -${getUnifiedStart(bounds.deletionStart, deletionCount)},${deletionCount} +${getUnifiedStart(bounds.additionStart, additionCount)},${additionCount} @@`,\n splitLineStart: 0,\n splitLineCount: 0,\n unifiedLineStart: 0,\n unifiedLineCount: 0,\n noEOFCRAdditions: false,\n noEOFCRDeletions: false,\n };\n recomputeHunkRenderLineCounts(hunk);\n return hunk;\n}\n\nfunction pushContext(\n hunkContent: Array<ContextContent | ChangeContent>,\n lines: number,\n additionLineIndex: number,\n deletionLineIndex: number\n): void {\n if (lines > 0) {\n hunkContent.push({\n type: 'context',\n lines,\n additionLineIndex,\n deletionLineIndex,\n });\n }\n}\n\nfunction hasRegionOrSplitLayoutChanged(\n previous: Hunk[],\n next: Hunk[]\n): boolean {\n if (previous.length !== next.length) {\n return true;\n }\n for (let index = 0; index < previous.length; index++) {\n const previousHunk = previous[index];\n const nextHunk = next[index];\n if (\n getHunkDeletionStart(previousHunk) !== getHunkDeletionStart(nextHunk) ||\n previousHunk.deletionCount !== nextHunk.deletionCount ||\n getHunkAdditionStart(previousHunk) !== getHunkAdditionStart(nextHunk) ||\n previousHunk.additionCount !== nextHunk.additionCount ||\n previousHunk.splitLineCount !== nextHunk.splitLineCount ||\n !haveSameSplitRowMapping(previousHunk, nextHunk)\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction haveSameSplitRowMapping(previous: Hunk, next: Hunk): boolean {\n const previousRows = iterateSplitRowMapping(previous);\n const nextRows = iterateSplitRowMapping(next);\n while (true) {\n const previousRow = previousRows.next();\n const nextRow = nextRows.next();\n if (previousRow.done === true || nextRow.done === true) {\n return previousRow.done === nextRow.done;\n }\n if (\n previousRow.value[0] !== nextRow.value[0] ||\n previousRow.value[1] !== nextRow.value[1]\n ) {\n return false;\n }\n }\n}\n\nfunction* iterateSplitRowMapping(\n hunk: Hunk\n): Generator<\n [deletionLine: number | undefined, additionLine: number | undefined]\n> {\n for (const content of hunk.hunkContent) {\n if (content.type === 'context') {\n for (let offset = 0; offset < content.lines; offset++) {\n yield [\n content.deletionLineIndex + offset,\n content.additionLineIndex + offset,\n ];\n }\n continue;\n }\n const rowCount = Math.max(content.deletions, content.additions);\n for (let offset = 0; offset < rowCount; offset++) {\n yield [\n offset < content.deletions\n ? content.deletionLineIndex + offset\n : undefined,\n offset < content.additions\n ? content.additionLineIndex + offset\n : undefined,\n ];\n }\n }\n}\n\nfunction getHunkAdditionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.additionStart, hunk.additionCount);\n}\n\nfunction getHunkDeletionStart(hunk: Hunk): number {\n return getHunkSideStartBoundary(hunk.deletionStart, hunk.deletionCount);\n}\n\nfunction getUnifiedStart(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex : lineIndex + 1;\n}\n\nfunction getUnifiedLineIndex(lineIndex: number, count: number): number {\n return count === 0 ? lineIndex - 1 : lineIndex;\n}\n\nfunction finalizeSessionHunks(diff: FileDiffMetadata): void {\n recomputeDiffRenderLineCounts(diff);\n for (let index = 0; index < diff.hunks.length; index++) {\n syncHunkNoEOFCRFromFullFile(diff, index);\n }\n}\n"],"mappings":";;;;;AA4DA,MAAM,uCAAuB,IAAI,QAG/B;;;;;;AAOF,SAAgB,qBAAqB,OAA2B;CAC9D,IAAI,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,OAAO,IAClD,OAAO,MAAM,MAAM,GAAG,EAAE;CAE1B,OAAO;AACT;;;;;AAMA,SAAgB,mBACd,eACA,eAC4B;CAC5B,MAAM,WAAW,KAAK,IAAI,cAAc,QAAQ,cAAc,MAAM;CACpE,IAAI,QAAQ;CACZ,OAAO,QAAQ,YAAY,cAAc,WAAW,cAAc,QAChE;CAEF,IAAI,cAAc,cAAc;CAChC,IAAI,cAAc,cAAc;CAChC,OACE,cAAc,SACd,cAAc,SACd,cAAc,cAAc,OAAO,cAAc,cAAc,IAC/D;EACA;EACA;CACF;CACA,IAAI,UAAU,eAAe,UAAU,aACrC;CAEF,OAAO;EAAE;EAAO;EAAa;CAAY;AAC3C;;;;;;AAOA,SAAgB,oBACd,MACA,kBACiC;CACjC,MAAM,gBAAgB,KAAK;CAC3B,MAAM,sBAAsB,KAAK;CACjC,MAAM,yBAAyB,qBAAqB,mBAAmB;CACvE,MAAM,gBACJ,2BAA2B,sBACvB,O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