@usememos/editor 26.11.0 → 26.11.1

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.
@@ -631,7 +631,8 @@ export declare class Editor {
631
631
  /**
632
632
  * The model with the text the DOM shows: one delete and one insert per
633
633
  * changed text container, inserted text getting `marks` when set. Only
634
- * `blockId` when given. Null when the text is the same.
634
+ * `blockId` when given: the composition's block, with `ended` once the
635
+ * composition has ended. Null when the text is the same.
635
636
  */
636
637
  private readDom;
637
638
  private onKeyDown;
@@ -666,8 +667,10 @@ export declare class Editor {
666
667
  private onPaste;
667
668
  /** What a paste writes in source mode: the editor's own Markdown, other HTML as Markdown, else the text; inside a fence, the text as written. */
668
669
  private pastedMarkdown;
669
- /** The URL a paste makes a link of: the text, when it is one URL and the paste is not plain. */
670
+ /** The URL a paste over selected text makes a link of, when the paste is not plain. */
670
671
  private pastedUrl;
672
+ /** The text as a link's URL: one URL whose scheme the URL policy allows, such as `https://` or `obsidian://`, else null. */
673
+ private linkableUrl;
671
674
  /** Clipboard content as blocks: the editor's own Markdown, other HTML, or text as Markdown. */
672
675
  private pastedBlocks;
673
676
  private onDrop;
@@ -241,6 +241,13 @@ export declare function contentElement(blockEl: HTMLElement, cell?: Cell): HTMLE
241
241
  export declare function childIndex(node: Node): number;
242
242
  /** Plain text of a content element as the browser currently has it, with atoms as one character. */
243
243
  export declare function domText(contentEl: HTMLElement): string;
244
+ /**
245
+ * The text the browser left directly in the root, outside every block. The
246
+ * renderer puts only elements there. WebKit, on committing a composition that
247
+ * is a block's whole text, removes the block's element and inserts the
248
+ * committed text as a text node of the root.
249
+ */
250
+ export declare function strayText(root: HTMLElement): string;
244
251
  export declare function domToPosition(root: HTMLElement, node: Node, offset: number): Position | null;
245
252
  /** The atom (an image or a rendered token) that starts at `pos`, or null. */
246
253
  export declare function atomAt(blockEl: HTMLElement, pos: Position): HTMLElement | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usememos/editor",
3
- "version": "26.11.0",
3
+ "version": "26.11.1",
4
4
  "description": "A block editor for Markdown. Zero runtime dependencies, with an optional React component.",
5
5
  "keywords": [
6
6
  "markdown",