@pierre/diffs 1.2.8 → 1.3.0-beta.2

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.
Files changed (163) hide show
  1. package/dist/components/CodeView.d.ts +0 -4
  2. package/dist/components/CodeView.d.ts.map +1 -1
  3. package/dist/components/CodeView.js +0 -38
  4. package/dist/components/CodeView.js.map +1 -1
  5. package/dist/components/File.d.ts +7 -2
  6. package/dist/components/File.d.ts.map +1 -1
  7. package/dist/components/File.js +36 -2
  8. package/dist/components/File.js.map +1 -1
  9. package/dist/components/FileDiff.d.ts +8 -2
  10. package/dist/components/FileDiff.d.ts.map +1 -1
  11. package/dist/components/FileDiff.js +73 -1
  12. package/dist/components/FileDiff.js.map +1 -1
  13. package/dist/components/UnresolvedFile.js +2 -2
  14. package/dist/components/VirtualizedFile.d.ts +2 -1
  15. package/dist/components/VirtualizedFile.d.ts.map +1 -1
  16. package/dist/components/VirtualizedFile.js +48 -48
  17. package/dist/components/VirtualizedFile.js.map +1 -1
  18. package/dist/components/VirtualizedFileDiff.js +42 -22
  19. package/dist/components/VirtualizedFileDiff.js.map +1 -1
  20. package/dist/components/Virtualizer.d.ts +1 -1
  21. package/dist/components/Virtualizer.d.ts.map +1 -1
  22. package/dist/components/Virtualizer.js +3 -5
  23. package/dist/components/Virtualizer.js.map +1 -1
  24. package/dist/constants.d.ts.map +1 -1
  25. package/dist/editor/command.d.ts +6 -0
  26. package/dist/editor/command.d.ts.map +1 -0
  27. package/dist/editor/command.js +31 -0
  28. package/dist/editor/command.js.map +1 -0
  29. package/dist/editor/css.d.ts +6 -0
  30. package/dist/editor/css.d.ts.map +1 -0
  31. package/dist/editor/css.js +218 -0
  32. package/dist/editor/css.js.map +1 -0
  33. package/dist/editor/editStack.d.ts +66 -0
  34. package/dist/editor/editStack.d.ts.map +1 -0
  35. package/dist/editor/editStack.js +218 -0
  36. package/dist/editor/editStack.js.map +1 -0
  37. package/dist/editor/editor.d.ts +22 -0
  38. package/dist/editor/editor.d.ts.map +1 -0
  39. package/dist/editor/editor.js +1323 -0
  40. package/dist/editor/editor.js.map +1 -0
  41. package/dist/editor/index.d.ts +3 -0
  42. package/dist/editor/index.js +4 -0
  43. package/dist/editor/lineAnnotations.d.ts +8 -0
  44. package/dist/editor/lineAnnotations.d.ts.map +1 -0
  45. package/dist/editor/lineAnnotations.js +32 -0
  46. package/dist/editor/lineAnnotations.js.map +1 -0
  47. package/dist/editor/pieceTable.d.ts +33 -0
  48. package/dist/editor/pieceTable.d.ts.map +1 -0
  49. package/dist/editor/pieceTable.js +590 -0
  50. package/dist/editor/pieceTable.js.map +1 -0
  51. package/dist/editor/platform.d.ts +12 -0
  52. package/dist/editor/platform.d.ts.map +1 -0
  53. package/dist/editor/platform.js +44 -0
  54. package/dist/editor/platform.js.map +1 -0
  55. package/dist/editor/quickEdit.d.ts +29 -0
  56. package/dist/editor/quickEdit.d.ts.map +1 -0
  57. package/dist/editor/quickEdit.js +81 -0
  58. package/dist/editor/quickEdit.js.map +1 -0
  59. package/dist/editor/searchPanel.d.ts +30 -0
  60. package/dist/editor/searchPanel.d.ts.map +1 -0
  61. package/dist/editor/searchPanel.js +219 -0
  62. package/dist/editor/searchPanel.js.map +1 -0
  63. package/dist/editor/selection.d.ts +126 -0
  64. package/dist/editor/selection.d.ts.map +1 -0
  65. package/dist/editor/selection.js +900 -0
  66. package/dist/editor/selection.js.map +1 -0
  67. package/dist/editor/textDocument.d.ts +139 -0
  68. package/dist/editor/textDocument.d.ts.map +1 -0
  69. package/dist/editor/textDocument.js +202 -0
  70. package/dist/editor/textDocument.js.map +1 -0
  71. package/dist/editor/textMeasure.d.ts +32 -0
  72. package/dist/editor/textMeasure.d.ts.map +1 -0
  73. package/dist/editor/textMeasure.js +108 -0
  74. package/dist/editor/textMeasure.js.map +1 -0
  75. package/dist/editor/tokenzier.d.ts +37 -0
  76. package/dist/editor/tokenzier.d.ts.map +1 -0
  77. package/dist/editor/tokenzier.js +348 -0
  78. package/dist/editor/tokenzier.js.map +1 -0
  79. package/dist/editor/utils.d.ts +16 -0
  80. package/dist/editor/utils.d.ts.map +1 -0
  81. package/dist/editor/utils.js +37 -0
  82. package/dist/editor/utils.js.map +1 -0
  83. package/dist/index.d.ts +2 -2
  84. package/dist/index.js +2 -2
  85. package/dist/react/EditorContext.d.ts +16 -0
  86. package/dist/react/EditorContext.d.ts.map +1 -0
  87. package/dist/react/EditorContext.js +26 -0
  88. package/dist/react/EditorContext.js.map +1 -0
  89. package/dist/react/File.d.ts +2 -1
  90. package/dist/react/File.d.ts.map +1 -1
  91. package/dist/react/File.js +3 -2
  92. package/dist/react/File.js.map +1 -1
  93. package/dist/react/FileDiff.d.ts +3 -1
  94. package/dist/react/FileDiff.d.ts.map +1 -1
  95. package/dist/react/FileDiff.js +3 -2
  96. package/dist/react/FileDiff.js.map +1 -1
  97. package/dist/react/MultiFileDiff.d.ts +3 -1
  98. package/dist/react/MultiFileDiff.d.ts.map +1 -1
  99. package/dist/react/MultiFileDiff.js +3 -2
  100. package/dist/react/MultiFileDiff.js.map +1 -1
  101. package/dist/react/PatchDiff.d.ts +3 -1
  102. package/dist/react/PatchDiff.d.ts.map +1 -1
  103. package/dist/react/PatchDiff.js +3 -2
  104. package/dist/react/PatchDiff.js.map +1 -1
  105. package/dist/react/index.d.ts +3 -2
  106. package/dist/react/index.js +2 -1
  107. package/dist/react/jsx.d.ts.map +1 -1
  108. package/dist/react/types.d.ts +1 -0
  109. package/dist/react/types.d.ts.map +1 -1
  110. package/dist/react/utils/useFileDiffInstance.d.ts +3 -1
  111. package/dist/react/utils/useFileDiffInstance.d.ts.map +1 -1
  112. package/dist/react/utils/useFileDiffInstance.js +31 -5
  113. package/dist/react/utils/useFileDiffInstance.js.map +1 -1
  114. package/dist/react/utils/useFileInstance.d.ts +4 -1
  115. package/dist/react/utils/useFileInstance.d.ts.map +1 -1
  116. package/dist/react/utils/useFileInstance.js +30 -5
  117. package/dist/react/utils/useFileInstance.js.map +1 -1
  118. package/dist/renderers/DiffHunksRenderer.d.ts +2 -2
  119. package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  120. package/dist/renderers/DiffHunksRenderer.js +9 -5
  121. package/dist/renderers/DiffHunksRenderer.js.map +1 -1
  122. package/dist/renderers/FileRenderer.d.ts +5 -1
  123. package/dist/renderers/FileRenderer.d.ts.map +1 -1
  124. package/dist/renderers/FileRenderer.js +108 -41
  125. package/dist/renderers/FileRenderer.js.map +1 -1
  126. package/dist/ssr/index.d.ts +2 -2
  127. package/dist/style.js +1 -1
  128. package/dist/style.js.map +1 -1
  129. package/dist/types.d.ts +45 -1
  130. package/dist/types.d.ts.map +1 -1
  131. package/dist/utils/cleanLastNewline.js +6 -1
  132. package/dist/utils/cleanLastNewline.js.map +1 -1
  133. package/dist/utils/computeEstimatedDiffHeights.js +20 -9
  134. package/dist/utils/computeEstimatedDiffHeights.js.map +1 -1
  135. package/dist/utils/computeFileOffsets.d.ts +13 -0
  136. package/dist/utils/computeFileOffsets.d.ts.map +1 -0
  137. package/dist/utils/computeFileOffsets.js +33 -0
  138. package/dist/utils/computeFileOffsets.js.map +1 -0
  139. package/dist/utils/createTransformerWithState.js +9 -0
  140. package/dist/utils/createTransformerWithState.js.map +1 -1
  141. package/dist/utils/iterateOverDiff.js +182 -147
  142. package/dist/utils/iterateOverDiff.js.map +1 -1
  143. package/dist/utils/renderDiffWithHighlighter.js +1 -1
  144. package/dist/utils/renderFileWithHighlighter.js +5 -14
  145. package/dist/utils/renderFileWithHighlighter.js.map +1 -1
  146. package/dist/utils/virtualDiffLayout.d.ts +2 -23
  147. package/dist/utils/virtualDiffLayout.d.ts.map +1 -1
  148. package/dist/utils/virtualDiffLayout.js +1 -41
  149. package/dist/utils/virtualDiffLayout.js.map +1 -1
  150. package/dist/worker/WorkerPoolManager.js +2 -2
  151. package/dist/worker/WorkerPoolManager.js.map +1 -1
  152. package/dist/worker/{wasm-BaDzIkIn.js → wasm-D4DU5jgR.js} +2 -2
  153. package/dist/worker/wasm-D4DU5jgR.js.map +1 -0
  154. package/dist/worker/worker-portable.js +349 -363
  155. package/dist/worker/worker-portable.js.map +1 -1
  156. package/dist/worker/worker.js +222 -243
  157. package/dist/worker/worker.js.map +1 -1
  158. package/package.json +10 -3
  159. package/dist/utils/iterateOverFile.d.ts +0 -50
  160. package/dist/utils/iterateOverFile.d.ts.map +0 -1
  161. package/dist/utils/iterateOverFile.js +0 -49
  162. package/dist/utils/iterateOverFile.js.map +0 -1
  163. package/dist/worker/wasm-BaDzIkIn.js.map +0 -1
