slate-vue3 0.0.38 → 0.0.40
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 +5 -13
- package/dist/{batch-dirty-paths-B1wfvdKs.js → batch-dirty-paths-CZqHWmdq.js} +27 -27
- package/dist/core.js +96 -2595
- package/dist/create-editor-BP4gf1UN.js +2585 -0
- package/dist/dom.d.ts +1 -3
- package/dist/dom.js +45 -45
- package/dist/history.js +2 -2
- package/dist/{hotkeys-BcYtYztM.js → hotkeys-DpsWjIJe.js} +42 -42
- package/dist/hyperscript.d.ts +1753 -0
- package/dist/hyperscript.js +251 -0
- package/dist/index.d.ts +12 -24
- package/dist/index.js +8 -20
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -33,8 +33,11 @@ npm install slate-vue3
|
|
|
33
33
|
## 2. Now, you can use it in vue-sfc :point_right: [**live demo**](https://guan-erjia.github.io/slate-vue3/)
|
|
34
34
|
```vue
|
|
35
35
|
<script setup lang="ts">
|
|
36
|
-
import { withDOM, Slate, Editable, defaultRenderLeaf, defaultRenderPlaceHolder, createEditor, withHistory } from "slate-vue3"
|
|
37
36
|
import { h } from "vue"
|
|
37
|
+
import { Slate, Editable, defaultRenderLeaf, defaultRenderPlaceHolder } from "slate-vue3"
|
|
38
|
+
import { createEditor } from "slate-vue3/core"
|
|
39
|
+
import { withDOM } from "slate-vue3/dom"
|
|
40
|
+
import { withHistory } from "slate-vue3/history"
|
|
38
41
|
|
|
39
42
|
const initialValue = [
|
|
40
43
|
{
|
|
@@ -118,7 +121,7 @@ export interface RenderPlaceholderProps {
|
|
|
118
121
|
## Editable
|
|
119
122
|
> customize style of editablearea, you can inherient other HTMLAttribute on it
|
|
120
123
|
```typescript
|
|
121
|
-
|
|
124
|
+
interface EditableProps extends HTMLAttributes {
|
|
122
125
|
role?: string
|
|
123
126
|
readOnly: boolean
|
|
124
127
|
placeholder?: string
|
|
@@ -260,17 +263,6 @@ Vue uses lazy updates, rendering with components generates additional state, whi
|
|
|
260
263
|
3. packages/slate/src/interfaces/range.ts 224:224
|
|
261
264
|
4. packages/slate/src/interfaces/transforms/general.ts 322:333
|
|
262
265
|
|
|
263
|
-
**rewrite implement for WeakMap**
|
|
264
|
-
|
|
265
|
-
1. packages/share-tools/index.ts
|
|
266
|
-
2. packages/slate-dom/src/utils/weak-maps.ts
|
|
267
|
-
|
|
268
|
-
**import types from globalThis in slate-dom**
|
|
269
|
-
|
|
270
|
-
1. packages/slate-dom/src/index.ts
|
|
271
|
-
2. packages/slate-dom/src/plugin/dom-editor.ts
|
|
272
|
-
3. packages/slate-dom/src/utils/dom.ts
|
|
273
|
-
|
|
274
266
|
**other compact**
|
|
275
267
|
|
|
276
268
|
1. packages/slate/src/core/normalize-node.ts
|
|
@@ -2367,32 +2367,32 @@ export {
|
|
|
2367
2367
|
Operation as O,
|
|
2368
2368
|
Path as P,
|
|
2369
2369
|
Range as R,
|
|
2370
|
-
|
|
2370
|
+
Scrubber as S,
|
|
2371
2371
|
Text as T,
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2372
|
+
Element as a,
|
|
2373
|
+
Point as b,
|
|
2374
|
+
Transforms as c,
|
|
2375
|
+
isPlainObject as d,
|
|
2376
|
+
isObjectLike as e,
|
|
2377
|
+
baseGetTag as f,
|
|
2378
|
+
Symbol$1 as g,
|
|
2379
|
+
isArray as h,
|
|
2380
|
+
isEditor as i,
|
|
2381
|
+
defineProperty as j,
|
|
2382
|
+
isArguments as k,
|
|
2383
|
+
arrayPush as l,
|
|
2384
|
+
getPrototype as m,
|
|
2385
|
+
copyObject as n,
|
|
2386
|
+
getAllKeysIn as o,
|
|
2387
|
+
baseClone as p,
|
|
2388
|
+
DIRTY_PATH_KEYS as q,
|
|
2389
|
+
isBatchingDirtyPaths as r,
|
|
2390
|
+
NORMALIZING as s,
|
|
2391
|
+
toRawWeakMap as t,
|
|
2392
|
+
PATH_REFS as u,
|
|
2393
|
+
POINT_REFS as v,
|
|
2394
|
+
RANGE_REFS as w,
|
|
2395
|
+
cloneDeep as x,
|
|
2396
|
+
getDefaultInsertLocation as y,
|
|
2397
|
+
batchDirtyPaths as z
|
|
2398
2398
|
};
|