wysimark-lite 0.23.0 → 0.24.0

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.
package/dist/index.d.ts CHANGED
@@ -877,9 +877,26 @@ type CodeBlockPluginCustomTypes = {
877
877
  };
878
878
  };
879
879
 
880
+ /**
881
+ * HTML block element for preserving raw HTML content
882
+ */
883
+ type HtmlBlockElement = {
884
+ type: "html-block";
885
+ /**
886
+ * The raw HTML content
887
+ */
888
+ html: string;
889
+ children: Text[];
890
+ };
891
+ type HtmlBlockPluginCustomTypes = {
892
+ Name: "html-block";
893
+ Editor: Record<string, never>;
894
+ Element: HtmlBlockElement;
895
+ };
896
+
880
897
  declare function createTableMethods(editor: Editor): {
881
898
  getTableInfo: (args_0?: {
882
- at?: ImageBlockElement | ParagraphElement | OrderedListItemElement | UnorderedListItemElement | TaskListItemElement | HorizontalRuleElement | TableElement | TableRowElement | TableCellElement | TableContentElement | CodeBlockElement | CodeBlockLineElement | BlockQuoteElement | HeadingElement | AnchorElement | slate.Location | null | undefined;
899
+ at?: ImageBlockElement | ParagraphElement | OrderedListItemElement | UnorderedListItemElement | TaskListItemElement | HorizontalRuleElement | TableElement | TableRowElement | TableCellElement | TableContentElement | HtmlBlockElement | CodeBlockElement | CodeBlockLineElement | BlockQuoteElement | HeadingElement | AnchorElement | slate.Location | null | undefined;
883
900
  } | undefined) => TableInfo | undefined;
884
901
  insertTable: (args_0: number, args_1: number, args_2?: {
885
902
  at?: slate.Location | null | undefined;
@@ -989,8 +1006,8 @@ type CurriedConvertElements = <T extends Element$1 = Element$1>(matchForToggle:
989
1006
 
990
1007
  declare function createConvertElementMethods(editor: Editor): {
991
1008
  convertElementTypes: string[];
992
- addConvertElementType: (type: "anchor" | "heading" | "block-quote" | "table" | "horizontal-rule" | "code-block" | "paragraph" | "image-block" | "ordered-list-item" | "unordered-list-item" | "task-list-item" | "table-row" | "table-cell" | "table-content" | "code-block-line" | ("anchor" | "heading" | "block-quote" | "table" | "horizontal-rule" | "code-block" | "paragraph" | "image-block" | "ordered-list-item" | "unordered-list-item" | "task-list-item" | "table-row" | "table-cell" | "table-content" | "code-block-line")[]) => void;
993
- isConvertibleElement: (element: ImageBlockElement | ParagraphElement | OrderedListItemElement | UnorderedListItemElement | TaskListItemElement | HorizontalRuleElement | TableElement | TableRowElement | TableCellElement | TableContentElement | CodeBlockElement | CodeBlockLineElement | BlockQuoteElement | HeadingElement | AnchorElement) => boolean;
1009
+ addConvertElementType: (type: "anchor" | "heading" | "block-quote" | "html-block" | "table" | "horizontal-rule" | "code-block" | "paragraph" | "image-block" | "ordered-list-item" | "unordered-list-item" | "task-list-item" | "table-row" | "table-cell" | "table-content" | "code-block-line" | ("anchor" | "heading" | "block-quote" | "html-block" | "table" | "horizontal-rule" | "code-block" | "paragraph" | "image-block" | "ordered-list-item" | "unordered-list-item" | "task-list-item" | "table-row" | "table-cell" | "table-content" | "code-block-line")[]) => void;
1010
+ isConvertibleElement: (element: ImageBlockElement | ParagraphElement | OrderedListItemElement | UnorderedListItemElement | TaskListItemElement | HorizontalRuleElement | TableElement | TableRowElement | TableCellElement | TableContentElement | HtmlBlockElement | CodeBlockElement | CodeBlockLineElement | BlockQuoteElement | HeadingElement | AnchorElement) => boolean;
994
1011
  convertElements: CurriedConvertElements;
995
1012
  };
996
1013
 
@@ -1018,7 +1035,7 @@ type PasteMarkdownPluginCustomTypes = {
1018
1035
  /**
1019
1036
  * @deprecated Use defaultPlugins instead
1020
1037
  */
1021
- declare const plugins: (TypedPlugin<PasteMarkdownPluginCustomTypes> | TypedPlugin<ConvertElementPluginCustomTypes> | TypedPlugin<AnchorPluginCustomTypes> | TypedPlugin<HeadingPluginCustomTypes> | TypedPlugin<MarksPluginCustomTypes> | TypedPlugin<InlineCodePluginCustomTypes> | TypedPlugin<BlockQuotePluginCustomTypes> | TypedPlugin<CodeBlockPluginCustomTypes> | TypedPlugin<TablePluginCustomTypes> | TypedPlugin<HorizontalRulePluginCustomTypes> | TypedPlugin<{
1038
+ declare const plugins: (TypedPlugin<PasteMarkdownPluginCustomTypes> | TypedPlugin<ConvertElementPluginCustomTypes> | TypedPlugin<AnchorPluginCustomTypes> | TypedPlugin<HeadingPluginCustomTypes> | TypedPlugin<MarksPluginCustomTypes> | TypedPlugin<InlineCodePluginCustomTypes> | TypedPlugin<BlockQuotePluginCustomTypes> | TypedPlugin<CodeBlockPluginCustomTypes> | TypedPlugin<HtmlBlockPluginCustomTypes> | TypedPlugin<TablePluginCustomTypes> | TypedPlugin<HorizontalRulePluginCustomTypes> | TypedPlugin<{
1022
1039
  Name: "trailing-block";
1023
1040
  Editor: {
1024
1041
  allowTrailingBlock: true;