@wangeditor-next/core 1.9.6 → 1.9.7

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/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@wangeditor-next/core",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "wangEditor core",
5
5
  "author": "cycleccc <2991205548@qq.com>",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/wangeditor-next/wangEditor-next#readme",
8
8
  "license": "MIT",
9
9
  "types": "dist/core/src/index.d.ts",
10
+ "typesVersions": {
11
+ "*": {
12
+ "upload": [
13
+ "dist/core/src/upload.d.ts"
14
+ ]
15
+ }
16
+ },
10
17
  "main": "dist/index.js",
11
18
  "module": "dist/index.mjs",
12
19
  "exports": {
@@ -1,22 +0,0 @@
1
- /**
2
- * @description image element
3
- * @author wangfupeng
4
- */
5
- type EmptyText = {
6
- text: '';
7
- };
8
- export type ImageStyle = {
9
- width?: string;
10
- height?: string;
11
- };
12
- export type ImageElement = {
13
- type: 'image';
14
- src: string;
15
- alt?: string;
16
- href?: string;
17
- width?: string;
18
- height?: string;
19
- style?: ImageStyle;
20
- children: EmptyText[];
21
- };
22
- export {};
@@ -1,7 +0,0 @@
1
- import { Editor, Span } from 'slate';
2
- import { WithTableOptions } from './options';
3
- /**
4
- * Determines whether two paths belong to the same types by checking
5
- * if they share a common ancestor node of type table
6
- */
7
- export declare function hasCommon(editor: Editor, [path, another]: Span, ...types: Array<keyof WithTableOptions['blocks']>): boolean;
@@ -1,5 +0,0 @@
1
- export * from './has-common';
2
- export * from './is-of-type';
3
- export * from './matrices';
4
- export * from './point';
5
- export * from './types';
@@ -1,6 +0,0 @@
1
- import { Editor, Element, Node, NodeMatch } from 'slate';
2
- import { WithTableOptions } from './options';
3
- import { WithType } from './types';
4
- export declare function isElement<T extends Element>(node: Node): node is WithType<T>;
5
- /** @returns a `NodeMatch` function which is used to match the elements of a specific `type`. */
6
- export declare function isOfType<T extends WithType<Element>>(editor: Editor, ...types: Array<keyof WithTableOptions['blocks']>): NodeMatch<T>;
@@ -1,9 +0,0 @@
1
- import { Editor, Location, NodeEntry } from 'slate';
2
- import { CellElement, NodeEntryWithContext } from './types';
3
- /** Generates a matrix for each table section (`thead`, `tbody`, `tfoot`) */
4
- export declare function matrices(editor: Editor, options?: {
5
- at?: Location;
6
- }): Generator<NodeEntry<CellElement>[][]>;
7
- export declare function filledMatrix(editor: Editor, options?: {
8
- at?: Location;
9
- }): NodeEntryWithContext[][];
@@ -1,25 +0,0 @@
1
- import { CustomTypes, ExtendedType } from 'slate';
2
- type ElementType = ExtendedType<'Element', CustomTypes>['type'];
3
- export interface WithTableOptions {
4
- blocks: {
5
- td: ElementType;
6
- th: ElementType;
7
- content: ElementType;
8
- tr: ElementType;
9
- table: ElementType;
10
- tbody: ElementType;
11
- tfoot: ElementType;
12
- thead: ElementType;
13
- };
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
- };
25
- export {};
@@ -1,7 +0,0 @@
1
- export declare class Point {
2
- x: number;
3
- y: number;
4
- constructor(x: number, y: number);
5
- static valueOf(x: number, y: number): Point;
6
- static equals(point: Point, another: Point): boolean;
7
- }
@@ -1,19 +0,0 @@
1
- import { Element, NodeEntry } from 'slate';
2
- export type CellElement = WithType<{
3
- rowSpan?: number;
4
- colSpan?: number;
5
- hidden?: boolean;
6
- } & Element>;
7
- /** Extends an element with the "type" property */
8
- export type WithType<T extends Element> = T & Record<'type', unknown>;
9
- export type NodeEntryWithContext = [
10
- NodeEntry<CellElement>,
11
- {
12
- rtl: number;
13
- ltr: number;
14
- ttb: number;
15
- btt: number;
16
- }
17
- ];
18
- export type SelectionMode = 'start' | 'end' | 'all';
19
- export type Edge = 'start' | 'end' | 'top' | 'bottom';
@@ -1,24 +0,0 @@
1
- /**
2
- * @description video element
3
- * @author wangfupeng
4
- */
5
- type EmptyText = {
6
- text: '';
7
- };
8
- export type videoStyle = {
9
- width?: string;
10
- height?: string;
11
- };
12
- export type VideoAlign = 'left' | 'center' | 'right';
13
- export type VideoElement = {
14
- type: 'video';
15
- key?: string;
16
- src: string;
17
- poster?: string;
18
- align?: VideoAlign;
19
- width?: string;
20
- height?: string;
21
- style?: videoStyle;
22
- children: EmptyText[];
23
- };
24
- export {};