refactor(editor): remove unused code block clipboard (#11170)

This commit is contained in:
Saul-Mirone
2025-03-25 12:09:23 +00:00
parent e84c60f53d
commit abe560082d
2 changed files with 0 additions and 116 deletions
@@ -25,7 +25,6 @@ import { query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { bundledLanguagesInfo, type ThemedToken } from 'shiki';
import { CodeClipboardController } from './clipboard/index.js';
import { CodeBlockConfigExtension } from './code-block-config.js';
import { CodeBlockInlineManagerExtension } from './code-block-inline.js';
import { CodeBlockHighlighter } from './code-block-service.js';
@@ -36,8 +35,6 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
private _inlineRangeProvider: InlineRangeProvider | null = null;
clipboardController = new CodeClipboardController(this);
highlightTokens$: Signal<ThemedToken[][]> = signal([]);
languageName$: Signal<string> = computed(() => {
@@ -144,8 +141,6 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
super.connectedCallback();
// set highlight options getter used by "exportToHtml"
this.clipboardController.hostConnected();
this.disposables.add(
effect(() => {
this._updateHighlightTokens();
@@ -373,11 +368,6 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
});
}
override disconnectedCallback() {
super.disconnectedCallback();
this.clipboardController.hostDisconnected();
}
override async getUpdateComplete() {
const result = await super.getUpdateComplete();
await this._richTextElement?.updateComplete;