slate-vue3 0.15.0 → 1.0.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.
- package/README.md +2 -3
- package/dist/dom.js +2 -2
- package/dist/index.js +2 -2
- package/dist/slate-dom/custom-types.d.ts +2 -0
- package/dist/slate-dom/plugin/dom-editor.d.ts +3 -1
- package/dist/slate-dom/utils/weak-maps.d.ts +1 -0
- package/dist/slate-dom-cOXt9FLf.js +1874 -0
- package/dist/slate-vue/components/children.d.ts +7 -2
- package/dist/slate-vue/components/chunk.d.ts +12 -3
- package/dist/slate-vue/components/element.d.ts +3 -1
- package/dist/slate-vue/components/placeholder.d.ts +8 -3
- package/dist/slate-vue/components/text.d.ts +2 -2
- package/dist/slate-vue/hooks/use-decorations.d.ts +5 -0
- package/dist/slate-vue/render/chunk.d.ts +0 -4
- package/dist/slate-vue/render/decorate.d.ts +1 -4
- package/dist/slate-vue/render/placeholder.d.ts +1 -19
- package/dist/slate-vue/utils/interface.d.ts +1 -1
- package/dist/{slate-vue-BAUZN2zq.js → slate-vue-CluiGoan.js} +221 -217
- package/dist/yjs.js +7 -6
- package/package.json +5 -22
- package/dist/slate-dom-Bhp4HdEp.js +0 -6143
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
#### 1. Install slate-vue3
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
|
-
npm install slate-vue3
|
|
39
|
+
npm install slate-vue3
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
#### 2. Now, you can use it in vue-sfc :point_right: [**live demo**](https://guan-erjia.github.io/slate-vue3/examples/rich-text)
|
|
@@ -44,7 +44,6 @@ npm install slate-vue3 slate-history
|
|
|
44
44
|
```vue
|
|
45
45
|
<script setup lang="ts">
|
|
46
46
|
import { Slate, Editable, createReactiveEditor } from "slate-vue3";
|
|
47
|
-
import { withHistory } from "slate-history";
|
|
48
47
|
|
|
49
48
|
const initialValue = [
|
|
50
49
|
{
|
|
@@ -52,7 +51,7 @@ const initialValue = [
|
|
|
52
51
|
children: [{ text: "Let's start" }],
|
|
53
52
|
},
|
|
54
53
|
];
|
|
55
|
-
const editor =
|
|
54
|
+
const editor = createReactiveEditor();
|
|
56
55
|
editor.children = initialValue;
|
|
57
56
|
</script>
|
|
58
57
|
|
package/dist/dom.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { CAN_USE_DOM, DOMEditor, EDITOR_TO_ELEMENT, EDITOR_TO_KEY_TO_ELEMENT, EDITOR_TO_ON_CHANGE, EDITOR_TO_USER_MARKS, EDITOR_TO_USER_SELECTION, EDITOR_TO_WINDOW, ELEMENT_TO_NODE, HAS_BEFORE_INPUT_SUPPORT, Hotkeys, IS_ANDROID, IS_ANDROID_CHROME_LEGACY, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_COMPOSING, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_FOCUSED, IS_IOS, IS_READ_ONLY, IS_SAFARI_LEGACY, IS_UC_MOBILE, IS_WEBKIT, IS_WECHATBROWSER, Key, MARK_PLACEHOLDER_SYMBOL, NODE_TO_ELEMENT, NODE_TO_INDEX, NODE_TO_KEY, NODE_TO_PARENT, applyStringDiff, closestShadowAware, containsShadowAware, getActiveElement, getClipboardData, getDefaultView, getEditableChild, getEditableChildAndIndex, getPlainText, getSelection, getSlateFragmentAttribute, hasShadowRoot, isAfter, isBefore, isDOMComment, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isElementDecorationsEqual, isPlainTextOnlyPaste, isTextDecorationsEqual, isTrackedMutation, normalizeDOMPoint, normalizeStringDiff, shallowCompare, splitDecorationsByChild, withDOM };
|
|
1
|
+
import { $ as getSelection, A as CAN_USE_DOM, B as IS_IOS, C as MARK_PLACEHOLDER_SYMBOL, D as NODE_TO_PARENT, E as NODE_TO_KEY, F as IS_CHROME, G as closestShadowAware, H as IS_UC_MOBILE, I as IS_CHROME_LEGACY, J as getClipboardData, K as containsShadowAware, L as IS_EDGE_LEGACY, M as IS_ANDROID, N as IS_ANDROID_CHROME_LEGACY, O as PLACEHOLDER_SYMBOL, P as IS_APPLE, Q as getPlainText, R as IS_FIREFOX, S as IS_READ_ONLY, T as NODE_TO_INDEX, U as IS_WEBKIT, V as IS_SAFARI_LEGACY, W as IS_WECHATBROWSER, X as getEditableChild, Y as getDefaultView, Z as getEditableChildAndIndex, _ as EDITOR_TO_USER_SELECTION, a as Hotkeys, at as isDOMElement, b as IS_COMPOSING, c as withDOM, ct as isDOMText, dt as normalizeDOMPoint, et as getSlateFragmentAttribute, f as DOMEditor, g as EDITOR_TO_USER_MARKS, h as EDITOR_TO_ON_CHANGE, i as splitDecorationsByChild, it as isDOMComment, j as HAS_BEFORE_INPUT_SUPPORT, k as Key, lt as isPlainTextOnlyPaste, m as EDITOR_TO_KEY_TO_ELEMENT, n as isTextDecorationsEqual, nt as isAfter, o as applyStringDiff, ot as isDOMNode, p as EDITOR_TO_ELEMENT, q as getActiveElement, r as shallowCompare, rt as isBefore, s as normalizeStringDiff, st as isDOMSelection, t as isElementDecorationsEqual, tt as hasShadowRoot, ut as isTrackedMutation, v as EDITOR_TO_WINDOW, w as NODE_TO_ELEMENT, x as IS_FOCUSED, y as ELEMENT_TO_NODE, z as IS_FIREFOX_LEGACY } from "./slate-dom-cOXt9FLf.js";
|
|
2
|
+
export { CAN_USE_DOM, DOMEditor, EDITOR_TO_ELEMENT, EDITOR_TO_KEY_TO_ELEMENT, EDITOR_TO_ON_CHANGE, EDITOR_TO_USER_MARKS, EDITOR_TO_USER_SELECTION, EDITOR_TO_WINDOW, ELEMENT_TO_NODE, HAS_BEFORE_INPUT_SUPPORT, Hotkeys, IS_ANDROID, IS_ANDROID_CHROME_LEGACY, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_COMPOSING, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_FOCUSED, IS_IOS, IS_READ_ONLY, IS_SAFARI_LEGACY, IS_UC_MOBILE, IS_WEBKIT, IS_WECHATBROWSER, Key, MARK_PLACEHOLDER_SYMBOL, NODE_TO_ELEMENT, NODE_TO_INDEX, NODE_TO_KEY, NODE_TO_PARENT, PLACEHOLDER_SYMBOL, applyStringDiff, closestShadowAware, containsShadowAware, getActiveElement, getClipboardData, getDefaultView, getEditableChild, getEditableChildAndIndex, getPlainText, getSelection, getSlateFragmentAttribute, hasShadowRoot, isAfter, isBefore, isDOMComment, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isElementDecorationsEqual, isPlainTextOnlyPaste, isTextDecorationsEqual, isTrackedMutation, normalizeDOMPoint, normalizeStringDiff, shallowCompare, splitDecorationsByChild, withDOM };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as reconcileChildren, l as KEY_TO_CHUNK_TREE, u as getChunkTreeForNode } from "./slate-dom-
|
|
2
|
-
import { C as isEventHandled, D as SLATE_USE_FOCUSED, E as SLATE_USE_ELEMENT, O as SLATE_USE_READ_ONLY, S as isDOMEventTargetInput, T as SLATE_USE_EDITOR, _ as DEFAULT_PLACEHOLDER_RENDER, a as useFocused, b as handleNativeHistoryEvents, c as useReadOnly, d as useEditor, f as Slate, g as DEFAULT_LEAF_RENDER, h as DEFAULT_ELEMENT_RENDER, i as useSelected, k as SLATE_USE_SELECTION, l as useElement, m as DEFAULT_DECORATE_FN, n as useInheritRef, o as Editable, p as DEFAULT_CHUNK_RENDER, r as useSelection, s as useComposing, t as createReactiveEditor, u as useElementIf, v as DEFAULT_SCROLL_INTO_VIEW, w as SLATE_USE_COMPOSING, x as isDOMEventHandled, y as DEFAULT_TEXT_RENDER } from "./slate-vue-
|
|
1
|
+
import { d as reconcileChildren, l as KEY_TO_CHUNK_TREE, u as getChunkTreeForNode } from "./slate-dom-cOXt9FLf.js";
|
|
2
|
+
import { C as isEventHandled, D as SLATE_USE_FOCUSED, E as SLATE_USE_ELEMENT, O as SLATE_USE_READ_ONLY, S as isDOMEventTargetInput, T as SLATE_USE_EDITOR, _ as DEFAULT_PLACEHOLDER_RENDER, a as useFocused, b as handleNativeHistoryEvents, c as useReadOnly, d as useEditor, f as Slate, g as DEFAULT_LEAF_RENDER, h as DEFAULT_ELEMENT_RENDER, i as useSelected, k as SLATE_USE_SELECTION, l as useElement, m as DEFAULT_DECORATE_FN, n as useInheritRef, o as Editable, p as DEFAULT_CHUNK_RENDER, r as useSelection, s as useComposing, t as createReactiveEditor, u as useElementIf, v as DEFAULT_SCROLL_INTO_VIEW, w as SLATE_USE_COMPOSING, x as isDOMEventHandled, y as DEFAULT_TEXT_RENDER } from "./slate-vue-CluiGoan.js";
|
|
3
3
|
export { DEFAULT_CHUNK_RENDER, DEFAULT_DECORATE_FN, DEFAULT_ELEMENT_RENDER, DEFAULT_LEAF_RENDER, DEFAULT_PLACEHOLDER_RENDER, DEFAULT_SCROLL_INTO_VIEW, DEFAULT_TEXT_RENDER, Editable, KEY_TO_CHUNK_TREE, SLATE_USE_COMPOSING, SLATE_USE_EDITOR, SLATE_USE_ELEMENT, SLATE_USE_FOCUSED, SLATE_USE_READ_ONLY, SLATE_USE_SELECTION, Slate, createReactiveEditor, getChunkTreeForNode, handleNativeHistoryEvents, isDOMEventHandled, isDOMEventTargetInput, isEventHandled, reconcileChildren, useComposing, useEditor, useElement, useElementIf, useFocused, useInheritRef, useReadOnly, useSelected, useSelection };
|
|
@@ -34,4 +34,5 @@ export declare const EDITOR_TO_ON_CHANGE: WeakMap<import('slate').BaseEditor, (o
|
|
|
34
34
|
operation?: Operation;
|
|
35
35
|
}) => void>;
|
|
36
36
|
export declare const EDITOR_TO_USER_MARKS: WeakMap<Editor, Partial<Text> | null>;
|
|
37
|
+
export declare const PLACEHOLDER_SYMBOL: string;
|
|
37
38
|
export declare const MARK_PLACEHOLDER_SYMBOL: string;
|