slate-react 0.56.1 → 0.57.3
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/Readme.md +2 -2
- package/dist/components/editable.d.ts.map +1 -1
- package/dist/components/slate.d.ts +3 -2
- package/dist/components/slate.d.ts.map +1 -1
- package/dist/components/text.d.ts.map +1 -1
- package/dist/hooks/use-editor.d.ts +5 -5
- package/dist/hooks/use-editor.d.ts.map +1 -1
- package/dist/hooks/use-slate.d.ts +5 -5
- package/dist/hooks/use-slate.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1712 -1535
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1709 -1533
- package/dist/index.js.map +1 -1
- package/dist/plugin/react-editor.d.ts +13 -0
- package/dist/plugin/react-editor.d.ts.map +1 -1
- package/dist/plugin/with-react.d.ts +2 -1
- package/dist/plugin/with-react.d.ts.map +1 -1
- package/dist/slate-react.js +10436 -9604
- package/dist/slate-react.min.js +1 -6
- package/dist/utils/dom.d.ts +11 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/environment.d.ts +1 -0
- package/dist/utils/environment.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/plugin/react-command.d.ts +0 -18
- package/dist/plugin/react-command.d.ts.map +0 -1
package/dist/utils/dom.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export declare const isDOMNode: (value: any) => value is DOMNode;
|
|
|
26
26
|
* Check if a DOM node is an element node.
|
|
27
27
|
*/
|
|
28
28
|
export declare const isDOMText: (value: any) => value is DOMText;
|
|
29
|
+
/**
|
|
30
|
+
* Checks whether a paste event is a plaintext-only event.
|
|
31
|
+
*/
|
|
32
|
+
export declare const isPlainTextOnlyPaste: (event: ClipboardEvent) => boolean | null;
|
|
29
33
|
/**
|
|
30
34
|
* Normalize a DOM point so that it always refers to a text node.
|
|
31
35
|
*/
|
|
@@ -35,4 +39,11 @@ export declare const normalizeDOMPoint: (domPoint: DOMPoint) => DOMPoint;
|
|
|
35
39
|
* `direction`.
|
|
36
40
|
*/
|
|
37
41
|
export declare const getEditableChild: (parent: DOMElement, index: number, direction: "forward" | "backward") => DOMNode;
|
|
42
|
+
/**
|
|
43
|
+
* Get a plaintext representation of the content of a node, accounting for block
|
|
44
|
+
* elements which get a newline appended.
|
|
45
|
+
*
|
|
46
|
+
* The domNode must be attached to the DOM.
|
|
47
|
+
*/
|
|
48
|
+
export declare const getPlainText: (domNode: DOMNode) => string;
|
|
38
49
|
//# sourceMappingURL=dom.d.ts.map
|
package/dist/utils/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/utils/dom.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,OAAO,GAAG,UAAU,CAAC,IAAI,CAAA;AAChC,OAAO,UAAU,GAAG,UAAU,CAAC,OAAO,CAAA;AACtC,OAAO,UAAU,GAAG,UAAU,CAAC,OAAO,CAAA;AACtC,OAAO,OAAO,GAAG,UAAU,CAAC,IAAI,CAAA;AAChC,OAAO,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAA;AAClC,OAAO,YAAY,GAAG,UAAU,CAAC,SAAS,CAAA;AAC1C,OAAO,cAAc,GAAG,UAAU,CAAC,WAAW,CAAA;AAC9C,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,cAAc,GACf,CAAA;AAED,oBAAY,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAErC;;GAEG;AAEH,eAAO,MAAM,YAAY,qCAExB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,YAAY,qCAExB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,SAAS,kCAErB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,SAAS,kCAErB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,iBAAiB,kCAwB7B,CAAA;AAED;;;GAGG;AAEH,eAAO,MAAM,gBAAgB,mFAyC5B,CAAA"}
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/utils/dom.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,OAAO,GAAG,UAAU,CAAC,IAAI,CAAA;AAChC,OAAO,UAAU,GAAG,UAAU,CAAC,OAAO,CAAA;AACtC,OAAO,UAAU,GAAG,UAAU,CAAC,OAAO,CAAA;AACtC,OAAO,OAAO,GAAG,UAAU,CAAC,IAAI,CAAA;AAChC,OAAO,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAA;AAClC,OAAO,YAAY,GAAG,UAAU,CAAC,SAAS,CAAA;AAC1C,OAAO,cAAc,GAAG,UAAU,CAAC,WAAW,CAAA;AAC9C,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,cAAc,GACf,CAAA;AAED,oBAAY,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAErC;;GAEG;AAEH,eAAO,MAAM,YAAY,qCAExB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,YAAY,qCAExB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,SAAS,kCAErB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,SAAS,kCAErB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,oBAAoB,2CAMhC,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,iBAAiB,kCAwB7B,CAAA;AAED;;;GAGG;AAEH,eAAO,MAAM,gBAAgB,mFAyC5B,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,8BAoBxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/utils/environment.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,OAID,CAAA;AAElB,eAAO,MAAM,QAAQ,SACqD,CAAA;AAE1E,eAAO,MAAM,UAAU,SAEuC,CAAA;AAE9D,eAAO,MAAM,SAAS,SAEgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/utils/environment.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,OAID,CAAA;AAElB,eAAO,MAAM,QAAQ,SACqD,CAAA;AAE1E,eAAO,MAAM,UAAU,SAEuC,CAAA;AAE9D,eAAO,MAAM,SAAS,SAEgC,CAAA;AAGtD,eAAO,MAAM,cAAc,SAEoC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slate-react",
|
|
3
3
|
"description": "Tools for building completely customizable richtext editors with React.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.57.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "git://github.com/ianstormtaylor/slate.git",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"dist/"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@types/debounce": "^1.2.0",
|
|
18
17
|
"@types/is-hotkey": "^0.1.1",
|
|
19
|
-
"
|
|
18
|
+
"@types/lodash": "^4.14.149",
|
|
20
19
|
"direction": "^1.0.3",
|
|
21
20
|
"is-hotkey": "^0.1.6",
|
|
22
21
|
"is-plain-object": "^3.0.0",
|
|
22
|
+
"lodash": "^4.17.4",
|
|
23
23
|
"scroll-into-view-if-needed": "^2.2.20"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"slate": "^0.
|
|
27
|
-
"slate-hyperscript": "^0.
|
|
26
|
+
"slate": "^0.57.3",
|
|
27
|
+
"slate-hyperscript": "^0.57.3"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=16.8.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"wysiwyg",
|
|
58
58
|
"wysiwym"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "036ee664aff6b4eb1f43b0790c96a3984beb954a"
|
|
61
61
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `InsertDataCommand` inserts content from a `DataTransfer` object.
|
|
3
|
-
*/
|
|
4
|
-
export interface InsertDataCommand {
|
|
5
|
-
type: 'insert_data';
|
|
6
|
-
data: DataTransfer;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The `ReactCommand` union for all commands that the React plugins defines.
|
|
10
|
-
*/
|
|
11
|
-
export declare type ReactCommand = InsertDataCommand;
|
|
12
|
-
export declare const ReactCommand: {
|
|
13
|
-
/**
|
|
14
|
-
* Check if a value is a `ReactCommand` object.
|
|
15
|
-
*/
|
|
16
|
-
isReactCommand(value: any): value is InsertDataCommand;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=react-command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-command.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/react-command.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED;;GAEG;AAEH,oBAAY,YAAY,GAAG,iBAAiB,CAAA;AAE5C,eAAO,MAAM,YAAY;IACvB;;OAEG;;CAYJ,CAAA"}
|