@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.js","names":[],"sources":["../../src/components/File.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nimport { toHtml } from 'hast-util-to-html';\n\nimport {\n CUSTOM_HEADER_SLOT_ID,\n DEFAULT_THEMES,\n DEFAULT_TOKENIZE_MAX_LENGTH,\n DIFFS_TAG_NAME,\n EMPTY_RENDER_RANGE,\n HEADER_FILENAME_SUFFIX_SLOT_ID,\n HEADER_METADATA_SLOT_ID,\n HEADER_PREFIX_SLOT_ID,\n THEME_CSS_ATTRIBUTE,\n UNSAFE_CSS_ATTRIBUTE,\n} from '../constants';\nimport {\n type GetHoveredLineResult,\n InteractionManager,\n type InteractionManagerBaseOptions,\n pluckInteractionOptions,\n type SelectionWriteOptions,\n} from '../managers/InteractionManager';\nimport { ResizeManager } from '../managers/ResizeManager';\nimport { FileRenderer, type FileRenderResult } from '../renderers/FileRenderer';\nimport { SVGSpriteSheet } from '../sprite';\nimport type {\n AppliedThemeStyleCache,\n BaseCodeOptions,\n DiffsEditableComponent,\n DiffsEditor,\n DiffsTextDocument,\n EditorActiveLineOptions,\n FileContents,\n HighlightedToken,\n LineAnnotation,\n PostRenderPhase,\n PrePropertiesConfig,\n RenderFileMetadata,\n RenderRange,\n SelectedLineRange,\n ThemeTypes,\n} from '../types';\nimport { areFilesEqual } from '../utils/areFilesEqual';\nimport { areLineAnnotationsEqual } from '../utils/areLineAnnotationsEqual';\nimport { arePrePropertiesEqual } from '../utils/arePrePropertiesEqual';\nimport { areRenderRangesEqual } from '../utils/areRenderRangesEqual';\nimport { areThemesEqual } from '../utils/areThemesEqual';\nimport { createAnnotationWrapperNode } from '../utils/createAnnotationWrapperNode';\nimport { createGutterUtilityContentNode } from '../utils/createGutterUtilityContentNode';\nimport { createUnsafeCSSStyleNode } from '../utils/createUnsafeCSSStyleNode';\nimport {\n patchScrollbarGutterSize,\n wrapThemeCSS,\n wrapUnsafeCSS,\n} from '../utils/cssWrappers';\nimport { getFileRendererOptions } from '../utils/getFileRendererOptions';\nimport { getLineAnnotationName } from '../utils/getLineAnnotationName';\nimport { getOrCreateCodeNode } from '../utils/getOrCreateCodeNode';\nimport { guardWebKitScrollDuringRebuild } from '../utils/guardWebKitScrollDuringRebuild';\nimport { upsertHostThemeStyle } from '../utils/hostTheme';\nimport { isFilePlainText } from '../utils/isFilePlainText';\nimport { isStyleNode } from '../utils/isStyleNode';\nimport { isSafari } from '../utils/platform';\nimport { prerenderHTMLIfNecessary } from '../utils/prerenderHTMLIfNecessary';\nimport { getMeasuredScrollbarGutter } from '../utils/scrollbarGutter';\nimport { setPreNodeProperties } from '../utils/setWrapperNodeProps';\nimport type { WorkerPoolManager } from '../worker';\nimport { DiffsContainerLoaded } from './web-components';\n\nconst EMPTY_STRINGS: string[] = [''];\n\nexport interface FileRenderProps<LAnnotation> {\n file: FileContents;\n fileContainer?: HTMLElement;\n containerWrapper?: HTMLElement;\n deferManagers?: boolean;\n forceRender?: boolean;\n preventEmit?: boolean;\n lineAnnotations?: LineAnnotation<LAnnotation>[];\n renderRange?: RenderRange;\n}\n\nexport interface FileHydrateProps<LAnnotation> extends Omit<\n FileRenderProps<LAnnotation>,\n 'fileContainer'\n> {\n fileContainer: HTMLElement;\n prerenderedHTML?: string;\n}\n\nexport interface FileOptions<LAnnotation>\n extends BaseCodeOptions, InteractionManagerBaseOptions<'file'> {\n disableFileHeader?: boolean;\n renderHeaderPrefix?: RenderFileMetadata;\n renderHeaderFilenameSuffix?: RenderFileMetadata;\n renderHeaderMetadata?: RenderFileMetadata;\n renderCustomHeader?: RenderFileMetadata;\n /**\n * When true, errors during rendering are rethrown instead of being caught\n * and displayed in the DOM. Useful for testing or when you want to handle\n * errors yourself.\n */\n disableErrorHandling?: boolean;\n renderAnnotation?(\n annotation: LineAnnotation<LAnnotation>\n ): HTMLElement | undefined;\n renderGutterUtility?(\n getHoveredRow: () => GetHoveredLineResult<'file'> | undefined\n ): HTMLElement | null | undefined;\n\n onPostRender?(\n node: HTMLElement,\n instance: File<LAnnotation>,\n phase: PostRenderPhase\n ): unknown;\n}\n\ninterface AnnotationElementCache<LAnnotation> {\n element: HTMLElement;\n annotation: LineAnnotation<LAnnotation>;\n}\n\ninterface ColumnElements {\n gutter: HTMLElement;\n content: HTMLElement;\n}\n\ninterface HydrationSetup<LAnnotation> {\n file: FileContents;\n lineAnnotations: LineAnnotation<LAnnotation>[] | undefined;\n}\n\nlet instanceId = -1;\n\nexport class File<\n LAnnotation = undefined,\n> implements DiffsEditableComponent<LAnnotation> {\n static LoadedCustomComponent: boolean = DiffsContainerLoaded;\n\n readonly __id: string = `file:${++instanceId}`;\n readonly type = 'file';\n\n protected fileContainer: HTMLElement | undefined;\n protected spriteSVG: SVGElement | undefined;\n protected pre: HTMLPreElement | undefined;\n protected code: HTMLElement | undefined;\n protected bufferBefore: HTMLElement | undefined;\n protected bufferAfter: HTMLElement | undefined;\n protected themeCSSStyle: HTMLStyleElement | undefined;\n protected appliedThemeCSS: AppliedThemeStyleCache | undefined;\n protected hasAdoptedThemeCSS = false;\n protected unsafeCSSStyle: HTMLStyleElement | undefined;\n protected appliedUnsafeCSS: string | undefined;\n protected gutterUtilityContent: HTMLElement | undefined;\n protected errorWrapper: HTMLElement | undefined;\n protected placeHolder: HTMLElement | undefined;\n protected lastRenderedHeaderHTML: string | undefined;\n protected cachedHeaderHTML: string | undefined;\n protected appliedPreAttributes: PrePropertiesConfig | undefined;\n protected lastRowCount: number | undefined;\n private mounted = false;\n\n protected headerElement: HTMLElement | undefined;\n protected headerCustom: HTMLElement | undefined;\n protected headerPrefix: HTMLElement | undefined;\n protected headerFilenameSuffix: HTMLElement | undefined;\n protected headerMetadata: HTMLElement | undefined;\n\n protected fileRenderer: FileRenderer<LAnnotation>;\n protected resizeManager: ResizeManager;\n protected interactionManager: InteractionManager<'file'>;\n\n protected annotationCache: Map<string, AnnotationElementCache<LAnnotation>> =\n new Map();\n protected lineAnnotations: LineAnnotation<LAnnotation>[] = [];\n protected managersDirty = false;\n\n public file: FileContents | undefined;\n protected renderRange: RenderRange | undefined;\n protected enabled = true;\n\n protected editor: DiffsEditor<LAnnotation> | undefined;\n\n constructor(\n public options: FileOptions<LAnnotation> = { theme: DEFAULT_THEMES },\n private workerManager?: WorkerPoolManager | undefined,\n private isContainerManaged = false\n ) {\n this.fileRenderer = new FileRenderer<LAnnotation>(\n options,\n this.handleHighlightRender,\n this.workerManager\n );\n this.resizeManager = new ResizeManager();\n this.interactionManager = new InteractionManager(\n 'file',\n pluckInteractionOptions(options)\n );\n this.workerManager?.subscribeToThemeChanges(this);\n }\n\n private handleHighlightRender = (): void => {\n this.rerender();\n };\n\n public rerender(): void {\n if (!this.enabled || this.file == null) return;\n this.render({\n file: this.file,\n forceRender: true,\n renderRange: this.renderRange,\n });\n }\n\n public __getCurrentFile(): FileContents | undefined {\n return this.file;\n }\n\n public onThemeChange(): void {\n this.fileRenderer.clearRenderCache();\n this.rerender();\n }\n\n public setOptions(options: FileOptions<LAnnotation> | undefined): void {\n if (options == null) return;\n this.options = options;\n this.cachedHeaderHTML = undefined;\n this.syncInteractionOptions();\n }\n\n protected syncInteractionOptions(): void {\n this.interactionManager.setOptions(pluckInteractionOptions(this.options));\n }\n\n private mergeOptions(options: Partial<FileOptions<LAnnotation>>): void {\n this.options = { ...this.options, ...options };\n }\n\n public setThemeType(themeType: ThemeTypes): void {\n if ((this.options.themeType ?? 'system') === themeType) {\n return;\n }\n this.mergeOptions({ themeType });\n this.applyCachedThemeState(themeType);\n }\n\n private applyCachedThemeState(themeType: ThemeTypes): boolean {\n if (\n typeof this.options.theme === 'string' ||\n this.fileContainer == null ||\n this.appliedThemeCSS == null\n ) {\n return false;\n }\n const effectiveThemeType = this.appliedThemeCSS.baseThemeType ?? themeType;\n if (this.appliedThemeCSS.themeType === effectiveThemeType) {\n return false;\n }\n this.applyThemeState(\n this.fileContainer,\n this.appliedThemeCSS.themeStyles,\n themeType,\n this.appliedThemeCSS.baseThemeType\n );\n return true;\n }\n\n private hasThemeChanged(): boolean {\n return (\n this.appliedThemeCSS != null &&\n !areThemesEqual(\n this.appliedThemeCSS.theme,\n this.options.theme ?? DEFAULT_THEMES\n )\n );\n }\n\n public getHoveredLine = (): GetHoveredLineResult<'file'> | undefined => {\n return this.interactionManager.getHoveredLine();\n };\n\n public setLineAnnotations(\n lineAnnotations: LineAnnotation<LAnnotation>[]\n ): void {\n this.lineAnnotations = lineAnnotations;\n }\n\n public setSelectedLines(\n range: SelectedLineRange | null,\n options?: SelectionWriteOptions\n ): void {\n this.interactionManager.setSelection(range, options);\n }\n\n public setEditorActiveLine(\n lineNumber: number | null,\n options?: EditorActiveLineOptions\n ): void {\n this.interactionManager.setEditorActiveLine(lineNumber, {\n lineNumberOnly: options?.lineNumberOnly,\n side: options?.side ?? 'additions',\n });\n }\n\n public getCodeScrollLeft(): number {\n return this.code?.scrollLeft ?? 0;\n }\n\n public setCodeScrollLeft(position: number): void {\n if (this.code != null) {\n this.code.scrollLeft = position;\n }\n }\n\n public __getEffectiveCodeOptions(): BaseCodeOptions {\n return { ...this.options, ...this.fileRenderer.getEffectiveCodeOptions() };\n }\n\n public flushManagers(): void {\n if (!this.managersDirty || this.pre == null) {\n this.managersDirty = false;\n return;\n }\n\n const { overflow = 'scroll' } = this.options;\n this.interactionManager.setup(this.pre);\n this.resizeManager.setup(this.pre, {\n disableAnnotations: overflow === 'wrap',\n columnVariables: this.shouldApplyColumnVariables(overflow)\n ? 'apply'\n : 'measure',\n });\n this.managersDirty = false;\n }\n\n protected shouldApplyColumnVariables(overflow: 'scroll' | 'wrap'): boolean {\n return overflow === 'scroll' && this.lineAnnotations.length > 0;\n }\n\n public cleanUp(recycle = false): void {\n this.emitPostRender(true);\n // Persist editor state while the code scroller still exists.\n this.editor?.cleanUp(recycle);\n this.editor = undefined;\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n this.managersDirty = false;\n this.workerManager?.unsubscribeToThemeChanges(this);\n this.renderRange = undefined;\n\n // Clean up the elements\n if (!this.isContainerManaged) {\n this.fileContainer?.remove();\n }\n this.fileContainer = undefined;\n this.mounted = false;\n if (!recycle) {\n this.lineAnnotations = [];\n }\n this.clearAuxiliaryNodes();\n this.pre = undefined;\n this.code = undefined;\n this.bufferBefore?.remove();\n this.bufferBefore = undefined;\n this.bufferAfter?.remove();\n this.bufferAfter = undefined;\n this.appliedPreAttributes = undefined;\n this.lastRowCount = undefined;\n this.headerElement = undefined;\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n this.lastRenderedHeaderHTML = undefined;\n if (!recycle) {\n this.cachedHeaderHTML = undefined;\n }\n this.errorWrapper?.remove();\n this.errorWrapper = undefined;\n this.spriteSVG = undefined;\n this.themeCSSStyle = undefined;\n this.appliedThemeCSS = undefined;\n this.hasAdoptedThemeCSS = false;\n this.unsafeCSSStyle = undefined;\n this.appliedUnsafeCSS = undefined;\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n\n if (recycle) {\n this.fileRenderer.recycle();\n } else {\n this.fileRenderer.cleanUp();\n this.workerManager = undefined;\n this.file = undefined;\n }\n this.enabled = false;\n }\n\n public virtualizedSetup(): void {\n this.enabled = true;\n this.workerManager?.subscribeToThemeChanges(this);\n }\n\n public hydrate(props: FileHydrateProps<LAnnotation>): void {\n const {\n fileContainer,\n prerenderedHTML,\n preventEmit = false,\n file,\n lineAnnotations,\n } = props;\n if (!this.enabled) {\n throw new Error(\n 'File.hydrate: attempting to call hydrate after cleaned up'\n );\n }\n if (this.fileContainer != null) {\n throw new Error(\n 'File.hydrate: hydrate can only be called before the instance has rendered or hydrated'\n );\n }\n this.hydrateElements(fileContainer, prerenderedHTML);\n if (\n shouldRenderCode(this.pre, file, this.options.collapsed) ||\n shouldRenderHeader(\n this.headerElement,\n file,\n this.options.disableFileHeader\n )\n ) {\n this.render({ ...props, preventEmit: true });\n }\n // Otherwise orchestrate our setup.\n else {\n this.hydrationSetup({ file, lineAnnotations });\n }\n if (!preventEmit) {\n this.emitPostRender();\n }\n }\n\n protected hydrateElements(\n fileContainer: HTMLElement,\n prerenderedHTML: string | undefined\n ): void {\n if (this.fileContainer !== fileContainer) {\n this.emitPostRender(true);\n }\n prerenderHTMLIfNecessary(fileContainer, prerenderedHTML);\n for (const element of Array.from(\n fileContainer.shadowRoot?.children ?? []\n )) {\n if (element instanceof SVGElement) {\n this.spriteSVG = element;\n continue;\n }\n if (!(element instanceof HTMLElement)) {\n continue;\n }\n if (element instanceof HTMLPreElement) {\n this.pre = element;\n this.appliedPreAttributes = undefined;\n continue;\n }\n if (\n element instanceof HTMLStyleElement &&\n element.hasAttribute(THEME_CSS_ATTRIBUTE)\n ) {\n this.themeCSSStyle = element;\n continue;\n }\n if (\n element instanceof HTMLStyleElement &&\n element.hasAttribute(UNSAFE_CSS_ATTRIBUTE)\n ) {\n this.unsafeCSSStyle = element;\n this.appliedUnsafeCSS = element.textContent;\n continue;\n }\n if ('diffsHeader' in element.dataset) {\n this.headerElement = element;\n this.lastRenderedHeaderHTML = undefined;\n continue;\n }\n }\n if (this.pre != null) {\n this.syncCodeNodeFromPre(this.pre);\n this.pre.removeAttribute('data-dehydrated');\n }\n this.fileContainer = fileContainer;\n this.hydrateMeasuredScrollbar();\n }\n\n protected hydrationSetup({\n file,\n lineAnnotations,\n }: HydrationSetup<LAnnotation>): void {\n this.lineAnnotations = lineAnnotations ?? this.lineAnnotations;\n this.file = file;\n this.fileRenderer.setOptions(getFileRendererOptions(this.options));\n this.syncInteractionOptions();\n if (this.pre == null) {\n return;\n }\n this.fileRenderer.hydrate(file);\n this.renderAnnotations();\n this.renderGutterUtility();\n this.injectUnsafeCSS();\n this.managersDirty = true;\n this.flushManagers();\n }\n\n public getOrCreateLineCache(\n file: FileContents | undefined = this.file\n ): string[] {\n return file != null\n ? this.fileRenderer.getOrCreateLineCache(file)\n : EMPTY_STRINGS;\n }\n\n protected updateBuffers(renderRange: RenderRange): void {\n if (this.pre != null) {\n this.applyBuffers(this.pre, renderRange);\n }\n }\n\n private syncRenderViewToEditor(): void {\n const editor = this.editor;\n const fileContainer = this.fileContainer;\n const file = this.file;\n const lineAnnotations = this.lineAnnotations;\n const renderRange = this.renderRange;\n if (editor != null && fileContainer != null && file != null) {\n void this.fileRenderer.initializeHighlighter().then((highlighter) => {\n if (\n !this.enabled ||\n this.editor !== editor ||\n this.fileContainer !== fileContainer ||\n this.file !== file\n ) {\n return;\n }\n editor.__syncRenderView(\n highlighter,\n fileContainer,\n file,\n lineAnnotations,\n renderRange\n );\n });\n }\n }\n\n public attachEditor(editor: DiffsEditor<LAnnotation>): () => void {\n this.editor?.cleanUp();\n this.editor = editor;\n this.fileRenderer.beginEditSession();\n const preparedFile =\n this.file == null ? undefined : editor.__prepareFile?.(this.file);\n if (preparedFile !== undefined && preparedFile !== this.file) {\n this.renderPreparedFile({\n file: preparedFile,\n forceRender: true,\n preventEmit: true,\n renderRange: this.renderRange,\n });\n } else if (this.fileRenderer.editorRenderReady()) {\n this.syncRenderViewToEditor();\n } else {\n // The current markup is missing the editor's token metadata, or its\n // highlight is still pending: render through the session, which also\n // syncs the render view once it paints.\n this.rerender();\n }\n return () => {\n this.editor = undefined;\n this.fileRenderer.endEditSession();\n };\n }\n\n // normally triggered by the host when the document line count changes\n public applyDocumentChange(\n textDocument: DiffsTextDocument,\n newLineAnnotations?: LineAnnotation<LAnnotation>[]\n ): void {\n this.fileRenderer.applyDocumentChange(textDocument);\n if (\n newLineAnnotations != null &&\n newLineAnnotations !== this.lineAnnotations &&\n this.file != null\n ) {\n this.setLineAnnotations(newLineAnnotations);\n this.fileRenderer.setLineAnnotations(this.lineAnnotations);\n this.renderAnnotations();\n }\n }\n\n public updateRenderCache(\n dirtyLines: Map<number, Array<HighlightedToken>>,\n themeType: 'dark' | 'light',\n options?: {\n lineCountChangeInFlight?: boolean;\n }\n ): void {\n this.fileRenderer.updateRenderCache(\n dirtyLines,\n themeType,\n options?.lineCountChangeInFlight\n );\n }\n\n public render(props: FileRenderProps<LAnnotation>): boolean {\n if (!this.enabled) {\n throw new Error(\n 'File.render: attempting to call render after cleaned up'\n );\n }\n\n const file = this.editor?.__prepareFile?.(props.file) ?? props.file;\n return this.renderPreparedFile(\n file === props.file ? props : { ...props, file }\n );\n }\n\n // Renders a file whose persisted document has already been restored. The\n // virtualized subclass overrides this phase so layout uses the same file.\n protected renderPreparedFile({\n file,\n fileContainer,\n forceRender = false,\n preventEmit = false,\n containerWrapper,\n deferManagers = false,\n lineAnnotations,\n renderRange,\n }: FileRenderProps<LAnnotation>): boolean {\n // postpone background tokenizing to next frame for avoiding UI freeze\n // during render\n this.editor?.__postponeBgTokenizeToNextFrame();\n\n const { collapsed = false, themeType = 'system' } = this.options;\n const nextRenderRange = collapsed ? undefined : renderRange;\n const previousRenderRange = this.renderRange;\n const themeChanged = this.hasThemeChanged();\n const annotationsChanged =\n lineAnnotations != null &&\n (lineAnnotations.length > 0 || this.lineAnnotations.length > 0)\n ? lineAnnotations !== this.lineAnnotations\n : false;\n const didFileChange =\n !areFilesEqual(this.file, file) ||\n this.fileRenderer.hasUnkeyedFileContentsChanged(file);\n if (\n !collapsed &&\n !forceRender &&\n areRenderRangesEqual(nextRenderRange, this.renderRange) &&\n !didFileChange &&\n !annotationsChanged &&\n !themeChanged\n ) {\n return this.applyCachedThemeState(themeType);\n }\n\n this.renderRange = nextRenderRange;\n if (didFileChange) {\n this.cachedHeaderHTML = undefined;\n }\n this.file = file;\n this.fileRenderer.setOptions(getFileRendererOptions(this.options));\n this.syncInteractionOptions();\n if (lineAnnotations != null) {\n this.setLineAnnotations(lineAnnotations);\n }\n this.fileRenderer.setLineAnnotations(this.lineAnnotations);\n\n const { disableErrorHandling = false, disableFileHeader = false } =\n this.options;\n if (disableFileHeader) {\n // Remove existing header from DOM\n if (this.headerElement != null) {\n this.headerElement.remove();\n this.headerElement = undefined;\n this.lastRenderedHeaderHTML = undefined;\n }\n this.clearHeaderSlots();\n }\n\n fileContainer = this.getOrCreateFileContainerNode(\n fileContainer,\n containerWrapper\n );\n this.applyCachedThemeState(themeType);\n\n if (collapsed) {\n this.removeRenderedCode();\n this.clearAuxiliaryNodes();\n\n try {\n const fileResult = this.fileRenderer.renderFile(\n file,\n EMPTY_RENDER_RANGE\n );\n if (fileResult != null) {\n this.applyThemeState(\n fileContainer,\n fileResult.themeStyles,\n themeType,\n fileResult.baseThemeType\n );\n }\n if (fileResult?.headerAST != null) {\n this.applyHeaderToDOM(fileResult.headerAST, fileContainer);\n }\n this.injectUnsafeCSS();\n } catch (error: unknown) {\n if (disableErrorHandling) {\n throw error;\n }\n console.error(error);\n if (error instanceof Error) {\n this.applyErrorToDOM(error, fileContainer);\n }\n }\n if (!preventEmit) {\n this.emitPostRender();\n }\n return true;\n }\n\n try {\n const pre = this.getOrCreatePreNode(fileContainer);\n if (\n !this.canPartiallyRender(\n forceRender,\n annotationsChanged,\n didFileChange || themeChanged\n ) ||\n !this.applyPartialRender(previousRenderRange, nextRenderRange)\n ) {\n const fileResult = this.fileRenderer.renderFile(file, nextRenderRange);\n if (fileResult == null) {\n if (this.workerManager?.isInitialized() === false) {\n void this.workerManager.initialize().then(() => this.rerender());\n }\n return false;\n }\n this.applyThemeState(\n fileContainer,\n fileResult.themeStyles,\n themeType,\n fileResult.baseThemeType\n );\n if (fileResult.headerAST != null) {\n this.applyHeaderToDOM(fileResult.headerAST, fileContainer);\n }\n this.applyFullRender(fileResult, pre);\n }\n\n this.applyBuffers(pre, nextRenderRange);\n this.injectUnsafeCSS();\n this.renderAnnotations();\n this.renderGutterUtility();\n\n this.managersDirty = true;\n if (!deferManagers) {\n this.flushManagers();\n }\n\n if (this.editor != null) {\n this.syncRenderViewToEditor();\n }\n } catch (error: unknown) {\n if (disableErrorHandling) {\n throw error;\n }\n console.error(error);\n if (error instanceof Error) {\n this.applyErrorToDOM(error, fileContainer);\n }\n }\n if (!preventEmit) {\n this.emitPostRender();\n }\n return true;\n }\n\n private emitPostRender(unmount = false) {\n const {\n fileContainer,\n options: { onPostRender },\n } = this;\n\n if (unmount) {\n if (!this.mounted) {\n return;\n }\n this.mounted = false;\n if (fileContainer == null) {\n return;\n }\n onPostRender?.(fileContainer, this, 'unmount');\n return;\n }\n\n if (fileContainer == null) {\n return;\n }\n\n const phase: PostRenderPhase = this.mounted ? 'update' : 'mount';\n this.mounted = true;\n onPostRender?.(fileContainer, this, phase);\n }\n\n private removeRenderedCode(): void {\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n\n this.bufferBefore?.remove();\n this.bufferBefore = undefined;\n this.bufferAfter?.remove();\n this.bufferAfter = undefined;\n\n this.code?.remove();\n this.code = undefined;\n\n this.pre?.remove();\n this.pre = undefined;\n\n this.appliedPreAttributes = undefined;\n this.lastRowCount = undefined;\n }\n\n private clearAuxiliaryNodes(): void {\n for (const { element } of this.annotationCache.values()) {\n element.remove();\n }\n this.annotationCache.clear();\n\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n }\n\n private canPartiallyRender(\n forceRender: boolean,\n annotationsChanged: boolean,\n didContentChange: boolean\n ): boolean {\n if (forceRender || annotationsChanged || didContentChange) {\n return false;\n }\n return true;\n }\n\n public renderPlaceholder(height: number): boolean {\n if (this.fileContainer == null) {\n return false;\n }\n this.emitPostRender(true);\n this.cleanChildNodes();\n\n if (this.placeHolder == null) {\n const shadowRoot =\n this.fileContainer.shadowRoot ??\n this.fileContainer.attachShadow({ mode: 'open' });\n this.placeHolder = document.createElement('div');\n this.placeHolder.dataset.placeholder = '';\n shadowRoot.appendChild(this.placeHolder);\n }\n this.placeHolder.style.setProperty('height', `${height}px`);\n return true;\n }\n\n public async primeHighlightCache(\n file: FileContents | undefined = this.file\n ): Promise<void> {\n const { workerManager } = this;\n if (\n file == null ||\n workerManager == null ||\n !workerManager.isWorkingPool() ||\n file.cacheKey == null ||\n isFilePlainText(file)\n ) {\n return;\n }\n const tokenizeMaxLength =\n this.options.tokenizeMaxLength ?? DEFAULT_TOKENIZE_MAX_LENGTH;\n const lines = this.fileRenderer.getOrCreateLineCache(file);\n if (lines.length > tokenizeMaxLength) {\n return;\n }\n\n await workerManager\n .primeFileHighlightCache(file)\n .catch((error: unknown) => {\n console.error(error);\n });\n }\n\n private cleanChildNodes() {\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n this.clearAuxiliaryNodes();\n\n this.bufferAfter?.remove();\n this.bufferBefore?.remove();\n this.code?.remove();\n this.errorWrapper?.remove();\n this.headerElement?.remove();\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerCustom?.remove();\n this.pre?.remove();\n this.spriteSVG?.remove();\n this.themeCSSStyle?.remove();\n this.unsafeCSSStyle?.remove();\n\n this.bufferAfter = undefined;\n this.bufferBefore = undefined;\n this.code = undefined;\n this.errorWrapper = undefined;\n this.headerElement = undefined;\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n this.pre = undefined;\n this.spriteSVG = undefined;\n this.themeCSSStyle = undefined;\n this.appliedThemeCSS = undefined;\n this.hasAdoptedThemeCSS = false;\n this.unsafeCSSStyle = undefined;\n this.appliedUnsafeCSS = undefined;\n\n this.lastRenderedHeaderHTML = undefined;\n this.lastRowCount = undefined;\n\n this.mounted = false;\n }\n\n private renderAnnotations(): void {\n if (this.isContainerManaged || this.fileContainer == null) {\n for (const { element } of this.annotationCache.values()) {\n element.remove();\n }\n this.annotationCache.clear();\n return;\n }\n const staleAnnotations = new Map(this.annotationCache);\n const { renderAnnotation } = this.options;\n if (renderAnnotation != null && this.lineAnnotations.length > 0) {\n for (const [index, annotation] of this.lineAnnotations.entries()) {\n const id = `${index}-${getLineAnnotationName(annotation)}`;\n let cache = this.annotationCache.get(id);\n if (\n cache == null ||\n !areLineAnnotationsEqual(annotation, cache.annotation)\n ) {\n cache?.element.remove();\n const content = renderAnnotation(annotation);\n // If we can't render anything, then we should not render anything\n // and clear the annotation cache if necessary.\n if (content == null) {\n continue;\n }\n cache = {\n element: createAnnotationWrapperNode(\n getLineAnnotationName(annotation)\n ),\n annotation,\n };\n cache.element.appendChild(content);\n this.fileContainer.appendChild(cache.element);\n this.annotationCache.set(id, cache);\n }\n staleAnnotations.delete(id);\n }\n }\n for (const [id, { element }] of staleAnnotations.entries()) {\n this.annotationCache.delete(id);\n element.remove();\n }\n }\n\n private renderGutterUtility() {\n const { renderGutterUtility } = this.options;\n if (this.fileContainer == null || renderGutterUtility == null) {\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n return;\n }\n const element = renderGutterUtility(this.interactionManager.getHoveredLine);\n if (element != null && this.gutterUtilityContent != null) {\n return;\n } else if (element == null) {\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n return;\n }\n const gutterUtilityContent = createGutterUtilityContentNode();\n gutterUtilityContent.appendChild(element);\n this.fileContainer.appendChild(gutterUtilityContent);\n this.gutterUtilityContent = gutterUtilityContent;\n }\n\n private injectUnsafeCSS(): void {\n const { unsafeCSS } = this.options;\n const shadowRoot = this.fileContainer?.shadowRoot;\n if (shadowRoot == null) {\n return;\n }\n\n if (unsafeCSS == null || unsafeCSS === '') {\n if (this.unsafeCSSStyle != null) {\n this.unsafeCSSStyle.remove();\n this.unsafeCSSStyle = undefined;\n }\n this.appliedUnsafeCSS = undefined;\n return;\n }\n\n if (\n this.unsafeCSSStyle?.parentNode === shadowRoot &&\n this.appliedUnsafeCSS === unsafeCSS\n ) {\n return;\n }\n\n // Create or update the style element\n this.unsafeCSSStyle ??= createUnsafeCSSStyleNode();\n if (this.unsafeCSSStyle.parentNode !== shadowRoot) {\n shadowRoot.appendChild(this.unsafeCSSStyle);\n }\n // Wrap in @layer unsafe to match SSR behavior\n this.unsafeCSSStyle.textContent = wrapUnsafeCSS(unsafeCSS);\n this.appliedUnsafeCSS = unsafeCSS;\n }\n\n private applyThemeState(\n container: HTMLElement,\n themeStyles: string,\n themeType: ThemeTypes,\n baseThemeType?: 'light' | 'dark'\n ): void {\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n const effectiveThemeType = baseThemeType ?? themeType;\n const currentTheme = this.options.theme ?? DEFAULT_THEMES;\n const theme =\n typeof currentTheme === 'string' ? currentTheme : { ...currentTheme };\n const scrollbarGutter = getMeasuredScrollbarGutter(shadowRoot);\n if (\n this.themeCSSStyle?.parentNode === shadowRoot &&\n this.appliedThemeCSS?.themeStyles === themeStyles &&\n this.appliedThemeCSS.themeType === effectiveThemeType &&\n this.appliedThemeCSS.scrollbarGutter === scrollbarGutter\n ) {\n this.appliedThemeCSS.theme = theme;\n return;\n }\n if (\n this.hasAdoptedThemeCSS &&\n this.themeCSSStyle?.parentNode === shadowRoot\n ) {\n this.hasAdoptedThemeCSS = false;\n this.appliedThemeCSS = {\n theme,\n themeStyles,\n themeType: effectiveThemeType,\n baseThemeType,\n scrollbarGutter,\n };\n return;\n }\n this.themeCSSStyle = upsertHostThemeStyle({\n shadowRoot,\n currentNode: this.themeCSSStyle,\n themeCSS: wrapThemeCSS(themeStyles, effectiveThemeType, scrollbarGutter),\n });\n this.appliedThemeCSS =\n this.themeCSSStyle != null\n ? {\n theme,\n themeStyles,\n themeType: effectiveThemeType,\n baseThemeType,\n scrollbarGutter,\n }\n : undefined;\n }\n\n private hydrateMeasuredScrollbar(): void {\n const shadowRoot = this.fileContainer?.shadowRoot;\n if (shadowRoot == null || this.themeCSSStyle == null) {\n return;\n }\n this.themeCSSStyle.textContent = patchScrollbarGutterSize(\n this.themeCSSStyle.textContent ?? '',\n getMeasuredScrollbarGutter(shadowRoot)\n );\n }\n\n // A boolean check to ensure that edit mode in WebKit doesn't cause potential\n // scroll jumps to due bugs with WebKit. The workarounds have performance\n // implications so we avoid running the workarounds on browsers or scenarios\n // where they are not applicable\n protected shouldGuardRebuildScroll(): boolean {\n return this.editor != null && isSafari();\n }\n\n private applyFullRender(result: FileRenderResult, pre: HTMLPreElement): void {\n this.cleanupErrorWrapper();\n this.applyPreNodeAttributes(pre, result);\n const code = (this.code = getOrCreateCodeNode({ code: this.code }));\n const codeAst = this.fileRenderer.renderCodeAST(result);\n this.editor?.__captureFocusForDOMReplacement();\n const applyColumns = () => {\n if (code.childElementCount >= 2) {\n for (let i = 0; i < 2; i++) {\n const domEl = code.children[i] as HTMLElement;\n const astEl = codeAst[i] as HASTElement;\n domEl.innerHTML = toHtml(astEl.children);\n domEl.style.cssText = astEl.properties.style as string;\n }\n } else {\n code.innerHTML = toHtml(codeAst);\n }\n if (!pre.contains(code)) {\n pre.replaceChildren(code);\n }\n };\n if (this.shouldGuardRebuildScroll()) {\n guardWebKitScrollDuringRebuild(pre, applyColumns);\n } else {\n applyColumns();\n }\n this.lastRowCount = result.rowCount;\n }\n\n private applyPartialRender(\n previousRenderRange: RenderRange | undefined,\n renderRange: RenderRange | undefined\n ): boolean {\n if (previousRenderRange == null || renderRange == null) {\n return false;\n }\n const { file, code } = this;\n const columns = code != null ? this.getColumns(code) : undefined;\n if (file == null || code == null || columns == null) {\n return false;\n }\n\n const previousStart = previousRenderRange.startingLine;\n const nextStart = renderRange.startingLine;\n const previousEnd =\n previousRenderRange.totalLines === Infinity\n ? Number.POSITIVE_INFINITY\n : previousStart + previousRenderRange.totalLines;\n const nextEnd =\n renderRange.totalLines === Infinity\n ? Number.POSITIVE_INFINITY\n : nextStart + renderRange.totalLines;\n\n const overlapStart = Math.max(previousStart, nextStart);\n const overlapEnd = Math.min(previousEnd, nextEnd);\n if (overlapEnd <= overlapStart) {\n return false;\n }\n\n if (\n !this.trimDOMToOverlap(columns.gutter, overlapStart, overlapEnd) ||\n !this.trimDOMToOverlap(columns.content, overlapStart, overlapEnd)\n ) {\n throw new Error('File.applyPartialRender: failed to trim to overlap');\n }\n\n let { length: rowCount } = columns.content.children;\n\n const renderChunk = (\n startingLine: number,\n totalLines: number\n ): FileRenderResult | undefined => {\n if (totalLines <= 0) {\n return undefined;\n }\n return this.fileRenderer.renderFile(file, {\n startingLine,\n totalLines,\n bufferBefore: 0,\n bufferAfter: 0,\n });\n };\n\n const prependResult =\n nextStart < overlapStart\n ? renderChunk(nextStart, overlapStart - nextStart)\n : undefined;\n if (prependResult === undefined && nextStart < overlapStart) {\n return false;\n }\n\n const appendTotalLines =\n nextEnd === Number.POSITIVE_INFINITY\n ? Number.POSITIVE_INFINITY\n : Math.max(0, nextEnd - overlapEnd);\n const appendResult =\n nextEnd > overlapEnd\n ? renderChunk(overlapEnd, appendTotalLines)\n : undefined;\n if (appendResult === undefined && nextEnd > overlapEnd) {\n return false;\n }\n\n this.cleanupErrorWrapper();\n if (prependResult != null) {\n columns.gutter.insertAdjacentHTML(\n 'afterbegin',\n this.fileRenderer.renderPartialHTML(prependResult.gutterAST)\n );\n columns.content.insertAdjacentHTML(\n 'afterbegin',\n this.fileRenderer.renderPartialHTML(prependResult.contentAST)\n );\n rowCount += prependResult.rowCount;\n }\n\n if (appendResult != null) {\n columns.gutter.insertAdjacentHTML(\n 'beforeend',\n this.fileRenderer.renderPartialHTML(appendResult.gutterAST)\n );\n columns.content.insertAdjacentHTML(\n 'beforeend',\n this.fileRenderer.renderPartialHTML(appendResult.contentAST)\n );\n rowCount += appendResult.rowCount;\n }\n\n if (this.lastRowCount !== rowCount) {\n columns.gutter.style.setProperty('grid-row', `span ${rowCount}`);\n columns.content.style.setProperty('grid-row', `span ${rowCount}`);\n this.lastRowCount = rowCount;\n }\n\n return true;\n }\n\n private getColumns(code: HTMLElement): ColumnElements | undefined {\n const gutter = code.children[0];\n const content = code.children[1];\n if (\n !(gutter instanceof HTMLElement) ||\n !(content instanceof HTMLElement) ||\n gutter.dataset.gutter == null ||\n content.dataset.content == null\n ) {\n return undefined;\n }\n return { gutter, content };\n }\n\n private trimDOMToOverlap(\n container: HTMLElement,\n overlapStart: number,\n overlapEnd: number\n ): boolean {\n const boundaryIndices = this.getDOMBoundaryIndices(container, [\n overlapStart,\n overlapEnd,\n ]);\n const startIndex =\n boundaryIndices.get(overlapStart) ?? container.children.length;\n const endIndex =\n boundaryIndices.get(overlapEnd) ?? container.children.length;\n\n if (startIndex > endIndex) {\n return false;\n }\n\n for (let i = container.children.length - 1; i >= endIndex; i -= 1) {\n container.children[i]?.remove();\n }\n for (let i = startIndex - 1; i >= 0; i -= 1) {\n container.children[i]?.remove();\n }\n return true;\n }\n\n private getDOMBoundaryIndices(\n container: HTMLElement,\n boundaries: number[]\n ): Map<number, number> {\n const sortedBoundaries = [...new Set(boundaries)].sort((a, b) => a - b);\n const boundaryIndices = new Map<number, number>();\n if (sortedBoundaries.length === 0) {\n return boundaryIndices;\n }\n let boundaryIndex = 0;\n let nextBoundary = sortedBoundaries[boundaryIndex];\n const { children } = container;\n\n if (nextBoundary === 0) {\n boundaryIndices.set(0, 0);\n boundaryIndex += 1;\n nextBoundary = sortedBoundaries[boundaryIndex];\n }\n\n for (let i = 0; i < children.length; i += 1) {\n const child = children[i];\n if (!(child instanceof HTMLElement)) {\n continue;\n }\n const lineIndex = this.getLineIndexFromDOMNode(child);\n if (lineIndex == null) {\n continue;\n }\n while (nextBoundary != null && lineIndex >= nextBoundary) {\n boundaryIndices.set(nextBoundary, i);\n boundaryIndex += 1;\n nextBoundary = sortedBoundaries[boundaryIndex];\n }\n if (boundaryIndex >= sortedBoundaries.length) {\n break;\n }\n }\n\n for (const boundary of sortedBoundaries) {\n if (!boundaryIndices.has(boundary)) {\n boundaryIndices.set(boundary, children.length);\n }\n }\n return boundaryIndices;\n }\n\n private getLineIndexFromDOMNode(node: HTMLElement): number | undefined {\n const lineIndexAttr = node.dataset.lineIndex;\n if (lineIndexAttr == null) {\n return undefined;\n }\n const parsed = Number(lineIndexAttr);\n return Number.isNaN(parsed) ? undefined : parsed;\n }\n\n private applyBuffers(\n pre: HTMLPreElement,\n renderRange: RenderRange | undefined\n ) {\n if (renderRange == null || this.shouldDisableVirtualizationBuffers()) {\n if (this.bufferBefore != null) {\n this.bufferBefore.remove();\n this.bufferBefore = undefined;\n }\n if (this.bufferAfter != null) {\n this.bufferAfter.remove();\n this.bufferAfter = undefined;\n }\n return;\n }\n\n if (renderRange.bufferBefore > 0) {\n if (this.bufferBefore == null) {\n this.bufferBefore = document.createElement('div');\n this.bufferBefore.dataset.virtualizerBuffer = 'before';\n pre.before(this.bufferBefore);\n }\n this.bufferBefore.style.setProperty(\n 'height',\n `${renderRange.bufferBefore}px`\n );\n this.bufferBefore.style.setProperty('contain', 'strict');\n } else if (this.bufferBefore != null) {\n this.bufferBefore.remove();\n this.bufferBefore = undefined;\n }\n\n if (renderRange.bufferAfter > 0) {\n if (this.bufferAfter == null) {\n this.bufferAfter = document.createElement('div');\n this.bufferAfter.dataset.virtualizerBuffer = 'after';\n pre.after(this.bufferAfter);\n }\n this.bufferAfter.style.setProperty(\n 'height',\n `${renderRange.bufferAfter}px`\n );\n this.bufferAfter.style.setProperty('contain', 'strict');\n } else if (this.bufferAfter != null) {\n this.bufferAfter.remove();\n this.bufferAfter = undefined;\n }\n }\n\n protected shouldDisableVirtualizationBuffers(): boolean {\n return this.options.disableVirtualizationBuffers ?? false;\n }\n\n private applyHeaderToDOM(\n headerAST: HASTElement,\n container: HTMLElement\n ): void {\n const { file } = this;\n if (file == null) return;\n this.cleanupErrorWrapper();\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n const headerHTML = this.cachedHeaderHTML ?? toHtml(headerAST);\n this.cachedHeaderHTML = headerHTML;\n if (headerHTML !== this.lastRenderedHeaderHTML) {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = headerHTML;\n const newHeader = tempDiv.firstElementChild;\n if (!(newHeader instanceof HTMLElement)) {\n return;\n }\n if (this.headerElement != null) {\n container.shadowRoot?.replaceChild(newHeader, this.headerElement);\n } else {\n container.shadowRoot?.prepend(newHeader);\n }\n this.headerElement = newHeader;\n this.lastRenderedHeaderHTML = headerHTML;\n }\n\n if (this.isContainerManaged) return;\n\n const {\n renderHeaderPrefix,\n renderHeaderFilenameSuffix,\n renderCustomHeader,\n renderHeaderMetadata,\n } = this.options;\n\n if (renderCustomHeader != null) {\n const content = renderCustomHeader(file) ?? undefined;\n this.headerCustom = this.upsertHeaderSlotElement(\n container,\n this.headerCustom,\n CUSTOM_HEADER_SLOT_ID,\n content\n );\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n } else {\n const prefix = renderHeaderPrefix?.(file) ?? undefined;\n const suffix = renderHeaderFilenameSuffix?.(file) ?? undefined;\n const content = renderHeaderMetadata?.(file) ?? undefined;\n this.headerPrefix = this.upsertHeaderSlotElement(\n container,\n this.headerPrefix,\n HEADER_PREFIX_SLOT_ID,\n prefix\n );\n this.headerFilenameSuffix = this.upsertHeaderSlotElement(\n container,\n this.headerFilenameSuffix,\n HEADER_FILENAME_SUFFIX_SLOT_ID,\n suffix\n );\n this.headerMetadata = this.upsertHeaderSlotElement(\n container,\n this.headerMetadata,\n HEADER_METADATA_SLOT_ID,\n content\n );\n this.headerCustom?.remove();\n this.headerCustom = undefined;\n }\n }\n\n private clearHeaderSlots(): void {\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerCustom?.remove();\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n }\n\n // Header slot callbacks are presence-based render hooks, not reactive views.\n private upsertHeaderSlotElement(\n container: HTMLElement,\n current: HTMLElement | undefined,\n slot: string,\n content: Element | string | number | undefined\n ): HTMLElement | undefined {\n if (content == null) {\n current?.remove();\n return undefined;\n }\n const element = current ?? this.createHeaderSlotElement(slot);\n if (current == null) {\n container.appendChild(element);\n }\n this.replaceHeaderSlotContent(element, content);\n return element;\n }\n\n private replaceHeaderSlotContent(\n element: HTMLElement,\n content: Element | string | number\n ): void {\n element.replaceChildren();\n if (content instanceof Element) {\n element.appendChild(content);\n } else {\n element.innerText = `${content}`;\n }\n }\n\n private createHeaderSlotElement(slot: string): HTMLElement {\n const element = document.createElement('div');\n element.slot = slot;\n return element;\n }\n\n protected getOrCreateFileContainerNode(\n fileContainer?: HTMLElement,\n parentNode?: HTMLElement\n ): HTMLElement {\n const { fileContainer: previousContainer } = this;\n const nextContainer =\n fileContainer ??\n previousContainer ??\n document.createElement(DIFFS_TAG_NAME);\n const containerChanged = previousContainer !== nextContainer;\n if (previousContainer != null && containerChanged) {\n this.editor?.__captureFocusForDOMReplacement();\n }\n if (containerChanged) {\n this.emitPostRender(true);\n }\n this.fileContainer = nextContainer;\n if (previousContainer != null && containerChanged) {\n this.lastRenderedHeaderHTML = undefined;\n this.headerElement = undefined;\n }\n if (parentNode != null && this.fileContainer.parentNode !== parentNode) {\n parentNode.appendChild(this.fileContainer);\n }\n if (containerChanged) {\n this.adoptReusableShellElements(this.fileContainer);\n }\n this.ensureSpriteSVG(this.fileContainer);\n return this.fileContainer;\n }\n\n // NOTE(amadeus): Technically this method is not safe for use outside of\n // the CodeView component, however I don't think in practice it really\n // should matter, but maybe there's some system we need in place to prevent\n // this from running outside of that environment?\n //\n // It's making very specific assumptions that all the elements will have the\n // correct content based on CodeView global options\n private adoptReusableShellElements(fileContainer: HTMLElement): void {\n const { shadowRoot } = fileContainer;\n if (shadowRoot == null) {\n return;\n }\n\n for (const element of shadowRoot.children) {\n if (element instanceof SVGElement) {\n this.spriteSVG ??= element;\n } else if (\n isStyleNode(element) &&\n element.hasAttribute(THEME_CSS_ATTRIBUTE)\n ) {\n this.themeCSSStyle ??= element;\n this.hasAdoptedThemeCSS = true;\n } else if (\n isStyleNode(element) &&\n element.hasAttribute(UNSAFE_CSS_ATTRIBUTE)\n ) {\n this.unsafeCSSStyle ??= element;\n this.appliedUnsafeCSS ??= this.options.unsafeCSS ?? undefined;\n }\n }\n }\n\n private ensureSpriteSVG(fileContainer: HTMLElement): void {\n const shadowRoot =\n fileContainer.shadowRoot ?? fileContainer.attachShadow({ mode: 'open' });\n if (this.spriteSVG == null) {\n const fragment = document.createElement('div');\n fragment.innerHTML = SVGSpriteSheet;\n const firstChild = fragment.firstChild;\n if (firstChild instanceof SVGElement) {\n this.spriteSVG = firstChild;\n }\n }\n if (this.spriteSVG != null && this.spriteSVG.parentNode !== shadowRoot) {\n shadowRoot.appendChild(this.spriteSVG);\n }\n }\n\n private getOrCreatePreNode(container: HTMLElement): HTMLPreElement {\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n // If we haven't created a pre element yet, lets go ahead and do that\n if (this.pre == null) {\n this.pre = document.createElement('pre');\n this.appliedPreAttributes = undefined;\n this.code = undefined;\n shadowRoot.appendChild(this.pre);\n }\n // If we have a new parent container for the pre element, lets go ahead and\n // move it into the new container\n else if (this.pre.parentNode !== shadowRoot) {\n this.editor?.__captureFocusForDOMReplacement();\n container.shadowRoot?.appendChild(this.pre);\n this.appliedPreAttributes = undefined;\n }\n\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n\n return this.pre;\n }\n\n private syncCodeNodeFromPre(pre: HTMLPreElement): void {\n this.code = undefined;\n for (const child of Array.from(pre.children)) {\n if (!(child instanceof HTMLElement)) {\n continue;\n }\n if (child.hasAttribute('data-code')) {\n this.code = child;\n return;\n }\n }\n }\n\n private applyPreNodeAttributes(\n pre: HTMLPreElement,\n { totalLines }: FileRenderResult\n ): void {\n const { overflow = 'scroll', disableLineNumbers = false } = this.options;\n const preProperties: PrePropertiesConfig = {\n type: 'file',\n split: false,\n overflow,\n disableLineNumbers,\n diffIndicators: 'none',\n disableBackground: true,\n totalLines,\n };\n if (arePrePropertiesEqual(preProperties, this.appliedPreAttributes)) {\n return;\n }\n setPreNodeProperties(pre, preProperties);\n this.appliedPreAttributes = preProperties;\n }\n\n private applyErrorToDOM(error: Error, container: HTMLElement) {\n this.cleanupErrorWrapper();\n this.pre?.remove();\n this.pre = undefined;\n this.appliedPreAttributes = undefined;\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n this.errorWrapper ??= document.createElement('div');\n this.errorWrapper.dataset.errorWrapper = '';\n this.errorWrapper.textContent = '';\n shadowRoot.appendChild(this.errorWrapper);\n const errorMessage = document.createElement('div');\n errorMessage.dataset.errorMessage = '';\n errorMessage.innerText = error.message;\n this.errorWrapper.appendChild(errorMessage);\n const errorStack = document.createElement('pre');\n errorStack.dataset.errorStack = '';\n errorStack.innerText = error.stack ?? 'No Error Stack';\n this.errorWrapper.appendChild(errorStack);\n }\n\n private cleanupErrorWrapper() {\n this.errorWrapper?.remove();\n this.errorWrapper = undefined;\n }\n}\n\nfunction shouldRenderCode(\n pre: HTMLPreElement | undefined,\n file: FileContents | undefined,\n collapsed = false\n): boolean {\n return !collapsed && pre == null && file != null;\n}\n\nfunction shouldRenderHeader(\n headerElement: HTMLElement | undefined,\n file: FileContents | undefined,\n disableFileHeader: boolean = false\n): boolean {\n return headerElement == null && file != null && !disableFileHeader;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAM,gBAA0B,CAAC,EAAE;AA+DnC,IAAI,aAAa;AAEjB,IAAa,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;AAC9C;AAEA,SAAS,mBACP,eACA,MACA,oBAA6B,OACpB;CACT,OAAO,iBAAiB,QAAQ,QAAQ,QAAQ,CAAC;AACnD"}
|
|
1
|
+
{"version":3,"file":"File.js","names":[],"sources":["../../src/components/File.ts"],"sourcesContent":["import type { Element as HASTElement } from 'hast';\nimport { toHtml } from 'hast-util-to-html';\n\nimport {\n CUSTOM_HEADER_SLOT_ID,\n DEFAULT_THEMES,\n DEFAULT_TOKENIZE_MAX_LENGTH,\n DIFFS_TAG_NAME,\n EMPTY_RENDER_RANGE,\n HEADER_FILENAME_SUFFIX_SLOT_ID,\n HEADER_METADATA_SLOT_ID,\n HEADER_PREFIX_SLOT_ID,\n THEME_CSS_ATTRIBUTE,\n UNSAFE_CSS_ATTRIBUTE,\n} from '../constants';\nimport type { Editor } from '../editor/editor';\nimport type { TextDocument } from '../editor/textDocument';\nimport type {\n EditCompletionDecision,\n EditorActiveLineOptions,\n EditorChangeEvent,\n FileEditCompleteEvent,\n} from '../editor/types';\nimport {\n type GetHoveredLineResult,\n InteractionManager,\n type InteractionManagerBaseOptions,\n pluckInteractionOptions,\n type SelectionWriteOptions,\n} from '../managers/InteractionManager';\nimport { ResizeManager } from '../managers/ResizeManager';\nimport { FileRenderer, type FileRenderResult } from '../renderers/FileRenderer';\nimport { SVGSpriteSheet } from '../sprite';\nexport type { FileEditCompleteEvent } from '../editor/types';\nimport {\n getHighlighterIfLoaded,\n getSharedHighlighter,\n} from '../highlighter/shared_highlighter';\nimport type {\n AppliedThemeStyleCache,\n BaseCodeOptions,\n DiffLineAnnotation,\n DiffsHighlighter,\n FileContents,\n HighlightedToken,\n LineAnnotation,\n PostRenderPhase,\n PrePropertiesConfig,\n RenderFileMetadata,\n RenderRange,\n SelectedLineRange,\n ThemeTypes,\n} from '../types';\nimport { areFileTargetsEqual } from '../utils/areFileTargetsEqual';\nimport { areLineAnnotationsEqual } from '../utils/areLineAnnotationsEqual';\nimport { arePrePropertiesEqual } from '../utils/arePrePropertiesEqual';\nimport { areRenderRangesEqual } from '../utils/areRenderRangesEqual';\nimport { areThemesEqual } from '../utils/areThemesEqual';\nimport { createAnnotationWrapperNode } from '../utils/createAnnotationWrapperNode';\nimport { createGutterUtilityContentNode } from '../utils/createGutterUtilityContentNode';\nimport { createUnsafeCSSStyleNode } from '../utils/createUnsafeCSSStyleNode';\nimport {\n patchScrollbarGutterSize,\n wrapThemeCSS,\n wrapUnsafeCSS,\n} from '../utils/cssWrappers';\nimport {\n adoptEditSessionAnnotations,\n type EditSessionAnnotations,\n resolveEditSessionSlotName,\n writeEditSessionAnnotations,\n} from '../utils/editSessionAnnotations';\nimport { getFileRendererOptions } from '../utils/getFileRendererOptions';\nimport { getFiletypeFromFileName } from '../utils/getFiletypeFromFileName';\nimport { getLineAnnotationName } from '../utils/getLineAnnotationName';\nimport { getOrCreateCodeNode } from '../utils/getOrCreateCodeNode';\nimport { getThemes } from '../utils/getThemes';\nimport { guardWebKitScrollDuringRebuild } from '../utils/guardWebKitScrollDuringRebuild';\nimport { upsertHostThemeStyle } from '../utils/hostTheme';\nimport { isFilePlainText } from '../utils/isFilePlainText';\nimport { isStyleNode } from '../utils/isStyleNode';\nimport { isSafari } from '../utils/platform';\nimport { prerenderHTMLIfNecessary } from '../utils/prerenderHTMLIfNecessary';\nimport { getMeasuredScrollbarGutter } from '../utils/scrollbarGutter';\nimport { setPreNodeProperties } from '../utils/setWrapperNodeProps';\nimport type { WorkerPoolManager } from '../worker';\nimport { DiffsContainerLoaded } from './web-components';\n\nconst EMPTY_STRINGS: string[] = [''];\n\nexport interface FileRenderProps<LAnnotation> {\n file: FileContents;\n fileContainer?: HTMLElement;\n containerWrapper?: HTMLElement;\n deferManagers?: boolean;\n forceRender?: boolean;\n preventEmit?: boolean;\n lineAnnotations?: LineAnnotation<LAnnotation>[];\n renderRange?: RenderRange;\n}\n\nexport interface FileHydrateProps<LAnnotation> extends Omit<\n FileRenderProps<LAnnotation>,\n 'fileContainer'\n> {\n fileContainer: HTMLElement;\n prerenderedHTML?: string;\n}\n\nexport type FileEditChangeHandler<LAnnotation, Caret> = (\n event: EditorChangeEvent<'file', LAnnotation, Caret>\n) => void;\n\n/**\n * Decides a completed edit synchronously: return `'accept'` to install the\n * event's `file` and annotations, or `'reject'` to restore the original values.\n * The event is frozen, so re-key the accepted file in place\n * (`event.file.cacheKey = '…'`) before accepting. The event's editor is\n * detached and returns its final state from `getViewState()`. A missing handler\n * rejects.\n */\nexport type FileEditCompleteHandler<LAnnotation, Caret> = (\n event: FileEditCompleteEvent<LAnnotation, Caret>\n) => EditCompletionDecision;\n\nexport interface FileOptions<LAnnotation, Caret>\n extends BaseCodeOptions, InteractionManagerBaseOptions<'file'> {\n disableFileHeader?: boolean;\n renderHeaderPrefix?: RenderFileMetadata;\n renderHeaderFilenameSuffix?: RenderFileMetadata;\n renderHeaderMetadata?: RenderFileMetadata;\n renderCustomHeader?: RenderFileMetadata;\n /**\n * When true, errors during rendering are rethrown instead of being caught\n * and displayed in the DOM. Useful for testing or when you want to handle\n * errors yourself.\n */\n disableErrorHandling?: boolean;\n renderAnnotation?(\n annotation: LineAnnotation<LAnnotation>\n ): HTMLElement | undefined;\n renderGutterUtility?(\n getHoveredRow: () => GetHoveredLineResult<'file'> | undefined\n ): HTMLElement | null | undefined;\n\n onPostRender?(\n node: HTMLElement,\n instance: File<LAnnotation, Caret>,\n phase: PostRenderPhase\n ): unknown;\n\n /**\n * Fired for every document change of an active edit session on this\n * component, with the same `EditorChangeEvent` the editor reports through\n * its own `onChange`. Do not feed the event's file back into the component\n * while the session is active.\n */\n onEditChange?: FileEditChangeHandler<LAnnotation, Caret>;\n\n /**\n * Fired when `edit` toggles false or a component unmounts, including when the\n * final contents are unchanged. If no callback is provided, the component\n * reverts to the last `file` and annotations passed into it. The callback\n * receives the detached editor with its final pre-detach state.\n */\n onEditComplete?: FileEditCompleteHandler<LAnnotation, Caret>;\n}\n\ninterface AnnotationElementCache<LAnnotation> {\n element: HTMLElement;\n annotation: LineAnnotation<LAnnotation>;\n}\n\ninterface ColumnElements {\n gutter: HTMLElement;\n content: HTMLElement;\n}\n\ninterface HydrationSetup<LAnnotation> {\n file: FileContents;\n lineAnnotations: LineAnnotation<LAnnotation>[] | undefined;\n}\n\ninterface EditSession<LAnnotation> {\n file: FileContents;\n annotations: EditSessionAnnotations<LineAnnotation<LAnnotation>> | undefined;\n /*\n * `externalReplacement` records that the host swapped in a new file\n * mid-session, so the next sync tells the editor to adopt `file` over its\n * own document\n */\n externalReplacement: boolean;\n}\n\nfunction createEditSessionFile(file: FileContents): FileContents {\n const editSessionFile = { ...file };\n delete editSessionFile.cacheKey;\n return editSessionFile;\n}\n\nlet instanceId = -1;\n\nexport class File<LAnnotation = undefined, Caret = undefined> {\n static LoadedCustomComponent: boolean = DiffsContainerLoaded;\n\n readonly __id: string = `file:${++instanceId}`;\n readonly type = 'file';\n\n protected fileContainer: HTMLElement | undefined;\n protected spriteSVG: SVGElement | undefined;\n protected pre: HTMLPreElement | undefined;\n protected code: HTMLElement | undefined;\n protected bufferBefore: HTMLElement | undefined;\n protected bufferAfter: HTMLElement | undefined;\n protected themeCSSStyle: HTMLStyleElement | undefined;\n protected appliedThemeCSS: AppliedThemeStyleCache | undefined;\n protected hasAdoptedThemeCSS = false;\n protected unsafeCSSStyle: HTMLStyleElement | undefined;\n protected appliedUnsafeCSS: string | undefined;\n protected gutterUtilityContent: HTMLElement | undefined;\n protected errorWrapper: HTMLElement | undefined;\n protected placeHolder: HTMLElement | undefined;\n protected lastRenderedHeaderHTML: string | undefined;\n protected cachedHeaderHTML: string | undefined;\n protected appliedPreAttributes: PrePropertiesConfig | undefined;\n protected lastRowCount: number | undefined;\n private mounted = false;\n\n protected headerElement: HTMLElement | undefined;\n protected headerCustom: HTMLElement | undefined;\n protected headerPrefix: HTMLElement | undefined;\n protected headerFilenameSuffix: HTMLElement | undefined;\n protected headerMetadata: HTMLElement | undefined;\n\n protected fileRenderer: FileRenderer<LAnnotation>;\n protected resizeManager: ResizeManager;\n protected interactionManager: InteractionManager<'file'>;\n\n protected annotationCache: Map<string, AnnotationElementCache<LAnnotation>> =\n new Map();\n protected lineAnnotations: LineAnnotation<LAnnotation>[] = [];\n protected managersDirty = false;\n\n public file: FileContents | undefined;\n private editSession: EditSession<LAnnotation> | undefined;\n protected renderedFile: FileContents | undefined;\n protected renderRange: RenderRange | undefined;\n protected enabled = true;\n\n protected editor: Editor<'file', LAnnotation, Caret> | undefined;\n\n constructor(\n public options: FileOptions<LAnnotation, Caret> = {\n theme: DEFAULT_THEMES,\n },\n private workerManager?: WorkerPoolManager | undefined,\n private isContainerManaged = false\n ) {\n this.fileRenderer = new FileRenderer<LAnnotation>(\n options,\n this.getAnnotationSlotName,\n this.handleHighlightRender,\n this.workerManager\n );\n this.resizeManager = new ResizeManager();\n this.interactionManager = new InteractionManager(\n 'file',\n pluckInteractionOptions(options)\n );\n this.workerManager?.subscribeToThemeChanges(this);\n }\n\n public getAnnotationSlotName = (\n annotation: LineAnnotation<LAnnotation> | DiffLineAnnotation<LAnnotation>\n ): string => {\n return resolveEditSessionSlotName(\n this.editSession?.annotations,\n annotation,\n getLineAnnotationName\n );\n };\n\n private handleHighlightRender = (): void => {\n this.rerender();\n };\n\n public rerender(): void {\n if (!this.enabled || this.file == null) return;\n this.render({\n file: this.file,\n forceRender: true,\n renderRange: this.renderRange,\n });\n }\n\n private getTheme() {\n return (\n this.workerManager?.getFileRenderOptions().theme ??\n this.options.theme ??\n DEFAULT_THEMES\n );\n }\n\n // Return the newest file this component intends to display. Once editing\n // starts, the private edit-session file owns that state.\n protected getLatestFile(\n file: FileContents | undefined = this.file\n ): FileContents | undefined {\n return this.editSession?.file ?? file;\n }\n\n // Return the file that produced the DOM currently owned by this instance.\n protected getRenderedFile(): FileContents | undefined {\n return this.renderedFile;\n }\n\n protected getLatestAnnotations(): LineAnnotation<LAnnotation>[] {\n return this.editSession?.annotations?.current ?? this.lineAnnotations;\n }\n\n // Returns true when the caller passed annotations this component has not\n // handled yet. Re-renders often re-pass an annotations array the component\n // already holds — the external one, or one the active session tracks — and\n // treating those repeats as new writes would move annotations, so they are\n // recognized by identity and ignored.\n protected isNewAnnotations(\n lineAnnotations: LineAnnotation<LAnnotation>[]\n ): boolean {\n const session = this.editSession?.annotations;\n const externalAnnotations = this.lineAnnotations;\n if (lineAnnotations === externalAnnotations) {\n return false;\n }\n return (\n session == null ||\n (lineAnnotations !== session.provided &&\n lineAnnotations !== session.current)\n );\n }\n\n // Install a replacement file from the caller; returns false when it is the\n // file already installed. During an edit session the swap re-seeds the\n // session as a host replacement, and the next sync decides whether it keeps\n // or resets undo history.\n protected updateExternalFile(\n incomingFile: FileContents,\n lineAnnotations?: LineAnnotation<LAnnotation>[]\n ): boolean {\n if (areFileTargetsEqual(this.file, incomingFile)) {\n return false;\n }\n\n const hadSession = this.editSession != null;\n this.file = incomingFile;\n\n if (hadSession || this.editor != null) {\n this.installEditSession(\n incomingFile,\n hadSession\n ? undefined\n : this.editor?.__getDocumentContents(incomingFile),\n true\n );\n } else {\n this.editSession = undefined;\n }\n if (this.editSession?.annotations != null && lineAnnotations != null) {\n // These annotations arrived with the new file, so their line numbers\n // describe it. The positions the session tracked for the old document\n // mean nothing now: the session restarts from these annotations, and\n // they also become what renders once the session ends.\n this.lineAnnotations = lineAnnotations;\n this.editSession.annotations = adoptEditSessionAnnotations(\n lineAnnotations,\n getLineAnnotationName,\n this.editSession.annotations\n );\n }\n return true;\n }\n\n // Set up the edit session's working copy — the editable copy of this file that\n // edit mode operates on: create the session if there isn't one, or replace its\n // file if one is already running (its annotations carry over). The working\n // copy's text is normally `externalFile`, but if `retainedDocument` is given\n // and its text differs, the session keeps that content instead so text carried\n // over from an earlier session isn't lost.\n //\n // `hostReplacement` is true only when the host swapped in a new file, not on a\n // plain first attach — the one case where the editor should overwrite whatever\n // it is currently showing with this file. It is recorded on the session for\n // the next sync to act on.\n private installEditSession(\n externalFile: FileContents,\n retainedDocument?: FileContents,\n hostReplacement = false\n ): void {\n const usesExternalDocument =\n retainedDocument == null ||\n (retainedDocument.name === externalFile.name &&\n retainedDocument.lang === externalFile.lang &&\n retainedDocument.contents === externalFile.contents);\n const file = createEditSessionFile(retainedDocument ?? externalFile);\n this.editSession = {\n file,\n externalReplacement: hostReplacement && usesExternalDocument,\n // Seed annotations when the session is created so the adopt-block in\n // updateExternalFile fires on the next external update — this is what an\n // attach-before-hydrate (React) mount relies on, since the session does\n // not exist yet at attach. A live session keeps the ones it tracks.\n annotations:\n this.editSession?.annotations ??\n adoptEditSessionAnnotations(\n this.lineAnnotations,\n getLineAnnotationName\n ),\n };\n this.fileRenderer.beginEditSession(\n file,\n usesExternalDocument ? externalFile : undefined\n );\n }\n\n public onThemeChange(): void {\n this.fileRenderer.clearRenderCache();\n this.rerender();\n }\n\n public setOptions(\n options: FileOptions<LAnnotation, Caret> | undefined\n ): void {\n if (options == null) return;\n this.options = options;\n this.cachedHeaderHTML = undefined;\n this.syncInteractionOptions();\n }\n\n protected syncInteractionOptions(): void {\n this.interactionManager.setOptions(pluckInteractionOptions(this.options));\n }\n\n private mergeOptions(\n options: Partial<FileOptions<LAnnotation, Caret>>\n ): void {\n this.options = { ...this.options, ...options };\n }\n\n public setThemeType(themeType: ThemeTypes): void {\n if ((this.options.themeType ?? 'system') === themeType) {\n return;\n }\n this.mergeOptions({ themeType });\n this.applyCachedThemeState(themeType);\n }\n\n private applyCachedThemeState(themeType: ThemeTypes): boolean {\n if (\n typeof this.options.theme === 'string' ||\n this.fileContainer == null ||\n this.appliedThemeCSS == null\n ) {\n return false;\n }\n const effectiveThemeType = this.appliedThemeCSS.baseThemeType ?? themeType;\n if (this.appliedThemeCSS.themeType === effectiveThemeType) {\n return false;\n }\n this.applyThemeState(\n this.fileContainer,\n this.appliedThemeCSS.themeStyles,\n themeType,\n this.appliedThemeCSS.baseThemeType\n );\n return true;\n }\n\n private hasThemeChanged(): boolean {\n return (\n this.appliedThemeCSS != null &&\n !areThemesEqual(this.appliedThemeCSS.theme, this.getTheme())\n );\n }\n\n public getHoveredLine = (): GetHoveredLineResult<'file'> | undefined => {\n return this.interactionManager.getHoveredLine();\n };\n\n public setLineAnnotations(\n lineAnnotations: LineAnnotation<LAnnotation>[]\n ): void {\n const sessionAnnotations = this.editSession?.annotations;\n if (sessionAnnotations == null) {\n this.lineAnnotations = lineAnnotations;\n return;\n }\n if (!this.isNewAnnotations(lineAnnotations)) {\n return;\n }\n // Externally provided annotations are the source of truth: they become the\n // new external collection and the session renders them at the line numbers\n // given. The caller owns whether those positions still make sense after an\n // edit; a revert renders this collection unchanged rather than moving them.\n this.lineAnnotations = lineAnnotations;\n writeEditSessionAnnotations(\n sessionAnnotations,\n lineAnnotations,\n getLineAnnotationName\n );\n }\n\n // Takes annotations the editor remapped and makes them what the session\n // renders: updates the session, feeds the renderer, and re-renders\n // annotation rows. Returns true when new annotations were adopted —\n // virtualized subclasses override this and refresh their layout on true.\n //\n // The editor delivers annotations through two calls. An edit that changes\n // the line count sends them with the structural rebuild\n // (applyDocumentChange) and again with the change event (__acceptEditorChange);\n // the identity check makes the second call a no-op. An edit that keeps the\n // line count skips the rebuild, so the event is its only path here.\n //\n // The annotations the caller passed in are never touched — stale\n // re-renders keep deduping against them.\n protected syncEditSessionAnnotationsFromEditor(\n lineAnnotations: LineAnnotation<LAnnotation>[]\n ): boolean {\n const session = this.editSession?.annotations;\n if (session == null || lineAnnotations === session.current) {\n return false;\n }\n session.current = lineAnnotations;\n this.fileRenderer.setLineAnnotations(lineAnnotations);\n this.renderAnnotations();\n return true;\n }\n\n public setSelectedLines(\n range: SelectedLineRange | null,\n options?: SelectionWriteOptions\n ): void {\n this.interactionManager.setSelection(range, options);\n }\n\n public setEditorActiveLine(\n lineNumber: number | null,\n options?: EditorActiveLineOptions\n ): void {\n this.interactionManager.setEditorActiveLine(lineNumber, {\n lineNumberOnly: options?.lineNumberOnly,\n side: options?.side ?? 'additions',\n });\n }\n\n public getCodeScrollLeft(): number {\n return this.code?.scrollLeft ?? 0;\n }\n\n public setCodeScrollLeft(position: number): void {\n if (this.code != null) {\n this.code.scrollLeft = position;\n }\n }\n\n public __getEffectiveCodeOptions(): BaseCodeOptions {\n return { ...this.options, ...this.fileRenderer.getEffectiveCodeOptions() };\n }\n\n public flushManagers(): void {\n if (!this.managersDirty || this.pre == null) {\n this.managersDirty = false;\n return;\n }\n\n const { overflow = 'scroll' } = this.options;\n this.interactionManager.setup(this.pre);\n this.resizeManager.setup(this.pre, {\n disableAnnotations: overflow === 'wrap',\n columnVariables: this.shouldApplyColumnVariables(overflow)\n ? 'apply'\n : 'measure',\n });\n this.managersDirty = false;\n }\n\n protected shouldApplyColumnVariables(overflow: 'scroll' | 'wrap'): boolean {\n return overflow === 'scroll' && this.getLatestAnnotations().length > 0;\n }\n\n public cleanUp(recycle = false): void {\n const editor = this.editor;\n this.emitPostRender(true);\n // Tear the editor down while the code scroller still exists. A recycle\n // keeps its document and undo history; a full teardown drops them as the\n // session ends.\n editor?.cleanUp(recycle ? 'recycle' : 'discard');\n if (!recycle) {\n this.editor = undefined;\n }\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n this.managersDirty = false;\n this.workerManager?.unsubscribeToThemeChanges(this);\n this.renderRange = undefined;\n\n // Clean up the elements\n if (!this.isContainerManaged) {\n this.fileContainer?.remove();\n }\n this.fileContainer = undefined;\n this.mounted = false;\n if (!recycle) {\n this.lineAnnotations = [];\n }\n this.clearAuxiliaryNodes();\n this.pre = undefined;\n this.code = undefined;\n this.bufferBefore?.remove();\n this.bufferBefore = undefined;\n this.bufferAfter?.remove();\n this.bufferAfter = undefined;\n this.appliedPreAttributes = undefined;\n this.lastRowCount = undefined;\n this.headerElement = undefined;\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n this.lastRenderedHeaderHTML = undefined;\n if (!recycle) {\n this.cachedHeaderHTML = undefined;\n }\n this.errorWrapper?.remove();\n this.errorWrapper = undefined;\n this.spriteSVG = undefined;\n this.themeCSSStyle = undefined;\n this.appliedThemeCSS = undefined;\n this.hasAdoptedThemeCSS = false;\n this.unsafeCSSStyle = undefined;\n this.appliedUnsafeCSS = undefined;\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n\n if (recycle) {\n this.fileRenderer.recycle();\n } else {\n this.fileRenderer.cleanUp();\n this.workerManager = undefined;\n this.file = undefined;\n this.editSession = undefined;\n this.renderedFile = undefined;\n }\n this.enabled = false;\n }\n\n public virtualizedSetup(): void {\n this.enabled = true;\n this.workerManager?.subscribeToThemeChanges(this);\n }\n\n public hydrate(props: FileHydrateProps<LAnnotation>): void {\n const {\n fileContainer,\n prerenderedHTML,\n preventEmit = false,\n file,\n lineAnnotations,\n } = props;\n if (!this.enabled) {\n throw new Error(\n 'File.hydrate: attempting to call hydrate after cleaned up'\n );\n }\n if (this.fileContainer != null) {\n throw new Error(\n 'File.hydrate: hydrate can only be called before the instance has rendered or hydrated'\n );\n }\n this.hydrateElements(fileContainer, prerenderedHTML);\n // An editor attached before hydration may carry a retained keyed document.\n // Render through the private edit session instead of adopting external\n // markup, so the restored document owns the first hydrated paint.\n const forceEditorRender = this.editor != null;\n if (\n forceEditorRender ||\n shouldRenderCode(this.pre, file, this.options.collapsed) ||\n shouldRenderHeader(\n this.headerElement,\n file,\n this.options.disableFileHeader\n )\n ) {\n this.render({\n ...props,\n forceRender: forceEditorRender || props.forceRender,\n preventEmit: true,\n });\n }\n // Otherwise orchestrate our setup.\n else {\n this.hydrationSetup({ file, lineAnnotations });\n }\n if (!preventEmit) {\n this.emitPostRender();\n }\n }\n\n protected hydrateElements(\n fileContainer: HTMLElement,\n prerenderedHTML: string | undefined\n ): void {\n if (this.fileContainer !== fileContainer) {\n this.emitPostRender(true);\n }\n prerenderHTMLIfNecessary(fileContainer, prerenderedHTML);\n for (const element of Array.from(\n fileContainer.shadowRoot?.children ?? []\n )) {\n if (element instanceof SVGElement) {\n this.spriteSVG = element;\n continue;\n }\n if (!(element instanceof HTMLElement)) {\n continue;\n }\n if (element instanceof HTMLPreElement) {\n this.pre = element;\n this.appliedPreAttributes = undefined;\n continue;\n }\n if (\n element instanceof HTMLStyleElement &&\n element.hasAttribute(THEME_CSS_ATTRIBUTE)\n ) {\n this.themeCSSStyle = element;\n continue;\n }\n if (\n element instanceof HTMLStyleElement &&\n element.hasAttribute(UNSAFE_CSS_ATTRIBUTE)\n ) {\n this.unsafeCSSStyle = element;\n this.appliedUnsafeCSS = element.textContent;\n continue;\n }\n if ('diffsHeader' in element.dataset) {\n this.headerElement = element;\n this.lastRenderedHeaderHTML = undefined;\n continue;\n }\n }\n if (this.pre != null) {\n this.syncCodeNodeFromPre(this.pre);\n this.pre.removeAttribute('data-dehydrated');\n }\n this.fileContainer = fileContainer;\n this.hydrateMeasuredScrollbar();\n }\n\n protected hydrationSetup({\n file,\n lineAnnotations,\n }: HydrationSetup<LAnnotation>): void {\n this.lineAnnotations = lineAnnotations ?? this.lineAnnotations;\n this.file = file;\n this.fileRenderer.setOptions(getFileRendererOptions(this.options));\n this.syncInteractionOptions();\n if (this.pre == null) {\n return;\n }\n this.fileRenderer.hydrate(file);\n this.renderedFile = file;\n this.renderAnnotations();\n this.renderGutterUtility();\n this.injectUnsafeCSS();\n this.managersDirty = true;\n this.flushManagers();\n }\n\n public getOrCreateLineCache(\n file: FileContents | undefined = this.getLatestFile()\n ): string[] {\n return file != null\n ? this.fileRenderer.getOrCreateLineCache(file)\n : EMPTY_STRINGS;\n }\n\n protected updateBuffers(renderRange: RenderRange): void {\n if (this.pre != null) {\n this.applyBuffers(this.pre, renderRange);\n }\n }\n\n private syncRenderViewToEditor(): void {\n const { editor, fileContainer, renderRange } = this;\n const lineAnnotations = this.getLatestAnnotations();\n const file = this.getLatestFile();\n if (editor == null || fileContainer == null || file == null) {\n return;\n }\n const syncEditor = (highlighter: DiffsHighlighter): void => {\n if (\n !this.enabled ||\n this.editor !== editor ||\n this.fileContainer !== fileContainer ||\n this.getLatestFile() !== file\n ) {\n return;\n }\n editor.__syncRenderView({\n highlighter,\n fileContainer,\n file,\n lineAnnotations,\n renderRange,\n externalDocument: this.editSession?.externalReplacement === true,\n });\n };\n\n const theme = this.getTheme();\n const lang = file.lang ?? getFiletypeFromFileName(file.name);\n // Sync editor synchronously whenever the shared highlighter is ready;\n // otherwise load it and sync once it resolves.\n const highlighter = getHighlighterIfLoaded({ theme, lang });\n if (highlighter != null) {\n syncEditor(highlighter);\n } else {\n void getSharedHighlighter({\n themes: getThemes(theme),\n langs: Array.from(new Set(['text', lang])),\n preferredHighlighter:\n this.workerManager?.getPreferredHighlighter() ??\n this.options.preferredHighlighter,\n }).then(syncEditor);\n }\n }\n\n /** @internal The editor applied or edited past the pending external replacement. */\n public __acknowledgeDocumentUpdate(): void {\n if (this.editSession != null) {\n this.editSession.externalReplacement = false;\n }\n }\n\n /** @internal Settle annotations */\n public __acceptEditorChange(\n event: EditorChangeEvent<'file', LAnnotation, Caret>\n ): void {\n const { lineAnnotations } = event;\n if (lineAnnotations != null) {\n this.syncEditSessionAnnotationsFromEditor(lineAnnotations);\n }\n }\n\n public emitEditChange(\n event: EditorChangeEvent<'file', LAnnotation, Caret>\n ): void {\n const { onEditChange } = this.options;\n onEditChange?.(event);\n }\n\n /** @internal Plain files have no component-owned diff session state. */\n public __captureDocumentSessionState(): undefined {\n return undefined;\n }\n\n /** @internal Associate this component with its editor for a render lifecycle. */\n public __attachEditor(\n editor: Editor<'file', LAnnotation, Caret>\n ): () => void {\n if (this.editor != null) {\n throw new Error('File.__attachEditor: an editor is already attached');\n }\n this.editor = editor;\n const detach = () => {\n this.editor = undefined;\n this.fileRenderer.endEditSession();\n };\n try {\n this.resumeEditorRendering(editor);\n return detach;\n } catch (error) {\n detach();\n throw error;\n }\n }\n\n /** @internal Resume rendering for the editor already associated with this component. */\n public __resumeEditor(editor: Editor<'file', LAnnotation, Caret>): void {\n if (this.editor !== editor) {\n throw new Error('File.__resumeEditor: editor association changed');\n }\n this.resumeEditorRendering(editor);\n }\n\n private resumeEditorRendering(\n editor: Editor<'file', LAnnotation, Caret>\n ): void {\n // A retained session just re-starts its render; a fresh attach with a file\n // installs a session seeded from the editor's document. The editor can also\n // attach before the file arrives, there is nothing to begin yet, so the\n // session installs on the later hydrate.\n if (this.editSession != null) {\n this.fileRenderer.beginEditSession(this.editSession.file);\n } else if (this.file != null) {\n this.installEditSession(\n this.file,\n editor.__getDocumentContents(this.file)\n );\n }\n const editSessionFile = this.editSession?.file;\n if (this.fileRenderer.editorRenderReady()) {\n if (this.fileRenderer.fileCache === editSessionFile) {\n this.renderedFile = editSessionFile;\n }\n this.syncRenderViewToEditor();\n } else {\n // The current markup is missing the editor's token metadata, or its\n // highlight is still pending: render through the session, which also\n // syncs the render view once it paints.\n this.rerender();\n }\n }\n\n /**\n * @internal\n *\n * Ends the edit session and settles which file this component renders.\n * Requires the editor to be detached first. Does nothing when no session\n * exists, so callers can invoke it again safely after it has settled.\n *\n * `onEditComplete` receives the completed file, current external file, and\n * both annotation collections even when the final text is unchanged. In\n * `install` mode, accepting installs the completed file and its annotations;\n * rejecting or having no handler restores the external values. `discard`\n * mode always restores the external values. An accepted file cannot reuse\n * the replaced file's `cacheKey`.\n */\n public __completeEditSession(\n editor: Editor<'file', LAnnotation, Caret>,\n mode: 'install' | 'discard'\n ): void {\n this.settleEditSession(mode === 'install', editor);\n }\n\n private settleEditSession(\n installResult: boolean,\n editor: Editor<'file', LAnnotation, Caret> | undefined\n ): void {\n const {\n editSession,\n file: externalFile,\n lineAnnotations: externalAnnotations,\n } = this;\n if (editSession == null || externalFile == null) {\n return;\n }\n const { file: editSessionFile, annotations: editSessionAnnotations } =\n editSession;\n if (this.editor != null) {\n throw new Error(\n 'File.__completeEditSession: detach the editor before completing the session'\n );\n }\n\n const sessionAnnotationsCurrent = editSessionAnnotations?.current;\n let acceptedFile: FileContents | undefined;\n let failed = false;\n let failure: unknown;\n if (editor == null) {\n throw new Error(\n 'File.__completeEditSession: editor is required for completion'\n );\n }\n const completedFile = { ...editSessionFile };\n const event: FileEditCompleteEvent<LAnnotation, Caret> = {\n file: completedFile,\n editor,\n originalFile: externalFile,\n lineAnnotations: sessionAnnotationsCurrent,\n originalLineAnnotations: externalAnnotations,\n };\n // Frozen so a handler cannot swap the event's file/originalFile\n // references; nested mutation (a fresh cacheKey on event.file) still\n // works.\n Object.freeze(event);\n try {\n editor.__emitEditComplete(event);\n const decision = this.options.onEditComplete?.(event);\n if (decision === 'accept') {\n if (\n completedFile.cacheKey != null &&\n completedFile.cacheKey === externalFile.cacheKey\n ) {\n throw new Error(\n 'File.__completeEditSession: an accepted file must not reuse the replaced file cacheKey'\n );\n }\n acceptedFile = completedFile;\n }\n } catch (error) {\n failed = true;\n failure = error;\n }\n\n if (installResult && acceptedFile != null) {\n this.file = acceptedFile;\n if (sessionAnnotationsCurrent != null) {\n this.lineAnnotations = sessionAnnotationsCurrent;\n }\n }\n this.editSession = undefined;\n // Ending the session with the settled file lets the renderer adopt it as\n // the rendered identity when its cache already shows this content, so\n // the next render treats it as current instead of a new file.\n const { renderedFile, file: settledFile } = this;\n this.fileRenderer.endEditSession(settledFile);\n if (\n renderedFile != null &&\n settledFile != null &&\n renderedFile !== settledFile &&\n areFileTargetsEqual(renderedFile, settledFile)\n ) {\n this.renderedFile = settledFile;\n }\n if (installResult && this.fileContainer != null) {\n this.rerender();\n }\n if (failed) {\n throw failure;\n }\n }\n\n // normally triggered by the host when the document line count changes\n public applyDocumentChange(\n textDocument: TextDocument<'file', LAnnotation>,\n newLineAnnotations?: LineAnnotation<LAnnotation>[]\n ): void {\n const editSessionFile = this.editSession?.file;\n if (editSessionFile == null) {\n throw new Error(\n 'File.applyDocumentChange: requires an active edit session'\n );\n }\n this.fileRenderer.beginEditSession(editSessionFile);\n this.fileRenderer.applyDocumentChange(textDocument);\n if (newLineAnnotations != null) {\n this.syncEditSessionAnnotationsFromEditor(newLineAnnotations);\n }\n }\n\n public updateRenderCache(\n dirtyLines: Map<number, Array<HighlightedToken>>,\n themeType: 'dark' | 'light',\n options?: {\n lineCountChangeInFlight?: boolean;\n }\n ): void {\n const editSessionFile = this.editSession?.file;\n if (editSessionFile == null) {\n throw new Error(\n 'File.updateRenderCache: requires an active edit session'\n );\n }\n this.fileRenderer.beginEditSession(editSessionFile);\n this.fileRenderer.updateRenderCache(\n dirtyLines,\n themeType,\n options?.lineCountChangeInFlight\n );\n }\n\n public render({\n file,\n fileContainer,\n forceRender = false,\n preventEmit = false,\n containerWrapper,\n deferManagers = false,\n lineAnnotations,\n renderRange,\n }: FileRenderProps<LAnnotation>): boolean {\n if (!this.enabled) {\n throw new Error(\n 'File.render: attempting to call render after cleaned up'\n );\n }\n\n // postpone background tokenizing to next frame for avoiding UI freeze\n // during render\n this.editor?.__postponeBgTokenizeToNextFrame();\n\n const { collapsed = false, themeType = 'system' } = this.options;\n const nextRenderRange = collapsed ? undefined : renderRange;\n const previousRenderRange = this.renderRange;\n const themeChanged = this.hasThemeChanged();\n const annotationsChanged =\n lineAnnotations != null &&\n (lineAnnotations.length > 0 || this.getLatestAnnotations().length > 0)\n ? this.isNewAnnotations(lineAnnotations)\n : false;\n const didFileChange = !areFileTargetsEqual(this.file, file);\n if (didFileChange) {\n this.updateExternalFile(file, lineAnnotations);\n }\n const latestFile = this.getLatestFile(file) ?? file;\n if (\n !collapsed &&\n !forceRender &&\n areRenderRangesEqual(nextRenderRange, this.renderRange) &&\n !didFileChange &&\n !annotationsChanged &&\n !themeChanged\n ) {\n const rendered = this.applyCachedThemeState(themeType);\n if (rendered) {\n this.finalizeRender();\n }\n return rendered;\n }\n\n this.renderRange = nextRenderRange;\n if (didFileChange) {\n this.cachedHeaderHTML = undefined;\n }\n this.fileRenderer.setOptions(getFileRendererOptions(this.options));\n this.syncInteractionOptions();\n if (lineAnnotations != null) {\n this.setLineAnnotations(lineAnnotations);\n }\n this.fileRenderer.setLineAnnotations(this.getLatestAnnotations());\n\n const { disableErrorHandling = false, disableFileHeader = false } =\n this.options;\n if (disableFileHeader) {\n // Remove existing header from DOM\n if (this.headerElement != null) {\n this.headerElement.remove();\n this.headerElement = undefined;\n this.lastRenderedHeaderHTML = undefined;\n }\n this.clearHeaderSlots();\n }\n\n fileContainer = this.getOrCreateFileContainerNode(\n fileContainer,\n containerWrapper\n );\n this.applyCachedThemeState(themeType);\n\n if (collapsed) {\n this.removeRenderedCode();\n this.clearAuxiliaryNodes();\n\n try {\n const fileResult = this.fileRenderer.renderFile(\n latestFile,\n EMPTY_RENDER_RANGE\n );\n if (fileResult != null) {\n this.applyThemeState(\n fileContainer,\n fileResult.themeStyles,\n themeType,\n fileResult.baseThemeType\n );\n }\n if (fileResult?.headerAST != null) {\n this.applyHeaderToDOM(\n fileResult.headerAST,\n fileContainer,\n fileResult.file\n );\n }\n this.renderedFile = fileResult?.file ?? latestFile;\n this.injectUnsafeCSS();\n } catch (error: unknown) {\n if (disableErrorHandling) {\n throw error;\n }\n console.error(error);\n if (error instanceof Error) {\n this.applyErrorToDOM(error, fileContainer);\n }\n }\n this.finalizeRender();\n if (!preventEmit) {\n this.emitPostRender();\n }\n return true;\n }\n\n try {\n const pre = this.getOrCreatePreNode(fileContainer);\n if (\n !this.canPartiallyRender(\n forceRender,\n annotationsChanged,\n didFileChange ||\n themeChanged ||\n !areFileTargetsEqual(this.renderedFile, latestFile)\n ) ||\n !this.applyPartialRender(\n latestFile,\n previousRenderRange,\n nextRenderRange\n )\n ) {\n const fileResult = this.fileRenderer.renderFile(\n latestFile,\n nextRenderRange\n );\n if (fileResult == null) {\n if (\n this.workerManager?.isInitialized() === false &&\n this.workerManager.isWorkingPool()\n ) {\n void this.workerManager\n .initialize()\n .catch(() => {})\n .then(() => this.rerender());\n }\n return false;\n }\n this.applyThemeState(\n fileContainer,\n fileResult.themeStyles,\n themeType,\n fileResult.baseThemeType\n );\n if (fileResult.headerAST != null) {\n this.applyHeaderToDOM(\n fileResult.headerAST,\n fileContainer,\n fileResult.file\n );\n }\n this.applyFullRender(fileResult, pre);\n this.renderedFile = fileResult.file;\n }\n\n this.applyBuffers(pre, nextRenderRange);\n this.injectUnsafeCSS();\n this.renderAnnotations();\n this.renderGutterUtility();\n\n this.managersDirty = true;\n if (!deferManagers) {\n this.flushManagers();\n }\n\n this.finalizeRender();\n if (this.editor != null) {\n this.syncRenderViewToEditor();\n }\n } catch (error: unknown) {\n if (disableErrorHandling) {\n throw error;\n }\n console.error(error);\n if (error instanceof Error) {\n this.applyErrorToDOM(error, fileContainer);\n }\n }\n if (!preventEmit) {\n this.emitPostRender();\n }\n return true;\n }\n\n // Finish subclass layout bookkeeping before editor sync or post-render\n // callbacks can synchronously replace or dispose this component.\n protected finalizeRender(): void {}\n\n private emitPostRender(unmount = false) {\n const {\n fileContainer,\n options: { onPostRender },\n } = this;\n\n if (unmount) {\n if (!this.mounted) {\n return;\n }\n this.mounted = false;\n if (fileContainer == null) {\n return;\n }\n onPostRender?.(fileContainer, this, 'unmount');\n return;\n }\n\n if (fileContainer == null) {\n return;\n }\n\n const phase: PostRenderPhase = this.mounted ? 'update' : 'mount';\n this.mounted = true;\n onPostRender?.(fileContainer, this, phase);\n }\n\n private removeRenderedCode(): void {\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n\n this.bufferBefore?.remove();\n this.bufferBefore = undefined;\n this.bufferAfter?.remove();\n this.bufferAfter = undefined;\n\n this.code?.remove();\n this.code = undefined;\n\n this.pre?.remove();\n this.pre = undefined;\n\n this.appliedPreAttributes = undefined;\n this.lastRowCount = undefined;\n }\n\n private clearAuxiliaryNodes(): void {\n for (const { element } of this.annotationCache.values()) {\n element.remove();\n }\n this.annotationCache.clear();\n\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n }\n\n private canPartiallyRender(\n forceRender: boolean,\n annotationsChanged: boolean,\n didContentChange: boolean\n ): boolean {\n if (forceRender || annotationsChanged || didContentChange) {\n return false;\n }\n return true;\n }\n\n public renderPlaceholder(height: number): boolean {\n if (this.fileContainer == null) {\n return false;\n }\n this.emitPostRender(true);\n this.cleanChildNodes();\n\n if (this.placeHolder == null) {\n const shadowRoot =\n this.fileContainer.shadowRoot ??\n this.fileContainer.attachShadow({ mode: 'open' });\n this.placeHolder = document.createElement('div');\n this.placeHolder.dataset.placeholder = '';\n shadowRoot.appendChild(this.placeHolder);\n }\n this.placeHolder.style.setProperty('height', `${height}px`);\n return true;\n }\n\n public async primeHighlightCache(\n file: FileContents | undefined = this.file\n ): Promise<void> {\n const { workerManager } = this;\n if (\n file == null ||\n workerManager == null ||\n !workerManager.isWorkingPool() ||\n file.cacheKey == null ||\n isFilePlainText(file)\n ) {\n return;\n }\n const tokenizeMaxLength =\n this.options.tokenizeMaxLength ?? DEFAULT_TOKENIZE_MAX_LENGTH;\n const lines = this.fileRenderer.getOrCreateLineCache(file);\n if (lines.length > tokenizeMaxLength) {\n return;\n }\n\n await workerManager\n .primeFileHighlightCache(file)\n .catch((error: unknown) => {\n console.error(error);\n });\n }\n\n private cleanChildNodes() {\n this.resizeManager.cleanUp();\n this.interactionManager.cleanUp();\n this.clearAuxiliaryNodes();\n\n this.bufferAfter?.remove();\n this.bufferBefore?.remove();\n this.code?.remove();\n this.errorWrapper?.remove();\n this.headerElement?.remove();\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerCustom?.remove();\n this.pre?.remove();\n this.spriteSVG?.remove();\n this.themeCSSStyle?.remove();\n this.unsafeCSSStyle?.remove();\n\n this.bufferAfter = undefined;\n this.bufferBefore = undefined;\n this.code = undefined;\n this.errorWrapper = undefined;\n this.headerElement = undefined;\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n this.pre = undefined;\n this.spriteSVG = undefined;\n this.themeCSSStyle = undefined;\n this.appliedThemeCSS = undefined;\n this.hasAdoptedThemeCSS = false;\n this.unsafeCSSStyle = undefined;\n this.appliedUnsafeCSS = undefined;\n\n this.lastRenderedHeaderHTML = undefined;\n this.lastRowCount = undefined;\n\n this.mounted = false;\n }\n\n private renderAnnotations(): void {\n if (this.isContainerManaged || this.fileContainer == null) {\n for (const { element } of this.annotationCache.values()) {\n element.remove();\n }\n this.annotationCache.clear();\n return;\n }\n const staleAnnotations = new Map(this.annotationCache);\n const { renderAnnotation } = this.options;\n const lineAnnotations = this.getLatestAnnotations();\n if (renderAnnotation != null && lineAnnotations.length > 0) {\n for (const [index, annotation] of lineAnnotations.entries()) {\n const name = this.getAnnotationSlotName(annotation);\n const id = `${index}-${name}`;\n let cache = this.annotationCache.get(id);\n if (\n cache == null ||\n !areLineAnnotationsEqual(annotation, cache.annotation)\n ) {\n cache?.element.remove();\n const content = renderAnnotation(annotation);\n // If we can't render anything, then we should not render anything\n // and clear the annotation cache if necessary.\n if (content == null) {\n continue;\n }\n cache = {\n element: createAnnotationWrapperNode(name),\n annotation,\n };\n cache.element.appendChild(content);\n this.fileContainer.appendChild(cache.element);\n this.annotationCache.set(id, cache);\n }\n staleAnnotations.delete(id);\n }\n }\n for (const [id, { element }] of staleAnnotations.entries()) {\n this.annotationCache.delete(id);\n element.remove();\n }\n }\n\n private renderGutterUtility() {\n const { renderGutterUtility } = this.options;\n if (this.fileContainer == null || renderGutterUtility == null) {\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n return;\n }\n const element = renderGutterUtility(this.interactionManager.getHoveredLine);\n if (element != null && this.gutterUtilityContent != null) {\n return;\n } else if (element == null) {\n this.gutterUtilityContent?.remove();\n this.gutterUtilityContent = undefined;\n return;\n }\n const gutterUtilityContent = createGutterUtilityContentNode();\n gutterUtilityContent.appendChild(element);\n this.fileContainer.appendChild(gutterUtilityContent);\n this.gutterUtilityContent = gutterUtilityContent;\n }\n\n private injectUnsafeCSS(): void {\n const { unsafeCSS } = this.options;\n const shadowRoot = this.fileContainer?.shadowRoot;\n if (shadowRoot == null) {\n return;\n }\n\n if (unsafeCSS == null || unsafeCSS === '') {\n if (this.unsafeCSSStyle != null) {\n this.unsafeCSSStyle.remove();\n this.unsafeCSSStyle = undefined;\n }\n this.appliedUnsafeCSS = undefined;\n return;\n }\n\n if (\n this.unsafeCSSStyle?.parentNode === shadowRoot &&\n this.appliedUnsafeCSS === unsafeCSS\n ) {\n return;\n }\n\n // Create or update the style element\n this.unsafeCSSStyle ??= createUnsafeCSSStyleNode();\n if (this.unsafeCSSStyle.parentNode !== shadowRoot) {\n shadowRoot.appendChild(this.unsafeCSSStyle);\n }\n // Wrap in @layer unsafe to match SSR behavior\n this.unsafeCSSStyle.textContent = wrapUnsafeCSS(unsafeCSS);\n this.appliedUnsafeCSS = unsafeCSS;\n }\n\n private applyThemeState(\n container: HTMLElement,\n themeStyles: string,\n themeType: ThemeTypes,\n baseThemeType?: 'light' | 'dark'\n ): void {\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n const effectiveThemeType = baseThemeType ?? themeType;\n const currentTheme = this.getTheme();\n const theme =\n typeof currentTheme === 'string' ? currentTheme : { ...currentTheme };\n const scrollbarGutter = getMeasuredScrollbarGutter(shadowRoot);\n if (\n this.themeCSSStyle?.parentNode === shadowRoot &&\n this.appliedThemeCSS?.themeStyles === themeStyles &&\n this.appliedThemeCSS.themeType === effectiveThemeType &&\n this.appliedThemeCSS.scrollbarGutter === scrollbarGutter\n ) {\n this.appliedThemeCSS.theme = theme;\n return;\n }\n if (\n this.hasAdoptedThemeCSS &&\n this.themeCSSStyle?.parentNode === shadowRoot\n ) {\n this.hasAdoptedThemeCSS = false;\n this.appliedThemeCSS = {\n theme,\n themeStyles,\n themeType: effectiveThemeType,\n baseThemeType,\n scrollbarGutter,\n };\n return;\n }\n this.themeCSSStyle = upsertHostThemeStyle({\n shadowRoot,\n currentNode: this.themeCSSStyle,\n themeCSS: wrapThemeCSS(themeStyles, effectiveThemeType, scrollbarGutter),\n });\n this.appliedThemeCSS =\n this.themeCSSStyle != null\n ? {\n theme,\n themeStyles,\n themeType: effectiveThemeType,\n baseThemeType,\n scrollbarGutter,\n }\n : undefined;\n }\n\n private hydrateMeasuredScrollbar(): void {\n const shadowRoot = this.fileContainer?.shadowRoot;\n if (shadowRoot == null || this.themeCSSStyle == null) {\n return;\n }\n this.themeCSSStyle.textContent = patchScrollbarGutterSize(\n this.themeCSSStyle.textContent ?? '',\n getMeasuredScrollbarGutter(shadowRoot)\n );\n }\n\n // A boolean check to ensure that edit mode in WebKit doesn't cause potential\n // scroll jumps to due bugs with WebKit. The workarounds have performance\n // implications so we avoid running the workarounds on browsers or scenarios\n // where they are not applicable\n protected shouldGuardRebuildScroll(): boolean {\n return this.editor != null && isSafari();\n }\n\n private applyFullRender(result: FileRenderResult, pre: HTMLPreElement): void {\n this.cleanupErrorWrapper();\n this.applyPreNodeAttributes(pre, result);\n const code = (this.code = getOrCreateCodeNode({ code: this.code }));\n const codeAst = this.fileRenderer.renderCodeAST(result);\n this.editor?.__captureFocusForDOMReplacement();\n const applyColumns = () => {\n if (code.childElementCount >= 2) {\n for (let i = 0; i < 2; i++) {\n const domEl = code.children[i] as HTMLElement;\n const astEl = codeAst[i] as HASTElement;\n domEl.innerHTML = toHtml(astEl.children);\n domEl.style.cssText = astEl.properties.style as string;\n }\n } else {\n code.innerHTML = toHtml(codeAst);\n }\n if (!pre.contains(code)) {\n pre.replaceChildren(code);\n }\n };\n if (this.shouldGuardRebuildScroll()) {\n guardWebKitScrollDuringRebuild(pre, applyColumns);\n } else {\n applyColumns();\n }\n this.lastRowCount = result.rowCount;\n }\n\n private applyPartialRender(\n file: FileContents,\n previousRenderRange: RenderRange | undefined,\n renderRange: RenderRange | undefined\n ): boolean {\n if (previousRenderRange == null || renderRange == null) {\n return false;\n }\n const { code } = this;\n const columns = code != null ? this.getColumns(code) : undefined;\n if (code == null || columns == null) {\n return false;\n }\n\n const previousStart = previousRenderRange.startingLine;\n const nextStart = renderRange.startingLine;\n const previousEnd =\n previousRenderRange.totalLines === Infinity\n ? Number.POSITIVE_INFINITY\n : previousStart + previousRenderRange.totalLines;\n const nextEnd =\n renderRange.totalLines === Infinity\n ? Number.POSITIVE_INFINITY\n : nextStart + renderRange.totalLines;\n\n const overlapStart = Math.max(previousStart, nextStart);\n const overlapEnd = Math.min(previousEnd, nextEnd);\n if (overlapEnd <= overlapStart) {\n return false;\n }\n\n if (\n !this.trimDOMToOverlap(columns.gutter, overlapStart, overlapEnd) ||\n !this.trimDOMToOverlap(columns.content, overlapStart, overlapEnd)\n ) {\n throw new Error('File.applyPartialRender: failed to trim to overlap');\n }\n\n let { length: rowCount } = columns.content.children;\n\n const renderChunk = (\n startingLine: number,\n totalLines: number\n ): FileRenderResult | undefined => {\n if (totalLines <= 0) {\n return undefined;\n }\n return this.fileRenderer.renderFile(file, {\n startingLine,\n totalLines,\n bufferBefore: 0,\n bufferAfter: 0,\n });\n };\n\n const prependResult =\n nextStart < overlapStart\n ? renderChunk(nextStart, overlapStart - nextStart)\n : undefined;\n if (prependResult === undefined && nextStart < overlapStart) {\n return false;\n }\n\n const appendTotalLines =\n nextEnd === Number.POSITIVE_INFINITY\n ? Number.POSITIVE_INFINITY\n : Math.max(0, nextEnd - overlapEnd);\n const appendResult =\n nextEnd > overlapEnd\n ? renderChunk(overlapEnd, appendTotalLines)\n : undefined;\n if (appendResult === undefined && nextEnd > overlapEnd) {\n return false;\n }\n\n this.cleanupErrorWrapper();\n if (prependResult != null) {\n columns.gutter.insertAdjacentHTML(\n 'afterbegin',\n this.fileRenderer.renderPartialHTML(prependResult.gutterAST)\n );\n columns.content.insertAdjacentHTML(\n 'afterbegin',\n this.fileRenderer.renderPartialHTML(prependResult.contentAST)\n );\n rowCount += prependResult.rowCount;\n }\n\n if (appendResult != null) {\n columns.gutter.insertAdjacentHTML(\n 'beforeend',\n this.fileRenderer.renderPartialHTML(appendResult.gutterAST)\n );\n columns.content.insertAdjacentHTML(\n 'beforeend',\n this.fileRenderer.renderPartialHTML(appendResult.contentAST)\n );\n rowCount += appendResult.rowCount;\n }\n\n if (this.lastRowCount !== rowCount) {\n columns.gutter.style.setProperty('grid-row', `span ${rowCount}`);\n columns.content.style.setProperty('grid-row', `span ${rowCount}`);\n this.lastRowCount = rowCount;\n }\n\n return true;\n }\n\n private getColumns(code: HTMLElement): ColumnElements | undefined {\n const gutter = code.children[0];\n const content = code.children[1];\n if (\n !(gutter instanceof HTMLElement) ||\n !(content instanceof HTMLElement) ||\n gutter.dataset.gutter == null ||\n content.dataset.content == null\n ) {\n return undefined;\n }\n return { gutter, content };\n }\n\n private trimDOMToOverlap(\n container: HTMLElement,\n overlapStart: number,\n overlapEnd: number\n ): boolean {\n const boundaryIndices = this.getDOMBoundaryIndices(container, [\n overlapStart,\n overlapEnd,\n ]);\n const startIndex =\n boundaryIndices.get(overlapStart) ?? container.children.length;\n const endIndex =\n boundaryIndices.get(overlapEnd) ?? container.children.length;\n\n if (startIndex > endIndex) {\n return false;\n }\n\n for (let i = container.children.length - 1; i >= endIndex; i -= 1) {\n container.children[i]?.remove();\n }\n for (let i = startIndex - 1; i >= 0; i -= 1) {\n container.children[i]?.remove();\n }\n return true;\n }\n\n private getDOMBoundaryIndices(\n container: HTMLElement,\n boundaries: number[]\n ): Map<number, number> {\n const sortedBoundaries = [...new Set(boundaries)].sort((a, b) => a - b);\n const boundaryIndices = new Map<number, number>();\n if (sortedBoundaries.length === 0) {\n return boundaryIndices;\n }\n let boundaryIndex = 0;\n let nextBoundary = sortedBoundaries[boundaryIndex];\n const { children } = container;\n\n if (nextBoundary === 0) {\n boundaryIndices.set(0, 0);\n boundaryIndex += 1;\n nextBoundary = sortedBoundaries[boundaryIndex];\n }\n\n for (let i = 0; i < children.length; i += 1) {\n const child = children[i];\n if (!(child instanceof HTMLElement)) {\n continue;\n }\n const lineIndex = this.getLineIndexFromDOMNode(child);\n if (lineIndex == null) {\n continue;\n }\n while (nextBoundary != null && lineIndex >= nextBoundary) {\n boundaryIndices.set(nextBoundary, i);\n boundaryIndex += 1;\n nextBoundary = sortedBoundaries[boundaryIndex];\n }\n if (boundaryIndex >= sortedBoundaries.length) {\n break;\n }\n }\n\n for (const boundary of sortedBoundaries) {\n if (!boundaryIndices.has(boundary)) {\n boundaryIndices.set(boundary, children.length);\n }\n }\n return boundaryIndices;\n }\n\n private getLineIndexFromDOMNode(node: HTMLElement): number | undefined {\n const lineIndexAttr = node.dataset.lineIndex;\n if (lineIndexAttr == null) {\n return undefined;\n }\n const parsed = Number(lineIndexAttr);\n return Number.isNaN(parsed) ? undefined : parsed;\n }\n\n private applyBuffers(\n pre: HTMLPreElement,\n renderRange: RenderRange | undefined\n ) {\n if (renderRange == null || this.shouldDisableVirtualizationBuffers()) {\n if (this.bufferBefore != null) {\n this.bufferBefore.remove();\n this.bufferBefore = undefined;\n }\n if (this.bufferAfter != null) {\n this.bufferAfter.remove();\n this.bufferAfter = undefined;\n }\n return;\n }\n\n if (renderRange.bufferBefore > 0) {\n if (this.bufferBefore == null) {\n this.bufferBefore = document.createElement('div');\n this.bufferBefore.dataset.virtualizerBuffer = 'before';\n pre.before(this.bufferBefore);\n }\n this.bufferBefore.style.setProperty(\n 'height',\n `${renderRange.bufferBefore}px`\n );\n this.bufferBefore.style.setProperty('contain', 'strict');\n } else if (this.bufferBefore != null) {\n this.bufferBefore.remove();\n this.bufferBefore = undefined;\n }\n\n if (renderRange.bufferAfter > 0) {\n if (this.bufferAfter == null) {\n this.bufferAfter = document.createElement('div');\n this.bufferAfter.dataset.virtualizerBuffer = 'after';\n pre.after(this.bufferAfter);\n }\n this.bufferAfter.style.setProperty(\n 'height',\n `${renderRange.bufferAfter}px`\n );\n this.bufferAfter.style.setProperty('contain', 'strict');\n } else if (this.bufferAfter != null) {\n this.bufferAfter.remove();\n this.bufferAfter = undefined;\n }\n }\n\n protected shouldDisableVirtualizationBuffers(): boolean {\n return this.options.disableVirtualizationBuffers ?? false;\n }\n\n private applyHeaderToDOM(\n headerAST: HASTElement,\n container: HTMLElement,\n file: FileContents\n ): void {\n this.cleanupErrorWrapper();\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n const headerHTML = this.cachedHeaderHTML ?? toHtml(headerAST);\n this.cachedHeaderHTML = headerHTML;\n if (headerHTML !== this.lastRenderedHeaderHTML) {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = headerHTML;\n const newHeader = tempDiv.firstElementChild;\n if (!(newHeader instanceof HTMLElement)) {\n return;\n }\n if (this.headerElement != null) {\n container.shadowRoot?.replaceChild(newHeader, this.headerElement);\n } else {\n container.shadowRoot?.prepend(newHeader);\n }\n this.headerElement = newHeader;\n this.lastRenderedHeaderHTML = headerHTML;\n }\n\n if (this.isContainerManaged) return;\n\n const {\n renderHeaderPrefix,\n renderHeaderFilenameSuffix,\n renderCustomHeader,\n renderHeaderMetadata,\n } = this.options;\n\n if (renderCustomHeader != null) {\n const content = renderCustomHeader(file) ?? undefined;\n this.headerCustom = this.upsertHeaderSlotElement(\n container,\n this.headerCustom,\n CUSTOM_HEADER_SLOT_ID,\n content\n );\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n } else {\n const prefix = renderHeaderPrefix?.(file) ?? undefined;\n const suffix = renderHeaderFilenameSuffix?.(file) ?? undefined;\n const content = renderHeaderMetadata?.(file) ?? undefined;\n this.headerPrefix = this.upsertHeaderSlotElement(\n container,\n this.headerPrefix,\n HEADER_PREFIX_SLOT_ID,\n prefix\n );\n this.headerFilenameSuffix = this.upsertHeaderSlotElement(\n container,\n this.headerFilenameSuffix,\n HEADER_FILENAME_SUFFIX_SLOT_ID,\n suffix\n );\n this.headerMetadata = this.upsertHeaderSlotElement(\n container,\n this.headerMetadata,\n HEADER_METADATA_SLOT_ID,\n content\n );\n this.headerCustom?.remove();\n this.headerCustom = undefined;\n }\n }\n\n private clearHeaderSlots(): void {\n this.headerPrefix?.remove();\n this.headerFilenameSuffix?.remove();\n this.headerMetadata?.remove();\n this.headerCustom?.remove();\n this.headerPrefix = undefined;\n this.headerFilenameSuffix = undefined;\n this.headerMetadata = undefined;\n this.headerCustom = undefined;\n }\n\n // Header slot callbacks are presence-based render hooks, not reactive views.\n private upsertHeaderSlotElement(\n container: HTMLElement,\n current: HTMLElement | undefined,\n slot: string,\n content: Element | string | number | undefined\n ): HTMLElement | undefined {\n if (content == null) {\n current?.remove();\n return undefined;\n }\n const element = current ?? this.createHeaderSlotElement(slot);\n if (current == null) {\n container.appendChild(element);\n }\n this.replaceHeaderSlotContent(element, content);\n return element;\n }\n\n private replaceHeaderSlotContent(\n element: HTMLElement,\n content: Element | string | number\n ): void {\n element.replaceChildren();\n if (content instanceof Element) {\n element.appendChild(content);\n } else {\n element.innerText = `${content}`;\n }\n }\n\n private createHeaderSlotElement(slot: string): HTMLElement {\n const element = document.createElement('div');\n element.slot = slot;\n return element;\n }\n\n protected getOrCreateFileContainerNode(\n fileContainer?: HTMLElement,\n parentNode?: HTMLElement\n ): HTMLElement {\n const { fileContainer: previousContainer } = this;\n const nextContainer =\n fileContainer ??\n previousContainer ??\n document.createElement(DIFFS_TAG_NAME);\n const containerChanged = previousContainer !== nextContainer;\n if (previousContainer != null && containerChanged) {\n this.editor?.__captureFocusForDOMReplacement();\n }\n if (containerChanged) {\n this.emitPostRender(true);\n }\n this.fileContainer = nextContainer;\n if (previousContainer != null && containerChanged) {\n this.lastRenderedHeaderHTML = undefined;\n this.headerElement = undefined;\n }\n if (parentNode != null && this.fileContainer.parentNode !== parentNode) {\n parentNode.appendChild(this.fileContainer);\n }\n if (containerChanged) {\n this.adoptReusableShellElements(this.fileContainer);\n }\n this.ensureSpriteSVG(this.fileContainer);\n return this.fileContainer;\n }\n\n // NOTE(amadeus): Technically this method is not safe for use outside of\n // the CodeView component, however I don't think in practice it really\n // should matter, but maybe there's some system we need in place to prevent\n // this from running outside of that environment?\n //\n // It's making very specific assumptions that all the elements will have the\n // correct content based on CodeView global options\n private adoptReusableShellElements(fileContainer: HTMLElement): void {\n const { shadowRoot } = fileContainer;\n if (shadowRoot == null) {\n return;\n }\n\n for (const element of shadowRoot.children) {\n if (element instanceof SVGElement) {\n this.spriteSVG ??= element;\n } else if (\n isStyleNode(element) &&\n element.hasAttribute(THEME_CSS_ATTRIBUTE)\n ) {\n this.themeCSSStyle ??= element;\n this.hasAdoptedThemeCSS = true;\n } else if (\n isStyleNode(element) &&\n element.hasAttribute(UNSAFE_CSS_ATTRIBUTE)\n ) {\n this.unsafeCSSStyle ??= element;\n this.appliedUnsafeCSS ??= this.options.unsafeCSS ?? undefined;\n }\n }\n }\n\n private ensureSpriteSVG(fileContainer: HTMLElement): void {\n const shadowRoot =\n fileContainer.shadowRoot ?? fileContainer.attachShadow({ mode: 'open' });\n if (this.spriteSVG == null) {\n const fragment = document.createElement('div');\n fragment.innerHTML = SVGSpriteSheet;\n const firstChild = fragment.firstChild;\n if (firstChild instanceof SVGElement) {\n this.spriteSVG = firstChild;\n }\n }\n if (this.spriteSVG != null && this.spriteSVG.parentNode !== shadowRoot) {\n shadowRoot.appendChild(this.spriteSVG);\n }\n }\n\n private getOrCreatePreNode(container: HTMLElement): HTMLPreElement {\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n // If we haven't created a pre element yet, lets go ahead and do that\n if (this.pre == null) {\n this.pre = document.createElement('pre');\n this.appliedPreAttributes = undefined;\n this.code = undefined;\n shadowRoot.appendChild(this.pre);\n }\n // If we have a new parent container for the pre element, lets go ahead and\n // move it into the new container\n else if (this.pre.parentNode !== shadowRoot) {\n this.editor?.__captureFocusForDOMReplacement();\n container.shadowRoot?.appendChild(this.pre);\n this.appliedPreAttributes = undefined;\n }\n\n this.placeHolder?.remove();\n this.placeHolder = undefined;\n\n return this.pre;\n }\n\n private syncCodeNodeFromPre(pre: HTMLPreElement): void {\n this.code = undefined;\n for (const child of Array.from(pre.children)) {\n if (!(child instanceof HTMLElement)) {\n continue;\n }\n if (child.hasAttribute('data-code')) {\n this.code = child;\n return;\n }\n }\n }\n\n private applyPreNodeAttributes(\n pre: HTMLPreElement,\n { totalLines }: FileRenderResult\n ): void {\n const { overflow = 'scroll', disableLineNumbers = false } = this.options;\n const preProperties: PrePropertiesConfig = {\n type: 'file',\n split: false,\n overflow,\n disableLineNumbers,\n diffIndicators: 'none',\n disableBackground: true,\n totalLines,\n };\n if (arePrePropertiesEqual(preProperties, this.appliedPreAttributes)) {\n return;\n }\n setPreNodeProperties(pre, preProperties);\n this.appliedPreAttributes = preProperties;\n }\n\n private applyErrorToDOM(error: Error, container: HTMLElement) {\n this.cleanupErrorWrapper();\n this.pre?.remove();\n this.pre = undefined;\n this.appliedPreAttributes = undefined;\n const shadowRoot =\n container.shadowRoot ?? container.attachShadow({ mode: 'open' });\n this.errorWrapper ??= document.createElement('div');\n this.errorWrapper.dataset.errorWrapper = '';\n this.errorWrapper.textContent = '';\n shadowRoot.appendChild(this.errorWrapper);\n const errorMessage = document.createElement('div');\n errorMessage.dataset.errorMessage = '';\n errorMessage.innerText = error.message;\n this.errorWrapper.appendChild(errorMessage);\n const errorStack = document.createElement('pre');\n errorStack.dataset.errorStack = '';\n errorStack.innerText = error.stack ?? 'No Error Stack';\n this.errorWrapper.appendChild(errorStack);\n }\n\n private cleanupErrorWrapper() {\n this.errorWrapper?.remove();\n this.errorWrapper = undefined;\n }\n}\n\nfunction shouldRenderCode(\n pre: HTMLPreElement | undefined,\n file: FileContents | undefined,\n collapsed = false\n): boolean {\n return !collapsed && pre == null && file != null;\n}\n\nfunction shouldRenderHeader(\n headerElement: HTMLElement | undefined,\n file: FileContents | undefined,\n disableFileHeader: boolean = false\n): boolean {\n return headerElement == null && file != null && !disableFileHeader;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,MAAM,gBAA0B,CAAC,EAAE;AA0GnC,SAAS,sBAAsB,MAAkC;CAC/D,MAAM,kBAAkB,EAAE,GAAG,KAAK;CAClC,OAAO,gBAAgB;CACvB,OAAO;AACT;AAEA,IAAI,aAAa;AAEjB,IAAa,OAAb,MAA8D;CAkDnD;CAGC;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