@udecode/slate-utils
Advanced tools
Comparing version 24.3.2 to 24.3.5
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
@@ -9,3 +8,2 @@ var __defProps = Object.defineProperties; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -50,10 +48,2 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -284,4 +274,3 @@ | ||
var import_slate12 = require("@udecode/slate"); | ||
var import_castArray = __toESM(require("lodash/castArray")); | ||
var import_map = __toESM(require("lodash/map")); | ||
var import_lodash_es = require("lodash-es"); | ||
@@ -320,3 +309,3 @@ // src/queries/isRangeAcrossBlocks.ts | ||
const unitOffset = !options.unit || options.unit === "offset"; | ||
const matchStrings = options.matchString ? (0, import_castArray.default)(options.matchString) : [""]; | ||
const matchStrings = options.matchString ? (0, import_lodash_es.castArray)(options.matchString) : [""]; | ||
let point; | ||
@@ -353,3 +342,3 @@ matchStrings.some((matchString) => { | ||
stack.pop(); | ||
beforeStringToMatch = (0, import_map.default)(stack.slice(0, -1), "text").join(""); | ||
beforeStringToMatch = (0, import_lodash_es.map)(stack.slice(0, -1), "text").join(""); | ||
} | ||
@@ -485,5 +474,5 @@ if (matchString === beforeStringToMatch || ((_a = options.match) == null ? void 0 : _a.call(options, { beforeString: beforeStringToMatch, beforePoint, at }))) { | ||
var import_slate18 = require("@udecode/slate"); | ||
var import_last = __toESM(require("lodash/last")); | ||
var import_lodash_es2 = require("lodash-es"); | ||
var getPreviousSiblingNode = (editor, path) => { | ||
const index = (0, import_last.default)(path); | ||
const index = (0, import_lodash_es2.last)(path); | ||
if (index > 0) { | ||
@@ -690,3 +679,3 @@ const previousSiblingIndex = index - 1; | ||
var import_slate35 = require("@udecode/slate"); | ||
var import_castArray2 = __toESM(require("lodash/castArray")); | ||
var import_lodash_es3 = require("lodash-es"); | ||
var queryEditor = (editor, { | ||
@@ -703,7 +692,7 @@ filter, | ||
} | ||
const allows = (0, import_castArray2.default)(allow); | ||
const allows = (0, import_lodash_es3.castArray)(allow); | ||
if (allows.length > 0 && !(0, import_slate35.someNode)(editor, { at, match: { type: allows } })) { | ||
return false; | ||
} | ||
const excludes = (0, import_castArray2.default)(exclude); | ||
const excludes = (0, import_lodash_es3.castArray)(exclude); | ||
if (excludes.length > 0 && (0, import_slate35.someNode)(editor, { at, match: { type: excludes } })) { | ||
@@ -758,3 +747,3 @@ return false; | ||
var import_slate40 = require("@udecode/slate"); | ||
var import_castArray3 = __toESM(require("lodash/castArray")); | ||
var import_lodash_es4 = require("lodash-es"); | ||
var import_slate41 = require("slate"); | ||
@@ -765,3 +754,3 @@ var removeMark = (editor, _a) => { | ||
const selection = at != null ? at : editor.selection; | ||
key = (0, import_castArray3.default)(key); | ||
key = (0, import_lodash_es4.castArray)(key); | ||
if (selection) { | ||
@@ -842,3 +831,3 @@ if (import_slate41.Range.isRange(selection) && import_slate41.Range.isExpanded(selection)) { | ||
var import_slate47 = require("@udecode/slate"); | ||
var import_castArray4 = __toESM(require("lodash/castArray")); | ||
var import_lodash_es5 = require("lodash-es"); | ||
var setMarks = (editor, marks, clear = []) => { | ||
@@ -848,3 +837,3 @@ if (!editor.selection) | ||
(0, import_slate47.withoutNormalizing)(editor, () => { | ||
const clears = (0, import_castArray4.default)(clear); | ||
const clears = (0, import_lodash_es5.castArray)(clear); | ||
removeMark(editor, { key: clears }); | ||
@@ -860,3 +849,3 @@ removeMark(editor, { key: Object.keys(marks) }); | ||
var import_slate48 = require("@udecode/slate"); | ||
var import_castArray5 = __toESM(require("lodash/castArray")); | ||
var import_lodash_es6 = require("lodash-es"); | ||
var toggleMark = (editor, { key, clear }) => { | ||
@@ -872,3 +861,3 @@ if (!editor.selection) | ||
if (clear) { | ||
const clears = (0, import_castArray5.default)(clear); | ||
const clears = (0, import_lodash_es6.castArray)(clear); | ||
removeMark(editor, { key: clears }); | ||
@@ -875,0 +864,0 @@ } |
{ | ||
"name": "@udecode/slate-utils", | ||
"version": "24.3.2", | ||
"version": "24.3.5", | ||
"description": "Slate utils", | ||
@@ -42,5 +42,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@udecode/slate": "24.3.2", | ||
"@udecode/slate": "24.3.5", | ||
"@udecode/utils": "24.3.0", | ||
"lodash": "^4.17.21" | ||
"lodash-es": "^4.17.21" | ||
}, | ||
@@ -47,0 +47,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204871
2146
+ Addedlodash-es@^4.17.21
+ Added@udecode/slate@24.3.5(transitive)
+ Addedlodash-es@4.17.21(transitive)
- Removedlodash@^4.17.21
- Removed@udecode/slate@24.3.2(transitive)
- Removedlodash@4.17.21(transitive)
Updated@udecode/slate@24.3.5