@pierre/diffs 1.2.10 → 1.2.11

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 (46) hide show
  1. package/README.md +6 -6
  2. package/dist/components/CodeView.d.ts.map +1 -1
  3. package/dist/components/CodeView.js +6 -6
  4. package/dist/components/CodeView.js.map +1 -1
  5. package/dist/components/File.d.ts.map +1 -1
  6. package/dist/components/File.js +6 -1
  7. package/dist/components/File.js.map +1 -1
  8. package/dist/components/FileDiff.d.ts.map +1 -1
  9. package/dist/components/FileDiff.js +1 -1
  10. package/dist/components/FileDiff.js.map +1 -1
  11. package/dist/components/FileStream.js +4 -2
  12. package/dist/components/FileStream.js.map +1 -1
  13. package/dist/components/VirtualizedFile.d.ts +6 -2
  14. package/dist/components/VirtualizedFile.d.ts.map +1 -1
  15. package/dist/components/VirtualizedFile.js +82 -21
  16. package/dist/components/VirtualizedFile.js.map +1 -1
  17. package/dist/components/VirtualizedFileDiff.d.ts +7 -2
  18. package/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
  19. package/dist/components/VirtualizedFileDiff.js +77 -15
  20. package/dist/components/VirtualizedFileDiff.js.map +1 -1
  21. package/dist/managers/InteractionManager.js +1 -1
  22. package/dist/managers/InteractionManager.js.map +1 -1
  23. package/dist/managers/ResizeManager.js +1 -1
  24. package/dist/managers/ResizeManager.js.map +1 -1
  25. package/dist/renderers/DiffHunksRenderer.d.ts +3 -2
  26. package/dist/renderers/DiffHunksRenderer.d.ts.map +1 -1
  27. package/dist/renderers/DiffHunksRenderer.js +49 -2
  28. package/dist/renderers/DiffHunksRenderer.js.map +1 -1
  29. package/dist/renderers/FileRenderer.js +12 -0
  30. package/dist/renderers/FileRenderer.js.map +1 -1
  31. package/dist/types.d.ts +8 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/utils/includesFileAnnotations.d.ts +17 -0
  34. package/dist/utils/includesFileAnnotations.d.ts.map +1 -0
  35. package/dist/utils/includesFileAnnotations.js +19 -0
  36. package/dist/utils/includesFileAnnotations.js.map +1 -0
  37. package/dist/utils/parseMergeConflictDiffFromFile.js.map +1 -1
  38. package/dist/utils/renderDiffWithHighlighter.js +4 -2
  39. package/dist/utils/renderDiffWithHighlighter.js.map +1 -1
  40. package/dist/utils/renderFileWithHighlighter.js +4 -2
  41. package/dist/utils/renderFileWithHighlighter.js.map +1 -1
  42. package/dist/worker/worker-portable.js +8 -4
  43. package/dist/worker/worker-portable.js.map +1 -1
  44. package/dist/worker/worker.js +8 -4
  45. package/dist/worker/worker.js.map +1 -1
  46. package/package.json +2 -8
package/README.md CHANGED
@@ -36,11 +36,11 @@ Technically you can use the package manager of your choice, but we use
36
36
  # From the root of the mono repo: setup dependencies
37
37
  bun install
38
38
 
39
- # Start the demo vite test server from root
40
- bun run demo:dev
39
+ # Start the demo vite test server
40
+ moonx demo:dev
41
41
 
42
- # To run the docs from root
43
- bun run docs:dev
42
+ # To run the docs (diffs site)
43
+ moonx docs:dev-diffs
44
44
  ```
45
45
 
46
46
  ### Testing
@@ -53,7 +53,7 @@ bun test
53
53
  bun test --update-snapshots
54
54
 
55
55
  # Type checking
56
- bun run tsc
56
+ moonx diffs:typecheck
57
57
  ```
58
58
 
59
59
  Tests are located in the `test/` folder and use Bun's native testing framework
@@ -78,7 +78,7 @@ The diff UI uses an SVG sprite built from `@pierre/icons`. From the monorepo
78
78
  root:
79
79
 
80
80
  ```bash
81
- bun run icons:sprite
81
+ moonx root:icons
82
82
  ```
83
83
 
84
84
  This reads SVGs from `node_modules/@pierre/icons/svg` and writes
