@wangeditor-next/plugin-float-image 3.0.0 → 6.2.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.
Files changed (44) hide show
  1. package/dist/basic-modules/src/constants/icon-svg.d.ts +2 -0
  2. package/dist/basic-modules/src/locale/en.d.ts +2 -0
  3. package/dist/basic-modules/src/locale/zh-CN.d.ts +2 -0
  4. package/dist/basic-modules/src/modules/header/parse-elem-html.d.ts +2 -2
  5. package/dist/basic-modules/src/modules/text-style/custom-types.d.ts +2 -0
  6. package/dist/basic-modules/src/modules/text-style/menu/EmphasisDotMenu.d.ts +11 -0
  7. package/dist/basic-modules/src/modules/text-style/menu/WavyUnderlineMenu.d.ts +11 -0
  8. package/dist/basic-modules/src/modules/text-style/menu/index.d.ts +10 -0
  9. package/dist/basic-modules/src/modules/text-style/render-style.d.ts +2 -1
  10. package/dist/basic-modules/src/modules/text-style/style-constants.d.ts +35 -0
  11. package/dist/basic-modules/src/modules/text-style/style-to-html.d.ts +2 -1
  12. package/dist/basic-modules/src/utils/dom.d.ts +1 -1
  13. package/dist/code-highlight/src/utils/dom.d.ts +1 -1
  14. package/dist/core/src/config/interface.d.ts +32 -2
  15. package/dist/core/src/editor/interface.d.ts +16 -3
  16. package/dist/core/src/index.d.ts +4 -2
  17. package/dist/core/src/render/helper.d.ts +1 -2
  18. package/dist/core/src/to-html/index.d.ts +12 -0
  19. package/dist/core/src/utils/dom.d.ts +1 -1
  20. package/dist/editor/src/Boot.d.ts +2 -2
  21. package/dist/editor/src/index.d.ts +7 -0
  22. package/dist/index.js +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/list-module/src/locale/en.d.ts +3 -0
  26. package/dist/list-module/src/locale/zh-CN.d.ts +3 -0
  27. package/dist/list-module/src/module/custom-types.d.ts +13 -0
  28. package/dist/list-module/src/module/helpers.d.ts +14 -4
  29. package/dist/list-module/src/module/html-transform.d.ts +10 -0
  30. package/dist/list-module/src/module/menu/BaseMenu.d.ts +2 -2
  31. package/dist/list-module/src/module/outline-actions.d.ts +9 -0
  32. package/dist/list-module/src/module/parse-elem-html.d.ts +1 -2
  33. package/dist/list-module/src/module/plugin.d.ts +1 -1
  34. package/dist/list-module/src/utils/maps.d.ts +2 -1
  35. package/dist/plugin-float-image/src/utils/dom.d.ts +1 -1
  36. package/dist/table-module/src/module/menu/CellProperty.d.ts +2 -1
  37. package/dist/table-module/src/module/menu/TableProperty.d.ts +2 -1
  38. package/dist/table-module/src/module/render-elem/selection-overlay.d.ts +21 -0
  39. package/dist/table-module/src/module/weak-maps.d.ts +3 -2
  40. package/dist/table-module/src/utils/dom.d.ts +1 -1
  41. package/dist/table-module/src/utils/options.d.ts +3 -12
  42. package/dist/upload-image-module/src/utils/dom.d.ts +1 -1
  43. package/dist/video-module/src/utils/dom.d.ts +1 -1
  44. package/package.json +3 -3
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description compose semantic outline HTML from additive list-item metadata
3
+ */
4
+ import { HtmlTransformFnType } from '@wangeditor-next/core';
5
+ /**
6
+ * List-item serialization remains backward compatible for ordinary lists.
7
+ * Only outline list items need document-level composition to create valid
8
+ * `ol > li > hN` structure.
9
+ */
10
+ export declare const transformListHtml: HtmlTransformFnType;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @description base menu
2
+ * @description list menu base class
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
@@ -11,7 +11,7 @@ declare abstract class BaseMenu implements IButtonMenu {
11
11
  abstract readonly title: string;
12
12
  abstract readonly iconSvg: string;
13
13
  readonly tag = "button";
14
- private getListNode;
14
+ private isTargetListNode;
15
15
  getValue(_editor: IDomEditor): string | boolean;
16
16
  isActive(editor: IDomEditor): boolean;
17
17
  isDisabled(editor: IDomEditor): boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description outline numbering marker actions
3
+ */
4
+ import { IDomEditor } from '@wangeditor-next/core';
5
+ import { ListItemElement } from './custom-types';
6
+ export declare function continueOutlineNumbering(editor: IDomEditor, node: ListItemElement): void;
7
+ export declare function restartOutlineNumbering(editor: IDomEditor, node: ListItemElement): void;
8
+ export declare function hideOutlineActionPanel(editor: IDomEditor): void;
9
+ export declare function showOutlineActionPanel(editor: IDomEditor, node: ListItemElement, marker: HTMLElement): void;
@@ -1,6 +1,5 @@
1
1
  /**
2
- * @description parse elem html
3
- * @author wangfupeng
2
+ * @description parse list HTML
4
3
  */
5
4
  import { IDomEditor } from '@wangeditor-next/core';
6
5
  import { Descendant } from 'slate';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @description editor 插件,重写 editor API
2
+ * @description list editor plugin
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { IDomEditor } from '@wangeditor-next/core';
@@ -3,4 +3,5 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import { IDomEditor } from '@wangeditor-next/core';
6
- export declare const ELEM_TO_EDITOR: WeakMap<import("packages/custom-types").CustomElement, IDomEditor>;
6
+ import { BaseElement } from 'slate';
7
+ export declare const ELEM_TO_EDITOR: WeakMap<BaseElement, IDomEditor>;
@@ -10,7 +10,7 @@ import DOMText = globalThis.Text;
10
10
  import DOMRange = globalThis.Range;
11
11
  import DOMSelection = globalThis.Selection;
12
12
  import DOMStaticRange = globalThis.StaticRange;
13
- export { Dom7Array } from 'dom7';
13
+ export type { Dom7Array } from 'dom7';
14
14
  export declare function getStyleValue($elem: Dom7Array, styleKey: string): string;
15
15
  export default $;
16
16
  export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
@@ -1,4 +1,5 @@
1
1
  import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
2
+ import { NodeEntry } from 'slate';
2
3
  import TableProperty, { FieldName } from './TableProperty';
3
4
  declare class CellProperty extends TableProperty implements IButtonMenu {
4
5
  readonly title: string;
@@ -8,6 +9,6 @@ declare class CellProperty extends TableProperty implements IButtonMenu {
8
9
  readonly modalWidth = 360;
9
10
  readonly menu = "cell";
10
11
  readonly propertyFields: FieldName[];
11
- getModalContentNode(editor: IDomEditor): import("slate").NodeEntry<import("../../utils").WithType<import("packages/custom-types").CustomElement>>;
12
+ getModalContentNode(editor: IDomEditor): NodeEntry;
12
13
  }
13
14
  export default CellProperty;
@@ -3,6 +3,7 @@
3
3
  * @author hsuna
4
4
  */
5
5
  import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ import { NodeEntry } from 'slate';
6
7
  export type FieldName = 'borderStyle' | 'borderColor' | 'borderWidth' | 'backgroundColor' | 'textAlign' | 'verticalAlign';
7
8
  type SelectOption = {
8
9
  value: string;
@@ -35,7 +36,7 @@ declare class TableProperty implements IButtonMenu {
35
36
  isActive(_editor: IDomEditor): boolean;
36
37
  isDisabled(editor: IDomEditor): boolean;
37
38
  exec(_editor: IDomEditor, _value: string | boolean): void;
38
- getModalContentNode(editor: IDomEditor): import("slate").NodeEntry<import("../../utils").WithType<import("packages/custom-types").CustomElement>>;
39
+ getModalContentNode(editor: IDomEditor): NodeEntry;
39
40
  getModalPositionNode(_editor: IDomEditor): null;
40
41
  getModalContentElem(editor: IDomEditor): Element | null;
41
42
  getPanelContentElem(editor: any, { mark, selectedColor, callback }: {
@@ -0,0 +1,21 @@
1
+ import { VNode } from 'snabbdom';
2
+ export type SelectionRect = {
3
+ top: number;
4
+ right: number;
5
+ bottom: number;
6
+ left: number;
7
+ };
8
+ export type SelectionPerimeterSide = 'top' | 'right' | 'bottom' | 'left';
9
+ export type SelectionPerimeterSegment = {
10
+ side: SelectionPerimeterSide;
11
+ offset: number;
12
+ start: number;
13
+ end: number;
14
+ };
15
+ /**
16
+ * Returns the physical perimeter of a set of non-overlapping cell rectangles. Opposing edges
17
+ * cancel only where they overlap, so partially exposed sides of merged cells remain precise.
18
+ */
19
+ export declare function getSelectionPerimeterSegments(rects: SelectionRect[]): SelectionPerimeterSegment[];
20
+ export declare function drawSelectionOverlay(elm: Node | undefined): void;
21
+ export declare function renderSelectionOverlay(): VNode;
@@ -1,5 +1,6 @@
1
+ import { BaseEditor, BaseElement } from 'slate';
1
2
  import { NodeEntryWithContext } from '../utils';
2
3
  /** Weak reference between the `Editor` and the selected elements */
3
- export declare const EDITOR_TO_SELECTION: WeakMap<import("slate").BaseEditor, NodeEntryWithContext[][]>;
4
+ export declare const EDITOR_TO_SELECTION: WeakMap<BaseEditor, NodeEntryWithContext[][]>;
4
5
  /** Weak reference between the `Editor` and a set of the selected elements */
5
- export declare const EDITOR_TO_SELECTION_SET: WeakMap<import("slate").BaseEditor, WeakSet<import("packages/custom-types").CustomElement>>;
6
+ export declare const EDITOR_TO_SELECTION_SET: WeakMap<BaseEditor, WeakSet<BaseElement>>;
@@ -10,7 +10,7 @@ import DOMText = globalThis.Text;
10
10
  import DOMRange = globalThis.Range;
11
11
  import DOMSelection = globalThis.Selection;
12
12
  import DOMStaticRange = globalThis.StaticRange;
13
- export { Dom7Array } from 'dom7';
13
+ export type { Dom7Array } from 'dom7';
14
14
  export default $;
15
15
  /**
16
16
  * 获取 tagName lower-case
@@ -8,18 +8,9 @@ export interface WithTableOptions {
8
8
  tr: ElementType;
9
9
  table: ElementType;
10
10
  tbody: ElementType;
11
- tfoot: ElementType;
12
- thead: ElementType;
11
+ tfoot?: ElementType;
12
+ thead?: ElementType;
13
13
  };
14
14
  }
15
- export declare const DEFAULT_WITH_TABLE_OPTIONS: {
16
- blocks: {
17
- td: string;
18
- th: string;
19
- content: string;
20
- tr: string;
21
- table: string;
22
- tbody: string;
23
- };
24
- };
15
+ export declare const DEFAULT_WITH_TABLE_OPTIONS: WithTableOptions;
25
16
  export {};
@@ -3,5 +3,5 @@
3
3
  * @author wangfupeng
4
4
  */
5
5
  import $ from 'dom7';
6
- export { Dom7Array } from 'dom7';
6
+ export type { Dom7Array } from 'dom7';
7
7
  export default $;
@@ -11,7 +11,7 @@ import DOMText = globalThis.Text;
11
11
  import DOMRange = globalThis.Range;
12
12
  import DOMSelection = globalThis.Selection;
13
13
  import DOMStaticRange = globalThis.StaticRange;
14
- export { Dom7Array } from 'dom7';
14
+ export type { Dom7Array } from 'dom7';
15
15
  export default $;
16
16
  /**
17
17
  * 获取 tagName lower-case
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wangeditor-next/plugin-float-image",
3
- "version": "3.0.0",
3
+ "version": "6.2.0",
4
4
  "description": "wangEditor float image plugin",
5
5
  "author": "cycleccc <2991205548@qq.com>",
6
6
  "type": "module",
@@ -34,10 +34,10 @@
34
34
  "url": "https://github.com/wangeditor-next/wangEditor-next/issues"
35
35
  },
36
36
  "peerDependencies": {
37
- "@wangeditor-next/editor": ">=6.0.0",
38
37
  "dom7": "^3.0.0 || ^4.0.0",
39
38
  "slate": "^0.124.0",
40
- "snabbdom": "^3.6.0"
39
+ "snabbdom": "^3.6.0",
40
+ "@wangeditor-next/editor": "^6.2.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@wangeditor-next-shared/rollup-config": "^0.0.2"