UNPKG

522 kBSource Map (JSON)View Raw
1{"version":3,"file":"index.js","sources":["../src/interfaces/path-ref.ts","../src/interfaces/point-ref.ts","../src/interfaces/range-ref.ts","../src/utils/weak-maps.ts","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/iterableToArray.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/nonIterableSpread.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/toConsumableArray.js","../src/interfaces/path.ts","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/typeof.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/toPrimitive.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/toPropertyKey.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/defineProperty.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/arrayWithHoles.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/nonIterableRest.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/slicedToArray.js","../src/interfaces/transforms/general.ts","../src/interfaces/transforms/node.ts","../src/interfaces/transforms/selection.ts","../src/utils/deep-equal.ts","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","../../../../../../.yarn/berry/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-10.zip/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","../src/interfaces/range.ts","../src/interfaces/element.ts","../src/interfaces/node.ts","../src/interfaces/operation.ts","../src/editor/is-editor.ts","../src/interfaces/editor.ts","../src/interfaces/location.ts","../src/interfaces/point.ts","../src/interfaces/scrubber.ts","../src/interfaces/text.ts","../src/utils/get-default-insert-location.ts","../src/utils/match-path.ts","../src/utils/string.ts","../src/interfaces/transforms/text.ts","../src/interfaces/transforms/index.ts","../src/core/batch-dirty-paths.ts","../src/core/update-dirty-paths.ts","../src/core/apply.ts","../src/core/get-dirty-paths.ts","../src/core/get-fragment.ts","../src/core/normalize-node.ts","../src/core/should-normalize.ts","../src/editor/above.ts","../src/editor/add-mark.ts","../src/editor/after.ts","../src/editor/before.ts","../src/editor/delete-backward.ts","../src/editor/delete-forward.ts","../src/editor/delete-fragment.ts","../src/editor/edges.ts","../src/editor/element-read-only.ts","../src/editor/end.ts","../src/editor/first.ts","../src/editor/fragment.ts","../src/editor/get-void.ts","../src/editor/has-blocks.ts","../src/editor/has-inlines.ts","../src/editor/has-path.ts","../src/editor/has-texts.ts","../src/editor/insert-break.ts","../src/editor/insert-node.ts","../src/editor/insert-soft-break.ts","../src/editor/insert-text.ts","../src/editor/is-block.ts","../src/editor/is-edge.ts","../src/editor/is-empty.ts","../src/editor/is-end.ts","../src/editor/is-normalizing.ts","../src/editor/is-start.ts","../src/editor/last.ts","../src/editor/leaf.ts","../src/editor/levels.ts","../src/editor/marks.ts","../src/editor/next.ts","../src/editor/node.ts","../src/editor/nodes.ts","../src/editor/normalize.ts","../src/editor/parent.ts","../src/editor/path-ref.ts","../src/editor/path-refs.ts","../src/editor/path.ts","../src/editor/point-ref.ts","../src/editor/point-refs.ts","../src/editor/point.ts","../src/editor/positions.ts","../src/editor/previous.ts","../src/editor/range-ref.ts","../src/editor/range-refs.ts","../src/editor/range.ts","../src/editor/remove-mark.ts","../src/editor/set-normalizing.ts","../src/editor/start.ts","../src/editor/string.ts","../src/editor/unhang-range.ts","../src/editor/without-normalizing.ts","../src/editor/should-merge-nodes-remove-prev-node.ts","../src/transforms-text/delete-text.ts","../src/transforms-text/insert-fragment.ts","../src/transforms-selection/collapse.ts","../src/transforms-selection/deselect.ts","../src/transforms-selection/move.ts","../src/transforms-selection/select.ts","../src/transforms-selection/set-point.ts","../src/transforms-selection/set-selection.ts","../src/transforms-node/insert-nodes.ts","../src/transforms-node/lift-nodes.ts","../src/transforms-node/merge-nodes.ts","../src/transforms-node/move-nodes.ts","../src/transforms-node/remove-nodes.ts","../src/transforms-node/set-nodes.ts","../src/transforms-node/split-nodes.ts","../src/transforms-node/unset-nodes.ts","../src/transforms-node/unwrap-nodes.ts","../src/transforms-node/wrap-nodes.ts","../src/create-editor.ts"],"sourcesContent":["import { Operation, Path } from '..'\n\n/**\n * `PathRef` objects keep a specific path in a document synced over time as new\n * operations are applied to the editor. You can access their `current` property\n * at any time for the up-to-date path value.\n */\n\nexport interface PathRef {\n current: Path | null\n affinity: 'forward' | 'backward' | null\n unref(): Path | null\n}\n\nexport interface PathRefInterface {\n /**\n * Transform the path ref's current value by an operation.\n */\n transform: (ref: PathRef, op: Operation) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const PathRef: PathRefInterface = {\n transform(ref: PathRef, op: Operation): void {\n const { current, affinity } = ref\n\n if (current == null) {\n return\n }\n\n const path = Path.transform(current, op, { affinity })\n ref.current = path\n\n if (path == null) {\n ref.unref()\n }\n },\n}\n","import { Operation, Point } from '..'\nimport { TextDirection } from '../types/types'\n\n/**\n * `PointRef` objects keep a specific point in a document synced over time as new\n * operations are applied to the editor. You can access their `current` property\n * at any time for the up-to-date point value.\n */\n\nexport interface PointRef {\n current: Point | null\n affinity: TextDirection | null\n unref(): Point | null\n}\n\nexport interface PointRefInterface {\n /**\n * Transform the point ref's current value by an operation.\n */\n transform: (ref: PointRef, op: Operation) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const PointRef: PointRefInterface = {\n transform(ref: PointRef, op: Operation): void {\n const { current, affinity } = ref\n\n if (current == null) {\n return\n }\n\n const point = Point.transform(current, op, { affinity })\n ref.current = point\n\n if (point == null) {\n ref.unref()\n }\n },\n}\n","import { Operation, Range } from '..'\n\n/**\n * `RangeRef` objects keep a specific range in a document synced over time as new\n * operations are applied to the editor. You can access their `current` property\n * at any time for the up-to-date range value.\n */\n\nexport interface RangeRef {\n current: Range | null\n affinity: 'forward' | 'backward' | 'outward' | 'inward' | null\n unref(): Range | null\n}\n\nexport interface RangeRefInterface {\n /**\n * Transform the range ref's current value by an operation.\n */\n transform: (ref: RangeRef, op: Operation) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const RangeRef: RangeRefInterface = {\n transform(ref: RangeRef, op: Operation): void {\n const { current, affinity } = ref\n\n if (current == null) {\n return\n }\n\n const path = Range.transform(current, op, { affinity })\n ref.current = path\n\n if (path == null) {\n ref.unref()\n }\n },\n}\n","import { Editor, Path, PathRef, PointRef, RangeRef } from '..'\n\nexport const DIRTY_PATHS: WeakMap<Editor, Path[]> = new WeakMap()\nexport const DIRTY_PATH_KEYS: WeakMap<Editor, Set<string>> = new WeakMap()\nexport const FLUSHING: WeakMap<Editor, boolean> = new WeakMap()\nexport const NORMALIZING: WeakMap<Editor, boolean> = new WeakMap()\nexport const PATH_REFS: WeakMap<Editor, Set<PathRef>> = new WeakMap()\nexport const POINT_REFS: WeakMap<Editor, Set<PointRef>> = new WeakMap()\nexport const RANGE_REFS: WeakMap<Editor, Set<RangeRef>> = new WeakMap()\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import {\n InsertNodeOperation,\n MergeNodeOperation,\n MoveNodeOperation,\n Operation,\n RemoveNodeOperation,\n SplitNodeOperation,\n} from '..'\nimport { TextDirection } from '../types/types'\n\n/**\n * `Path` arrays are a list of indexes that describe a node's exact position in\n * a Slate node tree. Although they are usually relative to the root `Editor`\n * object, they can be relative to any `Node` object.\n */\n\nexport type Path = number[]\n\nexport interface PathAncestorsOptions {\n reverse?: boolean\n}\n\nexport interface PathLevelsOptions {\n reverse?: boolean\n}\n\nexport interface PathTransformOptions {\n affinity?: TextDirection | null\n}\n\nexport interface PathInterface {\n /**\n * Get a list of ancestor paths for a given path.\n *\n * The paths are sorted from shallowest to deepest ancestor. However, if the\n * `reverse: true` option is passed, they are reversed.\n */\n ancestors: (path: Path, options?: PathAncestorsOptions) => Path[]\n\n /**\n * Get the common ancestor path of two paths.\n */\n common: (path: Path, another: Path) => Path\n\n /**\n * Compare a path to another, returning an integer indicating whether the path\n * was before, at, or after the other.\n *\n * Note: Two paths of unequal length can still receive a `0` result if one is\n * directly above or below the other. If you want exact matching, use\n * [[Path.equals]] instead.\n */\n compare: (path: Path, another: Path) => -1 | 0 | 1\n\n /**\n * Check if a path ends after one of the indexes in another.\n */\n endsAfter: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path ends at one of the indexes in another.\n */\n endsAt: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path ends before one of the indexes in another.\n */\n endsBefore: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is exactly equal to another.\n */\n equals: (path: Path, another: Path) => boolean\n\n /**\n * Check if the path of previous sibling node exists\n */\n hasPrevious: (path: Path) => boolean\n\n /**\n * Check if a path is after another.\n */\n isAfter: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is an ancestor of another.\n */\n isAncestor: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is before another.\n */\n isBefore: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is a child of another.\n */\n isChild: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is equal to or an ancestor of another.\n */\n isCommon: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is a descendant of another.\n */\n isDescendant: (path: Path, another: Path) => boolean\n\n /**\n * Check if a path is the parent of another.\n */\n isParent: (path: Path, another: Path) => boolean\n\n /**\n * Check is a value implements the `Path` interface.\n */\n isPath: (value: any) => value is Path\n\n /**\n * Check if a path is a sibling of another.\n */\n isSibling: (path: Path, another: Path) => boolean\n\n /**\n * Get a list of paths at every level down to a path. Note: this is the same\n * as `Path.ancestors`, but including the path itself.\n *\n * The paths are sorted from shallowest to deepest. However, if the `reverse:\n * true` option is passed, they are reversed.\n */\n levels: (path: Path, options?: PathLevelsOptions) => Path[]\n\n /**\n * Given a path, get the path to the next sibling node.\n */\n next: (path: Path) => Path\n\n /**\n * Returns whether this operation can affect paths or not. Used as an\n * optimization when updating dirty paths during normalization\n *\n * NOTE: This *must* be kept in sync with the implementation of 'transform'\n * below\n */\n operationCanTransformPath: (\n operation: Operation\n ) => operation is\n | InsertNodeOperation\n | RemoveNodeOperation\n | MergeNodeOperation\n | SplitNodeOperation\n | MoveNodeOperation\n\n /**\n * Given a path, return a new path referring to the parent node above it.\n */\n parent: (path: Path) => Path\n\n /**\n * Given a path, get the path to the previous sibling node.\n */\n previous: (path: Path) => Path\n\n /**\n * Get a path relative to an ancestor.\n */\n relative: (path: Path, ancestor: Path) => Path\n\n /**\n * Transform a path by an operation.\n */\n transform: (\n path: Path,\n operation: Operation,\n options?: PathTransformOptions\n ) => Path | null\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Path: PathInterface = {\n ancestors(path: Path, options: PathAncestorsOptions = {}): Path[] {\n const { reverse = false } = options\n let paths = Path.levels(path, options)\n\n if (reverse) {\n paths = paths.slice(1)\n } else {\n paths = paths.slice(0, -1)\n }\n\n return paths\n },\n\n common(path: Path, another: Path): Path {\n const common: Path = []\n\n for (let i = 0; i < path.length && i < another.length; i++) {\n const av = path[i]\n const bv = another[i]\n\n if (av !== bv) {\n break\n }\n\n common.push(av)\n }\n\n return common\n },\n\n compare(path: Path, another: Path): -1 | 0 | 1 {\n const min = Math.min(path.length, another.length)\n\n for (let i = 0; i < min; i++) {\n if (path[i] < another[i]) return -1\n if (path[i] > another[i]) return 1\n }\n\n return 0\n },\n\n endsAfter(path: Path, another: Path): boolean {\n const i = path.length - 1\n const as = path.slice(0, i)\n const bs = another.slice(0, i)\n const av = path[i]\n const bv = another[i]\n return Path.equals(as, bs) && av > bv\n },\n\n endsAt(path: Path, another: Path): boolean {\n const i = path.length\n const as = path.slice(0, i)\n const bs = another.slice(0, i)\n return Path.equals(as, bs)\n },\n\n endsBefore(path: Path, another: Path): boolean {\n const i = path.length - 1\n const as = path.slice(0, i)\n const bs = another.slice(0, i)\n const av = path[i]\n const bv = another[i]\n return Path.equals(as, bs) && av < bv\n },\n\n equals(path: Path, another: Path): boolean {\n return (\n path.length === another.length && path.every((n, i) => n === another[i])\n )\n },\n\n hasPrevious(path: Path): boolean {\n return path[path.length - 1] > 0\n },\n\n isAfter(path: Path, another: Path): boolean {\n return Path.compare(path, another) === 1\n },\n\n isAncestor(path: Path, another: Path): boolean {\n return path.length < another.length && Path.compare(path, another) === 0\n },\n\n isBefore(path: Path, another: Path): boolean {\n return Path.compare(path, another) === -1\n },\n\n isChild(path: Path, another: Path): boolean {\n return (\n path.length === another.length + 1 && Path.compare(path, another) === 0\n )\n },\n\n isCommon(path: Path, another: Path): boolean {\n return path.length <= another.length && Path.compare(path, another) === 0\n },\n\n isDescendant(path: Path, another: Path): boolean {\n return path.length > another.length && Path.compare(path, another) === 0\n },\n\n isParent(path: Path, another: Path): boolean {\n return (\n path.length + 1 === another.length && Path.compare(path, another) === 0\n )\n },\n\n isPath(value: any): value is Path {\n return (\n Array.isArray(value) &&\n (value.length === 0 || typeof value[0] === 'number')\n )\n },\n\n isSibling(path: Path, another: Path): boolean {\n if (path.length !== another.length) {\n return false\n }\n\n const as = path.slice(0, -1)\n const bs = another.slice(0, -1)\n const al = path[path.length - 1]\n const bl = another[another.length - 1]\n return al !== bl && Path.equals(as, bs)\n },\n\n levels(path: Path, options: PathLevelsOptions = {}): Path[] {\n const { reverse = false } = options\n const list: Path[] = []\n\n for (let i = 0; i <= path.length; i++) {\n list.push(path.slice(0, i))\n }\n\n if (reverse) {\n list.reverse()\n }\n\n return list\n },\n\n next(path: Path): Path {\n if (path.length === 0) {\n throw new Error(\n `Cannot get the next path of a root path [${path}], because it has no next index.`\n )\n }\n\n const last = path[path.length - 1]\n return path.slice(0, -1).concat(last + 1)\n },\n\n operationCanTransformPath(\n operation: Operation\n ): operation is\n | InsertNodeOperation\n | RemoveNodeOperation\n | MergeNodeOperation\n | SplitNodeOperation\n | MoveNodeOperation {\n switch (operation.type) {\n case 'insert_node':\n case 'remove_node':\n case 'merge_node':\n case 'split_node':\n case 'move_node':\n return true\n default:\n return false\n }\n },\n\n parent(path: Path): Path {\n if (path.length === 0) {\n throw new Error(`Cannot get the parent path of the root path [${path}].`)\n }\n\n return path.slice(0, -1)\n },\n\n previous(path: Path): Path {\n if (path.length === 0) {\n throw new Error(\n `Cannot get the previous path of a root path [${path}], because it has no previous index.`\n )\n }\n\n const last = path[path.length - 1]\n\n if (last <= 0) {\n throw new Error(\n `Cannot get the previous path of a first child path [${path}] because it would result in a negative index.`\n )\n }\n\n return path.slice(0, -1).concat(last - 1)\n },\n\n relative(path: Path, ancestor: Path): Path {\n if (!Path.isAncestor(ancestor, path) && !Path.equals(path, ancestor)) {\n throw new Error(\n `Cannot get the relative path of [${path}] inside ancestor [${ancestor}], because it is not above or equal to the path.`\n )\n }\n\n return path.slice(ancestor.length)\n },\n\n transform(\n path: Path | null,\n operation: Operation,\n options: PathTransformOptions = {}\n ): Path | null {\n if (!path) return null\n\n // PERF: use destructing instead of immer\n const p = [...path]\n const { affinity = 'forward' } = options\n\n // PERF: Exit early if the operation is guaranteed not to have an effect.\n if (path.length === 0) {\n return p\n }\n\n switch (operation.type) {\n case 'insert_node': {\n const { path: op } = operation\n\n if (\n Path.equals(op, p) ||\n Path.endsBefore(op, p) ||\n Path.isAncestor(op, p)\n ) {\n p[op.length - 1] += 1\n }\n\n break\n }\n\n case 'remove_node': {\n const { path: op } = operation\n\n if (Path.equals(op, p) || Path.isAncestor(op, p)) {\n return null\n } else if (Path.endsBefore(op, p)) {\n p[op.length - 1] -= 1\n }\n\n break\n }\n\n case 'merge_node': {\n const { path: op, position } = operation\n\n if (Path.equals(op, p) || Path.endsBefore(op, p)) {\n p[op.length - 1] -= 1\n } else if (Path.isAncestor(op, p)) {\n p[op.length - 1] -= 1\n p[op.length] += position\n }\n\n break\n }\n\n case 'split_node': {\n const { path: op, position } = operation\n\n if (Path.equals(op, p)) {\n if (affinity === 'forward') {\n p[p.length - 1] += 1\n } else if (affinity === 'backward') {\n // Nothing, because it still refers to the right path.\n } else {\n return null\n }\n } else if (Path.endsBefore(op, p)) {\n p[op.length - 1] += 1\n } else if (Path.isAncestor(op, p) && path[op.length] >= position) {\n p[op.length - 1] += 1\n p[op.length] -= position\n }\n\n break\n }\n\n case 'move_node': {\n const { path: op, newPath: onp } = operation\n\n // If the old and new path are the same, it's a no-op.\n if (Path.equals(op, onp)) {\n return p\n }\n\n if (Path.isAncestor(op, p) || Path.equals(op, p)) {\n const copy = onp.slice()\n\n if (Path.endsBefore(op, onp) && op.length < onp.length) {\n copy[op.length - 1] -= 1\n }\n\n return copy.concat(p.slice(op.length))\n } else if (\n Path.isSibling(op, onp) &&\n (Path.isAncestor(onp, p) || Path.equals(onp, p))\n ) {\n if (Path.endsBefore(op, p)) {\n p[op.length - 1] -= 1\n } else {\n p[op.length - 1] += 1\n }\n } else if (\n Path.endsBefore(onp, p) ||\n Path.equals(onp, p) ||\n Path.isAncestor(onp, p)\n ) {\n if (Path.endsBefore(op, p)) {\n p[op.length - 1] -= 1\n }\n\n p[onp.length - 1] += 1\n } else if (Path.endsBefore(op, p)) {\n if (Path.equals(onp, p)) {\n p[onp.length - 1] += 1\n }\n\n p[op.length - 1] -= 1\n }\n\n break\n }\n }\n\n return p\n },\n}\n","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { createDraft, finishDraft, isDraft } from 'immer'\nimport {\n Ancestor,\n Descendant,\n Editor,\n Element,\n Node,\n NodeEntry,\n Operation,\n Path,\n Point,\n Range,\n Scrubber,\n Selection,\n Text,\n} from '../../index'\n\nexport interface GeneralTransforms {\n /**\n * Transform the editor by an operation.\n */\n transform: (editor: Editor, op: Operation) => void\n}\n\nconst applyToDraft = (editor: Editor, selection: Selection, op: Operation) => {\n switch (op.type) {\n case 'insert_node': {\n const { path, node } = op\n const parent = Node.parent(editor, path)\n const index = path[path.length - 1]\n\n if (index > parent.children.length) {\n throw new Error(\n `Cannot apply an \"insert_node\" operation at path [${path}] because the destination is past the end of the node.`\n )\n }\n\n parent.children.splice(index, 0, node)\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n\n case 'insert_text': {\n const { path, offset, text } = op\n if (text.length === 0) break\n const node = Node.leaf(editor, path)\n const before = node.text.slice(0, offset)\n const after = node.text.slice(offset)\n node.text = before + text + after\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n\n case 'merge_node': {\n const { path } = op\n const node = Node.get(editor, path)\n const prevPath = Path.previous(path)\n const prev = Node.get(editor, prevPath)\n const parent = Node.parent(editor, path)\n const index = path[path.length - 1]\n\n if (Text.isText(node) && Text.isText(prev)) {\n prev.text += node.text\n } else if (!Text.isText(node) && !Text.isText(prev)) {\n prev.children.push(...node.children)\n } else {\n throw new Error(\n `Cannot apply a \"merge_node\" operation at path [${path}] to nodes of different interfaces: ${Scrubber.stringify(\n node\n )} ${Scrubber.stringify(prev)}`\n )\n }\n\n parent.children.splice(index, 1)\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n\n case 'move_node': {\n const { path, newPath } = op\n\n if (Path.isAncestor(path, newPath)) {\n throw new Error(\n `Cannot move a path [${path}] to new path [${newPath}] because the destination is inside itself.`\n )\n }\n\n const node = Node.get(editor, path)\n const parent = Node.parent(editor, path)\n const index = path[path.length - 1]\n\n // This is tricky, but since the `path` and `newPath` both refer to\n // the same snapshot in time, there's a mismatch. After either\n // removing the original position, the second step's path can be out\n // of date. So instead of using the `op.newPath` directly, we\n // transform `op.path` to ascertain what the `newPath` would be after\n // the operation was applied.\n parent.children.splice(index, 1)\n const truePath = Path.transform(path, op)!\n const newParent = Node.get(editor, Path.parent(truePath)) as Ancestor\n const newIndex = truePath[truePath.length - 1]\n\n newParent.children.splice(newIndex, 0, node)\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n\n case 'remove_node': {\n const { path } = op\n const index = path[path.length - 1]\n const parent = Node.parent(editor, path)\n parent.children.splice(index, 1)\n\n // Transform all the points in the value, but if the point was in the\n // node that was removed we need to update the range or remove it.\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n const result = Point.transform(point, op)\n\n if (selection != null && result != null) {\n selection[key] = result\n } else {\n let prev: NodeEntry<Text> | undefined\n let next: NodeEntry<Text> | undefined\n\n for (const [n, p] of Node.texts(editor)) {\n if (Path.compare(p, path) === -1) {\n prev = [n, p]\n } else {\n next = [n, p]\n break\n }\n }\n\n let preferNext = false\n if (prev && next) {\n if (Path.equals(next[1], path)) {\n preferNext = !Path.hasPrevious(next[1])\n } else {\n preferNext =\n Path.common(prev[1], path).length <\n Path.common(next[1], path).length\n }\n }\n\n if (prev && !preferNext) {\n point.path = prev[1]\n point.offset = prev[0].text.length\n } else if (next) {\n point.path = next[1]\n point.offset = 0\n } else {\n selection = null\n }\n }\n }\n }\n\n break\n }\n\n case 'remove_text': {\n const { path, offset, text } = op\n if (text.length === 0) break\n const node = Node.leaf(editor, path)\n const before = node.text.slice(0, offset)\n const after = node.text.slice(offset + text.length)\n node.text = before + after\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n\n case 'set_node': {\n const { path, properties, newProperties } = op\n\n if (path.length === 0) {\n throw new Error(`Cannot set properties on the root node!`)\n }\n\n const node = Node.get(editor, path)\n\n for (const key in newProperties) {\n if (key === 'children' || key === 'text') {\n throw new Error(`Cannot set the \"${key}\" property of nodes!`)\n }\n\n const value = newProperties[<keyof Node>key]\n\n if (value == null) {\n delete node[<keyof Node>key]\n } else {\n node[<keyof Node>key] = value\n }\n }\n\n // properties that were previously defined, but are now missing, must be deleted\n for (const key in properties) {\n if (!newProperties.hasOwnProperty(key)) {\n delete node[<keyof Node>key]\n }\n }\n\n break\n }\n\n case 'set_selection': {\n const { newProperties } = op\n\n if (newProperties == null) {\n selection = newProperties\n } else {\n if (selection == null) {\n if (!Range.isRange(newProperties)) {\n throw new Error(\n `Cannot apply an incomplete \"set_selection\" operation properties ${Scrubber.stringify(\n newProperties\n )} when there is no current selection.`\n )\n }\n\n selection = { ...newProperties }\n }\n\n for (const key in newProperties) {\n const value = newProperties[<keyof Range>key]\n\n if (value == null) {\n if (key === 'anchor' || key === 'focus') {\n throw new Error(`Cannot remove the \"${key}\" selection property`)\n }\n\n delete selection[<keyof Range>key]\n } else {\n selection[<keyof Range>key] = value\n }\n }\n }\n\n break\n }\n\n case 'split_node': {\n const { path, position, properties } = op\n\n if (path.length === 0) {\n throw new Error(\n `Cannot apply a \"split_node\" operation at path [${path}] because the root node cannot be split.`\n )\n }\n\n const node = Node.get(editor, path)\n const parent = Node.parent(editor, path)\n const index = path[path.length - 1]\n let newNode: Descendant\n\n if (Text.isText(node)) {\n const before = node.text.slice(0, position)\n const after = node.text.slice(position)\n node.text = before\n newNode = {\n ...(properties as Partial<Text>),\n text: after,\n }\n } else {\n const before = node.children.slice(0, position)\n const after = node.children.slice(position)\n node.children = before\n\n newNode = {\n ...(properties as Partial<Element>),\n children: after,\n }\n }\n\n parent.children.splice(index + 1, 0, newNode)\n\n if (selection) {\n for (const [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op)!\n }\n }\n\n break\n }\n }\n return selection\n}\n\n// eslint-disable-next-line no-redeclare\nexport const GeneralTransforms: GeneralTransforms = {\n transform(editor: Editor, op: Operation): void {\n editor.children = createDraft(editor.children)\n let selection = editor.selection && createDraft(editor.selection)\n\n try {\n selection = applyToDraft(editor, selection, op)\n } finally {\n editor.children = finishDraft(editor.children)\n\n if (selection) {\n editor.selection = isDraft(selection)\n ? (finishDraft(selection) as Range)\n : selection\n } else {\n editor.selection = null\n }\n }\n },\n}\n","import { Editor, Element, Location, Node, Path } from '../../index'\nimport { NodeMatch, PropsCompare, PropsMerge } from '../editor'\nimport { MaximizeMode, RangeMode } from '../../types/types'\n\nexport interface NodeInsertNodesOptions<T extends Node> {\n at?: Location\n match?: NodeMatch<T>\n mode?: RangeMode\n hanging?: boolean\n select?: boolean\n voids?: boolean\n batchDirty?: boolean\n}\n\nexport interface NodeTransforms {\n /**\n * Insert nodes in the editor\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertNodes: <T extends Node>(\n editor: Editor,\n nodes: Node | Node[],\n options?: NodeInsertNodesOptions<T>\n ) => void\n\n /**\n * Lift nodes at a specific location upwards in the document tree, splitting\n * their parent in two if necessary.\n */\n liftNodes: <T extends Node>(\n editor: Editor,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n voids?: boolean\n }\n ) => void\n\n /**\n * Merge a node at a location with the previous node of the same depth,\n * removing any empty containing nodes after the merge if necessary.\n */\n mergeNodes: <T extends Node>(\n editor: Editor,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: RangeMode\n hanging?: boolean\n voids?: boolean\n }\n ) => void\n\n /**\n * Move the nodes at a location to a new location.\n */\n moveNodes: <T extends Node>(\n editor: Editor,\n options: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n to: Path\n voids?: boolean\n }\n ) => void\n\n /**\n * Remove the nodes at a specific location in the document.\n */\n removeNodes: <T extends Node>(\n editor: Editor,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: RangeMode\n hanging?: boolean\n voids?: boolean\n }\n ) => void\n\n /**\n * Set new properties on the nodes at a location.\n */\n setNodes: <T extends Node>(\n editor: Editor,\n props: Partial<T>,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n hanging?: boolean\n split?: boolean\n voids?: boolean\n compare?: PropsCompare\n merge?: PropsMerge\n }\n ) => void\n\n /**\n * Split the nodes at a specific location.\n */\n splitNodes: <T extends Node>(\n editor: Editor,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: RangeMode\n always?: boolean\n height?: number\n voids?: boolean\n }\n ) => void\n\n /**\n * Unset properties on the nodes at a location.\n */\n unsetNodes: <T extends Node>(\n editor: Editor,\n props: string | string[],\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n hanging?: boolean\n split?: boolean\n voids?: boolean\n }\n ) => void\n\n /**\n * Unwrap the nodes at a location from a parent node, splitting the parent if\n * necessary to ensure that only the content in the range is unwrapped.\n */\n unwrapNodes: <T extends Node>(\n editor: Editor,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n split?: boolean\n voids?: boolean\n }\n ) => void\n\n /**\n * Wrap the nodes at a location in a new container node, splitting the edges\n * of the range first to ensure that only the content in the range is wrapped.\n */\n wrapNodes: <T extends Node>(\n editor: Editor,\n element: Element,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n split?: boolean\n voids?: boolean\n }\n ) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const NodeTransforms: NodeTransforms = {\n insertNodes(editor, nodes, options) {\n editor.insertNodes(nodes, options)\n },\n liftNodes(editor, options) {\n editor.liftNodes(options)\n },\n mergeNodes(editor, options) {\n editor.mergeNodes(options)\n },\n moveNodes(editor, options) {\n editor.moveNodes(options)\n },\n removeNodes(editor, options) {\n editor.removeNodes(options)\n },\n setNodes(editor, props, options) {\n editor.setNodes(props, options)\n },\n splitNodes(editor, options) {\n editor.splitNodes(options)\n },\n unsetNodes(editor, props, options) {\n editor.unsetNodes(props, options)\n },\n unwrapNodes(editor, options) {\n editor.unwrapNodes(options)\n },\n wrapNodes(editor, element, options) {\n editor.wrapNodes(element, options)\n },\n}\n","import { Editor, Location, Point, Range } from '../../index'\nimport { MoveUnit, SelectionEdge } from '../../types/types'\n\nexport interface SelectionCollapseOptions {\n edge?: SelectionEdge\n}\n\nexport interface SelectionMoveOptions {\n distance?: number\n unit?: MoveUnit\n reverse?: boolean\n edge?: SelectionEdge\n}\n\nexport interface SelectionSetPointOptions {\n edge?: SelectionEdge\n}\n\nexport interface SelectionTransforms {\n /**\n * Collapse the selection.\n */\n collapse: (editor: Editor, options?: SelectionCollapseOptions) => void\n\n /**\n * Unset the selection.\n */\n deselect: (editor: Editor) => void\n\n /**\n * Move the selection's point forward or backward.\n */\n move: (editor: Editor, options?: SelectionMoveOptions) => void\n\n /**\n * Set the selection to a new value.\n */\n select: (editor: Editor, target: Location) => void\n\n /**\n * Set new properties on one of the selection's points.\n */\n setPoint: (\n editor: Editor,\n props: Partial<Point>,\n options?: SelectionSetPointOptions\n ) => void\n\n /**\n * Set new properties on the selection.\n */\n setSelection: (editor: Editor, props: Partial<Range>) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const SelectionTransforms: SelectionTransforms = {\n collapse(editor, options) {\n editor.collapse(options)\n },\n deselect(editor) {\n editor.deselect()\n },\n move(editor, options) {\n editor.move(options)\n },\n select(editor, target) {\n editor.select(target)\n },\n setPoint(editor, props, options) {\n editor.setPoint(props, options)\n },\n setSelection(editor, props) {\n editor.setSelection(props)\n },\n}\n","import { isPlainObject } from 'is-plain-object'\n\n/*\n Custom deep equal comparison for Slate nodes.\n\n We don't need general purpose deep equality;\n Slate only supports plain values, Arrays, and nested objects.\n Complex values nested inside Arrays are not supported.\n\n Slate objects are designed to be serialised, so\n missing keys are deliberately normalised to undefined.\n */\nexport const isDeepEqual = (\n node: Record<string, any>,\n another: Record<string, any>\n): boolean => {\n for (const key in node) {\n const a = node[key]\n const b = another[key]\n if (isPlainObject(a) && isPlainObject(b)) {\n if (!isDeepEqual(a, b)) return false\n } else if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false\n }\n } else if (a !== b) {\n return false\n }\n }\n\n /*\n Deep object equality is only necessary in one direction; in the reverse direction\n we are only looking for keys that are missing.\n As above, undefined keys are normalised to missing.\n */\n\n for (const key in another) {\n if (node[key] === undefined && another[key] !== undefined) {\n return false\n }\n }\n\n return true\n}\n","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { produce } from 'immer'\nimport { isPlainObject } from 'is-plain-object'\nimport { ExtendedType, Operation, Path, Point, PointEntry } from '..'\nimport { RangeDirection } from '../types/types'\n\n/**\n * `Range` objects are a set of points that refer to a specific span of a Slate\n * document. They can define a span inside a single node or a can span across\n * multiple nodes.\n */\n\nexport interface BaseRange {\n anchor: Point\n focus: Point\n}\n\nexport type Range = ExtendedType<'Range', BaseRange>\n\nexport interface RangeEdgesOptions {\n reverse?: boolean\n}\n\nexport interface RangeTransformOptions {\n affinity?: RangeDirection | null\n}\n\nexport interface RangeInterface {\n /**\n * Get the start and end points of a range, in the order in which they appear\n * in the document.\n */\n edges: (range: Range, options?: RangeEdgesOptions) => [Point, Point]\n\n /**\n * Get the end point of a range.\n */\n end: (range: Range) => Point\n\n /**\n * Check if a range is exactly equal to another.\n */\n equals: (range: Range, another: Range) => boolean\n\n /**\n * Check if a range includes a path, a point or part of another range.\n */\n includes: (range: Range, target: Path | Point | Range) => boolean\n\n /**\n * Get the intersection of a range with another.\n */\n intersection: (range: Range, another: Range) => Range | null\n\n /**\n * Check if a range is backward, meaning that its anchor point appears in the\n * document _after_ its focus point.\n */\n isBackward: (range: Range) => boolean\n\n /**\n * Check if a range is collapsed, meaning that both its anchor and focus\n * points refer to the exact same position in the document.\n */\n isCollapsed: (range: Range) => boolean\n\n /**\n * Check if a range is expanded.\n *\n * This is the opposite of [[Range.isCollapsed]] and is provided for legibility.\n */\n isExpanded: (range: Range) => boolean\n\n /**\n * Check if a range is forward.\n *\n * This is the opposite of [[Range.isBackward]] and is provided for legibility.\n */\n isForward: (range: Range) => boolean\n\n /**\n * Check if a value implements the [[Range]] interface.\n */\n isRange: (value: any) => value is Range\n\n /**\n * Iterate through all of the point entries in a range.\n */\n points: (range: Range) => Generator<PointEntry, void, undefined>\n\n /**\n * Get the start point of a range.\n */\n start: (range: Range) => Point\n\n /**\n * Transform a range by an operation.\n */\n transform: (\n range: Range,\n op: Operation,\n options?: RangeTransformOptions\n ) => Range | null\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Range: RangeInterface = {\n edges(range: Range, options: RangeEdgesOptions = {}): [Point, Point] {\n const { reverse = false } = options\n const { anchor, focus } = range\n return Range.isBackward(range) === reverse\n ? [anchor, focus]\n : [focus, anchor]\n },\n\n end(range: Range): Point {\n const [, end] = Range.edges(range)\n return end\n },\n\n equals(range: Range, another: Range): boolean {\n return (\n Point.equals(range.anchor, another.anchor) &&\n Point.equals(range.focus, another.focus)\n )\n },\n\n includes(range: Range, target: Path | Point | Range): boolean {\n if (Range.isRange(target)) {\n if (\n Range.includes(range, target.anchor) ||\n Range.includes(range, target.focus)\n ) {\n return true\n }\n\n const [rs, re] = Range.edges(range)\n const [ts, te] = Range.edges(target)\n return Point.isBefore(rs, ts) && Point.isAfter(re, te)\n }\n\n const [start, end] = Range.edges(range)\n let isAfterStart = false\n let isBeforeEnd = false\n\n if (Point.isPoint(target)) {\n isAfterStart = Point.compare(target, start) >= 0\n isBeforeEnd = Point.compare(target, end) <= 0\n } else {\n isAfterStart = Path.compare(target, start.path) >= 0\n isBeforeEnd = Path.compare(target, end.path) <= 0\n }\n\n return isAfterStart && isBeforeEnd\n },\n\n intersection(range: Range, another: Range): Range | null {\n const { anchor, focus, ...rest } = range\n const [s1, e1] = Range.edges(range)\n const [s2, e2] = Range.edges(another)\n const start = Point.isBefore(s1, s2) ? s2 : s1\n const end = Point.isBefore(e1, e2) ? e1 : e2\n\n if (Point.isBefore(end, start)) {\n return null\n } else {\n return { anchor: start, focus: end, ...rest }\n }\n },\n\n isBackward(range: Range): boolean {\n const { anchor, focus } = range\n return Point.isAfter(anchor, focus)\n },\n\n isCollapsed(range: Range): boolean {\n const { anchor, focus } = range\n return Point.equals(anchor, focus)\n },\n\n isExpanded(range: Range): boolean {\n return !Range.isCollapsed(range)\n },\n\n isForward(range: Range): boolean {\n return !Range.isBackward(range)\n },\n\n isRange(value: any): value is Range {\n return (\n isPlainObject(value) &&\n Point.isPoint(value.anchor) &&\n Point.isPoint(value.focus)\n )\n },\n\n *points(range: Range): Generator<PointEntry, void, undefined> {\n yield [range.anchor, 'anchor']\n yield [range.focus, 'focus']\n },\n\n start(range: Range): Point {\n const [start] = Range.edges(range)\n return start\n },\n\n transform(\n range: Range | null,\n op: Operation,\n options: RangeTransformOptions = {}\n ): Range | null {\n return produce(range, r => {\n if (r === null) {\n return null\n }\n const { affinity = 'inward' } = options\n let affinityAnchor: 'forward' | 'backward' | null\n let affinityFocus: 'forward' | 'backward' | null\n\n if (affinity === 'inward') {\n // If the range is collapsed, make sure to use the same affinity to\n // avoid the two points passing each other and expanding in the opposite\n // direction\n const isCollapsed = Range.isCollapsed(r)\n if (Range.isForward(r)) {\n affinityAnchor = 'forward'\n affinityFocus = isCollapsed ? affinityAnchor : 'backward'\n } else {\n affinityAnchor = 'backward'\n affinityFocus = isCollapsed ? affinityAnchor : 'forward'\n }\n } else if (affinity === 'outward') {\n if (Range.isForward(r)) {\n affinityAnchor = 'backward'\n affinityFocus = 'forward'\n } else {\n affinityAnchor = 'forward'\n affinityFocus = 'backward'\n }\n } else {\n affinityAnchor = affinity\n affinityFocus = affinity\n }\n const anchor = Point.transform(r.anchor, op, { affinity: affinityAnchor })\n const focus = Point.transform(r.focus, op, { affinity: affinityFocus })\n\n if (!anchor || !focus) {\n return null\n }\n\n r.anchor = anchor\n r.focus = focus\n })\n },\n}\n","import { isPlainObject } from 'is-plain-object'\nimport { Ancestor, Descendant, Editor, ExtendedType, Node, Path } from '..'\n\n/**\n * `Element` objects are a type of node in a Slate document that contain other\n * element nodes or text nodes. They can be either \"blocks\" or \"inlines\"\n * depending on the Slate editor's configuration.\n */\n\nexport interface BaseElement {\n children: Descendant[]\n}\n\nexport type Element = ExtendedType<'Element', BaseElement>\n\nexport interface ElementInterface {\n /**\n * Check if a value implements the 'Ancestor' interface.\n */\n isAncestor: (value: any) => value is Ancestor\n\n /**\n * Check if a value implements the `Element` interface.\n */\n isElement: (value: any) => value is Element\n\n /**\n * Check if a value is an array of `Element` objects.\n */\n isElementList: (value: any) => value is Element[]\n\n /**\n * Check if a set of props is a partial of Element.\n */\n isElementProps: (props: any) => props is Partial<Element>\n\n /**\n * Check if a value implements the `Element` interface and has elementKey with selected value.\n * Default it check to `type` key value\n */\n isElementType: <T extends Element>(\n value: any,\n elementVal: string,\n elementKey?: string\n ) => value is T\n\n /**\n * Check if an element matches set of properties.\n *\n * Note: this checks custom properties, and it does not ensure that any\n * children are equivalent.\n */\n matches: (element: Element, props: Partial<Element>) => boolean\n}\n\n/**\n * Shared the function with isElementType utility\n */\nconst isElement = (value: any): value is Element => {\n return (\n isPlainObject(value) &&\n Node.isNodeList(value.children) &&\n !Editor.isEditor(value)\n )\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Element: ElementInterface = {\n isAncestor(value: any): value is Ancestor {\n return isPlainObject(value) && Node.isNodeList(value.children)\n },\n\n isElement,\n\n isElementList(value: any): value is Element[] {\n return Array.isArray(value) && value.every(val => Element.isElement(val))\n },\n\n isElementProps(props: any): props is Partial<Element> {\n return (props as Partial<Element>).children !== undefined\n },\n\n isElementType: <T extends Element>(\n value: any,\n elementVal: string,\n elementKey: string = 'type'\n ): value is T => {\n return (\n isElement(value) && value[<keyof Descendant>elementKey] === elementVal\n )\n },\n\n matches(element: Element, props: Partial<Element>): boolean {\n for (const key in props) {\n if (key === 'children') {\n continue\n }\n\n if (element[<keyof Descendant>key] !== props[<keyof Descendant>key]) {\n return false\n }\n }\n\n return true\n },\n}\n\n/**\n * `ElementEntry` objects refer to an `Element` and the `Path` where it can be\n * found inside a root node.\n */\nexport type ElementEntry = [Element, Path]\n","import { produce } from 'immer'\nimport { Editor, Path, Range, Scrubber, Text } from '..'\nimport { Element, ElementEntry } from './element'\n\n/**\n * The `Node` union type represents all of the different types of nodes that\n * occur in a Slate document tree.\n */\n\nexport type BaseNode = Editor | Element | Text\nexport type Node = Editor | Element | Text\n\nexport interface NodeAncestorsOptions {\n reverse?: boolean\n}\n\nexport interface NodeChildrenOptions {\n reverse?: boolean\n}\n\nexport interface NodeDescendantsOptions {\n from?: Path\n to?: Path\n reverse?: boolean\n pass?: (node: NodeEntry) => boolean\n}\n\nexport interface NodeElementsOptions {\n from?: Path\n to?: Path\n reverse?: boolean\n pass?: (node: NodeEntry) => boolean\n}\n\nexport interface NodeLevelsOptions {\n reverse?: boolean\n}\n\nexport interface NodeNodesOptions {\n from?: Path\n to?: Path\n reverse?: boolean\n pass?: (entry: NodeEntry) => boolean\n}\n\nexport interface NodeTextsOptions {\n from?: Path\n to?: Path\n reverse?: boolean\n pass?: (node: NodeEntry) => boolean\n}\n\nexport interface NodeInterface {\n /**\n * Get the node at a specific path, asserting that it's an ancestor node.\n */\n ancestor: (root: Node, path: Path) => Ancestor\n\n /**\n * Return a generator of all the ancestor nodes above a specific path.\n *\n * By default the order is top-down, from highest to lowest ancestor in\n * the tree, but you can pass the `reverse: true` option to go bottom-up.\n */\n ancestors: (\n root: Node,\n path: Path,\n options?: NodeAncestorsOptions\n ) => Generator<NodeEntry<Ancestor>, void, undefined>\n\n /**\n * Get the child of a node at a specific index.\n */\n child: (root: Node, index: number) => Descendant\n\n /**\n * Iterate over the children of a node at a specific path.\n */\n children: (\n root: Node,\n path: Path,\n options?: NodeChildrenOptions\n ) => Generator<NodeEntry<Descendant>, void, undefined>\n\n /**\n * Get an entry for the common ancesetor node of two paths.\n */\n common: (root: Node, path: Path, another: Path) => NodeEntry\n\n /**\n * Get the node at a specific path, asserting that it's a descendant node.\n */\n descendant: (root: Node, path: Path) => Descendant\n\n /**\n * Return a generator of all the descendant node entries inside a root node.\n */\n descendants: (\n root: Node,\n options?: NodeDescendantsOptions\n ) => Generator<NodeEntry<Descendant>, void, undefined>\n\n /**\n * Return a generator of all the element nodes inside a root node. Each iteration\n * will return an `ElementEntry` tuple consisting of `[Element, Path]`. If the\n * root node is an element it will be included in the iteration as well.\n */\n elements: (\n root: Node,\n options?: NodeElementsOptions\n ) => Generator<ElementEntry, void, undefined>\n\n /**\n * Extract props from a Node.\n */\n extractProps: (node: Node) => NodeProps\n\n /**\n * Get the first node entry in a root node from a path.\n */\n first: (root: Node, path: Path) => NodeEntry\n\n /**\n * Get the sliced fragment represented by a range inside a root node.\n */\n fragment: (root: Node, range: Range) => Descendant[]\n\n /**\n * Get the descendant node referred to by a specific path. If the path is an\n * empty array, it refers to the root node itself.\n */\n get: (root: Node, path: Path) => Node\n\n /**\n * Check if a descendant node exists at a specific path.\n */\n has: (root: Node, path: Path) => boolean\n\n /**\n * Check if a value implements the `Node` interface.\n */\n isNode: (value: any) => value is Node\n\n /**\n * Check if a value is a list of `Node` objects.\n */\n isNodeList: (value: any) => value is Node[]\n\n /**\n * Get the last node entry in a root node from a path.\n */\n last: (root: Node, path: Path) => NodeEntry\n\n /**\n * Get the node at a specific path, ensuring it's a leaf text node.\n */\n leaf: (root: Node, path: Path) => Text\n\n /**\n * Return a generator of the in a branch of the tree, from a specific path.\n *\n * By default the order is top-down, from highest to lowest node in the tree,\n * but you can pass the `reverse: true` option to go bottom-up.\n */\n levels: (\n root: Node,\n path: Path,\n options?: NodeLevelsOptions\n ) => Generator<NodeEntry, void, undefined>\n\n /**\n * Check if a node matches a set of props.\n */\n matches: (node: Node, props: Partial<Node>) => boolean\n\n /**\n * Return a generator of all the node entries of a root node. Each entry is\n * returned as a `[Node, Path]` tuple, with the path referring to the node's\n * position inside the root node.\n */\n nodes: (\n root: Node,\n options?: NodeNodesOptions\n ) => Generator<NodeEntry, void, undefined>\n\n /**\n * Get the parent of a node at a specific path.\n */\n parent: (root: Node, path: Path) => Ancestor\n\n /**\n * Get the concatenated text string of a node's content.\n *\n * Note that this will not include spaces or line breaks between block nodes.\n * It is not a user-facing string, but a string for performing offset-related\n * computations for a node.\n */\n string: (node: Node) => string\n\n /**\n * Return a generator of all leaf text nodes in a root node.\n */\n texts: (\n root: Node,\n options?: NodeTextsOptions\n ) => Generator<NodeEntry<Text>, void, undefined>\n}\n\nconst IS_NODE_LIST_CACHE = new WeakMap<any[], boolean>()\n\n// eslint-disable-next-line no-redeclare\nexport const Node: NodeInterface = {\n ancestor(root: Node, path: Path): Ancestor {\n const node = Node.get(root, path)\n\n if (Text.isText(node)) {\n throw new Error(\n `Cannot get the ancestor node at path [${path}] because it refers to a text node instead: ${Scrubber.stringify(\n node\n )}`\n )\n }\n\n return node\n },\n\n *ancestors(\n root: Node,\n path: Path,\n options: NodeAncestorsOptions = {}\n ): Generator<NodeEntry<Ancestor>, void, undefined> {\n for (const p of Path.ancestors(path, options)) {\n const n = Node.ancestor(root, p)\n const entry: NodeEntry<Ancestor> = [n, p]\n yield entry\n }\n },\n\n child(root: Node, index: number): Descendant {\n if (Text.isText(root)) {\n throw new Error(\n `Cannot get the child of a text node: ${Scrubber.stringify(root)}`\n )\n }\n\n const c = root.children[index] as Descendant\n\n if (c == null) {\n throw new Error(\n `Cannot get child at index \\`${index}\\` in node: ${Scrubber.stringify(\n root\n )}`\n )\n }\n\n return c\n },\n\n *children(\n root: Node,\n path: Path,\n options: NodeChildrenOptions = {}\n ): Generator<NodeEntry<Descendant>, void, undefined> {\n const { reverse = false } = options\n const ancestor = Node.ancestor(root, path)\n const { children } = ancestor\n let index = reverse ? children.length - 1 : 0\n\n while (reverse ? index >= 0 : index < children.length) {\n const child = Node.child(ancestor, index)\n const childPath = path.concat(index)\n yield [child, childPath]\n index = reverse ? index - 1 : index + 1\n }\n },\n\n common(root: Node, path: Path, another: Path): NodeEntry {\n const p = Path.common(path, another)\n const n = Node.get(root, p)\n return [n, p]\n },\n\n descendant(root: Node, path: Path): Descendant {\n const node = Node.get(root, path)\n\n if (Editor.isEditor(node)) {\n throw new Error(\n `Cannot get the descendant node at path [${path}] because it refers to the root editor node instead: ${Scrubber.stringify(\n node\n )}`\n )\n }\n\n return node\n },\n\n *descendants(\n root: Node,\n options: NodeDescendantsOptions = {}\n ): Generator<NodeEntry<Descendant>, void, undefined> {\n for (const [node, path] of Node.nodes(root, options)) {\n if (path.length !== 0) {\n // NOTE: we have to coerce here because checking the path's length does\n // guarantee that `node` is not a `Editor`, but TypeScript doesn't know.\n yield [node, path] as NodeEntry<Descendant>\n }\n }\n },\n\n *elements(\n root: Node,\n options: NodeElementsOptions = {}\n ): Generator<ElementEntry, void, undefined> {\n for (const [node, path] of Node.nodes(root, options)) {\n if (Element.isElement(node)) {\n yield [node, path]\n }\n }\n },\n\n extractProps(node: Node): NodeProps {\n if (Element.isAncestor(node)) {\n const { children, ...properties } = node\n\n return properties\n } else {\n const { text, ...properties } = node\n\n return properties\n }\n },\n\n first(root: Node, path: Path): NodeEntry {\n const p = path.slice()\n let n = Node.get(root, p)\n\n while (n) {\n if (Text.isText(n) || n.children.length === 0) {\n break\n } else {\n n = n.children[0]\n p.push(0)\n }\n }\n\n return [n, p]\n },\n\n fragment(root: Node, range: Range): Descendant[] {\n if (Text.isText(root)) {\n throw new Error(\n `Cannot get a fragment starting from a root text node: ${Scrubber.stringify(\n root\n )}`\n )\n }\n\n const newRoot = produce({ children: root.children }, r => {\n const [start, end] = Range.edges(range)\n const nodeEntries = Node.nodes(r, {\n reverse: true,\n pass: ([, path]) => !Range.includes(range, path),\n })\n\n for (const [, path] of nodeEntries) {\n if (!Range.includes(range, path)) {\n const parent = Node.parent(r, path)\n const index = path[path.length - 1]\n parent.children.splice(index, 1)\n }\n\n if (Path.equals(path, end.path)) {\n const leaf = Node.leaf(r, path)\n leaf.text = leaf.text.slice(0, end.offset)\n }\n\n if (Path.equals(path, start.path)) {\n const leaf = Node.leaf(r, path)\n leaf.text = leaf.text.slice(start.offset)\n }\n }\n\n if (Editor.isEditor(r)) {\n r.selection = null\n }\n })\n\n return newRoot.children\n },\n\n get(root: Node, path: Path): Node {\n let node = root\n\n for (let i = 0; i < path.length; i++) {\n const p = path[i]\n\n if (Text.isText(node) || !node.children[p]) {\n throw new Error(\n `Cannot find a descendant at path [${path}] in node: ${Scrubber.stringify(\n root\n )}`\n )\n }\n\n node = node.children[p]\n }\n\n return node\n },\n\n has(root: Node, path: Path): boolean {\n let node = root\n\n for (let i = 0; i < path.length; i++) {\n const p = path[i]\n\n if (Text.isText(node) || !node.children[p]) {\n return false\n }\n\n node = node.children[p]\n }\n\n return true\n },\n\n isNode(value: any): value is Node {\n return (\n Text.isText(value) || Element.isElement(value) || Editor.isEditor(value)\n )\n },\n\n isNodeList(value: any): value is Node[] {\n if (!Array.isArray(value)) {\n return false\n }\n const cachedResult = IS_NODE_LIST_CACHE.get(value)\n if (cachedResult !== undefined) {\n return cachedResult\n }\n const isNodeList = value.every(val => Node.isNode(val))\n IS_NODE_LIST_CACHE.set(value, isNodeList)\n return isNodeList\n },\n\n last(root: Node, path: Path): NodeEntry {\n const p = path.slice()\n let n = Node.get(root, p)\n\n while (n) {\n if (Text.isText(n) || n.children.length === 0) {\n break\n } else {\n const i = n.children.length - 1\n n = n.children[i]\n p.push(i)\n }\n }\n\n return [n, p]\n },\n\n leaf(root: Node, path: Path): Text {\n const node = Node.get(root, path)\n\n if (!Text.isText(node)) {\n throw new Error(\n `Cannot get the leaf node at path [${path}] because it refers to a non-leaf node: ${Scrubber.stringify(\n node\n )}`\n )\n }\n\n return node\n },\n\n *levels(\n root: Node,\n path: Path,\n options: NodeLevelsOptions = {}\n ): Generator<NodeEntry, void, undefined> {\n for (const p of Path.levels(path, options)) {\n const n = Node.get(root, p)\n yield [n, p]\n }\n },\n\n matches(node: Node, props: Partial<Node>): boolean {\n return (\n (Element.isElement(node) &&\n Element.isElementProps(props) &&\n Element.matches(node, props)) ||\n (Text.isText(node) &&\n Text.isTextProps(props) &&\n Text.matches(node, props))\n )\n },\n\n *nodes(\n root: Node,\n options: NodeNodesOptions = {}\n ): Generator<NodeEntry, void, undefined> {\n const { pass, reverse = false } = options\n const { from = [], to } = options\n const visited = new Set()\n let p: Path = []\n let n = root\n\n while (true) {\n if (to && (reverse ? Path.isBefore(p, to) : Path.isAfter(p, to))) {\n break\n }\n\n if (!visited.has(n)) {\n yield [n, p]\n }\n\n // If we're allowed to go downward and we haven't descended yet, do.\n if (\n !visited.has(n) &&\n !Text.isText(n) &&\n n.children.length !== 0 &&\n (pass == null || pass([n, p]) === false)\n ) {\n visited.add(n)\n let nextIndex = reverse ? n.children.length - 1 : 0\n\n if (Path.isAncestor(p, from)) {\n nextIndex = from[p.length]\n }\n\n p = p.concat(nextIndex)\n n = Node.get(root, p)\n continue\n }\n\n // If we're at the root and we can't go down, we're done.\n if (p.length === 0) {\n break\n }\n\n // If we're going forward...\n if (!reverse) {\n const newPath = Path.next(p)\n\n if (Node.has(root, newPath)) {\n p = newPath\n n = Node.get(root, p)\n continue\n }\n }\n\n // If we're going backward...\n if (reverse && p[p.length - 1] !== 0) {\n const newPath = Path.previous(p)\n p = newPath\n n = Node.get(root, p)\n continue\n }\n\n // Otherwise we're going upward...\n p = Path.parent(p)\n n = Node.get(root, p)\n visited.add(n)\n }\n },\n\n parent(root: Node, path: Path): Ancestor {\n const parentPath = Path.parent(path)\n const p = Node.get(root, parentPath)\n\n if (Text.isText(p)) {\n throw new Error(\n `Cannot get the parent of path [${path}] because it does not exist in the root.`\n )\n }\n\n return p\n },\n\n string(node: Node): string {\n if (Text.isText(node)) {\n return node.text\n } else {\n return node.children.map(Node.string).join('')\n }\n },\n\n *texts(\n root: Node,\n options: NodeTextsOptions = {}\n ): Generator<NodeEntry<Text>, void, undefined> {\n for (const [node, path] of Node.nodes(root, options)) {\n if (Text.isText(node)) {\n yield [node, path]\n }\n }\n },\n}\n\n/**\n * The `Descendant` union type represents nodes that are descendants in the\n * tree. It is returned as a convenience in certain cases to narrow a value\n * further than the more generic `Node` union.\n */\n\nexport type Descendant = Element | Text\n\n/**\n * The `Ancestor` union type represents nodes that are ancestors in the tree.\n * It is returned as a convenience in certain cases to narrow a value further\n * than the more generic `Node` union.\n */\n\nexport type Ancestor = Editor | Element\n\n/**\n * `NodeEntry` objects are returned when iterating over the nodes in a Slate\n * document tree. They consist of the node and its `Path` relative to the root\n * node in the document.\n */\n\nexport type NodeEntry<T extends Node = Node> = [T, Path]\n\n/**\n * Convenience type for returning the props of a node.\n */\nexport type NodeProps =\n | Omit<Editor, 'children'>\n | Omit<Element, 'children'>\n | Omit<Text, 'text'>\n","import { ExtendedType, Node, Path, Range } from '..'\nimport { isPlainObject } from 'is-plain-object'\n\nexport type BaseInsertNodeOperation = {\n type: 'insert_node'\n path: Path\n node: Node\n}\n\nexport type InsertNodeOperation = ExtendedType<\n 'InsertNodeOperation',\n BaseInsertNodeOperation\n>\n\nexport type BaseInsertTextOperation = {\n type: 'insert_text'\n path: Path\n offset: number\n text: string\n}\n\nexport type InsertTextOperation = ExtendedType<\n 'InsertTextOperation',\n BaseInsertTextOperation\n>\n\nexport type BaseMergeNodeOperation = {\n type: 'merge_node'\n path: Path\n position: number\n properties: Partial<Node>\n}\n\nexport type MergeNodeOperation = ExtendedType<\n 'MergeNodeOperation',\n BaseMergeNodeOperation\n>\n\nexport type BaseMoveNodeOperation = {\n type: 'move_node'\n path: Path\n newPath: Path\n}\n\nexport type MoveNodeOperation = ExtendedType<\n 'MoveNodeOperation',\n BaseMoveNodeOperation\n>\n\nexport type BaseRemoveNodeOperation = {\n type: 'remove_node'\n path: Path\n node: Node\n}\n\nexport type RemoveNodeOperation = ExtendedType<\n 'RemoveNodeOperation',\n BaseRemoveNodeOperation\n>\n\nexport type BaseRemoveTextOperation = {\n type: 'remove_text'\n path: Path\n offset: number\n text: string\n}\n\nexport type RemoveTextOperation = ExtendedType<\n 'RemoveTextOperation',\n BaseRemoveTextOperation\n>\n\nexport type BaseSetNodeOperation = {\n type: 'set_node'\n path: Path\n properties: Partial<Node>\n newProperties: Partial<Node>\n}\n\nexport type SetNodeOperation = ExtendedType<\n 'SetNodeOperation',\n BaseSetNodeOperation\n>\n\nexport type BaseSetSelectionOperation =\n | {\n type: 'set_selection'\n properties: null\n newProperties: Range\n }\n | {\n type: 'set_selection'\n properties: Partial<Range>\n newProperties: Partial<Range>\n }\n | {\n type: 'set_selection'\n properties: Range\n newProperties: null\n }\n\nexport type SetSelectionOperation = ExtendedType<\n 'SetSelectionOperation',\n BaseSetSelectionOperation\n>\n\nexport type BaseSplitNodeOperation = {\n type: 'split_node'\n path: Path\n position: number\n properties: Partial<Node>\n}\n\nexport type SplitNodeOperation = ExtendedType<\n 'SplitNodeOperation',\n BaseSplitNodeOperation\n>\n\nexport type NodeOperation =\n | InsertNodeOperation\n | MergeNodeOperation\n | MoveNodeOperation\n | RemoveNodeOperation\n | SetNodeOperation\n | SplitNodeOperation\n\nexport type SelectionOperation = SetSelectionOperation\n\nexport type TextOperation = InsertTextOperation | RemoveTextOperation\n\n/**\n * `Operation` objects define the low-level instructions that Slate editors use\n * to apply changes to their internal state. Representing all changes as\n * operations is what allows Slate editors to easily implement history,\n * collaboration, and other features.\n */\n\nexport type BaseOperation = NodeOperation | SelectionOperation | TextOperation\nexport type Operation = ExtendedType<'Operation', BaseOperation>\n\nexport interface OperationInterface {\n /**\n * Check if a value is a `NodeOperation` object.\n */\n isNodeOperation: (value: any) => value is NodeOperation\n\n /**\n * Check if a value is an `Operation` object.\n */\n isOperation: (value: any) => value is Operation\n\n /**\n * Check if a value is a list of `Operation` objects.\n */\n isOperationList: (value: any) => value is Operation[]\n\n /**\n * Check if a value is a `SelectionOperation` object.\n */\n isSelectionOperation: (value: any) => value is SelectionOperation\n\n /**\n * Check if a value is a `TextOperation` object.\n */\n isTextOperation: (value: any) => value is TextOperation\n\n /**\n * Invert an operation, returning a new operation that will exactly undo the\n * original when applied.\n */\n inverse: (op: Operation) => Operation\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Operation: OperationInterface = {\n isNodeOperation(value: any): value is NodeOperation {\n return Operation.isOperation(value) && value.type.endsWith('_node')\n },\n\n isOperation(value: any): value is Operation {\n if (!isPlainObject(value)) {\n return false\n }\n\n switch (value.type) {\n case 'insert_node':\n return Path.isPath(value.path) && Node.isNode(value.node)\n case 'insert_text':\n return (\n typeof value.offset === 'number' &&\n typeof value.text === 'string' &&\n Path.isPath(value.path)\n )\n case 'merge_node':\n return (\n typeof value.position === 'number' &&\n Path.isPath(value.path) &&\n isPlainObject(value.properties)\n )\n case 'move_node':\n return Path.isPath(value.path) && Path.isPath(value.newPath)\n case 'remove_node':\n return Path.isPath(value.path) && Node.isNode(value.node)\n case 'remove_text':\n return (\n typeof value.offset === 'number' &&\n typeof value.text === 'string' &&\n Path.isPath(value.path)\n )\n case 'set_node':\n return (\n Path.isPath(value.path) &&\n isPlainObject(value.properties) &&\n isPlainObject(value.newProperties)\n )\n case 'set_selection':\n return (\n (value.properties === null && Range.isRange(value.newProperties)) ||\n (value.newProperties === null && Range.isRange(value.properties)) ||\n (isPlainObject(value.properties) &&\n isPlainObject(value.newProperties))\n )\n case 'split_node':\n return (\n Path.isPath(value.path) &&\n typeof value.position === 'number' &&\n isPlainObject(value.properties)\n )\n default:\n return false\n }\n },\n\n isOperationList(value: any): value is Operation[] {\n return (\n Array.isArray(value) && value.every(val => Operation.isOperation(val))\n )\n },\n\n isSelectionOperation(value: any): value is SelectionOperation {\n return Operation.isOperation(value) && value.type.endsWith('_selection')\n },\n\n isTextOperation(value: any): value is TextOperation {\n return Operation.isOperation(value) && value.type.endsWith('_text')\n },\n\n inverse(op: Operation): Operation {\n switch (op.type) {\n case 'insert_node': {\n return { ...op, type: 'remove_node' }\n }\n\n case 'insert_text': {\n return { ...op, type: 'remove_text' }\n }\n\n case 'merge_node': {\n return { ...op, type: 'split_node', path: Path.previous(op.path) }\n }\n\n case 'move_node': {\n const { newPath, path } = op\n\n // PERF: in this case the move operation is a no-op anyways.\n if (Path.equals(newPath, path)) {\n return op\n }\n\n // If the move happens completely within a single parent the path and\n // newPath are stable with respect to each other.\n if (Path.isSibling(path, newPath)) {\n return { ...op, path: newPath, newPath: path }\n }\n\n // If the move does not happen within a single parent it is possible\n // for the move to impact the true path to the location where the node\n // was removed from and where it was inserted. We have to adjust for this\n // and find the original path. We can accomplish this (only in non-sibling)\n // moves by looking at the impact of the move operation on the node\n // after the original move path.\n const inversePath = Path.transform(path, op)!\n const inverseNewPath = Path.transform(Path.next(path), op)!\n return { ...op, path: inversePath, newPath: inverseNewPath }\n }\n\n case 'remove_node': {\n return { ...op, type: 'insert_node' }\n }\n\n case 'remove_text': {\n return { ...op, type: 'insert_text' }\n }\n\n case 'set_node': {\n const { properties, newProperties } = op\n return { ...op, properties: newProperties, newProperties: properties }\n }\n\n case 'set_selection': {\n const { properties, newProperties } = op\n\n if (properties == null) {\n return {\n ...op,\n properties: newProperties as Range,\n newProperties: null,\n }\n } else if (newProperties == null) {\n return {\n ...op,\n properties: null,\n newProperties: properties as Range,\n }\n } else {\n return { ...op, properties: newProperties, newProperties: properties }\n }\n }\n\n case 'split_node': {\n return { ...op, type: 'merge_node', path: Path.next(op.path) }\n }\n }\n },\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { isPlainObject } from 'is-plain-object'\nimport { Range } from '../interfaces/range'\nimport { Node } from '../interfaces/node'\nimport { Operation } from '../interfaces/operation'\n\nconst IS_EDITOR_CACHE = new WeakMap<object, boolean>()\n\nexport const isEditor: EditorInterface['isEditor'] = (\n value: any\n): value is Editor => {\n const cachedIsEditor = IS_EDITOR_CACHE.get(value)\n if (cachedIsEditor !== undefined) {\n return cachedIsEditor\n }\n\n if (!isPlainObject(value)) {\n return false\n }\n\n const isEditor =\n typeof value.addMark === 'function' &&\n typeof value.apply === 'function' &&\n typeof value.deleteFragment === 'function' &&\n typeof value.insertBreak === 'function' &&\n typeof value.insertSoftBreak === 'function' &&\n typeof value.insertFragment === 'function' &&\n typeof value.insertNode === 'function' &&\n typeof value.insertText === 'function' &&\n typeof value.isElementReadOnly === 'function' &&\n typeof value.isInline === 'function' &&\n typeof value.isSelectable === 'function' &&\n typeof value.isVoid === 'function' &&\n typeof value.normalizeNode === 'function' &&\n typeof value.onChange === 'function' &&\n typeof value.removeMark === 'function' &&\n typeof value.getDirtyPaths === 'function' &&\n (value.marks === null || isPlainObject(value.marks)) &&\n (value.selection === null || Range.isRange(value.selection)) &&\n Node.isNodeList(value.children) &&\n Operation.isOperationList(value.operations)\n IS_EDITOR_CACHE.set(value, isEditor)\n return isEditor\n}\n","import {\n Ancestor,\n Descendant,\n Element,\n ExtendedType,\n Location,\n Node,\n NodeEntry,\n Operation,\n Path,\n PathRef,\n Point,\n PointRef,\n Range,\n RangeRef,\n Span,\n Text,\n Transforms,\n} from '..'\nimport {\n LeafEdge,\n MaximizeMode,\n RangeDirection,\n SelectionMode,\n TextDirection,\n TextUnit,\n TextUnitAdjustment,\n} from '../types/types'\nimport { OmitFirstArg } from '../utils/types'\nimport { isEditor } from '../editor/is-editor'\nimport {\n TextInsertFragmentOptions,\n TextInsertTextOptions,\n} from './transforms/text'\nimport { NodeInsertNodesOptions } from './transforms/node'\n\n/**\n * The `Editor` interface stores all the state of a Slate editor. It is extended\n * by plugins that wish to add their own helpers and implement new behaviors.\n */\nexport interface BaseEditor {\n // Core state.\n\n children: Descendant[]\n selection: Selection\n operations: Operation[]\n marks: EditorMarks | null\n\n // Overrideable core methods.\n\n apply: (operation: Operation) => void\n getDirtyPaths: (operation: Operation) => Path[]\n getFragment: () => Descendant[]\n isElementReadOnly: (element: Element) => boolean\n isSelectable: (element: Element) => boolean\n markableVoid: (element: Element) => boolean\n normalizeNode: (entry: NodeEntry, options?: { operation?: Operation }) => void\n onChange: (options?: { operation?: Operation }) => void\n shouldNormalize: ({\n iteration,\n dirtyPaths,\n operation,\n }: {\n iteration: number\n initialDirtyPathsLength: number\n dirtyPaths: Path[]\n operation?: Operation\n }) => boolean\n\n // Overrideable core transforms.\n\n addMark: OmitFirstArg<typeof Editor.addMark>\n collapse: OmitFirstArg<typeof Transforms.collapse>\n delete: OmitFirstArg<typeof Transforms.delete>\n deleteBackward: (unit: TextUnit) => void\n deleteForward: (unit: TextUnit) => void\n deleteFragment: OmitFirstArg<typeof Editor.deleteFragment>\n deselect: OmitFirstArg<typeof Transforms.deselect>\n insertBreak: OmitFirstArg<typeof Editor.insertBreak>\n insertFragment: OmitFirstArg<typeof Transforms.insertFragment>\n insertNode: OmitFirstArg<typeof Editor.insertNode>\n insertNodes: OmitFirstArg<typeof Transforms.insertNodes>\n insertSoftBreak: OmitFirstArg<typeof Editor.insertSoftBreak>\n insertText: OmitFirstArg<typeof Transforms.insertText>\n liftNodes: OmitFirstArg<typeof Transforms.liftNodes>\n mergeNodes: OmitFirstArg<typeof Transforms.mergeNodes>\n move: OmitFirstArg<typeof Transforms.move>\n moveNodes: OmitFirstArg<typeof Transforms.moveNodes>\n normalize: OmitFirstArg<typeof Editor.normalize>\n removeMark: OmitFirstArg<typeof Editor.removeMark>\n removeNodes: OmitFirstArg<typeof Transforms.removeNodes>\n select: OmitFirstArg<typeof Transforms.select>\n setNodes: <T extends Node>(\n props: Partial<T>,\n options?: {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n hanging?: boolean\n split?: boolean\n voids?: boolean\n compare?: PropsCompare\n merge?: PropsMerge\n }\n ) => void\n setNormalizing: OmitFirstArg<typeof Editor.setNormalizing>\n setPoint: OmitFirstArg<typeof Transforms.setPoint>\n setSelection: OmitFirstArg<typeof Transforms.setSelection>\n splitNodes: OmitFirstArg<typeof Transforms.splitNodes>\n unsetNodes: OmitFirstArg<typeof Transforms.unsetNodes>\n unwrapNodes: OmitFirstArg<typeof Transforms.unwrapNodes>\n withoutNormalizing: OmitFirstArg<typeof Editor.withoutNormalizing>\n wrapNodes: OmitFirstArg<typeof Transforms.wrapNodes>\n\n // Overrideable core queries.\n\n above: <T extends Ancestor>(\n options?: EditorAboveOptions<T>\n ) => NodeEntry<T> | undefined\n after: OmitFirstArg<typeof Editor.after>\n before: OmitFirstArg<typeof Editor.before>\n edges: OmitFirstArg<typeof Editor.edges>\n elementReadOnly: OmitFirstArg<typeof Editor.elementReadOnly>\n end: OmitFirstArg<typeof Editor.end>\n first: OmitFirstArg<typeof Editor.first>\n fragment: OmitFirstArg<typeof Editor.fragment>\n getMarks: OmitFirstArg<typeof Editor.marks>\n hasBlocks: OmitFirstArg<typeof Editor.hasBlocks>\n hasInlines: OmitFirstArg<typeof Editor.hasInlines>\n hasPath: OmitFirstArg<typeof Editor.hasPath>\n hasTexts: OmitFirstArg<typeof Editor.hasTexts>\n isBlock: OmitFirstArg<typeof Editor.isBlock>\n isEdge: OmitFirstArg<typeof Editor.isEdge>\n isEmpty: OmitFirstArg<typeof Editor.isEmpty>\n isEnd: OmitFirstArg<typeof Editor.isEnd>\n isInline: OmitFirstArg<typeof Editor.isInline>\n isNormalizing: OmitFirstArg<typeof Editor.isNormalizing>\n isStart: OmitFirstArg<typeof Editor.isStart>\n isVoid: OmitFirstArg<typeof Editor.isVoid>\n last: OmitFirstArg<typeof Editor.last>\n leaf: OmitFirstArg<typeof Editor.leaf>\n levels: <T extends Node>(\n options?: EditorLevelsOptions<T>\n ) => Generator<NodeEntry<T>, void, undefined>\n next: <T extends Descendant>(\n options?: EditorNextOptions<T>\n ) => NodeEntry<T> | undefined\n node: OmitFirstArg<typeof Editor.node>\n nodes: <T extends Node>(\n options?: EditorNodesOptions<T>\n ) => Generator<NodeEntry<T>, void, undefined>\n parent: OmitFirstArg<typeof Editor.parent>\n path: OmitFirstArg<typeof Editor.path>\n pathRef: OmitFirstArg<typeof Editor.pathRef>\n pathRefs: OmitFirstArg<typeof Editor.pathRefs>\n point: OmitFirstArg<typeof Editor.point>\n pointRef: OmitFirstArg<typeof Editor.pointRef>\n pointRefs: OmitFirstArg<typeof Editor.pointRefs>\n positions: OmitFirstArg<typeof Editor.positions>\n previous: <T extends Node>(\n options?: EditorPreviousOptions<T>\n ) => NodeEntry<T> | undefined\n range: OmitFirstArg<typeof Editor.range>\n rangeRef: OmitFirstArg<typeof Editor.rangeRef>\n rangeRefs: OmitFirstArg<typeof Editor.rangeRefs>\n start: OmitFirstArg<typeof Editor.start>\n string: OmitFirstArg<typeof Editor.string>\n unhangRange: OmitFirstArg<typeof Editor.unhangRange>\n void: OmitFirstArg<typeof Editor.void>\n shouldMergeNodesRemovePrevNode: OmitFirstArg<\n typeof Editor.shouldMergeNodesRemovePrevNode\n >\n}\n\nexport type Editor = ExtendedType<'Editor', BaseEditor>\n\nexport type BaseSelection = Range | null\n\nexport type Selection = ExtendedType<'Selection', BaseSelection>\n\nexport type EditorMarks = Omit<Text, 'text'>\n\nexport interface EditorAboveOptions<T extends Ancestor> {\n at?: Location\n match?: NodeMatch<T>\n mode?: MaximizeMode\n voids?: boolean\n}\n\nexport interface EditorAfterOptions {\n distance?: number\n unit?: TextUnitAdjustment\n voids?: boolean\n}\n\nexport interface EditorBeforeOptions {\n distance?: number\n unit?: TextUnitAdjustment\n voids?: boolean\n}\n\nexport interface EditorDirectedDeletionOptions {\n unit?: TextUnit\n}\n\nexport interface EditorElementReadOnlyOptions {\n at?: Location\n mode?: MaximizeMode\n voids?: boolean\n}\n\nexport interface EditorFragmentDeletionOptions {\n direction?: TextDirection\n}\n\nexport interface EditorLeafOptions {\n depth?: number\n edge?: LeafEdge\n}\n\nexport interface EditorLevelsOptions<T extends Node> {\n at?: Location\n match?: NodeMatch<T>\n reverse?: boolean\n voids?: boolean\n}\n\nexport interface EditorNextOptions<T extends Descendant> {\n at?: Location\n match?: NodeMatch<T>\n mode?: SelectionMode\n voids?: boolean\n}\n\nexport interface EditorNodeOptions {\n depth?: number\n edge?: LeafEdge\n}\n\nexport interface EditorNodesOptions<T extends Node> {\n at?: Location | Span\n match?: NodeMatch<T>\n mode?: SelectionMode\n universal?: boolean\n reverse?: boolean\n voids?: boolean\n ignoreNonSelectable?: boolean\n}\n\nexport interface EditorNormalizeOptions {\n force?: boolean\n operation?: Operation\n}\n\nexport interface EditorParentOptions {\n depth?: number\n edge?: LeafEdge\n}\n\nexport interface EditorPathOptions {\n depth?: number\n edge?: LeafEdge\n}\n\nexport interface EditorPathRefOptions {\n affinity?: TextDirection | null\n}\n\nexport interface EditorPointOptions {\n edge?: LeafEdge\n}\n\nexport interface EditorPointRefOptions {\n affinity?: TextDirection | null\n}\n\nexport interface EditorPositionsOptions {\n at?: Location\n unit?: TextUnitAdjustment\n reverse?: boolean\n voids?: boolean\n ignoreNonSelectable?: boolean\n}\n\nexport interface EditorPreviousOptions<T extends Node> {\n at?: Location\n match?: NodeMatch<T>\n mode?: SelectionMode\n voids?: boolean\n}\n\nexport interface EditorRangeRefOptions {\n affinity?: RangeDirection | null\n}\n\nexport interface EditorStringOptions {\n voids?: boolean\n}\n\nexport interface EditorUnhangRangeOptions {\n voids?: boolean\n}\n\nexport interface EditorVoidOptions {\n at?: Location\n mode?: MaximizeMode\n voids?: boolean\n}\n\nexport interface EditorInterface {\n /**\n * Get the ancestor above a location in the document.\n */\n above: <T extends Ancestor>(\n editor: Editor,\n options?: EditorAboveOptions<T>\n ) => NodeEntry<T> | undefined\n\n /**\n * Add a custom property to the leaf text nodes in the current selection.\n *\n * If the selection is currently collapsed, the marks will be added to the\n * `editor.marks` property instead, and applied when text is inserted next.\n */\n addMark: (editor: Editor, key: string, value: any) => void\n\n /**\n * Get the point after a location.\n */\n after: (\n editor: Editor,\n at: Location,\n options?: EditorAfterOptions\n ) => Point | undefined\n\n /**\n * Get the point before a location.\n */\n before: (\n editor: Editor,\n at: Location,\n options?: EditorBeforeOptions\n ) => Point | undefined\n\n /**\n * Delete content in the editor backward from the current selection.\n */\n deleteBackward: (\n editor: Editor,\n options?: EditorDirectedDeletionOptions\n ) => void\n\n /**\n * Delete content in the editor forward from the current selection.\n */\n deleteForward: (\n editor: Editor,\n options?: EditorDirectedDeletionOptions\n ) => void\n\n /**\n * Delete the content in the current selection.\n */\n deleteFragment: (\n editor: Editor,\n options?: EditorFragmentDeletionOptions\n ) => void\n\n /**\n * Get the start and end points of a location.\n */\n edges: (editor: Editor, at: Location) => [Point, Point]\n\n /**\n * Match a read-only element in the current branch of the editor.\n */\n elementReadOnly: (\n editor: Editor,\n options?: EditorElementReadOnlyOptions\n ) => NodeEntry<Element> | undefined\n\n /**\n * Get the end point of a location.\n */\n end: (editor: Editor, at: Location) => Point\n\n /**\n * Get the first node at a location.\n */\n first: (editor: Editor, at: Location) => NodeEntry\n\n /**\n * Get the fragment at a location.\n */\n fragment: (editor: Editor, at: Location) => Descendant[]\n\n /**\n * Check if a node has block children.\n */\n hasBlocks: (editor: Editor, element: Element) => boolean\n\n /**\n * Check if a node has inline and text children.\n */\n hasInlines: (editor: Editor, element: Element) => boolean\n\n hasPath: (editor: Editor, path: Path) => boolean\n\n /**\n * Check if a node has text children.\n */\n hasTexts: (editor: Editor, element: Element) => boolean\n\n /**\n * Insert a block break at the current selection.\n *\n * If the selection is currently expanded, it will be deleted first.\n */\n insertBreak: (editor: Editor) => void\n\n /**\n * Inserts a fragment\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertFragment: (\n editor: Editor,\n fragment: Node[],\n options?: TextInsertFragmentOptions\n ) => void\n\n /**\n * Atomically inserts `nodes`\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertNode: <T extends Node>(\n editor: Editor,\n node: Node,\n options?: NodeInsertNodesOptions<T>\n ) => void\n\n /**\n * Insert a soft break at the current selection.\n *\n * If the selection is currently expanded, it will be deleted first.\n */\n insertSoftBreak: (editor: Editor) => void\n\n /**\n * Insert a string of text\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertText: (\n editor: Editor,\n text: string,\n options?: TextInsertTextOptions\n ) => void\n\n /**\n * Check if a value is a block `Element` object.\n */\n isBlock: (editor: Editor, value: Element) => boolean\n\n /**\n * Check if a point is an edge of a location.\n */\n isEdge: (editor: Editor, point: Point, at: Location) => boolean\n\n /**\n * Check if a value is an `Editor` object.\n */\n isEditor: (value: any) => value is Editor\n\n /**\n * Check if a value is a read-only `Element` object.\n */\n isElementReadOnly: (editor: Editor, element: Element) => boolean\n\n /**\n * Check if an element is empty, accounting for void nodes.\n */\n isEmpty: (editor: Editor, element: Element) => boolean\n\n /**\n * Check if a point is the end point of a location.\n */\n isEnd: (editor: Editor, point: Point, at: Location) => boolean\n\n /**\n * Check if a value is an inline `Element` object.\n */\n isInline: (editor: Editor, value: Element) => boolean\n\n /**\n * Check if the editor is currently normalizing after each operation.\n */\n isNormalizing: (editor: Editor) => boolean\n\n /**\n * Check if a value is a selectable `Element` object.\n */\n isSelectable: (editor: Editor, element: Element) => boolean\n\n /**\n * Check if a point is the start point of a location.\n */\n isStart: (editor: Editor, point: Point, at: Location) => boolean\n\n /**\n * Check if a value is a void `Element` object.\n */\n isVoid: (editor: Editor, value: Element) => boolean\n\n /**\n * Get the last node at a location.\n */\n last: (editor: Editor, at: Location) => NodeEntry\n\n /**\n * Get the leaf text node at a location.\n */\n leaf: (\n editor: Editor,\n at: Location,\n options?: EditorLeafOptions\n ) => NodeEntry<Text>\n\n /**\n * Iterate through all of the levels at a location.\n */\n levels: <T extends Node>(\n editor: Editor,\n options?: EditorLevelsOptions<T>\n ) => Generator<NodeEntry<T>, void, undefined>\n\n /**\n * Get the marks that would be added to text at the current selection.\n */\n marks: (editor: Editor) => Omit<Text, 'text'> | null\n\n /**\n * Get the matching node in the branch of the document after a location.\n */\n next: <T extends Descendant>(\n editor: Editor,\n options?: EditorNextOptions<T>\n ) => NodeEntry<T> | undefined\n\n /**\n * Get the node at a location.\n */\n node: (editor: Editor, at: Location, options?: EditorNodeOptions) => NodeEntry\n\n /**\n * Iterate through all of the nodes in the Editor.\n */\n nodes: <T extends Node>(\n editor: Editor,\n options?: EditorNodesOptions<T>\n ) => Generator<NodeEntry<T>, void, undefined>\n\n /**\n * Normalize any dirty objects in the editor.\n */\n normalize: (editor: Editor, options?: EditorNormalizeOptions) => void\n\n /**\n * Get the parent node of a location.\n */\n parent: (\n editor: Editor,\n at: Location,\n options?: EditorParentOptions\n ) => NodeEntry<Ancestor>\n\n /**\n * Get the path of a location.\n */\n path: (editor: Editor, at: Location, options?: EditorPathOptions) => Path\n\n /**\n * Create a mutable ref for a `Path` object, which will stay in sync as new\n * operations are applied to the editor.\n */\n pathRef: (\n editor: Editor,\n path: Path,\n options?: EditorPathRefOptions\n ) => PathRef\n\n /**\n * Get the set of currently tracked path refs of the editor.\n */\n pathRefs: (editor: Editor) => Set<PathRef>\n\n /**\n * Get the start or end point of a location.\n */\n point: (editor: Editor, at: Location, options?: EditorPointOptions) => Point\n\n /**\n * Create a mutable ref for a `Point` object, which will stay in sync as new\n * operations are applied to the editor.\n */\n pointRef: (\n editor: Editor,\n point: Point,\n options?: EditorPointRefOptions\n ) => PointRef\n\n /**\n * Get the set of currently tracked point refs of the editor.\n */\n pointRefs: (editor: Editor) => Set<PointRef>\n\n /**\n * Return all the positions in `at` range where a `Point` can be placed.\n *\n * By default, moves forward by individual offsets at a time, but\n * the `unit` option can be used to to move by character, word, line, or block.\n *\n * The `reverse` option can be used to change iteration direction.\n *\n * Note: By default void nodes are treated as a single point and iteration\n * will not happen inside their content unless you pass in true for the\n * `voids` option, then iteration will occur.\n */\n positions: (\n editor: Editor,\n options?: EditorPositionsOptions\n ) => Generator<Point, void, undefined>\n\n /**\n * Get the matching node in the branch of the document before a location.\n */\n previous: <T extends Node>(\n editor: Editor,\n options?: EditorPreviousOptions<T>\n ) => NodeEntry<T> | undefined\n\n /**\n * Get a range of a location.\n */\n range: (editor: Editor, at: Location, to?: Location) => Range\n\n /**\n * Create a mutable ref for a `Range` object, which will stay in sync as new\n * operations are applied to the editor.\n */\n rangeRef: (\n editor: Editor,\n range: Range,\n options?: EditorRangeRefOptions\n ) => RangeRef\n\n /**\n * Get the set of currently tracked range refs of the editor.\n */\n rangeRefs: (editor: Editor) => Set<RangeRef>\n\n /**\n * Remove a custom property from all of the leaf text nodes in the current\n * selection.\n *\n * If the selection is currently collapsed, the removal will be stored on\n * `editor.marks` and applied to the text inserted next.\n */\n removeMark: (editor: Editor, key: string) => void\n\n /**\n * Manually set if the editor should currently be normalizing.\n *\n * Note: Using this incorrectly can leave the editor in an invalid state.\n *\n */\n setNormalizing: (editor: Editor, isNormalizing: boolean) => void\n\n /**\n * Get the start point of a location.\n */\n start: (editor: Editor, at: Location) => Point\n\n /**\n * Get the text string content of a location.\n *\n * Note: by default the text of void nodes is considered to be an empty\n * string, regardless of content, unless you pass in true for the voids option\n */\n string: (\n editor: Editor,\n at: Location,\n options?: EditorStringOptions\n ) => string\n\n /**\n * Convert a range into a non-hanging one.\n */\n unhangRange: (\n editor: Editor,\n range: Range,\n options?: EditorUnhangRangeOptions\n ) => Range\n\n /**\n * Match a void node in the current branch of the editor.\n */\n void: (\n editor: Editor,\n options?: EditorVoidOptions\n ) => NodeEntry<Element> | undefined\n\n /**\n * Call a function, deferring normalization until after it completes.\n */\n withoutNormalizing: (editor: Editor, fn: () => void) => void\n\n /**\n * Call a function, Determine whether or not remove the previous node when merge.\n */\n shouldMergeNodesRemovePrevNode: (\n editor: Editor,\n prevNodeEntry: NodeEntry,\n curNodeEntry: NodeEntry\n ) => boolean\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Editor: EditorInterface = {\n above(editor, options) {\n return editor.above(options)\n },\n\n addMark(editor, key, value) {\n editor.addMark(key, value)\n },\n\n after(editor, at, options) {\n return editor.after(at, options)\n },\n\n before(editor, at, options) {\n return editor.before(at, options)\n },\n\n deleteBackward(editor, options = {}) {\n const { unit = 'character' } = options\n editor.deleteBackward(unit)\n },\n\n deleteForward(editor, options = {}) {\n const { unit = 'character' } = options\n editor.deleteForward(unit)\n },\n\n deleteFragment(editor, options) {\n editor.deleteFragment(options)\n },\n\n edges(editor, at) {\n return editor.edges(at)\n },\n\n elementReadOnly(editor: Editor, options: EditorElementReadOnlyOptions = {}) {\n return editor.elementReadOnly(options)\n },\n\n end(editor, at) {\n return editor.end(at)\n },\n\n first(editor, at) {\n return editor.first(at)\n },\n\n fragment(editor, at) {\n return editor.fragment(at)\n },\n\n hasBlocks(editor, element) {\n return editor.hasBlocks(element)\n },\n\n hasInlines(editor, element) {\n return editor.hasInlines(element)\n },\n\n hasPath(editor, path) {\n return editor.hasPath(path)\n },\n\n hasTexts(editor, element) {\n return editor.hasTexts(element)\n },\n\n insertBreak(editor) {\n editor.insertBreak()\n },\n\n insertFragment(editor, fragment, options) {\n editor.insertFragment(fragment, options)\n },\n\n insertNode(editor, node) {\n editor.insertNode(node)\n },\n\n insertSoftBreak(editor) {\n editor.insertSoftBreak()\n },\n\n insertText(editor, text) {\n editor.insertText(text)\n },\n\n isBlock(editor, value) {\n return editor.isBlock(value)\n },\n\n isEdge(editor, point, at) {\n return editor.isEdge(point, at)\n },\n\n isEditor(value: any): value is Editor {\n return isEditor(value)\n },\n\n isElementReadOnly(editor, element) {\n return editor.isElementReadOnly(element)\n },\n\n isEmpty(editor, element) {\n return editor.isEmpty(element)\n },\n\n isEnd(editor, point, at) {\n return editor.isEnd(point, at)\n },\n\n isInline(editor, value) {\n return editor.isInline(value)\n },\n\n isNormalizing(editor) {\n return editor.isNormalizing()\n },\n\n isSelectable(editor: Editor, value: Element) {\n return editor.isSelectable(value)\n },\n\n isStart(editor, point, at) {\n return editor.isStart(point, at)\n },\n\n isVoid(editor, value) {\n return editor.isVoid(value)\n },\n\n last(editor, at) {\n return editor.last(at)\n },\n\n leaf(editor, at, options) {\n return editor.leaf(at, options)\n },\n\n levels(editor, options) {\n return editor.levels(options)\n },\n\n marks(editor) {\n return editor.getMarks()\n },\n\n next<T extends Descendant>(\n editor: Editor,\n options?: EditorNextOptions<T>\n ): NodeEntry<T> | undefined {\n return editor.next(options)\n },\n\n node(editor, at, options) {\n return editor.node(at, options)\n },\n\n nodes(editor, options) {\n return editor.nodes(options)\n },\n\n normalize(editor, options) {\n editor.normalize(options)\n },\n\n parent(editor, at, options) {\n return editor.parent(at, options)\n },\n\n path(editor, at, options) {\n return editor.path(at, options)\n },\n\n pathRef(editor, path, options) {\n return editor.pathRef(path, options)\n },\n\n pathRefs(editor) {\n return editor.pathRefs()\n },\n\n point(editor, at, options) {\n return editor.point(at, options)\n },\n\n pointRef(editor, point, options) {\n return editor.pointRef(point, options)\n },\n\n pointRefs(editor) {\n return editor.pointRefs()\n },\n\n positions(editor, options) {\n return editor.positions(options)\n },\n\n previous(editor, options) {\n return editor.previous(options)\n },\n\n range(editor, at, to) {\n return editor.range(at, to)\n },\n\n rangeRef(editor, range, options) {\n return editor.rangeRef(range, options)\n },\n\n rangeRefs(editor) {\n return editor.rangeRefs()\n },\n\n removeMark(editor, key) {\n editor.removeMark(key)\n },\n\n setNormalizing(editor, isNormalizing) {\n editor.setNormalizing(isNormalizing)\n },\n\n start(editor, at) {\n return editor.start(at)\n },\n\n string(editor, at, options) {\n return editor.string(at, options)\n },\n\n unhangRange(editor, range, options) {\n return editor.unhangRange(range, options)\n },\n\n void(editor, options) {\n return editor.void(options)\n },\n\n withoutNormalizing(editor, fn: () => void) {\n editor.withoutNormalizing(fn)\n },\n shouldMergeNodesRemovePrevNode: (editor, prevNode, curNode) => {\n return editor.shouldMergeNodesRemovePrevNode(prevNode, curNode)\n },\n}\n\n/**\n * A helper type for narrowing matched nodes with a predicate.\n */\n\nexport type NodeMatch<T extends Node> =\n | ((node: Node, path: Path) => node is T)\n | ((node: Node, path: Path) => boolean)\n\nexport type PropsCompare = (prop: Partial<Node>, node: Partial<Node>) => boolean\nexport type PropsMerge = (prop: Partial<Node>, node: Partial<Node>) => object\n","import { Path, Point, Range } from '..'\n\n/**\n * The `Location` interface is a union of the ways to refer to a specific\n * location in a Slate document: paths, points or ranges.\n *\n * Methods will often accept a `Location` instead of requiring only a `Path`,\n * `Point` or `Range`. This eliminates the need for developers to manage\n * converting between the different interfaces in their own code base.\n */\n\nexport type Location = Path | Point | Range\n\nexport interface LocationInterface {\n /**\n * Check if a value implements the `Location` interface.\n */\n isLocation: (value: any) => value is Location\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Location: LocationInterface = {\n isLocation(value: any): value is Location {\n return Path.isPath(value) || Point.isPoint(value) || Range.isRange(value)\n },\n}\n\n/**\n * The `Span` interface is a low-level way to refer to locations in nodes\n * without using `Point` which requires leaf text nodes to be present.\n */\n\nexport type Span = [Path, Path]\n\nexport interface SpanInterface {\n /**\n * Check if a value implements the `Span` interface.\n */\n isSpan: (value: any) => value is Span\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Span: SpanInterface = {\n isSpan(value: any): value is Span {\n return (\n Array.isArray(value) && value.length === 2 && value.every(Path.isPath)\n )\n },\n}\n","import { isPlainObject } from 'is-plain-object'\nimport { produce } from 'immer'\nimport { ExtendedType, Operation, Path } from '..'\nimport { TextDirection } from '../types/types'\n\n/**\n * `Point` objects refer to a specific location in a text node in a Slate\n * document. Its path refers to the location of the node in the tree, and its\n * offset refers to the distance into the node's string of text. Points can\n * only refer to `Text` nodes.\n */\n\nexport interface BasePoint {\n path: Path\n offset: number\n}\n\nexport type Point = ExtendedType<'Point', BasePoint>\n\nexport interface PointTransformOptions {\n affinity?: TextDirection | null\n}\n\nexport interface PointInterface {\n /**\n * Compare a point to another, returning an integer indicating whether the\n * point was before, at, or after the other.\n */\n compare: (point: Point, another: Point) => -1 | 0 | 1\n\n /**\n * Check if a point is after another.\n */\n isAfter: (point: Point, another: Point) => boolean\n\n /**\n * Check if a point is before another.\n */\n isBefore: (point: Point, another: Point) => boolean\n\n /**\n * Check if a point is exactly equal to another.\n */\n equals: (point: Point, another: Point) => boolean\n\n /**\n * Check if a value implements the `Point` interface.\n */\n isPoint: (value: any) => value is Point\n\n /**\n * Transform a point by an operation.\n */\n transform: (\n point: Point,\n op: Operation,\n options?: PointTransformOptions\n ) => Point | null\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Point: PointInterface = {\n compare(point: Point, another: Point): -1 | 0 | 1 {\n const result = Path.compare(point.path, another.path)\n\n if (result === 0) {\n if (point.offset < another.offset) return -1\n if (point.offset > another.offset) return 1\n return 0\n }\n\n return result\n },\n\n isAfter(point: Point, another: Point): boolean {\n return Point.compare(point, another) === 1\n },\n\n isBefore(point: Point, another: Point): boolean {\n return Point.compare(point, another) === -1\n },\n\n equals(point: Point, another: Point): boolean {\n // PERF: ensure the offsets are equal first since they are cheaper to check.\n return (\n point.offset === another.offset && Path.equals(point.path, another.path)\n )\n },\n\n isPoint(value: any): value is Point {\n return (\n isPlainObject(value) &&\n typeof value.offset === 'number' &&\n Path.isPath(value.path)\n )\n },\n\n transform(\n point: Point | null,\n op: Operation,\n options: PointTransformOptions = {}\n ): Point | null {\n return produce(point, p => {\n if (p === null) {\n return null\n }\n const { affinity = 'forward' } = options\n const { path, offset } = p\n\n switch (op.type) {\n case 'insert_node':\n case 'move_node': {\n p.path = Path.transform(path, op, options)!\n break\n }\n\n case 'insert_text': {\n if (\n Path.equals(op.path, path) &&\n (op.offset < offset ||\n (op.offset === offset && affinity === 'forward'))\n ) {\n p.offset += op.text.length\n }\n\n break\n }\n\n case 'merge_node': {\n if (Path.equals(op.path, path)) {\n p.offset += op.position\n }\n\n p.path = Path.transform(path, op, options)!\n break\n }\n\n case 'remove_text': {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset -= Math.min(offset - op.offset, op.text.length)\n }\n\n break\n }\n\n case 'remove_node': {\n if (Path.equals(op.path, path) || Path.isAncestor(op.path, path)) {\n return null\n }\n\n p.path = Path.transform(path, op, options)!\n break\n }\n\n case 'split_node': {\n if (Path.equals(op.path, path)) {\n if (op.position === offset && affinity == null) {\n return null\n } else if (\n op.position < offset ||\n (op.position === offset && affinity === 'forward')\n ) {\n p.offset -= op.position\n\n p.path = Path.transform(path, op, {\n ...options,\n affinity: 'forward',\n })!\n }\n } else {\n p.path = Path.transform(path, op, options)!\n }\n\n break\n }\n }\n })\n },\n}\n\n/**\n * `PointEntry` objects are returned when iterating over `Point` objects that\n * belong to a range.\n */\n\nexport type PointEntry = [Point, 'anchor' | 'focus']\n","export type Scrubber = (key: string, value: unknown) => unknown\n\nexport interface ScrubberInterface {\n setScrubber(scrubber: Scrubber | undefined): void\n stringify(value: any): string\n}\n\nlet _scrubber: Scrubber | undefined = undefined\n\n/**\n * This interface implements a stringify() function, which is used by Slate\n * internally when generating exceptions containing end user data. Developers\n * using Slate may call Scrubber.setScrubber() to alter the behavior of this\n * stringify() function.\n *\n * For example, to prevent the cleartext logging of 'text' fields within Nodes:\n *\n * import { Scrubber } from 'slate';\n * Scrubber.setScrubber((key, val) => {\n * if (key === 'text') return '...scrubbed...'\n * return val\n * });\n *\n */\n// eslint-disable-next-line no-redeclare\nexport const Scrubber: ScrubberInterface = {\n setScrubber(scrubber: Scrubber | undefined): void {\n _scrubber = scrubber\n },\n\n stringify(value: any): string {\n return JSON.stringify(value, _scrubber)\n },\n}\n","import { isPlainObject } from 'is-plain-object'\nimport { Range } from '..'\nimport { ExtendedType } from '../types/custom-types'\nimport { isDeepEqual } from '../utils/deep-equal'\n\n/**\n * `Text` objects represent the nodes that contain the actual text content of a\n * Slate document along with any formatting properties. They are always leaf\n * nodes in the document tree as they cannot contain any children.\n */\n\nexport interface BaseText {\n text: string\n}\n\nexport type Text = ExtendedType<'Text', BaseText>\n\nexport interface TextEqualsOptions {\n loose?: boolean\n}\n\nexport interface TextInterface {\n /**\n * Check if two text nodes are equal.\n *\n * When loose is set, the text is not compared. This is\n * used to check whether sibling text nodes can be merged.\n */\n equals: (text: Text, another: Text, options?: TextEqualsOptions) => boolean\n\n /**\n * Check if a value implements the `Text` interface.\n */\n isText: (value: any) => value is Text\n\n /**\n * Check if a value is a list of `Text` objects.\n */\n isTextList: (value: any) => value is Text[]\n\n /**\n * Check if some props are a partial of Text.\n */\n isTextProps: (props: any) => props is Partial<Text>\n\n /**\n * Check if an text matches set of properties.\n *\n * Note: this is for matching custom properties, and it does not ensure that\n * the `text` property are two nodes equal.\n */\n matches: (text: Text, props: Partial<Text>) => boolean\n\n /**\n * Get the leaves for a text node given decorations.\n */\n decorations: (node: Text, decorations: Range[]) => Text[]\n}\n\n// eslint-disable-next-line no-redeclare\nexport const Text: TextInterface = {\n equals(text: Text, another: Text, options: TextEqualsOptions = {}): boolean {\n const { loose = false } = options\n\n function omitText(obj: Record<any, any>) {\n const { text, ...rest } = obj\n\n return rest\n }\n\n return isDeepEqual(\n loose ? omitText(text) : text,\n loose ? omitText(another) : another\n )\n },\n\n isText(value: any): value is Text {\n return isPlainObject(value) && typeof value.text === 'string'\n },\n\n isTextList(value: any): value is Text[] {\n return Array.isArray(value) && value.every(val => Text.isText(val))\n },\n\n isTextProps(props: any): props is Partial<Text> {\n return (props as Partial<Text>).text !== undefined\n },\n\n matches(text: Text, props: Partial<Text>): boolean {\n for (const key in props) {\n if (key === 'text') {\n continue\n }\n\n if (\n !text.hasOwnProperty(key) ||\n text[<keyof Text>key] !== props[<keyof Text>key]\n ) {\n return false\n }\n }\n\n return true\n },\n\n decorations(node: Text, decorations: Range[]): Text[] {\n let leaves: Text[] = [{ ...node }]\n\n for (const dec of decorations) {\n const { anchor, focus, ...rest } = dec\n const [start, end] = Range.edges(dec)\n const next = []\n let leafEnd = 0\n const decorationStart = start.offset\n const decorationEnd = end.offset\n\n for (const leaf of leaves) {\n const { length } = leaf.text\n const leafStart = leafEnd\n leafEnd += length\n\n // If the range encompasses the entire leaf, add the range.\n if (decorationStart <= leafStart && leafEnd <= decorationEnd) {\n Object.assign(leaf, rest)\n next.push(leaf)\n continue\n }\n\n // If the range expanded and match the leaf, or starts after, or ends before it, continue.\n if (\n (decorationStart !== decorationEnd &&\n (decorationStart === leafEnd || decorationEnd === leafStart)) ||\n decorationStart > leafEnd ||\n decorationEnd < leafStart ||\n (decorationEnd === leafStart && leafStart !== 0)\n ) {\n next.push(leaf)\n continue\n }\n\n // Otherwise we need to split the leaf, at the start, end, or both,\n // and add the range to the middle intersecting section. Do the end\n // split first since we don't need to update the offset that way.\n let middle = leaf\n let before\n let after\n\n if (decorationEnd < leafEnd) {\n const off = decorationEnd - leafStart\n after = { ...middle, text: middle.text.slice(off) }\n middle = { ...middle, text: middle.text.slice(0, off) }\n }\n\n if (decorationStart > leafStart) {\n const off = decorationStart - leafStart\n before = { ...middle, text: middle.text.slice(0, off) }\n middle = { ...middle, text: middle.text.slice(off) }\n }\n\n Object.assign(middle, rest)\n\n if (before) {\n next.push(before)\n }\n\n next.push(middle)\n\n if (after) {\n next.push(after)\n }\n }\n\n leaves = next\n }\n\n return leaves\n },\n}\n","import { Editor, Location } from '../interfaces'\n\n/**\n * Get the default location to insert content into the editor.\n * By default, use the selection as the target location. But if there is\n * no selection, insert at the end of the document since that is such a\n * common use case when inserting from a non-selected state.\n */\nexport const getDefaultInsertLocation = (editor: Editor): Location => {\n if (editor.selection) {\n return editor.selection\n } else if (editor.children.length > 0) {\n return Editor.end(editor, [])\n } else {\n return [0]\n }\n}\n","import { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { Node } from '../interfaces/node'\n\nexport const matchPath = (\n editor: Editor,\n path: Path\n): ((node: Node) => boolean) => {\n const [node] = Editor.node(editor, path)\n return n => n === node\n}\n","// Character (grapheme cluster) boundaries are determined according to\n// the default grapheme cluster boundary specification, extended grapheme clusters variant[1].\n//\n// References:\n//\n// [1] https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table\n// [2] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt\n// [3] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.html\n// [4] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt\n\n/**\n * Get the distance to the end of the first character in a string of text.\n */\n\nexport const getCharacterDistance = (str: string, isRTL = false): number => {\n const isLTR = !isRTL\n const codepoints = isRTL ? codepointsIteratorRTL(str) : str\n\n let left: CodepointType = CodepointType.None\n let right: CodepointType = CodepointType.None\n let distance = 0\n // Evaluation of these conditions are deferred.\n let gb11: boolean | null = null // Is GB11 applicable?\n let gb12Or13: boolean | null = null // Is GB12 or GB13 applicable?\n\n for (const char of codepoints) {\n const code = char.codePointAt(0)\n if (!code) break\n\n const type = getCodepointType(char, code)\n ;[left, right] = isLTR ? [right, type] : [type, left]\n\n if (\n intersects(left, CodepointType.ZWJ) &&\n intersects(right, CodepointType.ExtPict)\n ) {\n if (isLTR) {\n gb11 = endsWithEmojiZWJ(str.substring(0, distance))\n } else {\n gb11 = endsWithEmojiZWJ(str.substring(0, str.length - distance))\n }\n if (!gb11) break\n }\n\n if (\n intersects(left, CodepointType.RI) &&\n intersects(right, CodepointType.RI)\n ) {\n if (gb12Or13 !== null) {\n gb12Or13 = !gb12Or13\n } else {\n if (isLTR) {\n gb12Or13 = true\n } else {\n gb12Or13 = endsWithOddNumberOfRIs(\n str.substring(0, str.length - distance)\n )\n }\n }\n if (!gb12Or13) break\n }\n\n if (\n left !== CodepointType.None &&\n right !== CodepointType.None &&\n isBoundaryPair(left, right)\n ) {\n break\n }\n\n distance += char.length\n }\n\n return distance || 1\n}\n\nconst SPACE = /\\s/\nconst PUNCTUATION =\n /[\\u002B\\u0021-\\u0023\\u0025-\\u002A\\u002C-\\u002F\\u003A\\u003B\\u003F\\u0040\\u005B-\\u005D\\u005F\\u007B\\u007D\\u00A1\\u00A7\\u00AB\\u00B6\\u00B7\\u00BB\\u00BF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E3B\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/\nconst CHAMELEON = /['\\u2018\\u2019]/\n\n/**\n * Get the distance to the end of the first word in a string of text.\n */\n\nexport const getWordDistance = (text: string, isRTL = false): number => {\n let dist = 0\n let started = false\n\n while (text.length > 0) {\n const charDist = getCharacterDistance(text, isRTL)\n const [char, remaining] = splitByCharacterDistance(text, charDist, isRTL)\n\n if (isWordCharacter(char, remaining, isRTL)) {\n started = true\n dist += charDist\n } else if (!started) {\n dist += charDist\n } else {\n break\n }\n\n text = remaining\n }\n\n return dist\n}\n\n/**\n * Split a string in two parts at a given distance starting from the end when\n * `isRTL` is set to `true`.\n */\n\nexport const splitByCharacterDistance = (\n str: string,\n dist: number,\n isRTL?: boolean\n): [string, string] => {\n if (isRTL) {\n const at = str.length - dist\n return [str.slice(at, str.length), str.slice(0, at)]\n }\n\n return [str.slice(0, dist), str.slice(dist)]\n}\n\n/**\n * Check if a character is a word character. The `remaining` argument is used\n * because sometimes you must read subsequent characters to truly determine it.\n */\n\nconst isWordCharacter = (\n char: string,\n remaining: string,\n isRTL = false\n): boolean => {\n if (SPACE.test(char)) {\n return false\n }\n\n // Chameleons count as word characters as long as they're in a word, so\n // recurse to see if the next one is a word character or not.\n if (CHAMELEON.test(char)) {\n const charDist = getCharacterDistance(remaining, isRTL)\n const [nextChar, nextRemaining] = splitByCharacterDistance(\n remaining,\n charDist,\n isRTL\n )\n\n if (isWordCharacter(nextChar, nextRemaining, isRTL)) {\n return true\n }\n }\n\n if (PUNCTUATION.test(char)) {\n return false\n }\n\n return true\n}\n\n/**\n * Iterate on codepoints from right to left.\n */\n\nexport const codepointsIteratorRTL = function* (str: string) {\n const end = str.length - 1\n\n for (let i = 0; i < str.length; i++) {\n const char1 = str.charAt(end - i)\n\n if (isLowSurrogate(char1.charCodeAt(0))) {\n const char2 = str.charAt(end - i - 1)\n if (isHighSurrogate(char2.charCodeAt(0))) {\n yield char2 + char1\n\n i++\n continue\n }\n }\n\n yield char1\n }\n}\n\n/**\n * Is `charCode` a high surrogate.\n *\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\n */\n\nconst isHighSurrogate = (charCode: number) => {\n return charCode >= 0xd800 && charCode <= 0xdbff\n}\n\n/**\n * Is `charCode` a low surrogate.\n *\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\n */\n\nconst isLowSurrogate = (charCode: number) => {\n return charCode >= 0xdc00 && charCode <= 0xdfff\n}\n\nenum CodepointType {\n None = 0,\n Extend = 1 << 0,\n ZWJ = 1 << 1,\n RI = 1 << 2,\n Prepend = 1 << 3,\n SpacingMark = 1 << 4,\n L = 1 << 5,\n V = 1 << 6,\n T = 1 << 7,\n LV = 1 << 8,\n LVT = 1 << 9,\n ExtPict = 1 << 10,\n Any = 1 << 11,\n}\n\nconst reExtend = /^[\\p{Gr_Ext}\\p{EMod}]$/u\nconst rePrepend =\n /^[\\u0600-\\u0605\\u06DD\\u070F\\u0890-\\u0891\\u08E2\\u0D4E\\u{110BD}\\u{110CD}\\u{111C2}-\\u{111C3}\\u{1193F}\\u{11941}\\u{11A3A}\\u{11A84}-\\u{11A89}\\u{11D46}]$/u\nconst reSpacingMark =\n /^[\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E-\\u094F\\u0982-\\u0983\\u09BF-\\u09C0\\u09C7-\\u09C8\\u09CB-\\u09CC\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB-\\u0ACC\\u0B02-\\u0B03\\u0B40\\u0B47-\\u0B48\\u0B4B-\\u0B4C\\u0BBF\\u0BC1-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82-\\u0C83\\u0CBE\\u0CC0-\\u0CC1\\u0CC3-\\u0CC4\\u0CC7-\\u0CC8\\u0CCA-\\u0CCB\\u0D02-\\u0D03\\u0D3F-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D82-\\u0D83\\u0DD0-\\u0DD1\\u0DD8-\\u0DDE\\u0DF2-\\u0DF3\\u0E33\\u0EB3\\u0F3E-\\u0F3F\\u0F7F\\u1031\\u103B-\\u103C\\u1056-\\u1057\\u1084\\u1715\\u1734\\u17B6\\u17BE-\\u17C5\\u17C7-\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930-\\u1931\\u1933-\\u1938\\u1A19-\\u1A1A\\u1A55\\u1A57\\u1A6D-\\u1A72\\u1B04\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B44\\u1B82\\u1BA1\\u1BA6-\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2-\\u1BF3\\u1C24-\\u1C2B\\u1C34-\\u1C35\\u1CE1\\u1CF7\\uA823-\\uA824\\uA827\\uA880-\\uA881\\uA8B4-\\uA8C3\\uA952-\\uA953\\uA983\\uA9B4-\\uA9B5\\uA9BA-\\uA9BB\\uA9BE-\\uA9C0\\uAA2F-\\uAA30\\uAA33-\\uAA34\\uAA4D\\uAAEB\\uAAEE-\\uAAEF\\uAAF5\\uABE3-\\uABE4\\uABE6-\\uABE7\\uABE9-\\uABEA\\uABEC\\u{11000}\\u{11002}\\u{11082}\\u{110B0}-\\u{110B2}\\u{110B7}-\\u{110B8}\\u{1112C}\\u{11145}-\\u{11146}\\u{11182}\\u{111B3}-\\u{111B5}\\u{111BF}-\\u{111C0}\\u{111CE}\\u{1122C}-\\u{1122E}\\u{11232}-\\u{11233}\\u{11235}\\u{112E0}-\\u{112E2}\\u{11302}-\\u{11303}\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}-\\u{11348}\\u{1134B}-\\u{1134D}\\u{11362}-\\u{11363}\\u{11435}-\\u{11437}\\u{11440}-\\u{11441}\\u{11445}\\u{114B1}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BC}\\u{114BE}\\u{114C1}\\u{115B0}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{11630}-\\u{11632}\\u{1163B}-\\u{1163C}\\u{1163E}\\u{116AC}\\u{116AE}-\\u{116AF}\\u{116B6}\\u{11726}\\u{1182C}-\\u{1182E}\\u{11838}\\u{11931}-\\u{11935}\\u{11937}-\\u{11938}\\u{1193D}\\u{11940}\\u{11942}\\u{119D1}-\\u{119D3}\\u{119DC}-\\u{119DF}\\u{119E4}\\u{11A39}\\u{11A57}-\\u{11A58}\\u{11A97}\\u{11C2F}\\u{11C3E}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D8A}-\\u{11D8E}\\u{11D93}-\\u{11D94}\\u{11D96}\\u{11EF5}-\\u{11EF6}\\u{16F51}-\\u{16F87}\\u{16FF0}-\\u{16FF1}\\u{1D166}\\u{1D16D}]$/u\nconst reL = /^[\\u1100-\\u115F\\uA960-\\uA97C]$/u\nconst reV = /^[\\u1160-\\u11A7\\uD7B0-\\uD7C6]$/u\nconst reT = /^[\\u11A8-\\u11FF\\uD7CB-\\uD7FB]$/u\nconst reLV =\n /^[\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788]$/u\nconst reLVT =\n /^[\\uAC01-\\uAC1B\\uAC1D-\\uAC37\\uAC39-\\uAC53\\uAC55-\\uAC6F\\uAC71-\\uAC8B\\uAC8D-\\uACA7\\uACA9-\\uACC3\\uACC5-\\uACDF\\uACE1-\\uACFB\\uACFD-\\uAD17\\uAD19-\\uAD33\\uAD35-\\uAD4F\\uAD51-\\uAD6B\\uAD6D-\\uAD87\\uAD89-\\uADA3\\uADA5-\\uADBF\\uADC1-\\uADDB\\uADDD-\\uADF7\\uADF9-\\uAE13\\uAE15-\\uAE2F\\uAE31-\\uAE4B\\uAE4D-\\uAE67\\uAE69-\\uAE83\\uAE85-\\uAE9F\\uAEA1-\\uAEBB\\uAEBD-\\uAED7\\uAED9-\\uAEF3\\uAEF5-\\uAF0F\\uAF11-\\uAF2B\\uAF2D-\\uAF47\\uAF49-\\uAF63\\uAF65-\\uAF7F\\uAF81-\\uAF9B\\uAF9D-\\uAFB7\\uAFB9-\\uAFD3\\uAFD5-\\uAFEF\\uAFF1-\\uB00B\\uB00D-\\uB027\\uB029-\\uB043\\uB045-\\uB05F\\uB061-\\uB07B\\uB07D-\\uB097\\uB099-\\uB0B3\\uB0B5-\\uB0CF\\uB0D1-\\uB0EB\\uB0ED-\\uB107\\uB109-\\uB123\\uB125-\\uB13F\\uB141-\\uB15B\\uB15D-\\uB177\\uB179-\\uB193\\uB195-\\uB1AF\\uB1B1-\\uB1CB\\uB1CD-\\uB1E7\\uB1E9-\\uB203\\uB205-\\uB21F\\uB221-\\uB23B\\uB23D-\\uB257\\uB259-\\uB273\\uB275-\\uB28F\\uB291-\\uB2AB\\uB2AD-\\uB2C7\\uB2C9-\\uB2E3\\uB2E5-\\uB2FF\\uB301-\\uB31B\\uB31D-\\uB337\\uB339-\\uB353\\uB355-\\uB36F\\uB371-\\uB38B\\uB38D-\\uB3A7\\uB3A9-\\uB3C3\\uB3C5-\\uB3DF\\uB3E1-\\uB3FB\\uB3FD-\\uB417\\uB419-\\uB433\\uB435-\\uB44F\\uB451-\\uB46B\\uB46D-\\uB487\\uB489-\\uB4A3\\uB4A5-\\uB4BF\\uB4C1-\\uB4DB\\uB4DD-\\uB4F7\\uB4F9-\\uB513\\uB515-\\uB52F\\uB531-\\uB54B\\uB54D-\\uB567\\uB569-\\uB583\\uB585-\\uB59F\\uB5A1-\\uB5BB\\uB5BD-\\uB5D7\\uB5D9-\\uB5F3\\uB5F5-\\uB60F\\uB611-\\uB62B\\uB62D-\\uB647\\uB649-\\uB663\\uB665-\\uB67F\\uB681-\\uB69B\\uB69D-\\uB6B7\\uB6B9-\\uB6D3\\uB6D5-\\uB6EF\\uB6F1-\\uB70B\\uB70D-\\uB727\\uB729-\\uB743\\uB745-\\uB75F\\uB761-\\uB77B\\uB77D-\\uB797\\uB799-\\uB7B3\\uB7B5-\\uB7CF\\uB7D1-\\uB7EB\\uB7ED-\\uB807\\uB809-\\uB823\\uB825-\\uB83F\\uB841-\\uB85B\\uB85D-\\uB877\\uB879-\\uB893\\uB895-\\uB8AF\\uB8B1-\\uB8CB\\uB8CD-\\uB8E7\\uB8E9-\\uB903\\uB905-\\uB91F\\uB921-\\uB93B\\uB93D-\\uB957\\uB959-\\uB973\\uB975-\\uB98F\\uB991-\\uB9AB\\uB9AD-\\uB9C7\\uB9C9-\\uB9E3\\uB9E5-\\uB9FF\\uBA01-\\uBA1B\\uBA1D-\\uBA37\\uBA39-\\uBA53\\uBA55-\\uBA6F\\uBA71-\\uBA8B\\uBA8D-\\uBAA7\\uBAA9-\\uBAC3\\uBAC5-\\uBADF\\uBAE1-\\uBAFB\\uBAFD-\\uBB17\\uBB19-\\uBB33\\uBB35-\\uBB4F\\uBB51-\\uBB6B\\uBB6D-\\uBB87\\uBB89-\\uBBA3\\uBBA5-\\uBBBF\\uBBC1-\\uBBDB\\uBBDD-\\uBBF7\\uBBF9-\\uBC13\\uBC15-\\uBC2F\\uBC31-\\uBC4B\\uBC4D-\\uBC67\\uBC69-\\uBC83\\uBC85-\\uBC9F\\uBCA1-\\uBCBB\\uBCBD-\\uBCD7\\uBCD9-\\uBCF3\\uBCF5-\\uBD0F\\uBD11-\\uBD2B\\uBD2D-\\uBD47\\uBD49-\\uBD63\\uBD65-\\uBD7F\\uBD81-\\uBD9B\\uBD9D-\\uBDB7\\uBDB9-\\uBDD3\\uBDD5-\\uBDEF\\uBDF1-\\uBE0B\\uBE0D-\\uBE27\\uBE29-\\uBE43\\uBE45-\\uBE5F\\uBE61-\\uBE7B\\uBE7D-\\uBE97\\uBE99-\\uBEB3\\uBEB5-\\uBECF\\uBED1-\\uBEEB\\uBEED-\\uBF07\\uBF09-\\uBF23\\uBF25-\\uBF3F\\uBF41-\\uBF5B\\uBF5D-\\uBF77\\uBF79-\\uBF93\\uBF95-\\uBFAF\\uBFB1-\\uBFCB\\uBFCD-\\uBFE7\\uBFE9-\\uC003\\uC005-\\uC01F\\uC021-\\uC03B\\uC03D-\\uC057\\uC059-\\uC073\\uC075-\\uC08F\\uC091-\\uC0AB\\uC0AD-\\uC0C7\\uC0C9-\\uC0E3\\uC0E5-\\uC0FF\\uC101-\\uC11B\\uC11D-\\uC137\\uC139-\\uC153\\uC155-\\uC16F\\uC171-\\uC18B\\uC18D-\\uC1A7\\uC1A9-\\uC1C3\\uC1C5-\\uC1DF\\uC1E1-\\uC1FB\\uC1FD-\\uC217\\uC219-\\uC233\\uC235-\\uC24F\\uC251-\\uC26B\\uC26D-\\uC287\\uC289-\\uC2A3\\uC2A5-\\uC2BF\\uC2C1-\\uC2DB\\uC2DD-\\uC2F7\\uC2F9-\\uC313\\uC315-\\uC32F\\uC331-\\uC34B\\uC34D-\\uC367\\uC369-\\uC383\\uC385-\\uC39F\\uC3A1-\\uC3BB\\uC3BD-\\uC3D7\\uC3D9-\\uC3F3\\uC3F5-\\uC40F\\uC411-\\uC42B\\uC42D-\\uC447\\uC449-\\uC463\\uC465-\\uC47F\\uC481-\\uC49B\\uC49D-\\uC4B7\\uC4B9-\\uC4D3\\uC4D5-\\uC4EF\\uC4F1-\\uC50B\\uC50D-\\uC527\\uC529-\\uC543\\uC545-\\uC55F\\uC561-\\uC57B\\uC57D-\\uC597\\uC599-\\uC5B3\\uC5B5-\\uC5CF\\uC5D1-\\uC5EB\\uC5ED-\\uC607\\uC609-\\uC623\\uC625-\\uC63F\\uC641-\\uC65B\\uC65D-\\uC677\\uC679-\\uC693\\uC695-\\uC6AF\\uC6B1-\\uC6CB\\uC6CD-\\uC6E7\\uC6E9-\\uC703\\uC705-\\uC71F\\uC721-\\uC73B\\uC73D-\\uC757\\uC759-\\uC773\\uC775-\\uC78F\\uC791-\\uC7AB\\uC7AD-\\uC7C7\\uC7C9-\\uC7E3\\uC7E5-\\uC7FF\\uC801-\\uC81B\\uC81D-\\uC837\\uC839-\\uC853\\uC855-\\uC86F\\uC871-\\uC88B\\uC88D-\\uC8A7\\uC8A9-\\uC8C3\\uC8C5-\\uC8DF\\uC8E1-\\uC8FB\\uC8FD-\\uC917\\uC919-\\uC933\\uC935-\\uC94F\\uC951-\\uC96B\\uC96D-\\uC987\\uC989-\\uC9A3\\uC9A5-\\uC9BF\\uC9C1-\\uC9DB\\uC9DD-\\uC9F7\\uC9F9-\\uCA13\\uCA15-\\uCA2F\\uCA31-\\uCA4B\\uCA4D-\\uCA67\\uCA69-\\uCA83\\uCA85-\\uCA9F\\uCAA1-\\uCABB\\uCABD-\\uCAD7\\uCAD9-\\uCAF3\\uCAF5-\\uCB0F\\uCB11-\\uCB2B\\uCB2D-\\uCB47\\uCB49-\\uCB63\\uCB65-\\uCB7F\\uCB81-\\uCB9B\\uCB9D-\\uCBB7\\uCBB9-\\uCBD3\\uCBD5-\\uCBEF\\uCBF1-\\uCC0B\\uCC0D-\\uCC27\\uCC29-\\uCC43\\uCC45-\\uCC5F\\uCC61-\\uCC7B\\uCC7D-\\uCC97\\uCC99-\\uCCB3\\uCCB5-\\uCCCF\\uCCD1-\\uCCEB\\uCCED-\\uCD07\\uCD09-\\uCD23\\uCD25-\\uCD3F\\uCD41-\\uCD5B\\uCD5D-\\uCD77\\uCD79-\\uCD93\\uCD95-\\uCDAF\\uCDB1-\\uCDCB\\uCDCD-\\uCDE7\\uCDE9-\\uCE03\\uCE05-\\uCE1F\\uCE21-\\uCE3B\\uCE3D-\\uCE57\\uCE59-\\uCE73\\uCE75-\\uCE8F\\uCE91-\\uCEAB\\uCEAD-\\uCEC7\\uCEC9-\\uCEE3\\uCEE5-\\uCEFF\\uCF01-\\uCF1B\\uCF1D-\\uCF37\\uCF39-\\uCF53\\uCF55-\\uCF6F\\uCF71-\\uCF8B\\uCF8D-\\uCFA7\\uCFA9-\\uCFC3\\uCFC5-\\uCFDF\\uCFE1-\\uCFFB\\uCFFD-\\uD017\\uD019-\\uD033\\uD035-\\uD04F\\uD051-\\uD06B\\uD06D-\\uD087\\uD089-\\uD0A3\\uD0A5-\\uD0BF\\uD0C1-\\uD0DB\\uD0DD-\\uD0F7\\uD0F9-\\uD113\\uD115-\\uD12F\\uD131-\\uD14B\\uD14D-\\uD167\\uD169-\\uD183\\uD185-\\uD19F\\uD1A1-\\uD1BB\\uD1BD-\\uD1D7\\uD1D9-\\uD1F3\\uD1F5-\\uD20F\\uD211-\\uD22B\\uD22D-\\uD247\\uD249-\\uD263\\uD265-\\uD27F\\uD281-\\uD29B\\uD29D-\\uD2B7\\uD2B9-\\uD2D3\\uD2D5-\\uD2EF\\uD2F1-\\uD30B\\uD30D-\\uD327\\uD329-\\uD343\\uD345-\\uD35F\\uD361-\\uD37B\\uD37D-\\uD397\\uD399-\\uD3B3\\uD3B5-\\uD3CF\\uD3D1-\\uD3EB\\uD3ED-\\uD407\\uD409-\\uD423\\uD425-\\uD43F\\uD441-\\uD45B\\uD45D-\\uD477\\uD479-\\uD493\\uD495-\\uD4AF\\uD4B1-\\uD4CB\\uD4CD-\\uD4E7\\uD4E9-\\uD503\\uD505-\\uD51F\\uD521-\\uD53B\\uD53D-\\uD557\\uD559-\\uD573\\uD575-\\uD58F\\uD591-\\uD5AB\\uD5AD-\\uD5C7\\uD5C9-\\uD5E3\\uD5E5-\\uD5FF\\uD601-\\uD61B\\uD61D-\\uD637\\uD639-\\uD653\\uD655-\\uD66F\\uD671-\\uD68B\\uD68D-\\uD6A7\\uD6A9-\\uD6C3\\uD6C5-\\uD6DF\\uD6E1-\\uD6FB\\uD6FD-\\uD717\\uD719-\\uD733\\uD735-\\uD74F\\uD751-\\uD76B\\uD76D-\\uD787\\uD789-\\uD7A3]$/u\nconst reExtPict = /^\\p{ExtPict}$/u\n\nconst getCodepointType = (char: string, code: number): CodepointType => {\n let type = CodepointType.Any\n if (char.search(reExtend) !== -1) {\n type |= CodepointType.Extend\n }\n if (code === 0x200d) {\n type |= CodepointType.ZWJ\n }\n if (code >= 0x1f1e6 && code <= 0x1f1ff) {\n type |= CodepointType.RI\n }\n if (char.search(rePrepend) !== -1) {\n type |= CodepointType.Prepend\n }\n if (char.search(reSpacingMark) !== -1) {\n type |= CodepointType.SpacingMark\n }\n if (char.search(reL) !== -1) {\n type |= CodepointType.L\n }\n if (char.search(reV) !== -1) {\n type |= CodepointType.V\n }\n if (char.search(reT) !== -1) {\n type |= CodepointType.T\n }\n if (char.search(reLV) !== -1) {\n type |= CodepointType.LV\n }\n if (char.search(reLVT) !== -1) {\n type |= CodepointType.LVT\n }\n if (char.search(reExtPict) !== -1) {\n type |= CodepointType.ExtPict\n }\n\n return type\n}\n\nfunction intersects(x: CodepointType, y: CodepointType) {\n return (x & y) !== 0\n}\n\nconst NonBoundaryPairs: [CodepointType, CodepointType][] = [\n // GB6\n [\n CodepointType.L,\n CodepointType.L | CodepointType.V | CodepointType.LV | CodepointType.LVT,\n ],\n // GB7\n [CodepointType.LV | CodepointType.V, CodepointType.V | CodepointType.T],\n // GB8\n [CodepointType.LVT | CodepointType.T, CodepointType.T],\n // GB9\n [CodepointType.Any, CodepointType.Extend | CodepointType.ZWJ],\n // GB9a\n [CodepointType.Any, CodepointType.SpacingMark],\n // GB9b\n [CodepointType.Prepend, CodepointType.Any],\n // GB11\n [CodepointType.ZWJ, CodepointType.ExtPict],\n // GB12 and GB13\n [CodepointType.RI, CodepointType.RI],\n]\n\nfunction isBoundaryPair(left: CodepointType, right: CodepointType) {\n return (\n NonBoundaryPairs.findIndex(\n r => intersects(left, r[0]) && intersects(right, r[1])\n ) === -1\n )\n}\n\nconst endingEmojiZWJ = /\\p{ExtPict}[\\p{Gr_Ext}\\p{EMod}]*\\u200D$/u\nconst endsWithEmojiZWJ = (str: string): boolean => {\n return str.search(endingEmojiZWJ) !== -1\n}\n\nconst endingRIs = /\\p{RI}+$/gu\nconst endsWithOddNumberOfRIs = (str: string): boolean => {\n const match = str.match(endingRIs)\n if (match === null) {\n return false\n } else {\n // A RI is represented by a surrogate pair.\n const numRIs = match[0].length / 2\n return numRIs % 2 === 1\n }\n}\n","import { Editor, Location, Node, Path, Range, Transforms } from '../../index'\nimport { TextUnit } from '../../types/types'\nimport { getDefaultInsertLocation } from '../../utils'\n\nexport interface TextDeleteOptions {\n at?: Location\n distance?: number\n unit?: TextUnit\n reverse?: boolean\n hanging?: boolean\n voids?: boolean\n}\n\nexport interface TextInsertFragmentOptions {\n at?: Location\n hanging?: boolean\n voids?: boolean\n batchDirty?: boolean\n}\n\nexport interface TextInsertTextOptions {\n at?: Location\n voids?: boolean\n}\n\nexport interface TextTransforms {\n /**\n * Delete content in the editor.\n */\n delete: (editor: Editor, options?: TextDeleteOptions) => void\n\n /**\n * Insert a fragment in the editor\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertFragment: (\n editor: Editor,\n fragment: Node[],\n options?: TextInsertFragmentOptions\n ) => void\n\n /**\n * Insert a string of text in the editor\n * at the specified location or (if not defined) the current selection or (if not defined) the end of the document.\n */\n insertText: (\n editor: Editor,\n text: string,\n options?: TextInsertTextOptions\n ) => void\n}\n\n// eslint-disable-next-line no-redeclare\nexport const TextTransforms: TextTransforms = {\n delete(editor, options) {\n editor.delete(options)\n },\n insertFragment(editor, fragment, options) {\n editor.insertFragment(fragment, options)\n },\n insertText(\n editor: Editor,\n text: string,\n options: TextInsertTextOptions = {}\n ): void {\n Editor.withoutNormalizing(editor, () => {\n const { voids = false } = options\n let { at = getDefaultInsertLocation(editor) } = options\n\n if (Path.isPath(at)) {\n at = Editor.range(editor, at)\n }\n\n if (Range.isRange(at)) {\n if (Range.isCollapsed(at)) {\n at = at.anchor\n } else {\n const end = Range.end(at)\n if (!voids && Editor.void(editor, { at: end })) {\n return\n }\n const start = Range.start(at)\n const startRef = Editor.pointRef(editor, start)\n const endRef = Editor.pointRef(editor, end)\n Transforms.delete(editor, { at, voids })\n const startPoint = startRef.unref()\n const endPoint = endRef.unref()\n\n at = startPoint || endPoint!\n Transforms.setSelection(editor, { anchor: at, focus: at })\n }\n }\n\n if (\n (!voids && Editor.void(editor, { at })) ||\n Editor.elementReadOnly(editor, { at })\n ) {\n return\n }\n\n const { path, offset } = at\n if (text.length > 0)\n editor.apply({ type: 'insert_text', path, offset, text })\n })\n },\n}\n","import { GeneralTransforms } from './general'\nimport { NodeTransforms } from './node'\nimport { SelectionTransforms } from './selection'\nimport { TextTransforms } from './text'\n\nexport const Transforms: GeneralTransforms &\n NodeTransforms &\n SelectionTransforms &\n TextTransforms = {\n ...GeneralTransforms,\n ...NodeTransforms,\n ...SelectionTransforms,\n ...TextTransforms,\n}\n","// perf\n\nimport { Editor } from '../interfaces/editor'\n\nconst BATCHING_DIRTY_PATHS: WeakMap<Editor, boolean> = new WeakMap()\n\nexport const isBatchingDirtyPaths = (editor: Editor) => {\n return BATCHING_DIRTY_PATHS.get(editor) || false\n}\n\nexport const batchDirtyPaths = (\n editor: Editor,\n fn: () => void,\n update: () => void\n) => {\n const value = BATCHING_DIRTY_PATHS.get(editor) || false\n BATCHING_DIRTY_PATHS.set(editor, true)\n try {\n fn()\n update()\n } finally {\n BATCHING_DIRTY_PATHS.set(editor, value)\n }\n}\n","import { DIRTY_PATH_KEYS, DIRTY_PATHS } from '../utils/weak-maps'\nimport { Path } from '../interfaces/path'\nimport { Editor } from '../interfaces/editor'\n\n/**\n * update editor dirty paths\n *\n * @param newDirtyPaths: Path[]; new dirty paths\n * @param transform: (p: Path) => Path | null; how to transform existing dirty paths\n */\nexport function updateDirtyPaths(\n editor: Editor,\n newDirtyPaths: Path[],\n transform?: (p: Path) => Path | null\n) {\n const oldDirtyPaths = DIRTY_PATHS.get(editor) || []\n const oldDirtyPathKeys = DIRTY_PATH_KEYS.get(editor) || new Set()\n let dirtyPaths: Path[]\n let dirtyPathKeys: Set<string>\n\n const add = (path: Path | null) => {\n if (path) {\n const key = path.join(',')\n\n if (!dirtyPathKeys.has(key)) {\n dirtyPathKeys.add(key)\n dirtyPaths.push(path)\n }\n }\n }\n\n if (transform) {\n dirtyPaths = []\n dirtyPathKeys = new Set()\n for (const path of oldDirtyPaths) {\n const newPath = transform(path)\n add(newPath)\n }\n } else {\n dirtyPaths = oldDirtyPaths\n dirtyPathKeys = oldDirtyPathKeys\n }\n\n for (const path of newDirtyPaths) {\n add(path)\n }\n\n DIRTY_PATHS.set(editor, dirtyPaths)\n DIRTY_PATH_KEYS.set(editor, dirtyPathKeys)\n}\n","import { PathRef } from '../interfaces/path-ref'\nimport { PointRef } from '../interfaces/point-ref'\nimport { RangeRef } from '../interfaces/range-ref'\nimport { FLUSHING } from '../utils/weak-maps'\nimport { Path } from '../interfaces/path'\nimport { Transforms } from '../interfaces/transforms'\nimport { WithEditorFirstArg } from '../utils/types'\nimport { Editor } from '../interfaces/editor'\nimport { isBatchingDirtyPaths } from './batch-dirty-paths'\nimport { updateDirtyPaths } from './update-dirty-paths'\n\nexport const apply: WithEditorFirstArg<Editor['apply']> = (editor, op) => {\n for (const ref of Editor.pathRefs(editor)) {\n PathRef.transform(ref, op)\n }\n\n for (const ref of Editor.pointRefs(editor)) {\n PointRef.transform(ref, op)\n }\n\n for (const ref of Editor.rangeRefs(editor)) {\n RangeRef.transform(ref, op)\n }\n\n // update dirty paths\n if (!isBatchingDirtyPaths(editor)) {\n const transform = Path.operationCanTransformPath(op)\n ? (p: Path) => Path.transform(p, op)\n : undefined\n updateDirtyPaths(editor, editor.getDirtyPaths(op), transform)\n }\n\n Transforms.transform(editor, op)\n editor.operations.push(op)\n Editor.normalize(editor, {\n operation: op,\n })\n\n // Clear any formats applied to the cursor if the selection changes.\n if (op.type === 'set_selection') {\n editor.marks = null\n }\n\n if (!FLUSHING.get(editor)) {\n FLUSHING.set(editor, true)\n\n Promise.resolve().then(() => {\n FLUSHING.set(editor, false)\n editor.onChange({ operation: op })\n editor.operations = []\n })\n }\n}\n","import { WithEditorFirstArg } from '../utils/types'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\nimport { Node } from '../interfaces/node'\nimport { Editor } from '../interfaces/editor'\n\n/**\n * Get the \"dirty\" paths generated from an operation.\n */\nexport const getDirtyPaths: WithEditorFirstArg<Editor['getDirtyPaths']> = (\n editor,\n op\n) => {\n switch (op.type) {\n case 'insert_text':\n case 'remove_text':\n case 'set_node': {\n const { path } = op\n return Path.levels(path)\n }\n\n case 'insert_node': {\n const { node, path } = op\n const levels = Path.levels(path)\n const descendants = Text.isText(node)\n ? []\n : Array.from(Node.nodes(node), ([, p]) => path.concat(p))\n\n return [...levels, ...descendants]\n }\n\n case 'merge_node': {\n const { path } = op\n const ancestors = Path.ancestors(path)\n const previousPath = Path.previous(path)\n return [...ancestors, previousPath]\n }\n\n case 'move_node': {\n const { path, newPath } = op\n\n if (Path.equals(path, newPath)) {\n return []\n }\n\n const oldAncestors: Path[] = []\n const newAncestors: Path[] = []\n\n for (const ancestor of Path.ancestors(path)) {\n const p = Path.transform(ancestor, op)\n oldAncestors.push(p!)\n }\n\n for (const ancestor of Path.ancestors(newPath)) {\n const p = Path.transform(ancestor, op)\n newAncestors.push(p!)\n }\n\n const newParent = newAncestors[newAncestors.length - 1]\n const newIndex = newPath[newPath.length - 1]\n const resultPath = newParent.concat(newIndex)\n\n return [...oldAncestors, ...newAncestors, resultPath]\n }\n\n case 'remove_node': {\n const { path } = op\n const ancestors = Path.ancestors(path)\n return [...ancestors]\n }\n\n case 'split_node': {\n const { path } = op\n const levels = Path.levels(path)\n const nextPath = Path.next(path)\n return [...levels, nextPath]\n }\n\n default: {\n return []\n }\n }\n}\n","import { Editor, Node } from '../interfaces'\nimport { WithEditorFirstArg } from '../utils'\n\nexport const getFragment: WithEditorFirstArg<\n Editor['getFragment']\n> = editor => {\n const { selection } = editor\n\n if (selection) {\n return Node.fragment(editor, selection)\n }\n return []\n}\n","import { WithEditorFirstArg } from '../utils/types'\nimport { Text } from '../interfaces/text'\nimport { Element } from '../interfaces/element'\nimport { Transforms } from '../interfaces/transforms'\nimport { Descendant, Node } from '../interfaces/node'\nimport { Editor } from '../interfaces/editor'\n\nexport const normalizeNode: WithEditorFirstArg<Editor['normalizeNode']> = (\n editor,\n entry\n) => {\n const [node, path] = entry\n\n // There are no core normalizations for text nodes.\n if (Text.isText(node)) {\n return\n }\n\n // Ensure that block and inline nodes have at least one text child.\n if (Element.isElement(node) && node.children.length === 0) {\n const child = { text: '' }\n Transforms.insertNodes(editor, child, {\n at: path.concat(0),\n voids: true,\n })\n return\n }\n\n // Determine whether the node should have block or inline children.\n const shouldHaveInlines = Editor.isEditor(node)\n ? false\n : Element.isElement(node) &&\n (editor.isInline(node) ||\n node.children.length === 0 ||\n Text.isText(node.children[0]) ||\n editor.isInline(node.children[0]))\n\n // Since we'll be applying operations while iterating, keep track of an\n // index that accounts for any added/removed nodes.\n let n = 0\n\n for (let i = 0; i < node.children.length; i++, n++) {\n const currentNode = Node.get(editor, path)\n if (Text.isText(currentNode)) continue\n const child = currentNode.children[n] as Descendant\n const prev = currentNode.children[n - 1] as Descendant\n const isLast = i === node.children.length - 1\n const isInlineOrText =\n Text.isText(child) || (Element.isElement(child) && editor.isInline(child))\n\n // Only allow block nodes in the top-level children and parent blocks\n // that only contain block nodes. Similarly, only allow inline nodes in\n // other inline nodes, or parent blocks that only contain inlines and\n // text.\n if (isInlineOrText !== shouldHaveInlines) {\n Transforms.removeNodes(editor, { at: path.concat(n), voids: true })\n n--\n } else if (Element.isElement(child)) {\n // Ensure that inline nodes are surrounded by text nodes.\n if (editor.isInline(child)) {\n if (prev == null || !Text.isText(prev)) {\n const newChild = { text: '' }\n Transforms.insertNodes(editor, newChild, {\n at: path.concat(n),\n voids: true,\n })\n n++\n } else if (isLast) {\n const newChild = { text: '' }\n Transforms.insertNodes(editor, newChild, {\n at: path.concat(n + 1),\n voids: true,\n })\n n++\n }\n }\n } else {\n // If the child is not a text node, and doesn't have a `children` field,\n // then we have an invalid node that will upset slate.\n //\n // eg: `{ type: 'some_node' }`.\n //\n // To prevent slate from breaking, we can add the `children` field,\n // and now that it is valid, we can to many more operations easily,\n // such as extend normalizers to fix erronous structure.\n if (!Text.isText(child) && !('children' in child)) {\n const elementChild = child as Element\n elementChild.children = []\n }\n\n // Merge adjacent text nodes that are empty or match.\n if (prev != null && Text.isText(prev)) {\n if (Text.equals(child, prev, { loose: true })) {\n Transforms.mergeNodes(editor, { at: path.concat(n), voids: true })\n n--\n } else if (prev.text === '') {\n Transforms.removeNodes(editor, {\n at: path.concat(n - 1),\n voids: true,\n })\n n--\n } else if (child.text === '') {\n Transforms.removeNodes(editor, {\n at: path.concat(n),\n voids: true,\n })\n n--\n }\n }\n }\n }\n}\n","import { WithEditorFirstArg } from '../utils/types'\nimport { Editor } from '../interfaces/editor'\n\nexport const shouldNormalize: WithEditorFirstArg<Editor['shouldNormalize']> = (\n editor,\n { iteration, initialDirtyPathsLength }\n) => {\n const maxIterations = initialDirtyPathsLength * 42 // HACK: better way?\n\n if (iteration > maxIterations) {\n throw new Error(\n `Could not completely normalize the editor after ${maxIterations} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.`\n )\n }\n\n return true\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Text } from '../interfaces/text'\nimport { Range } from '../interfaces/range'\nimport { Path } from '../interfaces/path'\n\nexport const above: EditorInterface['above'] = (editor, options = {}) => {\n const {\n voids = false,\n mode = 'lowest',\n at = editor.selection,\n match,\n } = options\n\n if (!at) {\n return\n }\n\n const path = Editor.path(editor, at)\n const reverse = mode === 'lowest'\n\n for (const [n, p] of Editor.levels(editor, {\n at: path,\n voids,\n match,\n reverse,\n })) {\n if (Text.isText(n)) continue\n if (Range.isRange(at)) {\n if (\n Path.isAncestor(p, at.anchor.path) &&\n Path.isAncestor(p, at.focus.path)\n ) {\n return [n, p]\n }\n } else {\n if (!Path.equals(path, p)) {\n return [n, p]\n }\n }\n }\n}\n","import { Node } from '../interfaces/node'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { FLUSHING } from '../utils/weak-maps'\nimport { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const addMark: EditorInterface['addMark'] = (editor, key, value) => {\n const { selection } = editor\n\n if (selection) {\n const match = (node: Node, path: Path) => {\n if (!Text.isText(node)) {\n return false // marks can only be applied to text\n }\n const [parentNode, parentPath] = Editor.parent(editor, path)\n return !editor.isVoid(parentNode) || editor.markableVoid(parentNode)\n }\n const expandedSelection = Range.isExpanded(selection)\n let markAcceptingVoidSelected = false\n if (!expandedSelection) {\n const [selectedNode, selectedPath] = Editor.node(editor, selection)\n if (selectedNode && match(selectedNode, selectedPath)) {\n const [parentNode] = Editor.parent(editor, selectedPath)\n markAcceptingVoidSelected =\n parentNode && editor.markableVoid(parentNode)\n }\n }\n if (expandedSelection || markAcceptingVoidSelected) {\n Transforms.setNodes(\n editor,\n { [key]: value },\n {\n match,\n split: true,\n voids: true,\n }\n )\n } else {\n const marks = {\n ...(Editor.marks(editor) || {}),\n [key]: value,\n }\n\n editor.marks = marks\n if (!FLUSHING.get(editor)) {\n editor.onChange()\n }\n }\n }\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const after: EditorInterface['after'] = (editor, at, options = {}) => {\n const anchor = Editor.point(editor, at, { edge: 'end' })\n const focus = Editor.end(editor, [])\n const range = { anchor, focus }\n const { distance = 1 } = options\n let d = 0\n let target\n\n for (const p of Editor.positions(editor, {\n ...options,\n at: range,\n })) {\n if (d > distance) {\n break\n }\n\n if (d !== 0) {\n target = p\n }\n\n d++\n }\n\n return target\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const before: EditorInterface['before'] = (editor, at, options = {}) => {\n const anchor = Editor.start(editor, [])\n const focus = Editor.point(editor, at, { edge: 'start' })\n const range = { anchor, focus }\n const { distance = 1 } = options\n let d = 0\n let target\n\n for (const p of Editor.positions(editor, {\n ...options,\n at: range,\n reverse: true,\n })) {\n if (d > distance) {\n break\n }\n\n if (d !== 0) {\n target = p\n }\n\n d++\n }\n\n return target\n}\n","import { Editor } from '../interfaces/editor'\nimport { Transforms } from '../interfaces/transforms'\nimport { Range } from '../interfaces/range'\nimport { WithEditorFirstArg } from '../utils/types'\n\nexport const deleteBackward: WithEditorFirstArg<Editor['deleteBackward']> = (\n editor,\n unit\n) => {\n const { selection } = editor\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.delete(editor, { unit, reverse: true })\n }\n}\n","import { Editor } from '../interfaces/editor'\nimport { Transforms } from '../interfaces/transforms'\nimport { Range } from '../interfaces/range'\nimport { WithEditorFirstArg } from '../utils/types'\n\nexport const deleteForward: WithEditorFirstArg<Editor['deleteForward']> = (\n editor,\n unit\n) => {\n const { selection } = editor\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.delete(editor, { unit })\n }\n}\n","import { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { EditorInterface } from '../interfaces/editor'\n\nexport const deleteFragment: EditorInterface['deleteFragment'] = (\n editor,\n { direction = 'forward' } = {}\n) => {\n const { selection } = editor\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.delete(editor, { reverse: direction === 'backward' })\n }\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const edges: EditorInterface['edges'] = (editor, at) => {\n return [Editor.start(editor, at), Editor.end(editor, at)]\n}\n","import { Element } from '../interfaces/element'\nimport { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const elementReadOnly: EditorInterface['elementReadOnly'] = (\n editor,\n options = {}\n) => {\n return Editor.above(editor, {\n ...options,\n match: n => Element.isElement(n) && Editor.isElementReadOnly(editor, n),\n })\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const end: EditorInterface['end'] = (editor, at) => {\n return Editor.point(editor, at, { edge: 'end' })\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const first: EditorInterface['first'] = (editor, at) => {\n const path = Editor.path(editor, at, { edge: 'start' })\n return Editor.node(editor, path)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Node } from '../interfaces/node'\n\nexport const fragment: EditorInterface['fragment'] = (editor, at) => {\n const range = Editor.range(editor, at)\n return Node.fragment(editor, range)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Element } from '../interfaces/element'\n\nexport const getVoid: EditorInterface['void'] = (editor, options = {}) => {\n return Editor.above(editor, {\n ...options,\n match: n => Element.isElement(n) && Editor.isVoid(editor, n),\n })\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Element } from '../interfaces/element'\n\nexport const hasBlocks: EditorInterface['hasBlocks'] = (editor, element) => {\n return element.children.some(\n n => Element.isElement(n) && Editor.isBlock(editor, n)\n )\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Text } from '../interfaces/text'\n\nexport const hasInlines: EditorInterface['hasInlines'] = (editor, element) => {\n return element.children.some(\n n => Text.isText(n) || Editor.isInline(editor, n)\n )\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { Node } from '../interfaces/node'\n\nexport const hasPath: EditorInterface['hasPath'] = (editor, path) => {\n return Node.has(editor, path)\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { Text } from '../interfaces/text'\n\nexport const hasTexts: EditorInterface['hasTexts'] = (editor, element) => {\n return element.children.every(n => Text.isText(n))\n}\n","import { Transforms } from '../interfaces/transforms'\nimport { EditorInterface } from '../interfaces/editor'\n\nexport const insertBreak: EditorInterface['insertBreak'] = editor => {\n Transforms.splitNodes(editor, { always: true })\n}\n","import { Transforms } from '../interfaces/transforms'\nimport { EditorInterface } from '../interfaces/editor'\n\nexport const insertNode: EditorInterface['insertNode'] = (\n editor,\n node,\n options\n) => {\n Transforms.insertNodes(editor, node, options)\n}\n","import { Transforms } from '../interfaces/transforms'\nimport { EditorInterface } from '../interfaces/editor'\n\nexport const insertSoftBreak: EditorInterface['insertSoftBreak'] = editor => {\n Transforms.splitNodes(editor, { always: true })\n}\n","import { Transforms } from '../interfaces/transforms'\nimport { EditorInterface } from '../interfaces/editor'\n\nexport const insertText: EditorInterface['insertText'] = (\n editor,\n text,\n options = {}\n) => {\n const { selection, marks } = editor\n\n if (selection) {\n if (marks) {\n const node = { text, ...marks }\n Transforms.insertNodes(editor, node, {\n at: options.at,\n voids: options.voids,\n })\n } else {\n Transforms.insertText(editor, text, options)\n }\n\n editor.marks = null\n }\n}\n","import { EditorInterface } from '../interfaces/editor'\n\nexport const isBlock: EditorInterface['isBlock'] = (editor, value) => {\n return !editor.isInline(value)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const isEdge: EditorInterface['isEdge'] = (editor, point, at) => {\n return Editor.isStart(editor, point, at) || Editor.isEnd(editor, point, at)\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { Text } from '../interfaces/text'\n\nexport const isEmpty: EditorInterface['isEmpty'] = (editor, element) => {\n const { children } = element\n const [first] = children\n return (\n children.length === 0 ||\n (children.length === 1 &&\n Text.isText(first) &&\n first.text === '' &&\n !editor.isVoid(element))\n )\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Point } from '../interfaces/point'\n\nexport const isEnd: EditorInterface['isEnd'] = (editor, point, at) => {\n const end = Editor.end(editor, at)\n return Point.equals(point, end)\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { NORMALIZING } from '../utils/weak-maps'\n\nexport const isNormalizing: EditorInterface['isNormalizing'] = editor => {\n const isNormalizing = NORMALIZING.get(editor)\n return isNormalizing === undefined ? true : isNormalizing\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Point } from '../interfaces/point'\n\nexport const isStart: EditorInterface['isStart'] = (editor, point, at) => {\n // PERF: If the offset isn't `0` we know it's not the start.\n if (point.offset !== 0) {\n return false\n }\n\n const start = Editor.start(editor, at)\n return Point.equals(point, start)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const last: EditorInterface['last'] = (editor, at) => {\n const path = Editor.path(editor, at, { edge: 'end' })\n return Editor.node(editor, path)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Node } from '../interfaces/node'\n\nexport const leaf: EditorInterface['leaf'] = (editor, at, options = {}) => {\n const path = Editor.path(editor, at, options)\n const node = Node.leaf(editor, path)\n return [node, path]\n}\n","import { Node, NodeEntry } from '../interfaces/node'\nimport { Editor, EditorLevelsOptions } from '../interfaces/editor'\nimport { Element } from '../interfaces/element'\n\nexport function* levels<T extends Node>(\n editor: Editor,\n options: EditorLevelsOptions<T> = {}\n): Generator<NodeEntry<T>, void, undefined> {\n const { at = editor.selection, reverse = false, voids = false } = options\n let { match } = options\n\n if (match == null) {\n match = () => true\n }\n\n if (!at) {\n return\n }\n\n const levels: NodeEntry<T>[] = []\n const path = Editor.path(editor, at)\n\n for (const [n, p] of Node.levels(editor, path)) {\n if (!match(n, p)) {\n continue\n }\n\n levels.push([n, p] as NodeEntry<T>)\n\n if (!voids && Element.isElement(n) && Editor.isVoid(editor, n)) {\n break\n }\n }\n\n if (reverse) {\n levels.reverse()\n }\n\n yield* levels\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { NodeEntry } from '../interfaces/node'\nimport { Range } from '../interfaces/range'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\nimport { Element } from '../interfaces/element'\nimport { Point } from '../interfaces'\n\nexport const marks: EditorInterface['marks'] = (editor, options = {}) => {\n const { marks, selection } = editor\n\n if (!selection) {\n return null\n }\n let { anchor, focus } = selection\n\n if (marks) {\n return marks\n }\n\n if (Range.isExpanded(selection)) {\n /**\n * COMPAT: Make sure hanging ranges (caused by double clicking in Firefox)\n * do not adversely affect the returned marks.\n */\n const isEnd = Editor.isEnd(editor, anchor, anchor.path)\n if (isEnd) {\n const after = Editor.after(editor, anchor as Point)\n if (after) {\n anchor = after\n }\n }\n\n const [match] = Editor.nodes(editor, {\n match: Text.isText,\n at: {\n anchor,\n focus,\n },\n })\n\n if (match) {\n const [node] = match as NodeEntry<Text>\n const { text, ...rest } = node\n return rest\n } else {\n return {}\n }\n }\n\n const { path } = anchor\n\n let [node] = Editor.leaf(editor, path)\n\n if (anchor.offset === 0) {\n const prev = Editor.previous(editor, { at: path, match: Text.isText })\n const markedVoid = Editor.above(editor, {\n match: n =>\n Element.isElement(n) &&\n Editor.isVoid(editor, n) &&\n editor.markableVoid(n),\n })\n if (!markedVoid) {\n const block = Editor.above(editor, {\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n })\n\n if (prev && block) {\n const [prevNode, prevPath] = prev\n const [, blockPath] = block\n\n if (Path.isAncestor(blockPath, prevPath)) {\n node = prevNode as Text\n }\n }\n }\n }\n\n const { text, ...rest } = node\n return rest\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Span } from '../interfaces/location'\nimport { Path } from '../interfaces/path'\n\nexport const next: EditorInterface['next'] = (editor, options = {}) => {\n const { mode = 'lowest', voids = false } = options\n let { match, at = editor.selection } = options\n\n if (!at) {\n return\n }\n\n const pointAfterLocation = Editor.after(editor, at, { voids })\n\n if (!pointAfterLocation) return\n\n const [, to] = Editor.last(editor, [])\n\n const span: Span = [pointAfterLocation.path, to]\n\n if (Path.isPath(at) && at.length === 0) {\n throw new Error(`Cannot get the next node from the root node!`)\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n const [parent] = Editor.parent(editor, at)\n match = n => parent.children.includes(n)\n } else {\n match = () => true\n }\n }\n\n const [next] = Editor.nodes(editor, { at: span, match, mode, voids })\n return next\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Node } from '../interfaces/node'\n\nexport const node: EditorInterface['node'] = (editor, at, options = {}) => {\n const path = Editor.path(editor, at, options)\n const node = Node.get(editor, path)\n return [node, path]\n}\n","import { Node, NodeEntry } from '../interfaces/node'\nimport { Editor, EditorNodesOptions } from '../interfaces/editor'\nimport { Span } from '../interfaces/location'\nimport { Element } from '../interfaces/element'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\n\nexport function* nodes<T extends Node>(\n editor: Editor,\n options: EditorNodesOptions<T> = {}\n): Generator<NodeEntry<T>, void, undefined> {\n const {\n at = editor.selection,\n mode = 'all',\n universal = false,\n reverse = false,\n voids = false,\n ignoreNonSelectable = false,\n } = options\n let { match } = options\n\n if (!match) {\n match = () => true\n }\n\n if (!at) {\n return\n }\n\n let from\n let to\n\n if (Span.isSpan(at)) {\n from = at[0]\n to = at[1]\n } else {\n const first = Editor.path(editor, at, { edge: 'start' })\n const last = Editor.path(editor, at, { edge: 'end' })\n from = reverse ? last : first\n to = reverse ? first : last\n }\n\n const nodeEntries = Node.nodes(editor, {\n reverse,\n from,\n to,\n pass: ([node]) => {\n if (!Element.isElement(node)) return false\n if (\n !voids &&\n (Editor.isVoid(editor, node) || Editor.isElementReadOnly(editor, node))\n )\n return true\n if (ignoreNonSelectable && !Editor.isSelectable(editor, node)) return true\n return false\n },\n })\n\n const matches: NodeEntry<T>[] = []\n let hit: NodeEntry<T> | undefined\n\n for (const [node, path] of nodeEntries) {\n if (\n ignoreNonSelectable &&\n Element.isElement(node) &&\n !Editor.isSelectable(editor, node)\n ) {\n continue\n }\n\n const isLower = hit && Path.compare(path, hit[1]) === 0\n\n // In highest mode any node lower than the last hit is not a match.\n if (mode === 'highest' && isLower) {\n continue\n }\n\n if (!match(node, path)) {\n // If we've arrived at a leaf text node that is not lower than the last\n // hit, then we've found a branch that doesn't include a match, which\n // means the match is not universal.\n if (universal && !isLower && Text.isText(node)) {\n return\n } else {\n continue\n }\n }\n\n // If there's a match and it's lower than the last, update the hit.\n if (mode === 'lowest' && isLower) {\n hit = [node, path] as NodeEntry<T>\n continue\n }\n\n // In lowest mode we emit the last hit, once it's guaranteed lowest.\n const emit: NodeEntry<T> | undefined =\n mode === 'lowest' ? hit : ([node, path] as NodeEntry<T>)\n\n if (emit) {\n if (universal) {\n matches.push(emit)\n } else {\n yield emit\n }\n }\n\n hit = [node, path] as NodeEntry<T>\n }\n\n // Since lowest is always emitting one behind, catch up at the end.\n if (mode === 'lowest' && hit) {\n if (universal) {\n matches.push(hit)\n } else {\n yield hit\n }\n }\n\n // Universal defers to ensure that the match occurs in every branch, so we\n // yield all of the matches after iterating.\n if (universal) {\n yield* matches\n }\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { DIRTY_PATH_KEYS, DIRTY_PATHS } from '../utils/weak-maps'\nimport { Path } from '../interfaces/path'\nimport { Node } from '../interfaces/node'\nimport { Element } from '../interfaces/element'\n\nexport const normalize: EditorInterface['normalize'] = (\n editor,\n options = {}\n) => {\n const { force = false, operation } = options\n const getDirtyPaths = (editor: Editor) => {\n return DIRTY_PATHS.get(editor) || []\n }\n\n const getDirtyPathKeys = (editor: Editor) => {\n return DIRTY_PATH_KEYS.get(editor) || new Set()\n }\n\n const popDirtyPath = (editor: Editor): Path => {\n const path = getDirtyPaths(editor).pop()!\n const key = path.join(',')\n getDirtyPathKeys(editor).delete(key)\n return path\n }\n\n if (!Editor.isNormalizing(editor)) {\n return\n }\n\n if (force) {\n const allPaths = Array.from(Node.nodes(editor), ([, p]) => p)\n const allPathKeys = new Set(allPaths.map(p => p.join(',')))\n DIRTY_PATHS.set(editor, allPaths)\n DIRTY_PATH_KEYS.set(editor, allPathKeys)\n }\n\n if (getDirtyPaths(editor).length === 0) {\n return\n }\n\n Editor.withoutNormalizing(editor, () => {\n /*\n Fix dirty elements with no children.\n editor.normalizeNode() does fix this, but some normalization fixes also require it to work.\n Running an initial pass avoids the catch-22 race condition.\n */\n for (const dirtyPath of getDirtyPaths(editor)) {\n if (Node.has(editor, dirtyPath)) {\n const entry = Editor.node(editor, dirtyPath)\n const [node, _] = entry\n\n /*\n The default normalizer inserts an empty text node in this scenario, but it can be customised.\n So there is some risk here.\n\n As long as the normalizer only inserts child nodes for this case it is safe to do in any order;\n by definition adding children to an empty node can't cause other paths to change.\n */\n if (Element.isElement(node) && node.children.length === 0) {\n editor.normalizeNode(entry, { operation })\n }\n }\n }\n\n let dirtyPaths = getDirtyPaths(editor)\n const initialDirtyPathsLength = dirtyPaths.length\n let iteration = 0\n\n while (dirtyPaths.length !== 0) {\n if (\n !editor.shouldNormalize({\n dirtyPaths,\n iteration,\n initialDirtyPathsLength,\n operation,\n })\n ) {\n return\n }\n\n const dirtyPath = popDirtyPath(editor)\n\n // If the node doesn't exist in the tree, it does not need to be normalized.\n if (Node.has(editor, dirtyPath)) {\n const entry = Editor.node(editor, dirtyPath)\n editor.normalizeNode(entry, { operation })\n }\n iteration++\n dirtyPaths = getDirtyPaths(editor)\n }\n })\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { Ancestor, NodeEntry } from '../interfaces/node'\n\nexport const parent: EditorInterface['parent'] = (editor, at, options = {}) => {\n const path = Editor.path(editor, at, options)\n const parentPath = Path.parent(path)\n const entry = Editor.node(editor, parentPath)\n return entry as NodeEntry<Ancestor>\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { PathRef } from '../interfaces/path-ref'\n\nexport const pathRef: EditorInterface['pathRef'] = (\n editor,\n path,\n options = {}\n) => {\n const { affinity = 'forward' } = options\n const ref: PathRef = {\n current: path,\n affinity,\n unref() {\n const { current } = ref\n const pathRefs = Editor.pathRefs(editor)\n pathRefs.delete(ref)\n ref.current = null\n return current\n },\n }\n\n const refs = Editor.pathRefs(editor)\n refs.add(ref)\n return ref\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { PATH_REFS } from '../utils/weak-maps'\n\nexport const pathRefs: EditorInterface['pathRefs'] = editor => {\n let refs = PATH_REFS.get(editor)\n\n if (!refs) {\n refs = new Set()\n PATH_REFS.set(editor, refs)\n }\n\n return refs\n}\n","import { EditorInterface, Node, Path, Point, Range } from '../interfaces'\n\nexport const path: EditorInterface['path'] = (editor, at, options = {}) => {\n const { depth, edge } = options\n\n if (Path.isPath(at)) {\n if (edge === 'start') {\n const [, firstPath] = Node.first(editor, at)\n at = firstPath\n } else if (edge === 'end') {\n const [, lastPath] = Node.last(editor, at)\n at = lastPath\n }\n }\n\n if (Range.isRange(at)) {\n if (edge === 'start') {\n at = Range.start(at)\n } else if (edge === 'end') {\n at = Range.end(at)\n } else {\n at = Path.common(at.anchor.path, at.focus.path)\n }\n }\n\n if (Point.isPoint(at)) {\n at = at.path\n }\n\n if (depth != null) {\n at = at.slice(0, depth)\n }\n\n return at\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { PointRef } from '../interfaces/point-ref'\n\nexport const pointRef: EditorInterface['pointRef'] = (\n editor,\n point,\n options = {}\n) => {\n const { affinity = 'forward' } = options\n const ref: PointRef = {\n current: point,\n affinity,\n unref() {\n const { current } = ref\n const pointRefs = Editor.pointRefs(editor)\n pointRefs.delete(ref)\n ref.current = null\n return current\n },\n }\n\n const refs = Editor.pointRefs(editor)\n refs.add(ref)\n return ref\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { POINT_REFS } from '../utils/weak-maps'\n\nexport const pointRefs: EditorInterface['pointRefs'] = editor => {\n let refs = POINT_REFS.get(editor)\n\n if (!refs) {\n refs = new Set()\n POINT_REFS.set(editor, refs)\n }\n\n return refs\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { Node } from '../interfaces/node'\nimport { Text } from '../interfaces/text'\nimport { Range } from '../interfaces/range'\n\nexport const point: EditorInterface['point'] = (editor, at, options = {}) => {\n const { edge = 'start' } = options\n\n if (Path.isPath(at)) {\n let path\n\n if (edge === 'end') {\n const [, lastPath] = Node.last(editor, at)\n path = lastPath\n } else {\n const [, firstPath] = Node.first(editor, at)\n path = firstPath\n }\n\n const node = Node.get(editor, path)\n\n if (!Text.isText(node)) {\n throw new Error(\n `Cannot get the ${edge} point in the node at path [${at}] because it has no ${edge} text node.`\n )\n }\n\n return { path, offset: edge === 'end' ? node.text.length : 0 }\n }\n\n if (Range.isRange(at)) {\n const [start, end] = Range.edges(at)\n return edge === 'start' ? start : end\n }\n\n return at\n}\n","import { Editor, EditorPositionsOptions } from '../interfaces/editor'\nimport { Point } from '../interfaces/point'\nimport { Range } from '../interfaces/range'\nimport { Element } from '../interfaces/element'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\nimport {\n getCharacterDistance,\n getWordDistance,\n splitByCharacterDistance,\n} from '../utils/string'\n\nexport function* positions(\n editor: Editor,\n options: EditorPositionsOptions = {}\n): Generator<Point, void, undefined> {\n const {\n at = editor.selection,\n unit = 'offset',\n reverse = false,\n voids = false,\n ignoreNonSelectable = false,\n } = options\n\n if (!at) {\n return\n }\n\n /**\n * Algorithm notes:\n *\n * Each step `distance` is dynamic depending on the underlying text\n * and the `unit` specified. Each step, e.g., a line or word, may\n * span multiple text nodes, so we iterate through the text both on\n * two levels in step-sync:\n *\n * `leafText` stores the text on a text leaf level, and is advanced\n * through using the counters `leafTextOffset` and `leafTextRemaining`.\n *\n * `blockText` stores the text on a block level, and is shortened\n * by `distance` every time it is advanced.\n *\n * We only maintain a window of one blockText and one leafText because\n * a block node always appears before all of its leaf nodes.\n */\n\n const range = Editor.range(editor, at)\n const [start, end] = Range.edges(range)\n const first = reverse ? end : start\n let isNewBlock = false\n let blockText = ''\n let distance = 0 // Distance for leafText to catch up to blockText.\n let leafTextRemaining = 0\n let leafTextOffset = 0\n\n // Iterate through all nodes in range, grabbing entire textual content\n // of block nodes in blockText, and text nodes in leafText.\n // Exploits the fact that nodes are sequenced in such a way that we first\n // encounter the block node, then all of its text nodes, so when iterating\n // through the blockText and leafText we just need to remember a window of\n // one block node and leaf node, respectively.\n for (const [node, path] of Editor.nodes(editor, {\n at,\n reverse,\n voids,\n ignoreNonSelectable,\n })) {\n /*\n * ELEMENT NODE - Yield position(s) for voids, collect blockText for blocks\n */\n if (Element.isElement(node)) {\n // Void nodes are a special case, so by default we will always\n // yield their first point. If the `voids` option is set to true,\n // then we will iterate over their content.\n if (!voids && (editor.isVoid(node) || editor.isElementReadOnly(node))) {\n yield Editor.start(editor, path)\n continue\n }\n\n // Inline element nodes are ignored as they don't themselves\n // contribute to `blockText` or `leafText` - their parent and\n // children do.\n if (editor.isInline(node)) continue\n\n // Block element node - set `blockText` to its text content.\n if (Editor.hasInlines(editor, node)) {\n // We always exhaust block nodes before encountering a new one:\n // console.assert(blockText === '',\n // `blockText='${blockText}' - `+\n // `not exhausted before new block node`, path)\n\n // Ensure range considered is capped to `range`, in the\n // start/end edge cases where block extends beyond range.\n // Equivalent to this, but presumably more performant:\n // blockRange = Editor.range(editor, ...Editor.edges(editor, path))\n // blockRange = Range.intersection(range, blockRange) // intersect\n // blockText = Editor.string(editor, blockRange, { voids })\n const e = Path.isAncestor(path, end.path)\n ? end\n : Editor.end(editor, path)\n const s = Path.isAncestor(path, start.path)\n ? start\n : Editor.start(editor, path)\n\n blockText = Editor.string(editor, { anchor: s, focus: e }, { voids })\n isNewBlock = true\n }\n }\n\n /*\n * TEXT LEAF NODE - Iterate through text content, yielding\n * positions every `distance` offset according to `unit`.\n */\n if (Text.isText(node)) {\n const isFirst = Path.equals(path, first.path)\n\n // Proof that we always exhaust text nodes before encountering a new one:\n // console.assert(leafTextRemaining <= 0,\n // `leafTextRemaining=${leafTextRemaining} - `+\n // `not exhausted before new leaf text node`, path)\n\n // Reset `leafText` counters for new text node.\n if (isFirst) {\n leafTextRemaining = reverse\n ? first.offset\n : node.text.length - first.offset\n leafTextOffset = first.offset // Works for reverse too.\n } else {\n leafTextRemaining = node.text.length\n leafTextOffset = reverse ? leafTextRemaining : 0\n }\n\n // Yield position at the start of node (potentially).\n if (isFirst || isNewBlock || unit === 'offset') {\n yield { path, offset: leafTextOffset }\n isNewBlock = false\n }\n\n // Yield positions every (dynamically calculated) `distance` offset.\n while (true) {\n // If `leafText` has caught up with `blockText` (distance=0),\n // and if blockText is exhausted, break to get another block node,\n // otherwise advance blockText forward by the new `distance`.\n if (distance === 0) {\n if (blockText === '') break\n distance = calcDistance(blockText, unit, reverse)\n // Split the string at the previously found distance and use the\n // remaining string for the next iteration.\n blockText = splitByCharacterDistance(blockText, distance, reverse)[1]\n }\n\n // Advance `leafText` by the current `distance`.\n leafTextOffset = reverse\n ? leafTextOffset - distance\n : leafTextOffset + distance\n leafTextRemaining = leafTextRemaining - distance\n\n // If `leafText` is exhausted, break to get a new leaf node\n // and set distance to the overflow amount, so we'll (maybe)\n // catch up to blockText in the next leaf text node.\n if (leafTextRemaining < 0) {\n distance = -leafTextRemaining\n break\n }\n\n // Successfully walked `distance` offsets through `leafText`\n // to catch up with `blockText`, so we can reset `distance`\n // and yield this position in this node.\n distance = 0\n yield { path, offset: leafTextOffset }\n }\n }\n }\n // Proof that upon completion, we've exahusted both leaf and block text:\n // console.assert(leafTextRemaining <= 0, \"leafText wasn't exhausted\")\n // console.assert(blockText === '', \"blockText wasn't exhausted\")\n\n // Helper:\n // Return the distance in offsets for a step of size `unit` on given string.\n function calcDistance(text: string, unit: string, reverse?: boolean) {\n if (unit === 'character') {\n return getCharacterDistance(text, reverse)\n } else if (unit === 'word') {\n return getWordDistance(text, reverse)\n } else if (unit === 'line' || unit === 'block') {\n return text.length\n }\n return 1\n }\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Span } from '../interfaces/location'\nimport { Path } from '../interfaces/path'\n\nexport const previous: EditorInterface['previous'] = (editor, options = {}) => {\n const { mode = 'lowest', voids = false } = options\n let { match, at = editor.selection } = options\n\n if (!at) {\n return\n }\n\n const pointBeforeLocation = Editor.before(editor, at, { voids })\n\n if (!pointBeforeLocation) {\n return\n }\n\n const [, to] = Editor.first(editor, [])\n\n // The search location is from the start of the document to the path of\n // the point before the location passed in\n const span: Span = [pointBeforeLocation.path, to]\n\n if (Path.isPath(at) && at.length === 0) {\n throw new Error(`Cannot get the previous node from the root node!`)\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n const [parent] = Editor.parent(editor, at)\n match = n => parent.children.includes(n)\n } else {\n match = () => true\n }\n }\n\n const [previous] = Editor.nodes(editor, {\n reverse: true,\n at: span,\n match,\n mode,\n voids,\n })\n\n return previous\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { RangeRef } from '../interfaces/range-ref'\n\nexport const rangeRef: EditorInterface['rangeRef'] = (\n editor,\n range,\n options = {}\n) => {\n const { affinity = 'forward' } = options\n const ref: RangeRef = {\n current: range,\n affinity,\n unref() {\n const { current } = ref\n const rangeRefs = Editor.rangeRefs(editor)\n rangeRefs.delete(ref)\n ref.current = null\n return current\n },\n }\n\n const refs = Editor.rangeRefs(editor)\n refs.add(ref)\n return ref\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { RANGE_REFS } from '../utils/weak-maps'\n\nexport const rangeRefs: EditorInterface['rangeRefs'] = editor => {\n let refs = RANGE_REFS.get(editor)\n\n if (!refs) {\n refs = new Set()\n RANGE_REFS.set(editor, refs)\n }\n\n return refs\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Range } from '../interfaces/range'\n\nexport const range: EditorInterface['range'] = (editor, at, to) => {\n if (Range.isRange(at) && !to) {\n return at\n }\n\n const start = Editor.start(editor, at)\n const end = Editor.end(editor, to || at)\n return { anchor: start, focus: end }\n}\n","import { Node } from '../interfaces/node'\nimport { Path } from '../interfaces/path'\nimport { Text } from '../interfaces/text'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { FLUSHING } from '../utils/weak-maps'\nimport { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const removeMark: EditorInterface['removeMark'] = (editor, key) => {\n const { selection } = editor\n\n if (selection) {\n const match = (node: Node, path: Path) => {\n if (!Text.isText(node)) {\n return false // marks can only be applied to text\n }\n const [parentNode, parentPath] = Editor.parent(editor, path)\n return !editor.isVoid(parentNode) || editor.markableVoid(parentNode)\n }\n const expandedSelection = Range.isExpanded(selection)\n let markAcceptingVoidSelected = false\n if (!expandedSelection) {\n const [selectedNode, selectedPath] = Editor.node(editor, selection)\n if (selectedNode && match(selectedNode, selectedPath)) {\n const [parentNode] = Editor.parent(editor, selectedPath)\n markAcceptingVoidSelected =\n parentNode && editor.markableVoid(parentNode)\n }\n }\n if (expandedSelection || markAcceptingVoidSelected) {\n Transforms.unsetNodes(editor, key, {\n match,\n split: true,\n voids: true,\n })\n } else {\n const marks = { ...(Editor.marks(editor) || {}) }\n delete marks[<keyof Node>key]\n editor.marks = marks\n if (!FLUSHING.get(editor)) {\n editor.onChange()\n }\n }\n }\n}\n","import { EditorInterface } from '../interfaces/editor'\nimport { NORMALIZING } from '../utils/weak-maps'\n\nexport const setNormalizing: EditorInterface['setNormalizing'] = (\n editor,\n isNormalizing\n) => {\n NORMALIZING.set(editor, isNormalizing)\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const start: EditorInterface['start'] = (editor, at) => {\n return Editor.point(editor, at, { edge: 'start' })\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Range } from '../interfaces/range'\nimport { Text } from '../interfaces/text'\nimport { Path } from '../interfaces/path'\n\nexport const string: EditorInterface['string'] = (editor, at, options = {}) => {\n const { voids = false } = options\n const range = Editor.range(editor, at)\n const [start, end] = Range.edges(range)\n let text = ''\n\n for (const [node, path] of Editor.nodes(editor, {\n at: range,\n match: Text.isText,\n voids,\n })) {\n let t = node.text\n\n if (Path.equals(path, end.path)) {\n t = t.slice(0, end.offset)\n }\n\n if (Path.equals(path, start.path)) {\n t = t.slice(start.offset)\n }\n\n text += t\n }\n\n return text\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\nimport { Range } from '../interfaces/range'\nimport { Path } from '../interfaces/path'\nimport { Element } from '../interfaces/element'\nimport { Text } from '../interfaces/text'\n\nexport const unhangRange: EditorInterface['unhangRange'] = (\n editor,\n range,\n options = {}\n) => {\n const { voids = false } = options\n let [start, end] = Range.edges(range)\n\n // PERF: exit early if we can guarantee that the range isn't hanging.\n if (\n start.offset !== 0 ||\n end.offset !== 0 ||\n Range.isCollapsed(range) ||\n Path.hasPrevious(end.path)\n ) {\n return range\n }\n\n const endBlock = Editor.above(editor, {\n at: end,\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n voids,\n })\n const blockPath = endBlock ? endBlock[1] : []\n const first = Editor.start(editor, start)\n const before = { anchor: first, focus: end }\n let skip = true\n\n for (const [node, path] of Editor.nodes(editor, {\n at: before,\n match: Text.isText,\n reverse: true,\n voids,\n })) {\n if (skip) {\n skip = false\n continue\n }\n\n if (node.text !== '' || Path.isBefore(path, blockPath)) {\n end = { path, offset: node.text.length }\n break\n }\n }\n\n return { anchor: start, focus: end }\n}\n","import { Editor, EditorInterface } from '../interfaces/editor'\n\nexport const withoutNormalizing: EditorInterface['withoutNormalizing'] = (\n editor,\n fn\n) => {\n const value = Editor.isNormalizing(editor)\n Editor.setNormalizing(editor, false)\n try {\n fn()\n } finally {\n Editor.setNormalizing(editor, value)\n }\n Editor.normalize(editor)\n}\n","import { EditorInterface, Element, Editor, Text } from '../interfaces'\n\nexport const shouldMergeNodesRemovePrevNode: EditorInterface['shouldMergeNodesRemovePrevNode'] =\n (editor, [prevNode, prevPath], [curNode, curNodePath]) => {\n // If the target node that we're merging with is empty, remove it instead\n // of merging the two. This is a common rich text editor behavior to\n // prevent losing formatting when deleting entire nodes when you have a\n // hanging selection.\n // if prevNode is first child in parent,don't remove it.\n\n return (\n (Element.isElement(prevNode) && Editor.isEmpty(editor, prevNode)) ||\n (Text.isText(prevNode) &&\n prevNode.text === '' &&\n prevPath[prevPath.length - 1] !== 0)\n )\n }\n","import { TextTransforms } from '../interfaces/transforms/text'\nimport { Editor } from '../interfaces/editor'\nimport { Range } from '../interfaces/range'\nimport { Point } from '../interfaces/point'\nimport { Path } from '../interfaces/path'\nimport { Transforms } from '../interfaces/transforms'\nimport { Element } from '../interfaces/element'\nimport { NodeEntry } from '../interfaces/node'\n\nexport const deleteText: TextTransforms['delete'] = (editor, options = {}) => {\n Editor.withoutNormalizing(editor, () => {\n const {\n reverse = false,\n unit = 'character',\n distance = 1,\n voids = false,\n } = options\n let { at = editor.selection, hanging = false } = options\n\n if (!at) {\n return\n }\n\n let isCollapsed = false\n if (Range.isRange(at) && Range.isCollapsed(at)) {\n isCollapsed = true\n at = at.anchor\n }\n\n if (Point.isPoint(at)) {\n const furthestVoid = Editor.void(editor, { at, mode: 'highest' })\n\n if (!voids && furthestVoid) {\n const [, voidPath] = furthestVoid\n at = voidPath\n } else {\n const opts = { unit, distance }\n const target = reverse\n ? Editor.before(editor, at, opts) || Editor.start(editor, [])\n : Editor.after(editor, at, opts) || Editor.end(editor, [])\n at = { anchor: at, focus: target }\n hanging = true\n }\n }\n\n if (Path.isPath(at)) {\n Transforms.removeNodes(editor, { at, voids })\n return\n }\n\n if (Range.isCollapsed(at)) {\n return\n }\n\n if (!hanging) {\n const [, end] = Range.edges(at)\n const endOfDoc = Editor.end(editor, [])\n\n if (!Point.equals(end, endOfDoc)) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n }\n\n let [start, end] = Range.edges(at)\n const startBlock = Editor.above(editor, {\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n at: start,\n voids,\n })\n const endBlock = Editor.above(editor, {\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n at: end,\n voids,\n })\n const isAcrossBlocks =\n startBlock && endBlock && !Path.equals(startBlock[1], endBlock[1])\n const isSingleText = Path.equals(start.path, end.path)\n const startNonEditable = voids\n ? null\n : Editor.void(editor, { at: start, mode: 'highest' }) ??\n Editor.elementReadOnly(editor, { at: start, mode: 'highest' })\n const endNonEditable = voids\n ? null\n : Editor.void(editor, { at: end, mode: 'highest' }) ??\n Editor.elementReadOnly(editor, { at: end, mode: 'highest' })\n\n // If the start or end points are inside an inline void, nudge them out.\n if (startNonEditable) {\n const before = Editor.before(editor, start)\n\n if (before && startBlock && Path.isAncestor(startBlock[1], before.path)) {\n start = before\n }\n }\n\n if (endNonEditable) {\n const after = Editor.after(editor, end)\n\n if (after && endBlock && Path.isAncestor(endBlock[1], after.path)) {\n end = after\n }\n }\n\n // Get the highest nodes that are completely inside the range, as well as\n // the start and end nodes.\n const matches: NodeEntry[] = []\n let lastPath: Path | undefined\n\n for (const entry of Editor.nodes(editor, { at, voids })) {\n const [node, path] = entry\n\n if (lastPath && Path.compare(path, lastPath) === 0) {\n continue\n }\n\n if (\n (!voids &&\n Element.isElement(node) &&\n (Editor.isVoid(editor, node) ||\n Editor.isElementReadOnly(editor, node))) ||\n (!Path.isCommon(path, start.path) && !Path.isCommon(path, end.path))\n ) {\n matches.push(entry)\n lastPath = path\n }\n }\n\n const pathRefs = Array.from(matches, ([, p]) => Editor.pathRef(editor, p))\n const startRef = Editor.pointRef(editor, start)\n const endRef = Editor.pointRef(editor, end)\n\n let removedText = ''\n\n if (!isSingleText && !startNonEditable) {\n const point = startRef.current!\n const [node] = Editor.leaf(editor, point)\n const { path } = point\n const { offset } = start\n const text = node.text.slice(offset)\n if (text.length > 0) {\n editor.apply({ type: 'remove_text', path, offset, text })\n removedText = text\n }\n }\n\n pathRefs\n .reverse()\n .map(r => r.unref())\n .filter((r): r is Path => r !== null)\n .forEach(p => Transforms.removeNodes(editor, { at: p, voids }))\n\n if (!endNonEditable) {\n const point = endRef.current!\n const [node] = Editor.leaf(editor, point)\n const { path } = point\n const offset = isSingleText ? start.offset : 0\n const text = node.text.slice(offset, end.offset)\n if (text.length > 0) {\n editor.apply({ type: 'remove_text', path, offset, text })\n removedText = text\n }\n }\n\n if (!isSingleText && isAcrossBlocks && endRef.current && startRef.current) {\n Transforms.mergeNodes(editor, {\n at: endRef.current,\n hanging: true,\n voids,\n })\n }\n\n // For Thai script, deleting N character(s) backward should delete\n // N code point(s) instead of an entire grapheme cluster.\n // Therefore, the remaining code points should be inserted back.\n if (\n isCollapsed &&\n reverse &&\n unit === 'character' &&\n removedText.length > 1 &&\n removedText.match(/[\\u0E00-\\u0E7F]+/)\n ) {\n Transforms.insertText(\n editor,\n removedText.slice(0, removedText.length - distance)\n )\n }\n\n const startUnref = startRef.unref()\n const endUnref = endRef.unref()\n const point = reverse ? startUnref || endUnref : endUnref || startUnref\n\n if (options.at == null && point) {\n Transforms.select(editor, point)\n }\n })\n}\n","import { Transforms } from '../interfaces/transforms'\nimport { Editor } from '../interfaces/editor'\nimport { Range } from '../interfaces/range'\nimport { Path } from '../interfaces/path'\nimport { Element } from '../interfaces/element'\nimport { Node, NodeEntry } from '../interfaces/node'\nimport { Text } from '../interfaces/text'\nimport { TextTransforms } from '../interfaces/transforms/text'\nimport { getDefaultInsertLocation } from '../utils'\n\nexport const insertFragment: TextTransforms['insertFragment'] = (\n editor,\n fragment,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { hanging = false, voids = false } = options\n let { at = getDefaultInsertLocation(editor), batchDirty = true } = options\n\n if (!fragment.length) {\n return\n }\n\n if (Range.isRange(at)) {\n if (!hanging) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n\n if (Range.isCollapsed(at)) {\n at = at.anchor\n } else {\n const [, end] = Range.edges(at)\n\n if (!voids && Editor.void(editor, { at: end })) {\n return\n }\n\n const pointRef = Editor.pointRef(editor, end)\n Transforms.delete(editor, { at })\n at = pointRef.unref()!\n }\n } else if (Path.isPath(at)) {\n at = Editor.start(editor, at)\n }\n\n if (!voids && Editor.void(editor, { at })) {\n return\n }\n\n // If the insert point is at the edge of an inline node, move it outside\n // instead since it will need to be split otherwise.\n const inlineElementMatch = Editor.above(editor, {\n at,\n match: n => Element.isElement(n) && Editor.isInline(editor, n),\n mode: 'highest',\n voids,\n })\n\n if (inlineElementMatch) {\n const [, inlinePath] = inlineElementMatch\n\n if (Editor.isEnd(editor, at, inlinePath)) {\n const after = Editor.after(editor, inlinePath)!\n at = after\n } else if (Editor.isStart(editor, at, inlinePath)) {\n const before = Editor.before(editor, inlinePath)!\n at = before\n }\n }\n\n const blockMatch = Editor.above(editor, {\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n at,\n voids,\n })!\n const [, blockPath] = blockMatch\n const isBlockStart = Editor.isStart(editor, at, blockPath)\n const isBlockEnd = Editor.isEnd(editor, at, blockPath)\n const isBlockEmpty = isBlockStart && isBlockEnd\n const mergeStart = !isBlockStart || (isBlockStart && isBlockEnd)\n const mergeEnd = !isBlockEnd\n const [, firstPath] = Node.first({ children: fragment }, [])\n const [, lastPath] = Node.last({ children: fragment }, [])\n\n const matches: NodeEntry[] = []\n const matcher = ([n, p]: NodeEntry) => {\n const isRoot = p.length === 0\n if (isRoot) {\n return false\n }\n\n if (isBlockEmpty) {\n return true\n }\n\n if (\n mergeStart &&\n Path.isAncestor(p, firstPath) &&\n Element.isElement(n) &&\n !editor.isVoid(n) &&\n !editor.isInline(n)\n ) {\n return false\n }\n\n if (\n mergeEnd &&\n Path.isAncestor(p, lastPath) &&\n Element.isElement(n) &&\n !editor.isVoid(n) &&\n !editor.isInline(n)\n ) {\n return false\n }\n\n return true\n }\n\n for (const entry of Node.nodes({ children: fragment }, { pass: matcher })) {\n if (matcher(entry)) {\n matches.push(entry)\n }\n }\n\n const starts = []\n const middles = []\n const ends = []\n let starting = true\n let hasBlocks = false\n\n for (const [node] of matches) {\n if (Element.isElement(node) && !editor.isInline(node)) {\n starting = false\n hasBlocks = true\n middles.push(node)\n } else if (starting) {\n starts.push(node)\n } else {\n ends.push(node)\n }\n }\n\n const [inlineMatch] = Editor.nodes(editor, {\n at,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids,\n })!\n\n const [, inlinePath] = inlineMatch\n const isInlineStart = Editor.isStart(editor, at, inlinePath)\n const isInlineEnd = Editor.isEnd(editor, at, inlinePath)\n\n const middleRef = Editor.pathRef(\n editor,\n isBlockEnd && !ends.length ? Path.next(blockPath) : blockPath\n )\n\n const endRef = Editor.pathRef(\n editor,\n isInlineEnd ? Path.next(inlinePath) : inlinePath\n )\n\n Transforms.splitNodes(editor, {\n at,\n match: n =>\n hasBlocks\n ? Element.isElement(n) && Editor.isBlock(editor, n)\n : Text.isText(n) || Editor.isInline(editor, n),\n mode: hasBlocks ? 'lowest' : 'highest',\n always:\n hasBlocks &&\n (!isBlockStart || starts.length > 0) &&\n (!isBlockEnd || ends.length > 0),\n voids,\n })\n\n const startRef = Editor.pathRef(\n editor,\n !isInlineStart || (isInlineStart && isInlineEnd)\n ? Path.next(inlinePath)\n : inlinePath\n )\n\n Transforms.insertNodes(editor, starts, {\n at: startRef.current!,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids,\n batchDirty,\n })\n\n if (isBlockEmpty && !starts.length && middles.length && !ends.length) {\n Transforms.delete(editor, { at: blockPath, voids })\n }\n\n Transforms.insertNodes(editor, middles, {\n at: middleRef.current!,\n match: n => Element.isElement(n) && Editor.isBlock(editor, n),\n mode: 'lowest',\n voids,\n batchDirty,\n })\n\n Transforms.insertNodes(editor, ends, {\n at: endRef.current!,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids,\n batchDirty,\n })\n\n if (!options.at) {\n let path\n\n if (ends.length > 0 && endRef.current) {\n path = Path.previous(endRef.current)\n } else if (middles.length > 0 && middleRef.current) {\n path = Path.previous(middleRef.current)\n } else if (startRef.current) {\n path = Path.previous(startRef.current)\n }\n\n if (path) {\n const end = Editor.end(editor, path)\n Transforms.select(editor, end)\n }\n }\n\n startRef.unref()\n middleRef.unref()\n endRef.unref()\n })\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\nimport { Transforms } from '../interfaces/transforms'\nimport { Range } from '../interfaces/range'\n\nexport const collapse: SelectionTransforms['collapse'] = (\n editor,\n options = {}\n) => {\n const { edge = 'anchor' } = options\n const { selection } = editor\n\n if (!selection) {\n return\n } else if (edge === 'anchor') {\n Transforms.select(editor, selection.anchor)\n } else if (edge === 'focus') {\n Transforms.select(editor, selection.focus)\n } else if (edge === 'start') {\n const [start] = Range.edges(selection)\n Transforms.select(editor, start)\n } else if (edge === 'end') {\n const [, end] = Range.edges(selection)\n Transforms.select(editor, end)\n }\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\n\nexport const deselect: SelectionTransforms['deselect'] = editor => {\n const { selection } = editor\n\n if (selection) {\n editor.apply({\n type: 'set_selection',\n properties: selection,\n newProperties: null,\n })\n }\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\nimport { Range } from '../interfaces/range'\nimport { Editor } from '../interfaces/editor'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const move: SelectionTransforms['move'] = (editor, options = {}) => {\n const { selection } = editor\n const { distance = 1, unit = 'character', reverse = false } = options\n let { edge = null } = options\n\n if (!selection) {\n return\n }\n\n if (edge === 'start') {\n edge = Range.isBackward(selection) ? 'focus' : 'anchor'\n }\n\n if (edge === 'end') {\n edge = Range.isBackward(selection) ? 'anchor' : 'focus'\n }\n\n const { anchor, focus } = selection\n const opts = { distance, unit, ignoreNonSelectable: true }\n const props: Partial<Range> = {}\n\n if (edge == null || edge === 'anchor') {\n const point = reverse\n ? Editor.before(editor, anchor, opts)\n : Editor.after(editor, anchor, opts)\n\n if (point) {\n props.anchor = point\n }\n }\n\n if (edge == null || edge === 'focus') {\n const point = reverse\n ? Editor.before(editor, focus, opts)\n : Editor.after(editor, focus, opts)\n\n if (point) {\n props.focus = point\n }\n }\n\n Transforms.setSelection(editor, props)\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\nimport { Editor } from '../interfaces/editor'\nimport { Transforms } from '../interfaces/transforms'\nimport { Range } from '../interfaces/range'\nimport { Scrubber } from '../interfaces/scrubber'\n\nexport const select: SelectionTransforms['select'] = (editor, target) => {\n const { selection } = editor\n target = Editor.range(editor, target)\n\n if (selection) {\n Transforms.setSelection(editor, target)\n return\n }\n\n if (!Range.isRange(target)) {\n throw new Error(\n `When setting the selection and the current selection is \\`null\\` you must provide at least an \\`anchor\\` and \\`focus\\`, but you passed: ${Scrubber.stringify(\n target\n )}`\n )\n }\n\n editor.apply({\n type: 'set_selection',\n properties: selection,\n newProperties: target,\n })\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const setPoint: SelectionTransforms['setPoint'] = (\n editor,\n props,\n options = {}\n) => {\n const { selection } = editor\n let { edge = 'both' } = options\n\n if (!selection) {\n return\n }\n\n if (edge === 'start') {\n edge = Range.isBackward(selection) ? 'focus' : 'anchor'\n }\n\n if (edge === 'end') {\n edge = Range.isBackward(selection) ? 'anchor' : 'focus'\n }\n\n const { anchor, focus } = selection\n const point = edge === 'anchor' ? anchor : focus\n\n Transforms.setSelection(editor, {\n [edge === 'anchor' ? 'anchor' : 'focus']: { ...point, ...props },\n })\n}\n","import { SelectionTransforms } from '../interfaces/transforms/selection'\nimport { Range } from '../interfaces/range'\nimport { Point } from '../interfaces/point'\n\nexport const setSelection: SelectionTransforms['setSelection'] = (\n editor,\n props\n) => {\n const { selection } = editor\n const oldProps: Partial<Range> | null = {}\n const newProps: Partial<Range> = {}\n\n if (!selection) {\n return\n }\n\n for (const k in props) {\n if (\n (k === 'anchor' &&\n props.anchor != null &&\n !Point.equals(props.anchor, selection.anchor)) ||\n (k === 'focus' &&\n props.focus != null &&\n !Point.equals(props.focus, selection.focus)) ||\n (k !== 'anchor' &&\n k !== 'focus' &&\n props[<keyof Range>k] !== selection[<keyof Range>k])\n ) {\n oldProps[<keyof Range>k] = selection[<keyof Range>k]\n newProps[<keyof Range>k] = props[<keyof Range>k]\n }\n }\n\n if (Object.keys(oldProps).length > 0) {\n editor.apply({\n type: 'set_selection',\n properties: oldProps,\n newProperties: newProps,\n })\n }\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Node } from '../interfaces/node'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { Point } from '../interfaces/point'\nimport { Text } from '../interfaces/text'\nimport { Element } from '../interfaces/element'\nimport { Path } from '../interfaces/path'\nimport { getDefaultInsertLocation } from '../utils'\nimport { batchDirtyPaths } from '../core/batch-dirty-paths'\nimport { BaseInsertNodeOperation } from '../interfaces'\nimport { updateDirtyPaths } from '../core/update-dirty-paths'\n\nexport const insertNodes: NodeTransforms['insertNodes'] = (\n editor,\n nodes,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const {\n hanging = false,\n voids = false,\n mode = 'lowest',\n batchDirty = true,\n } = options\n let { at, match, select } = options\n\n if (Node.isNode(nodes)) {\n nodes = [nodes]\n }\n\n if (nodes.length === 0) {\n return\n }\n\n const [node] = nodes\n\n if (!at) {\n at = getDefaultInsertLocation(editor)\n if (select !== false) {\n select = true\n }\n }\n\n if (select == null) {\n select = false\n }\n\n if (Range.isRange(at)) {\n if (!hanging) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n\n if (Range.isCollapsed(at)) {\n at = at.anchor\n } else {\n const [, end] = Range.edges(at)\n const pointRef = Editor.pointRef(editor, end)\n Transforms.delete(editor, { at })\n at = pointRef.unref()!\n }\n }\n\n if (Point.isPoint(at)) {\n if (match == null) {\n if (Text.isText(node)) {\n match = n => Text.isText(n)\n } else if (editor.isInline(node)) {\n match = n => Text.isText(n) || Editor.isInline(editor, n)\n } else {\n match = n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n }\n\n const [entry] = Editor.nodes(editor, {\n at: at.path,\n match,\n mode,\n voids,\n })\n\n if (entry) {\n const [, matchPath] = entry\n const pathRef = Editor.pathRef(editor, matchPath)\n const isAtEnd = Editor.isEnd(editor, at, matchPath)\n Transforms.splitNodes(editor, { at, match, mode, voids })\n const path = pathRef.unref()!\n at = isAtEnd ? Path.next(path) : path\n } else {\n return\n }\n }\n\n const parentPath = Path.parent(at)\n let index = at[at.length - 1]\n\n if (!voids && Editor.void(editor, { at: parentPath })) {\n return\n }\n\n if (batchDirty) {\n // PERF: batch update dirty paths\n // batched ops used to transform existing dirty paths\n const batchedOps: BaseInsertNodeOperation[] = []\n const newDirtyPaths: Path[] = Path.levels(parentPath)\n batchDirtyPaths(\n editor,\n () => {\n for (const node of nodes as Node[]) {\n const path = parentPath.concat(index)\n index++\n\n const op: BaseInsertNodeOperation = {\n type: 'insert_node',\n path,\n node,\n }\n editor.apply(op)\n at = Path.next(at as Path)\n\n batchedOps.push(op)\n if (!Text.isText) {\n newDirtyPaths.push(path)\n } else {\n newDirtyPaths.push(\n ...Array.from(Node.nodes(node), ([, p]) => path.concat(p))\n )\n }\n }\n },\n () => {\n updateDirtyPaths(editor, newDirtyPaths, p => {\n let newPath: Path | null = p\n for (const op of batchedOps) {\n if (Path.operationCanTransformPath(op)) {\n newPath = Path.transform(newPath, op)\n if (!newPath) {\n return null\n }\n }\n }\n return newPath\n })\n }\n )\n } else {\n for (const node of nodes as Node[]) {\n const path = parentPath.concat(index)\n index++\n\n editor.apply({ type: 'insert_node', path, node })\n at = Path.next(at as Path)\n }\n }\n\n at = Path.previous(at)\n\n if (select) {\n const point = Editor.end(editor, at)\n\n if (point) {\n Transforms.select(editor, point)\n }\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\nimport { Ancestor, NodeEntry } from '../interfaces/node'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const liftNodes: NodeTransforms['liftNodes'] = (\n editor,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { at = editor.selection, mode = 'lowest', voids = false } = options\n let { match } = options\n\n if (match == null) {\n match = Path.isPath(at)\n ? matchPath(editor, at)\n : n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n if (!at) {\n return\n }\n\n const matches = Editor.nodes(editor, { at, match, mode, voids })\n const pathRefs = Array.from(matches, ([, p]) => Editor.pathRef(editor, p))\n\n for (const pathRef of pathRefs) {\n const path = pathRef.unref()!\n\n if (path.length < 2) {\n throw new Error(\n `Cannot lift node at a path [${path}] because it has a depth of less than \\`2\\`.`\n )\n }\n\n const parentNodeEntry = Editor.node(editor, Path.parent(path))\n const [parent, parentPath] = parentNodeEntry as NodeEntry<Ancestor>\n const index = path[path.length - 1]\n const { length } = parent.children\n\n if (length === 1) {\n const toPath = Path.next(parentPath)\n Transforms.moveNodes(editor, { at: path, to: toPath, voids })\n Transforms.removeNodes(editor, { at: parentPath, voids })\n } else if (index === 0) {\n Transforms.moveNodes(editor, { at: path, to: parentPath, voids })\n } else if (index === length - 1) {\n const toPath = Path.next(parentPath)\n Transforms.moveNodes(editor, { at: path, to: toPath, voids })\n } else {\n const splitPath = Path.next(path)\n const toPath = Path.next(parentPath)\n Transforms.splitNodes(editor, { at: splitPath, voids })\n Transforms.moveNodes(editor, { at: path, to: toPath, voids })\n }\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { Element } from '../interfaces/element'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { Text } from '../interfaces/text'\nimport { Scrubber } from '../interfaces/scrubber'\nimport { Node } from '../interfaces/node'\n\nconst hasSingleChildNest = (editor: Editor, node: Node): boolean => {\n if (Element.isElement(node)) {\n const element = node as Element\n if (Editor.isVoid(editor, node)) {\n return true\n } else if (element.children.length === 1) {\n return hasSingleChildNest(editor, element.children[0])\n } else {\n return false\n }\n } else if (Editor.isEditor(node)) {\n return false\n } else {\n return true\n }\n}\n\nexport const mergeNodes: NodeTransforms['mergeNodes'] = (\n editor,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n let { match, at = editor.selection } = options\n const { hanging = false, voids = false, mode = 'lowest' } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n const [parent] = Editor.parent(editor, at)\n match = n => parent.children.includes(n)\n } else {\n match = n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n\n if (Range.isRange(at)) {\n if (Range.isCollapsed(at)) {\n at = at.anchor\n } else {\n const [, end] = Range.edges(at)\n const pointRef = Editor.pointRef(editor, end)\n Transforms.delete(editor, { at })\n at = pointRef.unref()!\n\n if (options.at == null) {\n Transforms.select(editor, at)\n }\n }\n }\n\n const [current] = Editor.nodes(editor, { at, match, voids, mode })\n const prev = Editor.previous(editor, { at, match, voids, mode })\n\n if (!current || !prev) {\n return\n }\n\n const [node, path] = current\n const [prevNode, prevPath] = prev\n\n if (path.length === 0 || prevPath.length === 0) {\n return\n }\n\n const newPath = Path.next(prevPath)\n const commonPath = Path.common(path, prevPath)\n const isPreviousSibling = Path.isSibling(path, prevPath)\n const levels = Array.from(Editor.levels(editor, { at: path }), ([n]) => n)\n .slice(commonPath.length)\n .slice(0, -1)\n\n // Determine if the merge will leave an ancestor of the path empty as a\n // result, in which case we'll want to remove it after merging.\n const emptyAncestor = Editor.above(editor, {\n at: path,\n mode: 'highest',\n match: n => levels.includes(n) && hasSingleChildNest(editor, n),\n })\n\n const emptyRef = emptyAncestor && Editor.pathRef(editor, emptyAncestor[1])\n let properties\n let position\n\n // Ensure that the nodes are equivalent, and figure out what the position\n // and extra properties of the merge will be.\n if (Text.isText(node) && Text.isText(prevNode)) {\n const { text, ...rest } = node\n position = prevNode.text.length\n properties = rest as Partial<Text>\n } else if (Element.isElement(node) && Element.isElement(prevNode)) {\n const { children, ...rest } = node\n position = prevNode.children.length\n properties = rest as Partial<Element>\n } else {\n throw new Error(\n `Cannot merge the node at path [${path}] with the previous sibling because it is not the same kind: ${Scrubber.stringify(\n node\n )} ${Scrubber.stringify(prevNode)}`\n )\n }\n\n // If the node isn't already the next sibling of the previous node, move\n // it so that it is before merging.\n if (!isPreviousSibling) {\n Transforms.moveNodes(editor, { at: path, to: newPath, voids })\n }\n\n // If there was going to be an empty ancestor of the node that was merged,\n // we remove it from the tree.\n if (emptyRef) {\n Transforms.removeNodes(editor, { at: emptyRef.current!, voids })\n }\n\n if (Editor.shouldMergeNodesRemovePrevNode(editor, prev, current)) {\n Transforms.removeNodes(editor, { at: prevPath, voids })\n } else {\n editor.apply({\n type: 'merge_node',\n path: newPath,\n position,\n properties,\n })\n }\n\n if (emptyRef) {\n emptyRef.unref()\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\n\nexport const moveNodes: NodeTransforms['moveNodes'] = (editor, options) => {\n Editor.withoutNormalizing(editor, () => {\n const {\n to,\n at = editor.selection,\n mode = 'lowest',\n voids = false,\n } = options\n let { match } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n match = Path.isPath(at)\n ? matchPath(editor, at)\n : n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n const toRef = Editor.pathRef(editor, to)\n const targets = Editor.nodes(editor, { at, match, mode, voids })\n const pathRefs = Array.from(targets, ([, p]) => Editor.pathRef(editor, p))\n\n for (const pathRef of pathRefs) {\n const path = pathRef.unref()!\n const newPath = toRef.current!\n\n if (path.length !== 0) {\n editor.apply({ type: 'move_node', path, newPath })\n }\n\n if (\n toRef.current &&\n Path.isSibling(newPath, path) &&\n Path.isAfter(newPath, path)\n ) {\n // When performing a sibling move to a later index, the path at the destination is shifted\n // to before the insertion point instead of after. To ensure our group of nodes are inserted\n // in the correct order we increment toRef to account for that\n toRef.current = Path.next(toRef.current)\n }\n }\n\n toRef.unref()\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\nimport { Range } from '../interfaces/range'\n\nexport const removeNodes: NodeTransforms['removeNodes'] = (\n editor,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { hanging = false, voids = false, mode = 'lowest' } = options\n let { at = editor.selection, match } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n match = Path.isPath(at)\n ? matchPath(editor, at)\n : n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n\n const depths = Editor.nodes(editor, { at, match, mode, voids })\n const pathRefs = Array.from(depths, ([, p]) => Editor.pathRef(editor, p))\n\n for (const pathRef of pathRefs) {\n const path = pathRef.unref()!\n\n if (path) {\n const [node] = Editor.node(editor, path)\n editor.apply({ type: 'remove_node', path, node })\n }\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\nimport { Node } from '../interfaces/node'\n\nexport const setNodes: NodeTransforms['setNodes'] = (\n editor,\n props: Partial<Node>,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n let { match, at = editor.selection, compare, merge } = options\n const {\n hanging = false,\n mode = 'lowest',\n split = false,\n voids = false,\n } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n match = Path.isPath(at)\n ? matchPath(editor, at)\n : n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at, { voids })\n }\n\n if (split && Range.isRange(at)) {\n if (\n Range.isCollapsed(at) &&\n Editor.leaf(editor, at.anchor)[0].text.length > 0\n ) {\n // If the range is collapsed in a non-empty node and 'split' is true, there's nothing to\n // set that won't get normalized away\n return\n }\n const rangeRef = Editor.rangeRef(editor, at, { affinity: 'inward' })\n const [start, end] = Range.edges(at)\n const splitMode = mode === 'lowest' ? 'lowest' : 'highest'\n const endAtEndOfNode = Editor.isEnd(editor, end, end.path)\n Transforms.splitNodes(editor, {\n at: end,\n match,\n mode: splitMode,\n voids,\n always: !endAtEndOfNode,\n })\n const startAtStartOfNode = Editor.isStart(editor, start, start.path)\n Transforms.splitNodes(editor, {\n at: start,\n match,\n mode: splitMode,\n voids,\n always: !startAtStartOfNode,\n })\n at = rangeRef.unref()!\n\n if (options.at == null) {\n Transforms.select(editor, at)\n }\n }\n\n if (!compare) {\n compare = (prop, nodeProp) => prop !== nodeProp\n }\n\n for (const [node, path] of Editor.nodes(editor, {\n at,\n match,\n mode,\n voids,\n })) {\n const properties: Partial<Node> = {}\n // FIXME: is this correct?\n const newProperties: Partial<Node> & { [key: string]: unknown } = {}\n\n // You can't set properties on the editor node.\n if (path.length === 0) {\n continue\n }\n\n let hasChanges = false\n\n for (const k in props) {\n if (k === 'children' || k === 'text') {\n continue\n }\n\n if (compare(props[<keyof Node>k], node[<keyof Node>k])) {\n hasChanges = true\n // Omit new properties from the old properties list\n if (node.hasOwnProperty(k))\n properties[<keyof Node>k] = node[<keyof Node>k]\n // Omit properties that have been removed from the new properties list\n if (merge) {\n if (props[<keyof Node>k] != null)\n newProperties[<keyof Node>k] = merge(\n node[<keyof Node>k],\n props[<keyof Node>k]\n )\n } else {\n if (props[<keyof Node>k] != null)\n newProperties[<keyof Node>k] = props[<keyof Node>k]\n }\n }\n }\n\n if (hasChanges) {\n editor.apply({\n type: 'set_node',\n path,\n properties,\n newProperties,\n })\n }\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Element } from '../interfaces/element'\nimport { Range } from '../interfaces/range'\nimport { Path } from '../interfaces/path'\nimport { PointRef } from '../interfaces/point-ref'\nimport { Transforms } from '../interfaces/transforms'\nimport { Node } from '../interfaces/node'\nimport { Point } from '../interfaces/point'\n\n/**\n * Convert a range into a point by deleting it's content.\n */\nconst deleteRange = (editor: Editor, range: Range): Point | null => {\n if (Range.isCollapsed(range)) {\n return range.anchor\n } else {\n const [, end] = Range.edges(range)\n const pointRef = Editor.pointRef(editor, end)\n Transforms.delete(editor, { at: range })\n return pointRef.unref()\n }\n}\n\nexport const splitNodes: NodeTransforms['splitNodes'] = (\n editor,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { mode = 'lowest', voids = false } = options\n let { match, at = editor.selection, height = 0, always = false } = options\n\n if (match == null) {\n match = n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n if (Range.isRange(at)) {\n at = deleteRange(editor, at)\n }\n\n // If the target is a path, the default height-skipping and position\n // counters need to account for us potentially splitting at a non-leaf.\n if (Path.isPath(at)) {\n const path = at\n const point = Editor.point(editor, path)\n const [parent] = Editor.parent(editor, path)\n match = n => n === parent\n height = point.path.length - path.length + 1\n at = point\n always = true\n }\n\n if (!at) {\n return\n }\n\n const beforeRef = Editor.pointRef(editor, at, {\n affinity: 'backward',\n })\n let afterRef: PointRef | undefined\n try {\n const [highest] = Editor.nodes(editor, { at, match, mode, voids })\n\n if (!highest) {\n return\n }\n\n const voidMatch = Editor.void(editor, { at, mode: 'highest' })\n const nudge = 0\n\n if (!voids && voidMatch) {\n const [voidNode, voidPath] = voidMatch\n\n if (Element.isElement(voidNode) && editor.isInline(voidNode)) {\n let after = Editor.after(editor, voidPath)\n\n if (!after) {\n const text = { text: '' }\n const afterPath = Path.next(voidPath)\n Transforms.insertNodes(editor, text, { at: afterPath, voids })\n after = Editor.point(editor, afterPath)!\n }\n\n at = after\n always = true\n }\n\n const siblingHeight = at.path.length - voidPath.length\n height = siblingHeight + 1\n always = true\n }\n\n afterRef = Editor.pointRef(editor, at)\n const depth = at.path.length - height\n const [, highestPath] = highest\n const lowestPath = at.path.slice(0, depth)\n let position = height === 0 ? at.offset : at.path[depth] + nudge\n\n for (const [node, path] of Editor.levels(editor, {\n at: lowestPath,\n reverse: true,\n voids,\n })) {\n let split = false\n\n if (\n path.length < highestPath.length ||\n path.length === 0 ||\n (!voids && Element.isElement(node) && Editor.isVoid(editor, node))\n ) {\n break\n }\n\n const point = beforeRef.current!\n const isEnd = Editor.isEnd(editor, point, path)\n\n if (always || !beforeRef || !Editor.isEdge(editor, point, path)) {\n split = true\n const properties = Node.extractProps(node)\n editor.apply({\n type: 'split_node',\n path,\n position,\n properties,\n })\n }\n\n position = path[path.length - 1] + (split || isEnd ? 1 : 0)\n }\n\n if (options.at == null) {\n const point = afterRef.current || Editor.end(editor, [])\n Transforms.select(editor, point)\n }\n } finally {\n beforeRef.unref()\n afterRef?.unref()\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const unsetNodes: NodeTransforms['unsetNodes'] = (\n editor,\n props,\n options = {}\n) => {\n if (!Array.isArray(props)) {\n props = [props]\n }\n\n const obj: any = {}\n\n for (const key of props) {\n obj[key] = null\n }\n\n Transforms.setNodes(editor, obj, options)\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const unwrapNodes: NodeTransforms['unwrapNodes'] = (\n editor,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { mode = 'lowest', split = false, voids = false } = options\n let { at = editor.selection, match } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n match = Path.isPath(at)\n ? matchPath(editor, at)\n : n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n\n if (Path.isPath(at)) {\n at = Editor.range(editor, at)\n }\n\n const rangeRef = Range.isRange(at) ? Editor.rangeRef(editor, at) : null\n const matches = Editor.nodes(editor, { at, match, mode, voids })\n const pathRefs = Array.from(\n matches,\n ([, p]) => Editor.pathRef(editor, p)\n // unwrapNode will call liftNode which does not support splitting the node when nested.\n // If we do not reverse the order and call it from top to the bottom, it will remove all blocks\n // that wrap target node. So we reverse the order.\n ).reverse()\n\n for (const pathRef of pathRefs) {\n const path = pathRef.unref()!\n const [node] = Editor.node(editor, path)\n let range = Editor.range(editor, path)\n\n if (split && rangeRef) {\n range = Range.intersection(rangeRef.current!, range)!\n }\n\n Transforms.liftNodes(editor, {\n at: range,\n match: n => Element.isAncestor(node) && node.children.includes(n),\n voids,\n })\n }\n\n if (rangeRef) {\n rangeRef.unref()\n }\n })\n}\n","import { NodeTransforms } from '../interfaces/transforms/node'\nimport { Editor } from '../interfaces/editor'\nimport { Path } from '../interfaces/path'\nimport { matchPath } from '../utils/match-path'\nimport { Element } from '../interfaces/element'\nimport { Text } from '../interfaces/text'\nimport { Range } from '../interfaces/range'\nimport { Transforms } from '../interfaces/transforms'\n\nexport const wrapNodes: NodeTransforms['wrapNodes'] = (\n editor,\n element,\n options = {}\n) => {\n Editor.withoutNormalizing(editor, () => {\n const { mode = 'lowest', split = false, voids = false } = options\n let { match, at = editor.selection } = options\n\n if (!at) {\n return\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n match = matchPath(editor, at)\n } else if (editor.isInline(element)) {\n match = n =>\n (Element.isElement(n) && Editor.isInline(editor, n)) || Text.isText(n)\n } else {\n match = n => Element.isElement(n) && Editor.isBlock(editor, n)\n }\n }\n\n if (split && Range.isRange(at)) {\n const [start, end] = Range.edges(at)\n const rangeRef = Editor.rangeRef(editor, at, {\n affinity: 'inward',\n })\n Transforms.splitNodes(editor, { at: end, match, voids })\n Transforms.splitNodes(editor, { at: start, match, voids })\n at = rangeRef.unref()!\n\n if (options.at == null) {\n Transforms.select(editor, at)\n }\n }\n\n const roots = Array.from(\n Editor.nodes(editor, {\n at,\n match: editor.isInline(element)\n ? n => Element.isElement(n) && Editor.isBlock(editor, n)\n : n => Editor.isEditor(n),\n mode: 'lowest',\n voids,\n })\n )\n\n for (const [, rootPath] of roots) {\n const a = Range.isRange(at)\n ? Range.intersection(at, Editor.range(editor, rootPath))\n : at\n\n if (!a) {\n continue\n }\n\n const matches = Array.from(\n Editor.nodes(editor, { at: a, match, mode, voids })\n )\n\n if (matches.length > 0) {\n const [first] = matches\n const last = matches[matches.length - 1]\n const [, firstPath] = first\n const [, lastPath] = last\n\n if (firstPath.length === 0 && lastPath.length === 0) {\n // if there's no matching parent - usually means the node is an editor - don't do anything\n continue\n }\n\n const commonPath = Path.equals(firstPath, lastPath)\n ? Path.parent(firstPath)\n : Path.common(firstPath, lastPath)\n\n const range = Editor.range(editor, firstPath, lastPath)\n const commonNodeEntry = Editor.node(editor, commonPath)\n const [commonNode] = commonNodeEntry\n const depth = commonPath.length + 1\n const wrapperPath = Path.next(lastPath.slice(0, depth))\n const wrapper = { ...element, children: [] }\n Transforms.insertNodes(editor, wrapper, { at: wrapperPath, voids })\n\n Transforms.moveNodes(editor, {\n at: range,\n match: n =>\n Element.isAncestor(commonNode) && commonNode.children.includes(n),\n to: wrapperPath.concat(0),\n voids,\n })\n }\n }\n })\n}\n","import {\n addMark,\n deleteFragment,\n Editor,\n getDirtyPaths,\n getFragment,\n insertBreak,\n insertFragment,\n insertNode,\n insertSoftBreak,\n insertText,\n normalizeNode,\n removeMark,\n shouldNormalize,\n} from './'\nimport { apply } from './core'\nimport {\n above,\n after,\n before,\n deleteBackward,\n deleteForward,\n edges,\n elementReadOnly,\n end,\n first,\n fragment,\n getVoid,\n hasBlocks,\n hasInlines,\n hasPath,\n hasTexts,\n isBlock,\n isEdge,\n isEmpty,\n isEnd,\n isNormalizing,\n isStart,\n last,\n leaf,\n levels,\n marks,\n next,\n node,\n nodes,\n normalize,\n parent,\n path,\n pathRef,\n pathRefs,\n point,\n pointRef,\n pointRefs,\n positions,\n previous,\n range,\n rangeRef,\n rangeRefs,\n setNormalizing,\n shouldMergeNodesRemovePrevNode,\n start,\n string,\n unhangRange,\n withoutNormalizing,\n} from './editor'\nimport { deleteText } from './transforms-text'\nimport {\n collapse,\n deselect,\n move,\n select,\n setPoint,\n setSelection,\n} from './transforms-selection'\nimport {\n insertNodes,\n liftNodes,\n mergeNodes,\n moveNodes,\n removeNodes,\n setNodes,\n splitNodes,\n unsetNodes,\n unwrapNodes,\n wrapNodes,\n} from './transforms-node'\n\n/**\n * Create a new Slate `Editor` object.\n */\nexport const createEditor = (): Editor => {\n const editor: Editor = {\n children: [],\n operations: [],\n selection: null,\n marks: null,\n isElementReadOnly: () => false,\n isInline: () => false,\n isSelectable: () => true,\n isVoid: () => false,\n markableVoid: () => false,\n onChange: () => {},\n\n // Core\n apply: (...args) => apply(editor, ...args),\n\n // Editor\n addMark: (...args) => addMark(editor, ...args),\n deleteBackward: (...args) => deleteBackward(editor, ...args),\n deleteForward: (...args) => deleteForward(editor, ...args),\n deleteFragment: (...args) => deleteFragment(editor, ...args),\n getFragment: (...args) => getFragment(editor, ...args),\n insertBreak: (...args) => insertBreak(editor, ...args),\n insertSoftBreak: (...args) => insertSoftBreak(editor, ...args),\n insertFragment: (...args) => insertFragment(editor, ...args),\n insertNode: (...args) => insertNode(editor, ...args),\n insertText: (...args) => insertText(editor, ...args),\n normalizeNode: (...args) => normalizeNode(editor, ...args),\n removeMark: (...args) => removeMark(editor, ...args),\n getDirtyPaths: (...args) => getDirtyPaths(editor, ...args),\n shouldNormalize: (...args) => shouldNormalize(editor, ...args),\n\n // Editor interface\n above: (...args) => above(editor, ...args),\n after: (...args) => after(editor, ...args),\n before: (...args) => before(editor, ...args),\n collapse: (...args) => collapse(editor, ...args),\n delete: (...args) => deleteText(editor, ...args),\n deselect: (...args) => deselect(editor, ...args),\n edges: (...args) => edges(editor, ...args),\n elementReadOnly: (...args) => elementReadOnly(editor, ...args),\n end: (...args) => end(editor, ...args),\n first: (...args) => first(editor, ...args),\n fragment: (...args) => fragment(editor, ...args),\n getMarks: (...args) => marks(editor, ...args),\n hasBlocks: (...args) => hasBlocks(editor, ...args),\n hasInlines: (...args) => hasInlines(editor, ...args),\n hasPath: (...args) => hasPath(editor, ...args),\n hasTexts: (...args) => hasTexts(editor, ...args),\n insertNodes: (...args) => insertNodes(editor, ...args),\n isBlock: (...args) => isBlock(editor, ...args),\n isEdge: (...args) => isEdge(editor, ...args),\n isEmpty: (...args) => isEmpty(editor, ...args),\n isEnd: (...args) => isEnd(editor, ...args),\n isNormalizing: (...args) => isNormalizing(editor, ...args),\n isStart: (...args) => isStart(editor, ...args),\n last: (...args) => last(editor, ...args),\n leaf: (...args) => leaf(editor, ...args),\n levels: (...args) => levels(editor, ...args),\n liftNodes: (...args) => liftNodes(editor, ...args),\n mergeNodes: (...args) => mergeNodes(editor, ...args),\n move: (...args) => move(editor, ...args),\n moveNodes: (...args) => moveNodes(editor, ...args),\n next: (...args) => next(editor, ...args),\n node: (...args) => node(editor, ...args),\n nodes: (...args) => nodes(editor, ...args),\n normalize: (...args) => normalize(editor, ...args),\n parent: (...args) => parent(editor, ...args),\n path: (...args) => path(editor, ...args),\n pathRef: (...args) => pathRef(editor, ...args),\n pathRefs: (...args) => pathRefs(editor, ...args),\n point: (...args) => point(editor, ...args),\n pointRef: (...args) => pointRef(editor, ...args),\n pointRefs: (...args) => pointRefs(editor, ...args),\n positions: (...args) => positions(editor, ...args),\n previous: (...args) => previous(editor, ...args),\n range: (...args) => range(editor, ...args),\n rangeRef: (...args) => rangeRef(editor, ...args),\n rangeRefs: (...args) => rangeRefs(editor, ...args),\n removeNodes: (...args) => removeNodes(editor, ...args),\n select: (...args) => select(editor, ...args),\n setNodes: (...args) => setNodes(editor, ...args),\n setNormalizing: (...args) => setNormalizing(editor, ...args),\n setPoint: (...args) => setPoint(editor, ...args),\n setSelection: (...args) => setSelection(editor, ...args),\n splitNodes: (...args) => splitNodes(editor, ...args),\n start: (...args) => start(editor, ...args),\n string: (...args) => string(editor, ...args),\n unhangRange: (...args) => unhangRange(editor, ...args),\n unsetNodes: (...args) => unsetNodes(editor, ...args),\n unwrapNodes: (...args) => unwrapNodes(editor, ...args),\n void: (...args) => getVoid(editor, ...args),\n withoutNormalizing: (...args) => withoutNormalizing(editor, ...args),\n wrapNodes: (...args) => wrapNodes(editor, ...args),\n shouldMergeNodesRemovePrevNode: (...args) =>\n shouldMergeNodesRemovePrevNode(editor, ...args),\n }\n\n return editor\n}\n"],"names":["PathRef","transform","ref","op","current","affinity","path","Path","unref","PointRef","point","Point","RangeRef","Range","DIRTY_PATHS","WeakMap","DIRTY_PATH_KEYS","FLUSHING","NORMALIZING","PATH_REFS","POINT_REFS","RANGE_REFS","ancestors","options","arguments","length","undefined","_options$reverse","reverse","paths","levels","slice","common","another","i","av","bv","push","compare","min","Math","endsAfter","as","bs","equals","endsAt","endsBefore","every","n","hasPrevious","isAfter","isAncestor","isBefore","isChild","isCommon","isDescendant","isParent","isPath","value","Array","isArray","isSibling","al","bl","_options$reverse2","list","next","Error","concat","last","operationCanTransformPath","operation","type","parent","previous","relative","ancestor","p","_toConsumableArray","_options$affinity","position","onp","newPath","copy","require$$0","applyToDraft","editor","selection","node","Node","index","children","splice","_iterator","_createForOfIteratorHelper","points","_step","s","done","_step$value","_slicedToArray","key","err","e","f","offset","text","leaf","before","after","_iterator2","_step2","_step2$value","get","prevPath","prev","Text","isText","_prev$children","apply","Scrubber","stringify","_iterator3","_step3","_step3$value","truePath","newParent","newIndex","_iterator4","_step4","_step4$value","_iterator5","_step5","_step5$value","result","_iterator6","texts","_step6","_step6$value","preferNext","_iterator7","_step7","_step7$value","properties","newProperties","hasOwnProperty","isRange","_objectSpread","newNode","_iterator8","_step8","_step8$value","GeneralTransforms","createDraft","finishDraft","isDraft","NodeTransforms","insertNodes","nodes","liftNodes","mergeNodes","moveNodes","removeNodes","setNodes","props","splitNodes","unsetNodes","unwrapNodes","wrapNodes","element","SelectionTransforms","collapse","deselect","move","select","target","setPoint","setSelection","isDeepEqual","a","b","isPlainObject","edges","range","anchor","focus","isBackward","end","_Range$edges","_Range$edges2","includes","_Range$edges3","_Range$edges4","rs","re","_Range$edges5","_Range$edges6","ts","te","_Range$edges7","_Range$edges8","start","isAfterStart","isBeforeEnd","isPoint","intersection","rest","_objectWithoutProperties","_excluded","_Range$edges9","_Range$edges10","s1","e1","_Range$edges11","_Range$edges12","s2","e2","isCollapsed","isExpanded","isForward","_Range$edges13","_Range$edges14","produce","r","affinityAnchor","affinityFocus","isElement","isNodeList","Editor","isEditor","Element","isElementList","val","isElementProps","isElementType","elementVal","elementKey","matches","IS_NODE_LIST_CACHE","root","entry","child","c","childPath","descendant","descendants","elements","extractProps","_excluded2","first","fragment","newRoot","nodeEntries","pass","_ref","_ref2","has","isNode","cachedResult","set","isTextProps","_options$from","from","to","visited","Set","add","nextIndex","parentPath","string","map","join","Operation","isNodeOperation","isOperation","endsWith","isOperationList","isSelectionOperation","isTextOperation","inverse","inversePath","inverseNewPath","IS_EDITOR_CACHE","cachedIsEditor","addMark","deleteFragment","insertBreak","insertSoftBreak","insertFragment","insertNode","insertText","isElementReadOnly","isInline","isSelectable","isVoid","normalizeNode","onChange","removeMark","getDirtyPaths","marks","operations","above","at","deleteBackward","_options$unit","unit","deleteForward","_options$unit2","elementReadOnly","hasBlocks","hasInlines","hasPath","hasTexts","isBlock","isEdge","isEmpty","isEnd","isNormalizing","isStart","getMarks","normalize","pathRef","pathRefs","pointRef","pointRefs","positions","rangeRef","rangeRefs","setNormalizing","unhangRange","_void","withoutNormalizing","fn","shouldMergeNodesRemovePrevNode","prevNode","curNode","Location","isLocation","Span","isSpan","_scrubber","setScrubber","scrubber","JSON","_options$loose","loose","omitText","obj","isTextList","decorations","leaves","dec","leafEnd","decorationStart","decorationEnd","leafStart","Object","assign","middle","off","getDefaultInsertLocation","matchPath","_Editor$node","_Editor$node2","getCharacterDistance","str","isRTL","isLTR","codepoints","codepointsIteratorRTL","left","CodepointType","None","right","distance","gb11","gb12Or13","char","code","codePointAt","getCodepointType","intersects","ZWJ","ExtPict","endsWithEmojiZWJ","substring","RI","endsWithOddNumberOfRIs","isBoundaryPair","SPACE","PUNCTUATION","CHAMELEON","getWordDistance","dist","started","charDist","_splitByCharacterDist","splitByCharacterDistance","_splitByCharacterDist2","remaining","isWordCharacter","test","_splitByCharacterDist3","_splitByCharacterDist4","nextChar","nextRemaining","char1","charAt","isLowSurrogate","charCodeAt","char2","isHighSurrogate","charCode","reExtend","rePrepend","reSpacingMark","reL","reV","reT","reLV","reLVT","reExtPict","Any","search","Extend","Prepend","SpacingMark","L","V","T","LV","LVT","x","y","NonBoundaryPairs","findIndex","endingEmojiZWJ","endingRIs","match","numRIs","TextTransforms","_delete","_options$voids","voids","_options$at","startRef","endRef","Transforms","startPoint","endPoint","_at","BATCHING_DIRTY_PATHS","isBatchingDirtyPaths","batchDirtyPaths","update","updateDirtyPaths","newDirtyPaths","oldDirtyPaths","oldDirtyPathKeys","dirtyPaths","dirtyPathKeys","Promise","resolve","then","previousPath","oldAncestors","newAncestors","resultPath","nextPath","getFragment","_entry","shouldHaveInlines","currentNode","isLast","isInlineOrText","newChild","elementChild","shouldNormalize","iteration","initialDirtyPathsLength","maxIterations","_options$mode","mode","_Editor$parent","_Editor$parent2","parentNode","markableVoid","expandedSelection","markAcceptingVoidSelected","selectedNode","selectedPath","_Editor$parent3","_Editor$parent4","_defineProperty","split","edge","_options$distance","d","_ref$direction","direction","getVoid","some","always","_children","_Editor$nodes","_Editor$nodes2","_match","_anchor","_Editor$leaf","_Editor$leaf2","markedVoid","block","_prev","_block","blockPath","_node2","pointAfterLocation","_Editor$last","_Editor$last2","span","_options$universal","universal","_options$ignoreNonSel","ignoreNonSelectable","hit","isLower","emit","_options$force","force","getDirtyPathKeys","popDirtyPath","pop","allPaths","allPathKeys","dirtyPath","_entry2","_","refs","depth","_Node$first","_Node$first2","firstPath","_Node$last","_Node$last2","lastPath","_options$edge","isNewBlock","blockText","leafTextRemaining","leafTextOffset","isFirst","calcDistance","pointBeforeLocation","_Editor$first","_Editor$first2","t","endBlock","skip","_ref3","_ref4","curNodePath","deleteText","_Editor$void","_Editor$void2","_options$hanging","hanging","furthestVoid","_furthestVoid","voidPath","opts","endOfDoc","startBlock","isAcrossBlocks","isSingleText","startNonEditable","endNonEditable","removedText","_start","filter","forEach","_Editor$leaf3","_Editor$leaf4","startUnref","endUnref","_options$batchDirty","batchDirty","inlineElementMatch","_inlineElementMatch","inlinePath","blockMatch","_blockMatch","isBlockStart","isBlockEnd","isBlockEmpty","mergeStart","mergeEnd","matcher","isRoot","starts","middles","ends","starting","_i","_matches","_matches$_i","inlineMatch","_inlineMatch","isInlineStart","isInlineEnd","middleRef","oldProps","newProps","k","keys","_nodes","_nodes2","isAtEnd","batchedOps","_loop","_batchedOps","_pathRefs","parentNodeEntry","_parentNodeEntry","toPath","splitPath","hasSingleChildNest","_current","commonPath","isPreviousSibling","emptyAncestor","emptyRef","toRef","targets","depths","merge","_options$split","splitMode","endAtEndOfNode","startAtStartOfNode","prop","nodeProp","hasChanges","deleteRange","_options$height","height","_options$always","beforeRef","afterRef","highest","voidMatch","nudge","_voidMatch","voidNode","afterPath","siblingHeight","_highest","highestPath","lowestPath","_afterRef","roots","_roots$_i","_roots","rootPath","_first","_last","commonNodeEntry","_commonNodeEntry","commonNode","wrapperPath","wrapper","_ret","createEditor","_len","args","_key","_len2","_key2","_len3","_key3","_len4","_key4","_len5","_key5","_len6","_key6","_len7","_key7","_len8","_key8","_len9","_key9","_len10","_key10","_len11","_key11","_len12","_key12","_len13","_key13","_len14","_key14","_len15","_key15","_len16","_key16","_len17","_key17","_len18","_key18","_len19","_key19","_len20","_key20","_len21","_key21","_len22","_key22","_len23","_key23","_len24","_key24","_len25","_key25","_len26","_key26","_len27","_key27","_len28","_key28","_len29","_key29","_len30","_key30","_len31","_key31","_len32","_key32","_len33","_key33","_len34","_key34","_len35","_key35","_len36","_key36","_len37","_key37","_len38","_key38","_len39","_key39","_len40","_key40","_len41","_key41","_len42","_key42","_len43","_key43","_len44","_key44","_len45","_key45","_len46","_key46","_len47","_key47","_len48","_key48","_len49","_key49","_len50","_key50","_len51","_key51","_len52","_key52","_len53","_key53","_len54","_key54","_len55","_key55","_len56","_key56","_len57","_key57","_len58","_key58","_len59","_key59","_len60","_key60","_len61","_key61","_len62","_key62","_len63","_key63","_len64","_key64","_len65","_key65","_len66","_key66","_len67","_key67","_len68","_key68","_len69","_key69","_len70","_key70","_len71","_key71","_len72","_key72","_len73","_key73","_len74","_key74","_len75","_key75","_len76","_key76","_len77","_key77"],"mappings":";;;;;AAqBA;AACO,IAAMA,OAAO,GAAqB;AACvCC,EAAAA,SAAS,EAAAA,SAAAA,SAAAA,CAACC,GAAY,EAAEC,EAAa,EAAA;AACnC,IAAA,IAAQC,OAAO,GAAeF,GAAG,CAAzBE,OAAO;MAAEC,QAAQ,GAAKH,GAAG,CAAhBG,QAAQ,CAAA;IAEzB,IAAID,OAAO,IAAI,IAAI,EAAE;AACnB,MAAA,OAAA;AACD,KAAA;IAED,IAAME,IAAI,GAAGC,IAAI,CAACN,SAAS,CAACG,OAAO,EAAED,EAAE,EAAE;AAAEE,MAAAA,QAAQ,EAARA,QAAAA;AAAQ,KAAE,CAAC,CAAA;IACtDH,GAAG,CAACE,OAAO,GAAGE,IAAI,CAAA;IAElB,IAAIA,IAAI,IAAI,IAAI,EAAE;MAChBJ,GAAG,CAACM,KAAK,EAAE,CAAA;AACZ,KAAA;AACH,GAAA;;;ACdF;AACO,IAAMC,QAAQ,GAAsB;AACzCR,EAAAA,SAAS,EAAAA,SAAAA,SAAAA,CAACC,GAAa,EAAEC,EAAa,EAAA;AACpC,IAAA,IAAQC,OAAO,GAAeF,GAAG,CAAzBE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