UNPKG

@atlaskit/editor-plugin-list

Version:

List plugin for @atlaskit/editor-core

11 lines (10 loc) 476 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isFirstChildOfParent = void 0; var _selection = require("@atlaskit/editor-common/selection"); var isFirstChildOfParent = exports.isFirstChildOfParent = function isFirstChildOfParent(state) { var $from = state.selection.$from; return $from.depth > 1 ? state.selection instanceof _selection.GapCursorSelection && $from.parentOffset === 0 || $from.index($from.depth - 1) === 0 : true; };