@@ -129,7 +129,6 @@ declare class CodeView<LAnnotation = undefined> {
129
129
  private readonly diffOptionsPrototype;
130
130
  private pendingScrollTarget;
131
131
  private pendingLayoutAnchor;
132
- private shouldFixContainerFocus;
133
132
  private scrollAnimation;
134
133
  private root;
135
134
  private resizeObserver;
@@ -150,7 +149,6 @@ declare class CodeView<LAnnotation = undefined> {
150
149
  private shouldDisablePointerEvents;
151
150
  private shouldValidateItemHeights;
152
151
  private validateRenderedItemHeight;
153
- private validateStickyContainerHeight;
154
152
  private clearScrollInteractionTimer;
155
153
  private suspendScrollInteractions;
156
154
  private restoreScrollInteractions;
@@ -163,8 +161,6 @@ declare class CodeView<LAnnotation = undefined> {
163
161
  private getElementPoolLimit;
164
162
  private acquireElement;
165
163
  private releaseRenderedItem;
166
- private renderedItemOwnsFocus;
167
- private fixContainerFocus;
168
164
  private cleanElement;
169
165
  private queueElementForPool;
170
166
  private promotePendingPooledElements;
@@ -1 +1 @@
1
- {"version":3,"file":"CodeView.d.ts","names":["SelectionWriteOptions","CodeViewDiffItem","CodeViewFileItem","CodeViewItem","CodeViewLayout","CodeViewScrollTarget","HunkSeparators","SelectedLineRange","SmoothScrollSettings","VirtualFileMetrics","VirtualWindowSpecs","WorkerPoolManager","FileOptions","FileDiffOptions","VirtualizedFile","VirtualizedFileDiff","VirtualizerConfig","AdvancedVirtualizedBaseItem","HTMLElement","CodeViewDiffItemContext","LAnnotation","CodeViewFileItemContext","CodeViewRenderedDiffItem","CodeViewRenderedFileItem","CodeViewRenderedItem","CodeViewLineSelection","CodeViewCoordinator","CodeViewScrollListener","CodeView","OverloadCallbackArgs","TCallback","TArgs","CallbackReturn","TReturn","OverloadFileCallbackArgs","TKey","NonNullable","OverloadDiffCallbackArgs","CodeViewOptionCallback","CODE_VIEW_DIFF_OPTION_KEYS","CodeViewDiffOptionKeys","CodeViewPassThroughOptions","Pick","CODE_VIEW_SHARED_CALLBACK_KEYS","CODE_VIEW_SELECTION_CALLBACK_KEYS","CodeViewSharedCallbackKeys","CodeViewSelectionCallbackKeys","CodeViewSharedCallbackOptions","CodeViewSelectionCallbackOptions","CodeViewOptions","Exclude","Partial"],"sources":["../../src/components/CodeView.d.ts"],"sourcesContent":["import type { SelectionWriteOptions } from '../managers/InteractionManager';\nimport type { CodeViewDiffItem, CodeViewFileItem, CodeViewItem, CodeViewLayout, CodeViewScrollTarget, HunkSeparators, SelectedLineRange, SmoothScrollSettings, VirtualFileMetrics, VirtualWindowSpecs } from '../types';\nimport type { WorkerPoolManager } from '../worker';\nimport type { FileOptions } from './File';\nimport type { FileDiffOptions } from './FileDiff';\nimport { VirtualizedFile } from './VirtualizedFile';\nimport { VirtualizedFileDiff } from './VirtualizedFileDiff';\nimport type { VirtualizerConfig } from './Virtualizer';\ninterface AdvancedVirtualizedBaseItem {\n /** Current index of this record in the ordered items array. */\n index: number;\n /** Absolute top offset of this item inside the scroll content. */\n top: number;\n /** Total measured height reserved for this item. */\n height: number;\n /** Root <diffs-container> node currently mounted for this item, only exists\n * when rendered. */\n element: HTMLElement | undefined;\n /** Last controlled version observed for this record. */\n version: number | undefined;\n /** Last CodeView option revision this item rendered with. */\n renderedOptionsRevision: number;\n}\ninterface CodeViewDiffItemContext<LAnnotation> extends AdvancedVirtualizedBaseItem {\n type: 'diff';\n /** Latest item snapshot for this record. Controlled updates can replace it. */\n item: CodeViewDiffItem<LAnnotation>;\n /** Virtualized diff instance responsible for rendering this item. */\n instance: VirtualizedFileDiff<LAnnotation>;\n}\ninterface CodeViewFileItemContext<LAnnotation> extends AdvancedVirtualizedBaseItem {\n type: 'file';\n /** Latest item snapshot for this record. Controlled updates can replace it. */\n item: CodeViewFileItem<LAnnotation>;\n /** Virtualized file instance responsible for rendering this item. */\n instance: VirtualizedFile<LAnnotation>;\n}\nexport interface CodeViewRenderedDiffItem<LAnnotation> {\n id: string;\n type: 'diff';\n item: CodeViewDiffItem<LAnnotation>;\n version: number | undefined;\n element: HTMLElement;\n instance: VirtualizedFileDiff<LAnnotation>;\n}\nexport interface CodeViewRenderedFileItem<LAnnotation> {\n id: string;\n type: 'file';\n item: CodeViewFileItem<LAnnotation>;\n version: number | undefined;\n element: HTMLElement;\n instance: VirtualizedFile<LAnnotation>;\n}\nexport type CodeViewRenderedItem<LAnnotation> = CodeViewRenderedDiffItem<LAnnotation> | CodeViewRenderedFileItem<LAnnotation>;\nexport interface CodeViewLineSelection {\n id: string;\n range: SelectedLineRange;\n}\nexport interface CodeViewCoordinator<LAnnotation> {\n hasHeaderRenderers: boolean;\n hasAnnotationRenderer: boolean;\n hasGutterRenderer: boolean;\n onSnapshotChange(snapshot: CodeViewRenderedItem<LAnnotation>[] | undefined): void;\n}\nexport type CodeViewScrollListener<LAnnotation> = (scrollTop: number, viewer: CodeView<LAnnotation>) => void;\ntype OverloadCallbackArgs<TCallback> = TCallback extends (...args: infer TArgs) => unknown ? TArgs : never;\ntype CallbackReturn<TCallback> = TCallback extends (...args: never[]) => infer TReturn ? TReturn : never;\ntype OverloadFileCallbackArgs<LAnnotation, TKey extends keyof FileOptions<LAnnotation>> = OverloadCallbackArgs<NonNullable<FileOptions<LAnnotation>[TKey]>>;\ntype OverloadDiffCallbackArgs<LAnnotation, TKey extends keyof FileDiffOptions<LAnnotation>> = OverloadCallbackArgs<NonNullable<FileDiffOptions<LAnnotation>[TKey]>>;\ntype CodeViewOptionCallback<LAnnotation, TKey extends keyof FileOptions<LAnnotation> & keyof FileDiffOptions<LAnnotation>> = {\n (...args: [\n ...OverloadFileCallbackArgs<LAnnotation, TKey>,\n context: CodeViewFileItemContext<LAnnotation>\n ]): CallbackReturn<NonNullable<FileOptions<LAnnotation>[TKey]>>;\n (...args: [\n ...OverloadDiffCallbackArgs<LAnnotation, TKey>,\n context: CodeViewDiffItemContext<LAnnotation>\n ]): CallbackReturn<NonNullable<FileDiffOptions<LAnnotation>[TKey]>>;\n};\ndeclare const CODE_VIEW_DIFF_OPTION_KEYS: readonly [\"theme\", \"disableLineNumbers\", \"overflow\", \"themeType\", \"disableFileHeader\", \"disableVirtualizationBuffers\", \"preferredHighlighter\", \"useCSSClasses\", \"useTokenTransformer\", \"tokenizeMaxLineLength\", \"tokenizeMaxLength\", \"unsafeCSS\", \"diffStyle\", \"diffIndicators\", \"disableBackground\", \"expandUnchanged\", \"collapsedContextThreshold\", \"lineDiffType\", \"maxLineDiffLength\", \"expansionLineCount\", \"lineHoverHighlight\", \"enableTokenInteractionsOnWhitespace\", \"enableGutterUtility\", \"__debugPointerEvents\", \"enableLineSelection\", \"controlledSelection\", \"disableErrorHandling\"];\ntype CodeViewDiffOptionKeys = (typeof CODE_VIEW_DIFF_OPTION_KEYS)[number];\ntype CodeViewPassThroughOptions<LAnnotation> = Pick<FileDiffOptions<LAnnotation>, CodeViewDiffOptionKeys>;\ndeclare const CODE_VIEW_SHARED_CALLBACK_KEYS: readonly [\"renderCustomHeader\", \"renderHeaderPrefix\", \"renderHeaderMetadata\", \"renderAnnotation\", \"renderGutterUtility\", \"onPostRender\", \"onGutterUtilityClick\", \"onLineClick\", \"onLineNumberClick\", \"onLineEnter\", \"onLineLeave\", \"onTokenClick\", \"onTokenEnter\", \"onTokenLeave\"];\ndeclare const CODE_VIEW_SELECTION_CALLBACK_KEYS: readonly [\"onLineSelected\", \"onLineSelectionStart\", \"onLineSelectionChange\", \"onLineSelectionEnd\"];\ntype CodeViewSharedCallbackKeys = (typeof CODE_VIEW_SHARED_CALLBACK_KEYS)[number];\ntype CodeViewSelectionCallbackKeys = (typeof CODE_VIEW_SELECTION_CALLBACK_KEYS)[number];\ntype CodeViewSharedCallbackOptions<LAnnotation> = {\n [TKey in CodeViewSharedCallbackKeys]?: CodeViewOptionCallback<LAnnotation, TKey>;\n};\ntype CodeViewSelectionCallbackOptions<LAnnotation> = {\n [TKey in CodeViewSelectionCallbackKeys]?: CodeViewOptionCallback<LAnnotation, TKey>;\n};\nexport interface CodeViewOptions<LAnnotation> extends CodeViewPassThroughOptions<LAnnotation>, CodeViewSharedCallbackOptions<LAnnotation>, CodeViewSelectionCallbackOptions<LAnnotation> {\n hunkSeparators?: Exclude<HunkSeparators, 'custom'>;\n itemMetrics?: Partial<VirtualFileMetrics>;\n pointerEventsOnScroll?: boolean;\n smoothScrollSettings?: SmoothScrollSettings;\n stickyHeaders?: boolean;\n controlledSelection?: boolean;\n onSelectedLinesChange?(selection: CodeViewLineSelection | null): void;\n layout?: CodeViewLayout;\n /** Internal dev-only check to ensure your `itemMetrics` are correct. Its\n * automatically disabled in a production build because it will hurt\n * performance fairly significantly */\n __devOnlyValidateItemHeights?: boolean;\n}\nexport declare class CodeView<LAnnotation = undefined> {\n static __STOP: boolean;\n static __lastScrollPosition: number;\n type: \"advanced\";\n readonly config: VirtualizerConfig;\n private items;\n private idToItem;\n private selectedLines;\n private instanceToItem;\n private layoutDirtyIndex;\n private pendingLayoutReset;\n private renderOptionsRevision;\n private slotCoordinator;\n private slotSnapshot;\n private scrollListeners;\n private scrollHeight;\n private containerHeight;\n private scrollTop;\n private scrollPageOffset;\n private scrollDirty;\n private scrollInteractionFixTimer;\n private pointerEventsDisabled;\n private codeOverflowFix;\n private height;\n private heightDirty;\n private windowSpecs;\n private renderState;\n private itemMetricsCache;\n private readonly fileOptionsPrototype;\n private readonly diffOptionsPrototype;\n private pendingScrollTarget;\n private pendingLayoutAnchor;\n private shouldFixContainerFocus;\n private scrollAnimation;\n private root;\n private resizeObserver;\n private container;\n private stickyContainer;\n private stickyOffset;\n private elementPool;\n private elementPoolVersion;\n private elementPoolTracker;\n private pendingElementPool;\n private options;\n private workerManager;\n private isContainerManaged;\n constructor(options?: CodeViewOptions<LAnnotation>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);\n private getLayout;\n private computeMetricsCache;\n private getSmoothScrollSettings;\n private shouldDisablePointerEvents;\n private shouldValidateItemHeights;\n private validateRenderedItemHeight;\n private validateStickyContainerHeight;\n private clearScrollInteractionTimer;\n private suspendScrollInteractions;\n private restoreScrollInteractions;\n private syncLayout;\n setup(root: HTMLElement): void;\n reset(): void;\n cleanUp(): void;\n private cleanAllRenderedItems;\n private primeScrollTarget;\n private getElementPoolLimit;\n private acquireElement;\n private releaseRenderedItem;\n private renderedItemOwnsFocus;\n private fixContainerFocus;\n private cleanElement;\n private queueElementForPool;\n private promotePendingPooledElements;\n private isElementClean;\n private getElementPoolSize;\n private clearElementPool;\n private invalidateElementPool;\n private markElementPoolGenerationCurrent;\n private isElementPoolGenerationCurrent;\n private resolveEffectiveScrollBehavior;\n scrollTo(target: CodeViewScrollTarget): void;\n setSelectedLines(selection: CodeViewLineSelection | null, options?: SelectionWriteOptions): void;\n getSelectedLines(): CodeViewLineSelection | null;\n clearSelectedLines(options?: SelectionWriteOptions): void;\n getItem(itemId: string): CodeViewItem<LAnnotation> | undefined;\n updateItem(input: CodeViewItem<LAnnotation>): boolean;\n updateItemId(oldId: string, newId: string): boolean;\n addItem(input: CodeViewItem<LAnnotation>): void;\n addItems(inputs: readonly CodeViewItem<LAnnotation>[]): void;\n setItems(items: readonly CodeViewItem<LAnnotation>[]): void;\n /**\n * Append new records to the viewer while preserving existing layout state.\n * This is the shared path for imperative adds and the append-only reconcile\n * fast path, so it measures new items immediately and only triggers render\n * once at the end.\n */\n private appendItemsInternal;\n private canSkipRenderForAppend;\n onThemeChange(): void;\n setOptions(options: CodeViewOptions<LAnnotation> | undefined): void;\n private capturePendingLayoutAnchor;\n render(immediate?: boolean): void;\n instanceChanged(instance: VirtualizedFile<LAnnotation> | VirtualizedFileDiff<LAnnotation>, layoutDirty: boolean): void;\n getWindowSpecs(): VirtualWindowSpecs;\n getContainerElement(): HTMLElement | undefined;\n getRenderedItems(): CodeViewRenderedItem<LAnnotation>[];\n setSlotCoordinator(coordinator?: CodeViewCoordinator<LAnnotation>): boolean;\n getSlotSnapshot(coordinator: CodeViewCoordinator<LAnnotation>): CodeViewRenderedItem<LAnnotation>[] | undefined;\n subscribeToScroll(listener: CodeViewScrollListener<LAnnotation>): () => void;\n getLocalTopForInstance(instance: VirtualizedFile<LAnnotation> | VirtualizedFileDiff<LAnnotation>): number;\n getTopForItem(id: string): number | undefined;\n private createItem;\n private applySelectedLines;\n private syncSelection;\n private renamePendingScrollTarget;\n private renamePendingLayoutAnchor;\n private createFileOptionsPrototype;\n private createDiffOptionsPrototype;\n private createFileOptions;\n private createDiffOptions;\n private updateItemOptionsId;\n private getItemOptions;\n private defineItemSharedCallback;\n private defineItemSelectionCallback;\n /**\n * Track the earliest index whose measured layout may now be stale. Later\n * render passes relayout from this point forward so we do not have to rebuild\n * positions for the whole list after every change.\n */\n private markLayoutDirtyFromIndex;\n /**\n * Mark the earliest affected item as layout-dirty after an imperative change.\n * Each record carries its current array index so this stays O(1) even when\n * the viewer holds a very large number of items.\n */\n private markItemLayoutDirty;\n /**\n * Detect the common controlled-update case where the new list simply extends\n * the existing ordered prefix. When that happens we can reuse every current\n * record in place, sync any versioned payload changes, and append only the new\n * tail instead of rebuilding the whole list.\n */\n private tryAppendItems;\n /**\n * Reconcile a new controlled item list against the existing records by id.\n * This reuses records and instances when type matches, cleans up removed\n * records, rebuilds the lookup maps, and marks layout dirty whenever order,\n * membership, or versioned item data changes.\n */\n private reconcileItems;\n /**\n * Update a reused record from the latest controlled item only when its item\n * version changes. Matching versions mean CodeView keeps the current record\n * snapshot, which lets imperative updates remain in place until the caller\n * intentionally publishes a newer version.\n */\n private syncItemRecord;\n private getMaxScrollTopForHeight;\n private getMaxScrollTop;\n private shouldRebaseScroll;\n private getPagedScrollHeight;\n private getMaxPagedScrollTop;\n private clampPagedScrollTop;\n /**\n * Clamps a logical scroll position to the min/max allowable scroll range\n * based on the full computed content height.\n */\n private clampScrollTop;\n private getMaxScrollPageOffset;\n private clampScrollPageOffset;\n private resolveScrollPageWindow;\n /**\n * Resolve how a logical scrollTop maps onto the reusable paged scroll window\n * without mutating the current page offset.\n */\n private resolvePagedScrollPosition;\n private needsScrollPageUpdate;\n private getPagedLayoutTop;\n private getStickyHeaderOffset;\n private getScrollTargetRect;\n private normalizeScrollTarget;\n /**\n * Resolve a target's scroll position\n \n * Returns `undefined` when we can't resolve a target for whatever reason\n */\n private resolveScrollTargetTop;\n /**\n * Given an existing scroll target (scroll top and height), figure out the\n * correct scroll position to target based on the desired alignment, offset\n * and stickyOffset if necessary\n */\n private resolveAlignedScrollPosition;\n private getLineScrollPosition;\n private getRangeScrollPosition;\n /**\n * Determine target scroll position for current frame.\n *\n * If there's no pendingScrollTarget then we just return the current scroll\n * position\n *\n * If there's a pendingScrollTarget then we depend on whether there's a\n * smooth scroll animation or not. If not just return the destination, or\n * compute next position given the smooth scroll spring physics\n */\n private computeTargetScrollTopForFrame;\n /**\n * Closed-form critical-damped ODE step.\n *\n * Stable at any dt (Euler would blow up once ω·dt ≳ 1), so this survives\n * big RAF gaps (tab-wake, offscreen frames) and resize-driven ticks that\n * fire outside the normal RAF cadence.\n */\n private computeSpringStep;\n /**\n * For any given pendingScrollTarget, updates any in flight smooth scroll\n * animations and returns the target scrollTop to move towards\n *\n * Resolves the animation based on frame time and adopts any necessary scroll\n * anchoring corrections if necessary\n */\n private advanceScrollAnimation;\n private computeRenderRangeAndEmit;\n private flushManagers;\n private syncContainerHeight;\n private getStickyBounds;\n private applyStickyPositioning;\n private syncPagedScrollScaffolding;\n private reconcileRenderedItems;\n private updateStickyPositioning;\n private handleScroll;\n private clearPendingScroll;\n private handleResize;\n /**\n * Figure out scrollTop accounting for sticky header if enabled and\n * necessary\n */\n private getScrollAnchorViewportTop;\n /**\n * Attempt to find a scroll anchor based on build in metrics of the existing\n * rendered files/diff.\n *\n * A scroll anchor represents the first fully visible element (in other\n * words, the first file or first line who's top is fully in the viewport).\n */\n private getScrollAnchor;\n /**\n * Given a scroll anchor, attempt to resolve a newly updated (and clamped)\n * scroll position to keep the anchored element in place.\n *\n * If we can't resolve a position for whatever reason, we'll return\n * undefined.\n */\n private resolveAnchoredScrollTop;\n /**\n * Apply a device-pixel-rounded scroll position if it differs from the last\n * logical scrollTop synchronized into the paged scroll scaffold.\n */\n private applyScrollFix;\n /**\n * Decide whether a pending programmatic scroll has reached its\n * destination and should be cleared.\n */\n private isPendingTargetSettled;\n getScrollTop(): number;\n getHeight(): number;\n getScrollHeight(): number;\n private flushSlotCoordinator;\n private notifyScroll;\n /**\n * Find the first item whose bottom edge crosses into the viewport window.\n * This lets scroll-time rendering jump directly near the visible range instead\n * of linearly scanning from the start of very large item lists.\n */\n private findFirstVisibleIndex;\n /**\n * Find the last item whose top edge is still within the viewport window.\n * Paired with findFirstVisibleIndex, this bounds the render loop to only the\n * slice of items that can actually intersect the current scroll range.\n */\n private findLastVisibleIndex;\n /**\n * Recompute measured tops and heights starting from the earliest dirty item.\n * Earlier items keep their existing layout, while everything from startIndex\n * onward is remeasured so downstream positions and total scroll height stay\n * consistent after inserts, removals, or versioned item updates.\n */\n private recomputeLayout;\n private resetRenderState;\n private getFitPerfectlyOverscroll;\n}\nexport {};\n//# sourceMappingURL=CodeView.d.ts.map"],"mappings":";;;;;;;;;;;UAQUiB,2BAAAA;;;EAAAA;EAeAE,GAAAA,EAAAA,MAAAA;EAGiBC;EAAjBnB,MAAAA,EAAAA,MAAAA;EAEwBmB;;EALqBH,OAAAA,EAN1CC,WAM0CD,GAAAA,SAAAA;EAA2B;EAOxEI,OAAAA,EAAAA,MAAAA,GAAAA,SAAuB;EAGND;EAAjBlB,uBAAAA,EAAAA,MAAAA;;UAVAiB,uBAYIL,CAAAA,WAAAA,CAAAA,SAZyCG,2BAYzC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V;yBACKQ;sBACHM,qBAAqBJ;mCACRM,oBAAoBN;+BACxBM,oBAAoBN,eAAeI,qBAAqBJ;8BACzDO,uBAAuBP;mCAClBN,gBAAgBM,eAAeL,oBAAoBK"}
1
+ {"version":3,"file":"CodeView.d.ts","names":["SelectionWriteOptions","CodeViewDiffItem","CodeViewFileItem","CodeViewItem","CodeViewLayout","CodeViewScrollTarget","HunkSeparators","SelectedLineRange","SmoothScrollSettings","VirtualFileMetrics","VirtualWindowSpecs","WorkerPoolManager","FileOptions","FileDiffOptions","VirtualizedFile","VirtualizedFileDiff","VirtualizerConfig","AdvancedVirtualizedBaseItem","HTMLElement","CodeViewDiffItemContext","LAnnotation","CodeViewFileItemContext","CodeViewRenderedDiffItem","CodeViewRenderedFileItem","CodeViewRenderedItem","CodeViewLineSelection","CodeViewCoordinator","CodeViewScrollListener","CodeView","OverloadCallbackArgs","TCallback","TArgs","CallbackReturn","TReturn","OverloadFileCallbackArgs","TKey","NonNullable","OverloadDiffCallbackArgs","CodeViewOptionCallback","CODE_VIEW_DIFF_OPTION_KEYS","CodeViewDiffOptionKeys","CodeViewPassThroughOptions","Pick","CODE_VIEW_SHARED_CALLBACK_KEYS","CODE_VIEW_SELECTION_CALLBACK_KEYS","CodeViewSharedCallbackKeys","CodeViewSelectionCallbackKeys","CodeViewSharedCallbackOptions","CodeViewSelectionCallbackOptions","CodeViewOptions","Exclude","Partial"],"sources":["../../src/components/CodeView.d.ts"],"sourcesContent":["import type { SelectionWriteOptions } from '../managers/InteractionManager';\nimport type { CodeViewDiffItem, CodeViewFileItem, CodeViewItem, CodeViewLayout, CodeViewScrollTarget, HunkSeparators, SelectedLineRange, SmoothScrollSettings, VirtualFileMetrics, VirtualWindowSpecs } from '../types';\nimport type { WorkerPoolManager } from '../worker';\nimport type { FileOptions } from './File';\nimport type { FileDiffOptions } from './FileDiff';\nimport { VirtualizedFile } from './VirtualizedFile';\nimport { VirtualizedFileDiff } from './VirtualizedFileDiff';\nimport type { VirtualizerConfig } from './Virtualizer';\ninterface AdvancedVirtualizedBaseItem {\n /** Current index of this record in the ordered items array. */\n index: number;\n /** Absolute top offset of this item inside the scroll content. */\n top: number;\n /** Total measured height reserved for this item. */\n height: number;\n /** Root <diffs-container> node currently mounted for this item, only exists\n * when rendered. */\n element: HTMLElement | undefined;\n /** Last controlled version observed for this record. */\n version: number | undefined;\n /** Last CodeView option revision this item rendered with. */\n renderedOptionsRevision: number;\n}\ninterface CodeViewDiffItemContext<LAnnotation> extends AdvancedVirtualizedBaseItem {\n type: 'diff';\n /** Latest item snapshot for this record. Controlled updates can replace it. */\n item: CodeViewDiffItem<LAnnotation>;\n /** Virtualized diff instance responsible for rendering this item. */\n instance: VirtualizedFileDiff<LAnnotation>;\n}\ninterface CodeViewFileItemContext<LAnnotation> extends AdvancedVirtualizedBaseItem {\n type: 'file';\n /** Latest item snapshot for this record. Controlled updates can replace it. */\n item: CodeViewFileItem<LAnnotation>;\n /** Virtualized file instance responsible for rendering this item. */\n instance: VirtualizedFile<LAnnotation>;\n}\nexport interface CodeViewRenderedDiffItem<LAnnotation> {\n id: string;\n type: 'diff';\n item: CodeViewDiffItem<LAnnotation>;\n version: number | undefined;\n element: HTMLElement;\n instance: VirtualizedFileDiff<LAnnotation>;\n}\nexport interface CodeViewRenderedFileItem<LAnnotation> {\n id: string;\n type: 'file';\n item: CodeViewFileItem<LAnnotation>;\n version: number | undefined;\n element: HTMLElement;\n instance: VirtualizedFile<LAnnotation>;\n}\nexport type CodeViewRenderedItem<LAnnotation> = CodeViewRenderedDiffItem<LAnnotation> | CodeViewRenderedFileItem<LAnnotation>;\nexport interface CodeViewLineSelection {\n id: string;\n range: SelectedLineRange;\n}\nexport interface CodeViewCoordinator<LAnnotation> {\n hasHeaderRenderers: boolean;\n hasAnnotationRenderer: boolean;\n hasGutterRenderer: boolean;\n onSnapshotChange(snapshot: CodeViewRenderedItem<LAnnotation>[] | undefined): void;\n}\nexport type CodeViewScrollListener<LAnnotation> = (scrollTop: number, viewer: CodeView<LAnnotation>) => void;\ntype OverloadCallbackArgs<TCallback> = TCallback extends (...args: infer TArgs) => unknown ? TArgs : never;\ntype CallbackReturn<TCallback> = TCallback extends (...args: never[]) => infer TReturn ? TReturn : never;\ntype OverloadFileCallbackArgs<LAnnotation, TKey extends keyof FileOptions<LAnnotation>> = OverloadCallbackArgs<NonNullable<FileOptions<LAnnotation>[TKey]>>;\ntype OverloadDiffCallbackArgs<LAnnotation, TKey extends keyof FileDiffOptions<LAnnotation>> = OverloadCallbackArgs<NonNullable<FileDiffOptions<LAnnotation>[TKey]>>;\ntype CodeViewOptionCallback<LAnnotation, TKey extends keyof FileOptions<LAnnotation> & keyof FileDiffOptions<LAnnotation>> = {\n (...args: [\n ...OverloadFileCallbackArgs<LAnnotation, TKey>,\n context: CodeViewFileItemContext<LAnnotation>\n ]): CallbackReturn<NonNullable<FileOptions<LAnnotation>[TKey]>>;\n (...args: [\n ...OverloadDiffCallbackArgs<LAnnotation, TKey>,\n context: CodeViewDiffItemContext<LAnnotation>\n ]): CallbackReturn<NonNullable<FileDiffOptions<LAnnotation>[TKey]>>;\n};\ndeclare const CODE_VIEW_DIFF_OPTION_KEYS: readonly [\"theme\", \"disableLineNumbers\", \"overflow\", \"themeType\", \"disableFileHeader\", \"disableVirtualizationBuffers\", \"preferredHighlighter\", \"useCSSClasses\", \"useTokenTransformer\", \"tokenizeMaxLineLength\", \"tokenizeMaxLength\", \"unsafeCSS\", \"diffStyle\", \"diffIndicators\", \"disableBackground\", \"expandUnchanged\", \"collapsedContextThreshold\", \"lineDiffType\", \"maxLineDiffLength\", \"expansionLineCount\", \"lineHoverHighlight\", \"enableTokenInteractionsOnWhitespace\", \"enableGutterUtility\", \"__debugPointerEvents\", \"enableLineSelection\", \"controlledSelection\", \"disableErrorHandling\"];\ntype CodeViewDiffOptionKeys = (typeof CODE_VIEW_DIFF_OPTION_KEYS)[number];\ntype CodeViewPassThroughOptions<LAnnotation> = Pick<FileDiffOptions<LAnnotation>, CodeViewDiffOptionKeys>;\ndeclare const CODE_VIEW_SHARED_CALLBACK_KEYS: readonly [\"renderCustomHeader\", \"renderHeaderPrefix\", \"renderHeaderMetadata\", \"renderAnnotation\", \"renderGutterUtility\", \"onPostRender\", \"onGutterUtilityClick\", \"onLineClick\", \"onLineNumberClick\", \"onLineEnter\", \"onLineLeave\", \"onTokenClick\", \"onTokenEnter\", \"onTokenLeave\"];\ndeclare const CODE_VIEW_SELECTION_CALLBACK_KEYS: readonly [\"onLineSelected\", \"onLineSelectionStart\", \"onLineSelectionChange\", \"onLineSelectionEnd\"];\ntype CodeViewSharedCallbackKeys = (typeof CODE_VIEW_SHARED_CALLBACK_KEYS)[number];\ntype CodeViewSelectionCallbackKeys = (typeof CODE_VIEW_SELECTION_CALLBACK_KEYS)[number];\ntype CodeViewSharedCallbackOptions<LAnnotation> = {\n [TKey in CodeViewSharedCallbackKeys]?: CodeViewOptionCallback<LAnnotation, TKey>;\n};\ntype CodeViewSelectionCallbackOptions<LAnnotation> = {\n [TKey in CodeViewSelectionCallbackKeys]?: CodeViewOptionCallback<LAnnotation, TKey>;\n};\nexport interface CodeViewOptions<LAnnotation> extends CodeViewPassThroughOptions<LAnnotation>, CodeViewSharedCallbackOptions<LAnnotation>, CodeViewSelectionCallbackOptions<LAnnotation> {\n hunkSeparators?: Exclude<HunkSeparators, 'custom'>;\n itemMetrics?: Partial<VirtualFileMetrics>;\n pointerEventsOnScroll?: boolean;\n smoothScrollSettings?: SmoothScrollSettings;\n stickyHeaders?: boolean;\n controlledSelection?: boolean;\n onSelectedLinesChange?(selection: CodeViewLineSelection | null): void;\n layout?: CodeViewLayout;\n /** Internal dev-only check to ensure your `itemMetrics` are correct. Its\n * automatically disabled in a production build because it will hurt\n * performance fairly significantly */\n __devOnlyValidateItemHeights?: boolean;\n}\nexport declare class CodeView<LAnnotation = undefined> {\n static __STOP: boolean;\n static __lastScrollPosition: number;\n type: \"advanced\";\n readonly config: VirtualizerConfig;\n private items;\n private idToItem;\n private selectedLines;\n private instanceToItem;\n private layoutDirtyIndex;\n private pendingLayoutReset;\n private renderOptionsRevision;\n private slotCoordinator;\n private slotSnapshot;\n private scrollListeners;\n private scrollHeight;\n private containerHeight;\n private scrollTop;\n private scrollPageOffset;\n private scrollDirty;\n private scrollInteractionFixTimer;\n private pointerEventsDisabled;\n private codeOverflowFix;\n private height;\n private heightDirty;\n private windowSpecs;\n private renderState;\n private itemMetricsCache;\n private readonly fileOptionsPrototype;\n private readonly diffOptionsPrototype;\n private pendingScrollTarget;\n private pendingLayoutAnchor;\n private scrollAnimation;\n private root;\n private resizeObserver;\n private container;\n private stickyContainer;\n private stickyOffset;\n private elementPool;\n private elementPoolVersion;\n private elementPoolTracker;\n private pendingElementPool;\n private options;\n private workerManager;\n private isContainerManaged;\n constructor(options?: CodeViewOptions<LAnnotation>, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);\n private getLayout;\n private computeMetricsCache;\n private getSmoothScrollSettings;\n private shouldDisablePointerEvents;\n private shouldValidateItemHeights;\n private validateRenderedItemHeight;\n private clearScrollInteractionTimer;\n private suspendScrollInteractions;\n private restoreScrollInteractions;\n private syncLayout;\n setup(root: HTMLElement): void;\n reset(): void;\n cleanUp(): void;\n private cleanAllRenderedItems;\n private primeScrollTarget;\n private getElementPoolLimit;\n private acquireElement;\n private releaseRenderedItem;\n private cleanElement;\n private queueElementForPool;\n private promotePendingPooledElements;\n private isElementClean;\n private getElementPoolSize;\n private clearElementPool;\n private invalidateElementPool;\n private markElementPoolGenerationCurrent;\n private isElementPoolGenerationCurrent;\n private resolveEffectiveScrollBehavior;\n scrollTo(target: CodeViewScrollTarget): void;\n setSelectedLines(selection: CodeViewLineSelection | null, options?: SelectionWriteOptions): void;\n getSelectedLines(): CodeViewLineSelection | null;\n clearSelectedLines(options?: SelectionWriteOptions): void;\n getItem(itemId: string): CodeViewItem<LAnnotation> | undefined;\n updateItem(input: CodeViewItem<LAnnotation>): boolean;\n updateItemId(oldId: string, newId: string): boolean;\n addItem(input: CodeViewItem<LAnnotation>): void;\n addItems(inputs: readonly CodeViewItem<LAnnotation>[]): void;\n setItems(items: readonly CodeViewItem<LAnnotation>[]): void;\n /**\n * Append new records to the viewer while preserving existing layout state.\n * This is the shared path for imperative adds and the append-only reconcile\n * fast path, so it measures new items immediately and only triggers render\n * once at the end.\n */\n private appendItemsInternal;\n private canSkipRenderForAppend;\n onThemeChange(): void;\n setOptions(options: CodeViewOptions<LAnnotation> | undefined): void;\n private capturePendingLayoutAnchor;\n render(immediate?: boolean): void;\n instanceChanged(instance: VirtualizedFile<LAnnotation> | VirtualizedFileDiff<LAnnotation>, layoutDirty: boolean): void;\n getWindowSpecs(): VirtualWindowSpecs;\n getContainerElement(): HTMLElement | undefined;\n getRenderedItems(): CodeViewRenderedItem<LAnnotation>[];\n setSlotCoordinator(coordinator?: CodeViewCoordinator<LAnnotation>): boolean;\n getSlotSnapshot(coordinator: CodeViewCoordinator<LAnnotation>): CodeViewRenderedItem<LAnnotation>[] | undefined;\n subscribeToScroll(listener: CodeViewScrollListener<LAnnotation>): () => void;\n getLocalTopForInstance(instance: VirtualizedFile<LAnnotation> | VirtualizedFileDiff<LAnnotation>): number;\n getTopForItem(id: string): number | undefined;\n private createItem;\n private applySelectedLines;\n private syncSelection;\n private renamePendingScrollTarget;\n private renamePendingLayoutAnchor;\n private createFileOptionsPrototype;\n private createDiffOptionsPrototype;\n private createFileOptions;\n private createDiffOptions;\n private updateItemOptionsId;\n private getItemOptions;\n private defineItemSharedCallback;\n private defineItemSelectionCallback;\n /**\n * Track the earliest index whose measured layout may now be stale. Later\n * render passes relayout from this point forward so we do not have to rebuild\n * positions for the whole list after every change.\n */\n private markLayoutDirtyFromIndex;\n /**\n * Mark the earliest affected item as layout-dirty after an imperative change.\n * Each record carries its current array index so this stays O(1) even when\n * the viewer holds a very large number of items.\n */\n private markItemLayoutDirty;\n /**\n * Detect the common controlled-update case where the new list simply extends\n * the existing ordered prefix. When that happens we can reuse every current\n * record in place, sync any versioned payload changes, and append only the new\n * tail instead of rebuilding the whole list.\n */\n private tryAppendItems;\n /**\n * Reconcile a new controlled item list against the existing records by id.\n * This reuses records and instances when type matches, cleans up removed\n * records, rebuilds the lookup maps, and marks layout dirty whenever order,\n * membership, or versioned item data changes.\n */\n private reconcileItems;\n /**\n * Update a reused record from the latest controlled item only when its item\n * version changes. Matching versions mean CodeView keeps the current record\n * snapshot, which lets imperative updates remain in place until the caller\n * intentionally publishes a newer version.\n */\n private syncItemRecord;\n private getMaxScrollTopForHeight;\n private getMaxScrollTop;\n private shouldRebaseScroll;\n private getPagedScrollHeight;\n private getMaxPagedScrollTop;\n private clampPagedScrollTop;\n /**\n * Clamps a logical scroll position to the min/max allowable scroll range\n * based on the full computed content height.\n */\n private clampScrollTop;\n private getMaxScrollPageOffset;\n private clampScrollPageOffset;\n private resolveScrollPageWindow;\n /**\n * Resolve how a logical scrollTop maps onto the reusable paged scroll window\n * without mutating the current page offset.\n */\n private resolvePagedScrollPosition;\n private needsScrollPageUpdate;\n private getPagedLayoutTop;\n private getStickyHeaderOffset;\n private getScrollTargetRect;\n private normalizeScrollTarget;\n /**\n * Resolve a target's scroll position\n \n * Returns `undefined` when we can't resolve a target for whatever reason\n */\n private resolveScrollTargetTop;\n /**\n * Given an existing scroll target (scroll top and height), figure out the\n * correct scroll position to target based on the desired alignment, offset\n * and stickyOffset if necessary\n */\n private resolveAlignedScrollPosition;\n private getLineScrollPosition;\n private getRangeScrollPosition;\n /**\n * Determine target scroll position for current frame.\n *\n * If there's no pendingScrollTarget then we just return the current scroll\n * position\n *\n * If there's a pendingScrollTarget then we depend on whether there's a\n * smooth scroll animation or not. If not just return the destination, or\n * compute next position given the smooth scroll spring physics\n */\n private computeTargetScrollTopForFrame;\n /**\n * Closed-form critical-damped ODE step.\n *\n * Stable at any dt (Euler would blow up once ω·dt ≳ 1), so this survives\n * big RAF gaps (tab-wake, offscreen frames) and resize-driven ticks that\n * fire outside the normal RAF cadence.\n */\n private computeSpringStep;\n /**\n * For any given pendingScrollTarget, updates any in flight smooth scroll\n * animations and returns the target scrollTop to move towards\n *\n * Resolves the animation based on frame time and adopts any necessary scroll\n * anchoring corrections if necessary\n */\n private advanceScrollAnimation;\n private computeRenderRangeAndEmit;\n private flushManagers;\n private syncContainerHeight;\n private getStickyBounds;\n private applyStickyPositioning;\n private syncPagedScrollScaffolding;\n private reconcileRenderedItems;\n private updateStickyPositioning;\n private handleScroll;\n private clearPendingScroll;\n private handleResize;\n /**\n * Figure out scrollTop accounting for sticky header if enabled and\n * necessary\n */\n private getScrollAnchorViewportTop;\n /**\n * Attempt to find a scroll anchor based on build in metrics of the existing\n * rendered files/diff.\n *\n * A scroll anchor represents the first fully visible element (in other\n * words, the first file or first line who's top is fully in the viewport).\n */\n private getScrollAnchor;\n /**\n * Given a scroll anchor, attempt to resolve a newly updated (and clamped)\n * scroll position to keep the anchored element in place.\n *\n * If we can't resolve a position for whatever reason, we'll return\n * undefined.\n */\n private resolveAnchoredScrollTop;\n /**\n * Apply a device-pixel-rounded scroll position if it differs from the last\n * logical scrollTop synchronized into the paged scroll scaffold.\n */\n private applyScrollFix;\n /**\n * Decide whether a pending programmatic scroll has reached its\n * destination and should be cleared.\n */\n private isPendingTargetSettled;\n getScrollTop(): number;\n getHeight(): number;\n getScrollHeight(): number;\n private flushSlotCoordinator;\n private notifyScroll;\n /**\n * Find the first item whose bottom edge crosses into the viewport window.\n * This lets scroll-time rendering jump directly near the visible range instead\n * of linearly scanning from the start of very large item lists.\n */\n private findFirstVisibleIndex;\n /**\n * Find the last item whose top edge is still within the viewport window.\n * Paired with findFirstVisibleIndex, this bounds the render loop to only the\n * slice of items that can actually intersect the current scroll range.\n */\n private findLastVisibleIndex;\n /**\n * Recompute measured tops and heights starting from the earliest dirty item.\n * Earlier items keep their existing layout, while everything from startIndex\n * onward is remeasured so downstream positions and total scroll height stay\n * consistent after inserts, removals, or versioned item updates.\n */\n private recomputeLayout;\n private resetRenderState;\n private getFitPerfectly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A;EAAvBO,QAAAA,4BAAAA;EACqBP,QAAAA,cAAAA;EAAhBN,QAAAA,kBAAAA;EAAmDM,QAAAA,gBAAAA;EAApBL,QAAAA,qBAAAA;EAAmB,QAAA,gCAAA;;;mBA7BlEV;8BACWoB,wCAAwCzB;sBAChDyB;+BACSzB;2BACJG,aAAaiB;oBACpBjB,aAAaiB;;iBAEhBjB,aAAaiB;4BACFjB,aAAaiB;2BACdjB,aAAaiB;;;;;;;;;;sBAUlB6B,gBAAgB7B;;;4BAGVN,gBAAgBM,eAAeL,oBAAoBK;oBAC3DV;yBACKQ;sBACHM,qBAAqBJ;mCACRM,oBAAoBN;+BACxBM,oBAAoBN,eAAeI,qBAAqBJ;8BACzDO,uBAAuBP;mCAClBN,gBAAgBM,eAAeL,oBAAoBK"}
@@ -164,7 +164,6 @@ var CodeView = class CodeView {
164
164
  diffOptionsPrototype;
165
165
  pendingScrollTarget;
166
166
  pendingLayoutAnchor;
167
- shouldFixContainerFocus = false;
168
167
  scrollAnimation;
169
168
  root;
170
169
  resizeObserver;
@@ -241,28 +240,6 @@ var CodeView = class CodeView {
241
240
  instance: item.instance
242
241
  });
243
242
  }
244
- validateStickyContainerHeight() {
245
- if (!this.shouldValidateItemHeights()) return;
246
- const { firstIndex, lastIndex, stickyHeight, stickyTop, stickyBottom } = this.renderState;
247
- if (firstIndex === -1 || lastIndex === -1) return;
248
- const actualHeight = this.stickyContainer.getBoundingClientRect().height;
249
- if (Math.abs(actualHeight - stickyHeight) < 1) return;
250
- console.error("CodeView: sticky container height does not match computed layout", {
251
- computedStickyHeight: stickyHeight,
252
- actualStickyHeight: actualHeight,
253
- delta: actualHeight - stickyHeight,
254
- stickyTop,
255
- stickyBottom,
256
- firstIndex,
257
- lastIndex,
258
- firstStickySpecs: this.items[firstIndex]?.instance.getAdvancedStickySpecs(),
259
- lastStickySpecs: this.items[lastIndex]?.instance.getAdvancedStickySpecs(),
260
- scrollTop: this.getScrollTop(),
261
- scrollPageOffset: this.scrollPageOffset,
262
- windowSpecs: { ...this.windowSpecs },
263
- stickyContainer: this.stickyContainer
264
- });
265
- }
266
243
  clearScrollInteractionTimer() {
267
244
  if (this.scrollInteractionFixTimer != null) {
268
245
  clearTimeout(this.scrollInteractionFixTimer);
@@ -303,7 +280,6 @@ var CodeView = class CodeView {
303
280
  this.workerManager?.subscribeToThemeChanges(this);
304
281
  this.root = root;
305
282
  this.root.style.overflowAnchor = "none";
306
- if (!this.root.hasAttribute("tabindex")) this.root.tabIndex = -1;
307
283
  this.container ??= document.createElement("div");
308
284
  this.container.style.contain = "layout style";
309
285
  this.syncLayout();
@@ -354,7 +330,6 @@ var CodeView = class CodeView {
354
330
  bottom: 0
355
331
  };
356
332
  this.pendingLayoutAnchor = void 0;
357
- this.shouldFixContainerFocus = false;
358
333
  this.height = 0;
359
334
  this.scrollTop = 0;
360
335
  this.scrollPageOffset = 0;
@@ -413,7 +388,6 @@ var CodeView = class CodeView {
413
388
  }
414
389
  releaseRenderedItem(item) {
415
390
  const { element } = item;
416
- if (element != null && this.renderedItemOwnsFocus(element)) this.shouldFixContainerFocus = true;
417
391
  item.instance.cleanUp(true);
418
392
  item.element = void 0;
419
393
  if (element == null) return;
@@ -421,16 +395,6 @@ var CodeView = class CodeView {
421
395
  this.cleanElement(element);
422
396
  this.queueElementForPool(element);
423
397
  }
424
- renderedItemOwnsFocus(element) {
425
- const { activeElement } = document;
426
- return activeElement === element || element.contains(activeElement) || element.shadowRoot?.activeElement != null;
427
- }
428
- fixContainerFocus() {
429
- if (this.shouldFixContainerFocus) {
430
- this.shouldFixContainerFocus = false;
431
- this.root?.focus({ preventScroll: true });
432
- }
433
- }
434
398
  cleanElement(element) {
435
399
  const { shadowRoot } = element;
436
400
  if (shadowRoot != null) {
@@ -1307,8 +1271,6 @@ var CodeView = class CodeView {
1307
1271
  }
1308
1272
  this.renderState.scrollTop = roundToDevicePixel(syncedScrollTop);
1309
1273
  this.flushManagers(updatedItems);
1310
- this.validateStickyContainerHeight();
1311
- this.fixContainerFocus();
1312
1274
  if (fitPerfectly || this.scrollAnimation != null) this.render();
1313
1275
  };
1314
1276
  flushManagers(updatedItems) {