/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { DOMPreprocessFn } from '@lexical/html';
/**
* VS Code → browser code-block pastes ship the block as either:
*
* - **Chrome**: one outer
* `
…
`
* wrapping per-line ``s and `
`s.
* - **Safari**: a flat run of sibling
* `
…
` and
* `
` elements with no wrapping
* monospace ancestor (the styles are duplicated onto every
* element).
*
* The legacy `
` rule (and {@link DivRule}) produces one CodeNode
* per `
` on Safari and concatenates inner divs without
* separating `\n`s on Chrome. This preprocess scans once for the
* structural signature and, only when it matches, pushes
* {@link VscodeCodePasteOverlay} onto {@link ImportOverlays} so the
* VS Code-specific rules participate in the walk. Pastes from other
* sources pay only the detection cost.
*
* @experimental
*/
export declare const $installVscodeCodePasteOverlay: DOMPreprocessFn;
/**
* Import rules for {@link CodeNode}.
*
* Specific class-restricted rules (GitHub raw-file-view detectors) are
* registered before the generic `
` / `` / `| ` rules so
* they win dispatch.
*
* Registered by {@link CodeExtension} itself (together with
* `CoreImportExtension` and the {@link $installVscodeCodePasteOverlay}
* preprocess), so any editor that uses the code extension can import
* these shapes through the `DOMImportExtension` pipeline without further
* configuration.
*
* @experimental
*/
export declare const CodeImportRules: import("@lexical/html").DOMImportRule>>[];
|