slate-vue3 0.2.11 → 0.3.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.
- package/dist/{batch-dirty-paths-pvy6IJFh.js → batch-dirty-paths-DdGxRyrT.js} +40 -125
- package/dist/core.js +3 -3
- package/dist/{create-editor-BUkL7rUJ.js → create-editor-BLBmZQoI.js} +6 -4
- package/dist/dom.js +3 -3
- package/dist/history.js +6 -3
- package/dist/{hotkeys-mwG-vBv9.js → hotkeys-CmyQAN4Q.js} +1 -1
- package/dist/hyperscript.js +2 -2
- package/dist/index.js +12 -1773
- package/dist/{location-Cf-z17XM.js → location-BQJIMGOU.js} +1 -1
- package/dist/slate/interfaces/editor.d.ts +1 -0
- package/dist/slate-yjs/hooks/useDecorateRemoteCursors.d.ts +23 -0
- package/dist/slate-yjs/hooks/useRemoteCursorEditor.d.ts +3 -0
- package/dist/slate-yjs/hooks/useRemoteCursorOverlayPositions.d.ts +14 -0
- package/dist/slate-yjs/hooks/useRemoteCursorStateStore.d.ts +4 -0
- package/dist/slate-yjs/hooks/useRemoteCursorStates.d.ts +3 -0
- package/dist/slate-yjs/hooks/useUnsetCursorPositionOnBlur.d.ts +1 -0
- package/dist/slate-yjs/hooks/utils.d.ts +32 -0
- package/dist/slate-yjs/index.d.ts +8 -2
- package/dist/use-focused-C0jEAq2w.js +1776 -0
- package/dist/yjs.js +386 -3
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toRaw, isProxy } from "vue";
|
|
2
2
|
/*!
|
|
3
3
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
4
|
*
|
|
@@ -738,12 +738,12 @@ var freeGlobal = typeof global == "object" && global && global.Object === Object
|
|
|
738
738
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
739
739
|
var root = freeGlobal || freeSelf || Function("return this")();
|
|
740
740
|
var Symbol$1 = root.Symbol;
|
|
741
|
-
var objectProto$
|
|
742
|
-
var hasOwnProperty$
|
|
743
|
-
var nativeObjectToString$1 = objectProto$
|
|
741
|
+
var objectProto$b = Object.prototype;
|
|
742
|
+
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
743
|
+
var nativeObjectToString$1 = objectProto$b.toString;
|
|
744
744
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
745
745
|
function getRawTag(value) {
|
|
746
|
-
var isOwn = hasOwnProperty$
|
|
746
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
747
747
|
try {
|
|
748
748
|
value[symToStringTag$1] = void 0;
|
|
749
749
|
var unmasked = true;
|
|
@@ -759,8 +759,8 @@ function getRawTag(value) {
|
|
|
759
759
|
}
|
|
760
760
|
return result;
|
|
761
761
|
}
|
|
762
|
-
var objectProto$
|
|
763
|
-
var nativeObjectToString = objectProto$
|
|
762
|
+
var objectProto$a = Object.prototype;
|
|
763
|
+
var nativeObjectToString = objectProto$a.toString;
|
|
764
764
|
function objectToString(value) {
|
|
765
765
|
return nativeObjectToString.call(value);
|
|
766
766
|
}
|
|
@@ -813,11 +813,11 @@ function toSource(func) {
|
|
|
813
813
|
}
|
|
814
814
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
815
815
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
816
|
-
var funcProto = Function.prototype, objectProto$
|
|
816
|
+
var funcProto = Function.prototype, objectProto$9 = Object.prototype;
|
|
817
817
|
var funcToString = funcProto.toString;
|
|
818
|
-
var hasOwnProperty$
|
|
818
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
819
819
|
var reIsNative = RegExp(
|
|
820
|
-
"^" + funcToString.call(hasOwnProperty$
|
|
820
|
+
"^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
821
821
|
);
|
|
822
822
|
function baseIsNative(value) {
|
|
823
823
|
if (!isObject(value) || isMasked(value)) {
|
|
@@ -851,14 +851,6 @@ var baseCreate = /* @__PURE__ */ function() {
|
|
|
851
851
|
return result;
|
|
852
852
|
};
|
|
853
853
|
}();
|
|
854
|
-
function copyArray(source, array) {
|
|
855
|
-
var index = -1, length = source.length;
|
|
856
|
-
array || (array = Array(length));
|
|
857
|
-
while (++index < length) {
|
|
858
|
-
array[index] = source[index];
|
|
859
|
-
}
|
|
860
|
-
return array;
|
|
861
|
-
}
|
|
862
854
|
var defineProperty = function() {
|
|
863
855
|
try {
|
|
864
856
|
var func = getNative(Object, "defineProperty");
|
|
@@ -898,32 +890,14 @@ function baseAssignValue(object, key, value) {
|
|
|
898
890
|
function eq(value, other) {
|
|
899
891
|
return value === other || value !== value && other !== other;
|
|
900
892
|
}
|
|
901
|
-
var objectProto$
|
|
902
|
-
var hasOwnProperty$
|
|
893
|
+
var objectProto$8 = Object.prototype;
|
|
894
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
903
895
|
function assignValue(object, key, value) {
|
|
904
896
|
var objValue = object[key];
|
|
905
|
-
if (!(hasOwnProperty$
|
|
897
|
+
if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
906
898
|
baseAssignValue(object, key, value);
|
|
907
899
|
}
|
|
908
900
|
}
|
|
909
|
-
function copyObject(source, props, object, customizer) {
|
|
910
|
-
var isNew = !object;
|
|
911
|
-
object || (object = {});
|
|
912
|
-
var index = -1, length = props.length;
|
|
913
|
-
while (++index < length) {
|
|
914
|
-
var key = props[index];
|
|
915
|
-
var newValue = void 0;
|
|
916
|
-
if (newValue === void 0) {
|
|
917
|
-
newValue = source[key];
|
|
918
|
-
}
|
|
919
|
-
if (isNew) {
|
|
920
|
-
baseAssignValue(object, key, newValue);
|
|
921
|
-
} else {
|
|
922
|
-
assignValue(object, key, newValue);
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
return object;
|
|
926
|
-
}
|
|
927
901
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
928
902
|
function isLength(value) {
|
|
929
903
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
@@ -931,9 +905,9 @@ function isLength(value) {
|
|
|
931
905
|
function isArrayLike(value) {
|
|
932
906
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
933
907
|
}
|
|
934
|
-
var objectProto$
|
|
908
|
+
var objectProto$7 = Object.prototype;
|
|
935
909
|
function isPrototype(value) {
|
|
936
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
910
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7;
|
|
937
911
|
return value === proto;
|
|
938
912
|
}
|
|
939
913
|
function baseTimes(n, iteratee) {
|
|
@@ -947,13 +921,13 @@ var argsTag$2 = "[object Arguments]";
|
|
|
947
921
|
function baseIsArguments(value) {
|
|
948
922
|
return isObjectLike(value) && baseGetTag(value) == argsTag$2;
|
|
949
923
|
}
|
|
950
|
-
var objectProto$
|
|
951
|
-
var hasOwnProperty$
|
|
952
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
924
|
+
var objectProto$6 = Object.prototype;
|
|
925
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
926
|
+
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
953
927
|
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
954
928
|
return arguments;
|
|
955
929
|
}()) ? baseIsArguments : function(value) {
|
|
956
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
930
|
+
return isObjectLike(value) && hasOwnProperty$5.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
957
931
|
};
|
|
958
932
|
function stubFalse() {
|
|
959
933
|
return false;
|
|
@@ -993,12 +967,12 @@ var nodeUtil = function() {
|
|
|
993
967
|
}();
|
|
994
968
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
995
969
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
996
|
-
var objectProto$
|
|
997
|
-
var hasOwnProperty$
|
|
970
|
+
var objectProto$5 = Object.prototype;
|
|
971
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
998
972
|
function arrayLikeKeys(value, inherited) {
|
|
999
973
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
1000
974
|
for (var key in value) {
|
|
1001
|
-
if (
|
|
975
|
+
if (hasOwnProperty$4.call(value, key) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1002
976
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1003
977
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1004
978
|
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
@@ -1014,15 +988,15 @@ function overArg(func, transform) {
|
|
|
1014
988
|
};
|
|
1015
989
|
}
|
|
1016
990
|
var nativeKeys = overArg(Object.keys, Object);
|
|
1017
|
-
var objectProto$
|
|
1018
|
-
var hasOwnProperty$
|
|
991
|
+
var objectProto$4 = Object.prototype;
|
|
992
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1019
993
|
function baseKeys(object) {
|
|
1020
994
|
if (!isPrototype(object)) {
|
|
1021
995
|
return nativeKeys(object);
|
|
1022
996
|
}
|
|
1023
997
|
var result = [];
|
|
1024
998
|
for (var key in Object(object)) {
|
|
1025
|
-
if (hasOwnProperty$
|
|
999
|
+
if (hasOwnProperty$3.call(object, key) && key != "constructor") {
|
|
1026
1000
|
result.push(key);
|
|
1027
1001
|
}
|
|
1028
1002
|
}
|
|
@@ -1031,32 +1005,6 @@ function baseKeys(object) {
|
|
|
1031
1005
|
function keys(object) {
|
|
1032
1006
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1033
1007
|
}
|
|
1034
|
-
function nativeKeysIn(object) {
|
|
1035
|
-
var result = [];
|
|
1036
|
-
if (object != null) {
|
|
1037
|
-
for (var key in Object(object)) {
|
|
1038
|
-
result.push(key);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return result;
|
|
1042
|
-
}
|
|
1043
|
-
var objectProto$4 = Object.prototype;
|
|
1044
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1045
|
-
function baseKeysIn(object) {
|
|
1046
|
-
if (!isObject(object)) {
|
|
1047
|
-
return nativeKeysIn(object);
|
|
1048
|
-
}
|
|
1049
|
-
var isProto = isPrototype(object), result = [];
|
|
1050
|
-
for (var key in object) {
|
|
1051
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$3.call(object, key)))) {
|
|
1052
|
-
result.push(key);
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
return result;
|
|
1056
|
-
}
|
|
1057
|
-
function keysIn(object) {
|
|
1058
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
1059
|
-
}
|
|
1060
1008
|
var nativeCreate = getNative(Object, "create");
|
|
1061
1009
|
function hashClear() {
|
|
1062
1010
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
@@ -1258,23 +1206,15 @@ Stack.prototype["delete"] = stackDelete;
|
|
|
1258
1206
|
Stack.prototype.get = stackGet;
|
|
1259
1207
|
Stack.prototype.has = stackHas;
|
|
1260
1208
|
Stack.prototype.set = stackSet;
|
|
1261
|
-
function baseAssign(object, source) {
|
|
1262
|
-
return object && copyObject(source, keys(source), object);
|
|
1263
|
-
}
|
|
1264
|
-
function baseAssignIn(object, source) {
|
|
1265
|
-
return object && copyObject(source, keysIn(source), object);
|
|
1266
|
-
}
|
|
1267
1209
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1268
1210
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1269
1211
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1270
|
-
var Buffer = moduleExports ? root.Buffer : void 0
|
|
1212
|
+
var Buffer = moduleExports ? root.Buffer : void 0;
|
|
1213
|
+
Buffer ? Buffer.allocUnsafe : void 0;
|
|
1271
1214
|
function cloneBuffer(buffer, isDeep) {
|
|
1272
|
-
|
|
1215
|
+
{
|
|
1273
1216
|
return buffer.slice();
|
|
1274
1217
|
}
|
|
1275
|
-
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1276
|
-
buffer.copy(result);
|
|
1277
|
-
return result;
|
|
1278
1218
|
}
|
|
1279
1219
|
function arrayFilter(array, predicate) {
|
|
1280
1220
|
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
@@ -1291,31 +1231,16 @@ function stubArray() {
|
|
|
1291
1231
|
}
|
|
1292
1232
|
var objectProto$1 = Object.prototype;
|
|
1293
1233
|
var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
|
|
1294
|
-
var nativeGetSymbols
|
|
1295
|
-
var getSymbols = !nativeGetSymbols
|
|
1234
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1235
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1296
1236
|
if (object == null) {
|
|
1297
1237
|
return [];
|
|
1298
1238
|
}
|
|
1299
1239
|
object = Object(object);
|
|
1300
|
-
return arrayFilter(nativeGetSymbols
|
|
1240
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1301
1241
|
return propertyIsEnumerable.call(object, symbol);
|
|
1302
1242
|
});
|
|
1303
1243
|
};
|
|
1304
|
-
function copySymbols(source, object) {
|
|
1305
|
-
return copyObject(source, getSymbols(source), object);
|
|
1306
|
-
}
|
|
1307
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1308
|
-
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
1309
|
-
var result = [];
|
|
1310
|
-
while (object) {
|
|
1311
|
-
arrayPush(result, getSymbols(object));
|
|
1312
|
-
object = getPrototype(object);
|
|
1313
|
-
}
|
|
1314
|
-
return result;
|
|
1315
|
-
};
|
|
1316
|
-
function copySymbolsIn(source, object) {
|
|
1317
|
-
return copyObject(source, getSymbolsIn(source), object);
|
|
1318
|
-
}
|
|
1319
1244
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1320
1245
|
var result = keysFunc(object);
|
|
1321
1246
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
@@ -1323,9 +1248,6 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
|
1323
1248
|
function getAllKeys(object) {
|
|
1324
1249
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
1325
1250
|
}
|
|
1326
|
-
function getAllKeysIn(object) {
|
|
1327
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
1328
|
-
}
|
|
1329
1251
|
var DataView = getNative(root, "DataView");
|
|
1330
1252
|
var Promise$1 = getNative(root, "Promise");
|
|
1331
1253
|
var Set$1 = getNative(root, "Set");
|
|
@@ -1370,7 +1292,7 @@ function cloneArrayBuffer(arrayBuffer) {
|
|
|
1370
1292
|
return result;
|
|
1371
1293
|
}
|
|
1372
1294
|
function cloneDataView(dataView, isDeep) {
|
|
1373
|
-
var buffer =
|
|
1295
|
+
var buffer = cloneArrayBuffer(dataView.buffer);
|
|
1374
1296
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
1375
1297
|
}
|
|
1376
1298
|
var reFlags = /\w*$/;
|
|
@@ -1384,7 +1306,7 @@ function cloneSymbol(symbol) {
|
|
|
1384
1306
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
1385
1307
|
}
|
|
1386
1308
|
function cloneTypedArray(typedArray, isDeep) {
|
|
1387
|
-
var buffer =
|
|
1309
|
+
var buffer = cloneArrayBuffer(typedArray.buffer);
|
|
1388
1310
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1389
1311
|
}
|
|
1390
1312
|
var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
|
|
@@ -1398,7 +1320,7 @@ function initCloneByTag(object, tag, isDeep) {
|
|
|
1398
1320
|
case dateTag$1:
|
|
1399
1321
|
return new Ctor(+object);
|
|
1400
1322
|
case dataViewTag$1:
|
|
1401
|
-
return cloneDataView(object
|
|
1323
|
+
return cloneDataView(object);
|
|
1402
1324
|
case float32Tag$1:
|
|
1403
1325
|
case float64Tag$1:
|
|
1404
1326
|
case int8Tag$1:
|
|
@@ -1408,7 +1330,7 @@ function initCloneByTag(object, tag, isDeep) {
|
|
|
1408
1330
|
case uint8ClampedTag$1:
|
|
1409
1331
|
case uint16Tag$1:
|
|
1410
1332
|
case uint32Tag$1:
|
|
1411
|
-
return cloneTypedArray(object
|
|
1333
|
+
return cloneTypedArray(object);
|
|
1412
1334
|
case mapTag$2:
|
|
1413
1335
|
return new Ctor();
|
|
1414
1336
|
case numberTag$1:
|
|
@@ -1437,14 +1359,13 @@ function baseIsSet(value) {
|
|
|
1437
1359
|
}
|
|
1438
1360
|
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
1439
1361
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1440
|
-
var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
1441
1362
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
1442
1363
|
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
1443
1364
|
var cloneableTags = {};
|
|
1444
1365
|
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
1445
1366
|
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
1446
1367
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1447
|
-
var result
|
|
1368
|
+
var result;
|
|
1448
1369
|
if (result !== void 0) {
|
|
1449
1370
|
return result;
|
|
1450
1371
|
}
|
|
@@ -1454,24 +1375,18 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
|
1454
1375
|
var isArr = isArray(value);
|
|
1455
1376
|
if (isArr) {
|
|
1456
1377
|
result = initCloneArray(value);
|
|
1457
|
-
if (!isDeep) {
|
|
1458
|
-
return copyArray(value, result);
|
|
1459
|
-
}
|
|
1460
1378
|
} else {
|
|
1461
1379
|
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1462
1380
|
if (isBuffer(value)) {
|
|
1463
|
-
return cloneBuffer(value
|
|
1381
|
+
return cloneBuffer(value);
|
|
1464
1382
|
}
|
|
1465
1383
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
1466
|
-
result =
|
|
1467
|
-
if (!isDeep) {
|
|
1468
|
-
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
1469
|
-
}
|
|
1384
|
+
result = isFunc ? {} : initCloneObject(value);
|
|
1470
1385
|
} else {
|
|
1471
1386
|
if (!cloneableTags[tag]) {
|
|
1472
1387
|
return object ? value : {};
|
|
1473
1388
|
}
|
|
1474
|
-
result = initCloneByTag(value, tag
|
|
1389
|
+
result = initCloneByTag(value, tag);
|
|
1475
1390
|
}
|
|
1476
1391
|
}
|
|
1477
1392
|
stack || (stack = new Stack());
|
|
@@ -1489,7 +1404,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
|
1489
1404
|
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1490
1405
|
});
|
|
1491
1406
|
}
|
|
1492
|
-
var keysFunc =
|
|
1407
|
+
var keysFunc = getAllKeys;
|
|
1493
1408
|
var props = isArr ? void 0 : keysFunc(value);
|
|
1494
1409
|
arrayEach(props || value, function(subValue, key2) {
|
|
1495
1410
|
if (props) {
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a6, a7, a8, d, e, f, a, h, aj, c, i, j, k, ap, ak, l, m, o, p, q, g, b, r, t, u, v, w, x, aq, y, a9, z, A, B, C, D, E, F, G, H, I, J, aa, K, ab, al, ac, L, M, N, O, n, P, S, Q, R, V, T, U, W, X, _, Y, Z, $, ad, am, ae, a0, an, ao, a5, s, af, a1, a2, a3, ag, ah, a4, ai } from "./create-editor-
|
|
2
|
-
import { E as E2, a as a10, N as N2, O as O2, P as P2, b as b2, R as R2, S as S2, T as T2, c as c2, i as i2 } from "./batch-dirty-paths-
|
|
3
|
-
import { L as L2, S as S3 } from "./location-
|
|
1
|
+
import { a6, a7, a8, d, e, f, a, h, aj, c, i, j, k, ap, ak, l, m, o, p, q, g, b, r, t, u, v, w, x, aq, y, a9, z, A, B, C, D, E, F, G, H, I, J, aa, K, ab, al, ac, L, M, N, O, n, P, S, Q, R, V, T, U, W, X, _, Y, Z, $, ad, am, ae, a0, an, ao, a5, s, af, a1, a2, a3, ag, ah, a4, ai } from "./create-editor-BLBmZQoI.js";
|
|
2
|
+
import { E as E2, a as a10, N as N2, O as O2, P as P2, b as b2, R as R2, S as S2, T as T2, c as c2, i as i2 } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
3
|
+
import { L as L2, S as S3 } from "./location-BQJIMGOU.js";
|
|
4
4
|
export {
|
|
5
5
|
E2 as Editor,
|
|
6
6
|
a10 as Element,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Path, b as Point, R as Range, E as Editor, D as DIRTY_PATHS, e as DIRTY_PATH_KEYS, f as isBatchingDirtyPaths, c as Transforms, F as FLUSHING, T as Text, N as Node, a as Element, g as NORMALIZING, h as PATH_REFS, j as POINT_REFS, k as RANGE_REFS, l as cloneDeep, m as getDefaultInsertLocation, S as Scrubber, n as batchDirtyPaths } from "./batch-dirty-paths-
|
|
1
|
+
import { P as Path, b as Point, R as Range, E as Editor, D as DIRTY_PATHS, e as DIRTY_PATH_KEYS, f as isBatchingDirtyPaths, c as Transforms, F as FLUSHING, T as Text, N as Node, a as Element, g as NORMALIZING, h as PATH_REFS, j as POINT_REFS, k as RANGE_REFS, l as cloneDeep, m as getDefaultInsertLocation, S as Scrubber, n as batchDirtyPaths } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
2
2
|
import { reactive } from "vue";
|
|
3
|
-
import { S as Span } from "./location-
|
|
3
|
+
import { S as Span } from "./location-BQJIMGOU.js";
|
|
4
4
|
const PathRef = {
|
|
5
5
|
transform(ref, op) {
|
|
6
6
|
const { current, affinity } = ref;
|
|
@@ -850,6 +850,7 @@ function* nodes(editor, options = {}) {
|
|
|
850
850
|
universal = false,
|
|
851
851
|
reverse = false,
|
|
852
852
|
voids = false,
|
|
853
|
+
pass,
|
|
853
854
|
ignoreNonSelectable = false
|
|
854
855
|
} = options;
|
|
855
856
|
let { match } = options;
|
|
@@ -874,7 +875,8 @@ function* nodes(editor, options = {}) {
|
|
|
874
875
|
reverse,
|
|
875
876
|
from,
|
|
876
877
|
to,
|
|
877
|
-
pass: ([node2]) => {
|
|
878
|
+
pass: ([node2, path2]) => {
|
|
879
|
+
if (pass && pass([node2, path2])) return true;
|
|
878
880
|
if (!Element.isElement(node2)) return false;
|
|
879
881
|
if (!voids && (Editor.isVoid(editor, node2) || Editor.isElementReadOnly(editor, node2)))
|
|
880
882
|
return true;
|
|
@@ -1841,7 +1843,7 @@ const insertNodes = (editor, nodes2, options = {}) => {
|
|
|
1841
1843
|
editor.apply(op);
|
|
1842
1844
|
at = Path.next(at);
|
|
1843
1845
|
batchedOps.push(op);
|
|
1844
|
-
if (
|
|
1846
|
+
if (Text.isText(node22)) {
|
|
1845
1847
|
newDirtyPaths.push(path2);
|
|
1846
1848
|
} else {
|
|
1847
1849
|
newDirtyPaths.push(
|
package/dist/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, g as getPlainText, c as getSlateFragmentAttribute, d as EDITOR_TO_ON_CHANGE } from "./hotkeys-
|
|
2
|
-
import { C, F, G, J, H, B, I, u, L, v, w, M, x, O, z, y, A, K, P, Q, R, S, e, f, h, j, k, l, m, o, p, q, r, s, t, n } from "./hotkeys-
|
|
3
|
-
import { E as Editor, R as Range, a as Element, c as Transforms, P as Path, N as Node } from "./batch-dirty-paths-
|
|
1
|
+
import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, g as getPlainText, c as getSlateFragmentAttribute, d as EDITOR_TO_ON_CHANGE } from "./hotkeys-CmyQAN4Q.js";
|
|
2
|
+
import { C, F, G, J, H, B, I, u, L, v, w, M, x, O, z, y, A, K, P, Q, R, S, e, f, h, j, k, l, m, o, p, q, r, s, t, n } from "./hotkeys-CmyQAN4Q.js";
|
|
3
|
+
import { E as Editor, R as Range, a as Element, c as Transforms, P as Path, N as Node } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
const doRectsIntersect = (rect, compareRect) => {
|
|
6
6
|
const middle = (compareRect.top + compareRect.bottom) / 2;
|
package/dist/history.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as isPlainObject, O as Operation, t as toRawWeakMap, E as Editor, c as Transforms, P as Path } from "./batch-dirty-paths-
|
|
1
|
+
import { d as isPlainObject, O as Operation, t as toRawWeakMap, E as Editor, c as Transforms, P as Path } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
const History = {
|
|
4
4
|
/**
|
|
@@ -92,8 +92,11 @@ const HistoryEditor = {
|
|
|
92
92
|
withoutSaving(editor, fn) {
|
|
93
93
|
const prev = HistoryEditor.isSaving(editor);
|
|
94
94
|
SAVING.set(editor, false);
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
try {
|
|
96
|
+
fn();
|
|
97
|
+
} finally {
|
|
98
|
+
SAVING.set(editor, prev);
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
101
|
};
|
|
99
102
|
const withHistory = (editor) => {
|
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a, _b;
|
|
5
|
-
import { t as toRawWeakMap,
|
|
5
|
+
import { t as toRawWeakMap, R as Range, E as Editor, S as Scrubber, a as Element, c as Transforms } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
6
6
|
import "vue";
|
|
7
7
|
const getDefaultView = (value) => {
|
|
8
8
|
return value && value.ownerDocument && value.ownerDocument.defaultView || null;
|
package/dist/hyperscript.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { t as toRawWeakMap,
|
|
5
|
-
import { c as createEditor$1 } from "./create-editor-
|
|
4
|
+
import { t as toRawWeakMap, R as Range, N as Node, T as Text, a as Element, d as isPlainObject } from "./batch-dirty-paths-DdGxRyrT.js";
|
|
5
|
+
import { c as createEditor$1 } from "./create-editor-BLBmZQoI.js";
|
|
6
6
|
import "vue";
|
|
7
7
|
const ANCHOR = new toRawWeakMap();
|
|
8
8
|
const FOCUS = new toRawWeakMap();
|