@@ -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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,gBAAgB7B;;;4BAGVN,gBAAgBM,eAAeL,oBAAoBK;oBAC3DV;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 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,2BAYzCH,CAAAA;EALyCG,IAAAA,EAAAA,MAAAA;EAA2B;EAOjEK,IAAAA,EAXPrB,gBAWOqB,CAXUF,WAWcA,CAAAA;EAGdA;EAAjBnB,QAAAA,EAZIc,mBAYJd,CAZwBmB,WAYxBnB,CAAAA;;UAVAoB,uBAawBD,CAAAA,WAAAA,CAAAA,SAbqBH,2BAarBG,CAAAA;EAApBL,IAAAA,EAAAA,MAAAA;EAAmB;EAEhBQ,IAAAA,EAZPrB,gBAYOqB,CAZUH,WAYcA,CAAAA;EAGdA;EAAjBlB,QAAAA,EAbIY,eAaJZ,CAboBkB,WAapBlB,CAAAA;;AAGoBkB,UAdbE,wBAcaF,CAAAA,WAAAA,CAAAA,CAAAA;EAAhBN,EAAAA,EAAAA,MAAAA;EAAe,IAAA,EAAA,MAAA;EAEjBU,IAAAA,EAbFvB,gBAaEuB,CAbeJ,WAaKA,CAAAA;EAAyCA,OAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAzBE,OAAAA,EAXnCJ,WAWmCI;EAAiEF,QAAAA,EAVnGL,mBAUmGK,CAV/EA,WAU+EA,CAAAA;;AAAD,UAR/FG,wBAQ+F,CAAA,WAAA,CAAA,CAAA;E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CAAAA,EAAAA,IAAAA;EACgBN,QAAAA,qBAAAA;EAApBM,QAAAA,iBAAAA;EAAwDN,QAAAA,mBAAAA;EAArBI,QAAAA,cAAAA;EACbJ,QAAAA,mBAAAA;EAAvBO,QAAAA,qBAAAA;EACqBP,QAAAA,iBAAAA;EAAhBN,QAAAA,YAAAA;EAAmDM,QAAAA,mBAAAA;EAApBL,QAAAA,4BAAAA;EAAmB,QAAA,cAAA;;;;;;;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"}
@@ -1618,8 +1618,8 @@ var CodeView = class CodeView {
1618
1618
  const item = this.items[index];
1619
1619
  if (item == null) throw new Error("CodeView.recomputeLayout: invalid item index");
1620
1620
  item.top = runningTop;
1621
- if (item.type === "diff") item.height = item.instance.prepareCodeViewItem(item.item.fileDiff, runningTop, reset);
1622
- else item.height = item.instance.prepareCodeViewItem(item.item.file, runningTop, reset);
1621
+ if (item.type === "diff") item.height = item.instance.prepareCodeViewItem(item.item.fileDiff, runningTop, reset, item.item.annotations ?? []);
1622
+ else item.height = item.instance.prepareCodeViewItem(item.item.file, runningTop, reset, item.item.annotations ?? []);
1623
1623
  runningTop += item.height;
1624
1624
  if (index < this.items.length - 1) runningTop += layout.gap;
1625
1625
  }
@@ -1640,8 +1640,8 @@ var CodeView = class CodeView {
1640
1640
  };
1641
1641
  function prepareItemInstance(item) {
1642
1642
  item.instance.cleanUp(true);
1643
- if (item.type === "diff") return item.instance.prepareCodeViewItem(item.item.fileDiff, item.top);
1644
- else return item.instance.prepareCodeViewItem(item.item.file, item.top);
1643
+ if (item.type === "diff") return item.instance.prepareCodeViewItem(item.item.fileDiff, item.top, void 0, item.item.annotations ?? []);
1644
+ else return item.instance.prepareCodeViewItem(item.item.file, item.top, void 0, item.item.annotations ?? []);
1645
1645
  }
1646
1646
  function shouldClearPool(previousOptions, nextOptions) {
1647
1647
  return !areThemesEqual(previousOptions.theme ?? DEFAULT_THEMES, nextOptions.theme ?? DEFAULT_THEMES) || (previousOptions.themeType ?? "system") !== (nextOptions.themeType ?? "system") || previousOptions.unsafeCSS !== nextOptions.unsafeCSS;
@@ -1671,14 +1671,14 @@ function renderItem(item, fileContainer, forceRender = false) {
1671
1671
  fileContainer,
1672
1672
  fileDiff: item.item.fileDiff,
1673
1673
  forceRender,
1674
- lineAnnotations: item.item.annotations
1674
+ lineAnnotations: item.item.annotations ?? []
1675
1675
  });
1676
1676
  else return item.instance.render({
1677
1677
  deferManagers: true,
1678
1678
  fileContainer,
1679
1679
  file: item.item.file,
1680
1680
  forceRender,
1681
- lineAnnotations: item.item.annotations
1681
+ lineAnnotations: item.item.annotations ?? []
1682
1682
  });
1683
1683
  }
1684
1684
  /**