slate-angular 19.1.1 → 19.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"slate-angular.mjs","sources":["../../packages/src/utils/block-card.ts","../../packages/src/plugins/with-dom.ts","../../packages/src/plugins/angular-editor.ts","../../packages/src/utils/weak-maps.ts","../../packages/src/utils/environment.ts","../../packages/src/utils/hotkeys.ts","../../packages/src/utils/view.ts","../../packages/src/utils/range-list.ts","../../packages/src/utils/global-normalize.ts","../../packages/src/utils/throttle.ts","../../packages/src/utils/clipboard/common.ts","../../packages/src/utils/clipboard/data-transfer.ts","../../packages/src/utils/clipboard/navigator-clipboard.ts","../../packages/src/utils/dom.ts","../../packages/src/utils/clipboard/clipboard.ts","../../packages/src/plugins/with-angular.ts","../../packages/src/custom-event/DOMTopLevelEventTypes.ts","../../packages/src/custom-event/FallbackCompositionState.ts","../../packages/src/custom-event/BeforeInputEventPlugin.ts","../../packages/src/custom-event/before-input-polyfill.ts","../../packages/src/types/error.ts","../../packages/src/components/string/template.component.ts","../../packages/src/components/string/template.component.html","../../packages/src/utils/restore-dom.ts","../../packages/src/components/element/default-element.component.token.ts","../../packages/src/components/text/token.ts","../../packages/src/components/children/children-outlet.component.ts","../../packages/src/view/context-change.ts","../../packages/src/view/render/utils.ts","../../packages/src/view/render/leaves-render.ts","../../packages/src/components/block-card/block-card.component.ts","../../packages/src/components/block-card/block-card.component.html","../../packages/src/view/render/list-render.ts","../../packages/src/view/base.ts","../../packages/src/components/text/void-text.component.ts","../../packages/src/components/text/default-text.component.ts","../../packages/src/components/element/default-element.component.ts","../../packages/src/view/container-item.ts","../../packages/src/components/string/default-string.component.ts","../../packages/src/components/string/string.component.ts","../../packages/src/components/leaf/default-leaf.component.ts","../../packages/src/components/leaf/token.ts","../../packages/src/components/editable/editable.component.ts","../../packages/src/components/editable/editable.component.html","../../packages/src/components/element/element.component.ts","../../packages/src/view/container.ts","../../packages/src/components/children/children.component.ts","../../packages/src/components/leaves/leaves.component.ts","../../packages/src/module.ts","../../packages/src/public-api.ts","../../packages/src/slate-angular.ts"],"sourcesContent":["import { DOMNode, DOMSelection } from \"slate-dom\";\n\nexport const FAKE_LEFT_BLOCK_CARD_OFFSET = -1;\n\nexport const FAKE_RIGHT_BLOCK_CARD_OFFSET = -2;\n\nexport function hasBlockCardWithNode(node: DOMNode) {\n return node && (node.parentElement.hasAttribute('card-target') || (node instanceof HTMLElement && node.hasAttribute('card-target')));\n}\n\nexport function hasBlockCard(selection: DOMSelection) {\n return hasBlockCardWithNode(selection?.anchorNode) || hasBlockCardWithNode(selection?.focusNode);\n}\n\nexport function getCardTargetAttribute(node: DOMNode) {\n return node.parentElement.attributes['card-target'] || (node instanceof HTMLElement && node.attributes['card-target']);\n}\n\nexport function isCardLeft(node: DOMNode) {\n const cardTarget = getCardTargetAttribute(node);\n return cardTarget && cardTarget.nodeValue === 'card-left';\n}\n\nexport function isCardLeftByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-left';\n}\n\nexport function isCardRightByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-right';\n}\n\nexport function isCardCenterByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-center';\n}\n","import {\n FAKE_LEFT_BLOCK_CARD_OFFSET,\n FAKE_RIGHT_BLOCK_CARD_OFFSET,\n getCardTargetAttribute,\n isCardLeftByTargetAttr\n} from '../utils/block-card';\nimport { BasePoint, BaseRange, Editor, Node, Point, Range, Element, NodeEntry, point } from 'slate';\nimport {\n DOMEditor,\n DOMElement,\n DOMNode,\n DOMRange,\n DOMPoint,\n DOMSelection,\n DOMStaticRange,\n EDITOR_TO_ELEMENT,\n hasShadowRoot,\n IS_CHROME,\n isDOMElement,\n isDOMSelection,\n NODE_TO_ELEMENT,\n NODE_TO_INDEX,\n NODE_TO_PARENT,\n normalizeDOMPoint\n} from 'slate-dom';\nimport { AngularEditor } from './angular-editor';\n\nexport interface CustomDOMEditor extends DOMEditor {\n hasEditableTarget: (editor: CustomDOMEditor, target: EventTarget | null) => target is DOMNode;\n hasRange: (editor: CustomDOMEditor, range: Range) => boolean;\n hasSelectableTarget: (editor: CustomDOMEditor, target: EventTarget | null) => boolean;\n hasTarget: (editor: CustomDOMEditor, target: EventTarget | null) => target is DOMNode;\n insertData: (data: DataTransfer) => void;\n insertFragmentData: (data: DataTransfer) => boolean;\n insertTextData: (data: DataTransfer) => boolean;\n isTargetInsideNonReadonlyVoid: (editor: CustomDOMEditor, target: EventTarget | null) => boolean;\n setFragmentData: (data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;\n}\n\nconst customToDOMNode = (editor: Editor, node: Node): HTMLElement => {\n const domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : NODE_TO_ELEMENT.get(node);\n\n if (!domNode) {\n throw new Error(`Cannot resolve a DOM node from Slate node: ${JSON.stringify(node)}`);\n }\n\n return domNode;\n};\nDOMEditor.toDOMNode = customToDOMNode as unknown as (editor: DOMEditor, node: Node) => HTMLElement;\n\nconst toDOMPointForBlockCard = (editor: AngularEditor, point: Point): DOMPoint | undefined => {\n const [node] = Editor.node(editor, point.path);\n const [parentNode] = Editor.parent(editor, point.path);\n if (editor.isBlockCard(parentNode) || editor.isBlockCard(node)) {\n if (point.offset < 0) {\n if (point.offset === FAKE_LEFT_BLOCK_CARD_OFFSET) {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, node, { direction: 'left' });\n return [cursorNode, 1];\n } else {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, node, { direction: 'right' });\n return [cursorNode, 1];\n }\n }\n if (editor.selection && Range.isExpanded(editor.selection)) {\n const [start, end] = Range.edges(editor.selection);\n if (start === point) {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, parentNode, { direction: 'left' });\n return [cursorNode, 1];\n } else {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, parentNode, { direction: 'right' });\n return [cursorNode, 1];\n }\n }\n }\n};\n\nconst customToDOMPoint = (editor: AngularEditor, point: Point): DOMPoint => {\n const [node] = Editor.node(editor, point.path);\n const el = customToDOMNode(editor, node);\n let domPoint: DOMPoint | undefined;\n\n const domPointForBlackCard = toDOMPointForBlockCard(editor, point);\n if (domPointForBlackCard) {\n return domPointForBlackCard;\n }\n\n // If we're inside a void node, force the offset to 0, otherwise the zero\n // width spacing character will result in an incorrect offset of 1\n if (Editor.void(editor, { at: point })) {\n point = { path: point.path, offset: 0 };\n }\n\n // For each leaf, we need to isolate its content, which means filtering\n // to its direct text and zero-width spans. (We have to filter out any\n // other siblings that may have been rendered alongside them.)\n const selector = `[data-slate-string], [data-slate-zero-width]`;\n const texts = Array.from(el.querySelectorAll(selector));\n let start = 0;\n\n for (const text of texts) {\n const domNode = text.childNodes[0] as HTMLElement;\n\n if (domNode == null || domNode.textContent == null) {\n continue;\n }\n\n const { length } = domNode.textContent;\n const attr = text.getAttribute('data-slate-length');\n const trueLength = attr == null ? length : parseInt(attr, 10);\n const end = start + trueLength;\n\n if (point.offset <= end) {\n const offset = Math.min(length, Math.max(0, point.offset - start));\n domPoint = [domNode, offset];\n // fixed cursor position after zero width char\n if (offset === 0 && length === 1 && domNode.textContent === '\\uFEFF') {\n domPoint = [domNode, offset + 1];\n }\n break;\n }\n\n start = end;\n }\n\n if (!domPoint) {\n throw new Error(`Cannot resolve a DOM point from Slate point: ${JSON.stringify(point)}`);\n }\n\n return domPoint;\n};\nDOMEditor.toDOMPoint = customToDOMPoint as unknown as (editor: DOMEditor, point: BasePoint) => DOMPoint;\n\nconst toSlatePointForBlockCard = (editor: AngularEditor, domPoint: DOMPoint, nearestNode: DOMNode): Point | undefined => {\n const [domNode] = domPoint;\n const cardTargetAttr = getCardTargetAttribute(domNode);\n if (cardTargetAttr) {\n const domSelection = window.getSelection();\n const blockCardEntry = CustomDOMEditor.toSlateCardEntry(editor, domNode) || CustomDOMEditor.toSlateCardEntry(editor, nearestNode);\n const [, blockPath] = blockCardEntry;\n if (domSelection.isCollapsed) {\n if (isCardLeftByTargetAttr(cardTargetAttr)) {\n return { path: blockPath, offset: -1 };\n } else {\n return { path: blockPath, offset: -2 };\n }\n }\n if (isCardLeftByTargetAttr(cardTargetAttr)) {\n return Editor.start(editor, blockPath);\n } else {\n return Editor.end(editor, blockPath);\n }\n }\n};\n\nconst customToSlatePoint = <T extends boolean>(\n editor: AngularEditor,\n domPoint: DOMPoint,\n options: {\n exactMatch: boolean;\n suppressThrow: T;\n searchDirection?: 'forward' | 'backward';\n }\n): T extends true ? Point | null : Point => {\n const { exactMatch, suppressThrow } = options;\n const [nearestNode, nearestOffset] = normalizeDOMPoint(domPoint);\n let parentNode = nearestNode.parentNode as DOMElement;\n let textNode: DOMElement | null = null;\n let offset = 0;\n\n const slatePointForBlockCard = toSlatePointForBlockCard(editor, domPoint, nearestNode);\n if (slatePointForBlockCard) {\n return slatePointForBlockCard;\n }\n\n if (parentNode) {\n const voidNode = parentNode.closest('[data-slate-void=\"true\"]');\n let leafNode = parentNode.closest('[data-slate-leaf]');\n let domNode: DOMElement | null = null;\n\n // Calculate how far into the text node the `nearestNode` is, so that we\n // can determine what the offset relative to the text node is.\n if (leafNode && CustomDOMEditor.isLeafInEditor(editor, leafNode)) {\n textNode = leafNode.closest('[data-slate-node=\"text\"]')!;\n const window = DOMEditor.getWindow(editor);\n const range = window.document.createRange();\n range.setStart(textNode, 0);\n range.setEnd(nearestNode, nearestOffset);\n const contents = range.cloneContents();\n const removals = [\n ...Array.prototype.slice.call(contents.querySelectorAll('[data-slate-zero-width]')),\n ...Array.prototype.slice.call(contents.querySelectorAll('[contenteditable=false]'))\n ];\n\n removals.forEach(el => {\n el!.parentNode!.removeChild(el);\n });\n\n // COMPAT: Edge has a bug where Range.prototype.toString() will\n // convert \\n into \\r\\n. The bug causes a loop when slate-react\n // attempts to reposition its cursor to match the native position. Use\n // textContent.length instead.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10291116/\n offset = contents.textContent!.length;\n domNode = textNode;\n } else if (voidNode) {\n // For void nodes, the element with the offset key will be a cousin, not an\n // ancestor, so find it by going down from the nearest void parent.\n const spacer = voidNode.querySelector('[data-slate-spacer=\"true\"]')!;\n leafNode = spacer.firstElementChild;\n parentNode = leafNode.firstElementChild;\n textNode = spacer;\n domNode = leafNode;\n offset = domNode.textContent!.length;\n }\n\n // COMPAT: If the parent node is a Slate zero-width space, editor is\n // because the text node should have no characters. However, during IME\n // composition the ASCII characters will be prepended to the zero-width\n // space, so subtract 1 from the offset to account for the zero-width\n // space character.\n if (domNode && offset === domNode.textContent!.length && parentNode && parentNode.hasAttribute('data-slate-zero-width')) {\n offset--;\n }\n }\n\n if (!textNode) {\n if (suppressThrow) {\n return null as T extends true ? Point | null : Point;\n }\n throw new Error(`Cannot resolve a Slate point from DOM point: ${domPoint}`);\n }\n\n // COMPAT: If someone is clicking from one Slate editor into another,\n // the select event fires twice, once for the old editor's `element`\n // first, and then afterwards for the correct `element`. (2017/03/03)\n let slateNode = null;\n try {\n slateNode = CustomDOMEditor.toSlateNode(editor, textNode);\n } catch (error) {\n if (!suppressThrow) {\n throw error;\n }\n }\n if (!slateNode && suppressThrow) {\n return null as T extends true ? Point | null : Point;\n }\n const path = CustomDOMEditor.findPath(editor, slateNode);\n return { path, offset };\n};\nDOMEditor.toSlatePoint = customToSlatePoint as unknown as <T extends boolean>(\n editor: DOMEditor,\n domPoint: DOMPoint,\n options: { exactMatch: boolean; suppressThrow: T; searchDirection?: 'forward' | 'backward' }\n) => T extends true ? BasePoint : BasePoint;\n\nconst customToSlateRange = <T extends boolean>(\n editor: CustomDOMEditor,\n domRange: DOMRange | DOMStaticRange | DOMSelection,\n options?: {\n exactMatch?: boolean;\n suppressThrow: T;\n }\n): T extends true ? Range | null : Range => {\n const { exactMatch, suppressThrow } = options || {};\n const el = isDOMSelection(domRange) ? domRange.anchorNode : domRange.startContainer;\n let anchorNode;\n let anchorOffset;\n let focusNode;\n let focusOffset;\n let isCollapsed;\n\n if (el) {\n if (isDOMSelection(domRange)) {\n anchorNode = domRange.anchorNode;\n anchorOffset = domRange.anchorOffset;\n focusNode = domRange.focusNode;\n focusOffset = domRange.focusOffset;\n // COMPAT: There's a bug in chrome that always returns `true` for\n // `isCollapsed` for a Selection that comes from a ShadowRoot.\n // (2020/08/08)\n // https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n if (IS_CHROME && hasShadowRoot(anchorNode)) {\n isCollapsed = domRange.anchorNode === domRange.focusNode && domRange.anchorOffset === domRange.focusOffset;\n } else {\n isCollapsed = domRange.isCollapsed;\n }\n } else {\n anchorNode = domRange.startContainer;\n anchorOffset = domRange.startOffset;\n focusNode = domRange.endContainer;\n focusOffset = domRange.endOffset;\n isCollapsed = domRange.collapsed;\n }\n }\n\n if (anchorNode == null || focusNode == null || anchorOffset == null || focusOffset == null) {\n throw new Error(`Cannot resolve a Slate range from DOM range: ${domRange}`);\n }\n\n const anchor = DOMEditor.toSlatePoint(editor, [anchorNode, anchorOffset], { suppressThrow, exactMatch });\n if (!anchor) {\n return null as T extends true ? Range | null : Range;\n }\n\n const focus = isCollapsed ? anchor : DOMEditor.toSlatePoint(editor, [focusNode, focusOffset], { suppressThrow, exactMatch });\n if (!focus) {\n return null as T extends true ? Range | null : Range;\n }\n\n let range: Range = { anchor: anchor as Point, focus: focus as Point };\n // if the selection is a hanging range that ends in a void\n // and the DOM focus is an Element\n // (meaning that the selection ends before the element)\n // unhang the range to avoid mistakenly including the void\n if (\n Range.isExpanded(range) &&\n Range.isForward(range) &&\n isDOMElement(focusNode) &&\n Editor.void(editor as Editor, { at: range.focus, mode: 'highest' })\n ) {\n range = Editor.unhangRange(editor as Editor, range, { voids: true });\n }\n\n return range;\n};\nDOMEditor.toSlateRange = customToSlateRange as unknown as <T extends boolean>(\n editor: DOMEditor,\n domRange: Range | StaticRange | Selection,\n options: { exactMatch: boolean; suppressThrow: T }\n) => T extends true ? BaseRange : BaseRange;\n\nexport const CustomDOMEditor = {\n ...DOMEditor,\n isNodeInEditor(editor: CustomDOMEditor, node: Node): boolean {\n let child = node;\n\n while (true) {\n const parent = NODE_TO_PARENT.get(child);\n\n if (parent == null) {\n if (Editor.isEditor(child) && child === editor) {\n return true;\n } else {\n break;\n }\n }\n\n const i = NODE_TO_INDEX.get(child);\n\n if (i == null) {\n break;\n }\n\n child = parent;\n }\n\n return false;\n },\n isLeafInEditor(editor: CustomDOMEditor, leafNode: DOMElement): boolean {\n const textNode = leafNode.closest('[data-slate-node=\"text\"]')!;\n let node: Node | null = null;\n try {\n node = CustomDOMEditor.toSlateNode(editor, textNode);\n } catch (error) {}\n if (node && CustomDOMEditor.isNodeInEditor(editor, node)) {\n return true;\n } else {\n return false;\n }\n },\n /**\n * Check if the editor is hanging right.\n */\n isBlockHangingRight(editor: Editor): boolean {\n const { selection } = editor;\n if (!selection) {\n return false;\n }\n if (Range.isCollapsed(selection)) {\n return false;\n }\n const [start, end] = Range.edges(selection);\n const endBlock = Editor.above(editor, {\n at: end,\n match: node => Element.isElement(node) && Editor.isBlock(editor, node)\n });\n return Editor.isStart(editor, end, endBlock[1]);\n },\n isBlockCardLeftCursor(editor: Editor) {\n return (\n editor.selection?.anchor?.offset === FAKE_LEFT_BLOCK_CARD_OFFSET &&\n editor.selection?.focus?.offset === FAKE_LEFT_BLOCK_CARD_OFFSET\n );\n },\n isBlockCardRightCursor(editor: Editor) {\n return (\n editor.selection?.anchor?.offset === FAKE_RIGHT_BLOCK_CARD_OFFSET &&\n editor.selection?.focus?.offset === FAKE_RIGHT_BLOCK_CARD_OFFSET\n );\n },\n getCardCursorNode(\n editor: AngularEditor,\n blockCardNode: Node,\n options: {\n direction: 'left' | 'right' | 'center';\n }\n ) {\n const blockCardElement = DOMEditor.toDOMNode(editor, blockCardNode);\n const cardCenter = blockCardElement.parentElement;\n return options.direction === 'left' ? cardCenter.previousElementSibling.firstChild : cardCenter.nextElementSibling.firstChild;\n },\n toSlateCardEntry(editor: AngularEditor, node: DOMNode): NodeEntry {\n const element = node.parentElement.closest('.slate-block-card')?.querySelector('[card-target=\"card-center\"]').firstElementChild;\n const slateNode = DOMEditor.toSlateNode(editor, element);\n const path = DOMEditor.findPath(editor, slateNode);\n return [slateNode, path];\n }\n};\n","import { Editor, Node, Path, Transforms, Element } from 'slate';\nimport { Injector } from '@angular/core';\nimport { SlateError } from '../types/error';\nimport { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET } from '../utils/block-card';\nimport { CustomDOMEditor } from './with-dom';\nimport { DOMEditor, EDITOR_TO_ELEMENT, IS_FOCUSED } from 'slate-dom';\nimport { getSelection } from '../utils/dom';\n\n/**\n * An Angular and DOM-specific version of the `Editor` interface.\n */\nexport interface AngularEditor extends CustomDOMEditor {\n deleteCutData: () => void;\n onKeydown: (event: KeyboardEvent) => void;\n onClick: (event: MouseEvent) => void;\n injector: Injector;\n isBlockCard: (node: Node) => boolean;\n isExpanded: (node: Element) => boolean;\n onError: (errorData: SlateError) => void;\n customInsertFragmentData: (data: DataTransfer) => Promise<boolean>;\n customInsertTextData: (data: DataTransfer) => Promise<boolean>;\n}\n\nexport const AngularEditor = {\n ...CustomDOMEditor,\n /**\n * handle editor error.\n */\n\n onError(errorData: SlateError) {\n if (errorData.nativeError) {\n throw errorData.nativeError;\n }\n },\n\n /**\n * onKeydown hook.\n */\n onKeydown(editor: AngularEditor, data: KeyboardEvent): void {\n editor.onKeydown(data);\n },\n\n /**\n * onClick hook.\n */\n onClick(editor: AngularEditor, data: MouseEvent): void {\n editor.onClick(data);\n },\n\n deleteCutData(editor: AngularEditor): void {\n editor.deleteCutData();\n },\n\n isLeafBlock(editor: AngularEditor, node: Node): boolean {\n return Element.isElement(node) && !editor.isInline(node) && Editor.hasInlines(editor, node);\n },\n\n /**\n * move native selection to card-left or card-right\n * @param editor\n * @param blockCardNode\n * @param options\n */\n moveBlockCard(\n editor: AngularEditor,\n blockCardNode: Node,\n options: {\n direction: 'left' | 'right';\n }\n ) {\n const cursorNode = AngularEditor.getCardCursorNode(editor, blockCardNode, options);\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n domSelection.setBaseAndExtent(cursorNode, 1, cursorNode, 1);\n },\n\n /**\n * move slate selection to card-left or card-right\n * @param editor\n * @param path\n * @param options\n */\n moveBlockCardCursor(\n editor: AngularEditor,\n path: Path,\n options: {\n direction: 'left' | 'right';\n }\n ) {\n const cursor = {\n path,\n offset: options.direction === 'left' ? FAKE_LEFT_BLOCK_CARD_OFFSET : FAKE_RIGHT_BLOCK_CARD_OFFSET\n };\n Transforms.select(editor, { anchor: cursor, focus: cursor });\n },\n focus: (editor, options = { retries: 5 }) => {\n // Return if already focused\n if (IS_FOCUSED.get(editor)) {\n return;\n }\n\n // Return if no dom node is associated with the editor, which means the editor is not yet mounted\n // or has been unmounted. This can happen especially, while retrying to focus the editor.\n if (!EDITOR_TO_ELEMENT.get(editor)) {\n return;\n }\n\n IS_FOCUSED.set(editor, true);\n const el = DOMEditor.toDOMNode(editor, editor);\n const root = DOMEditor.findDocumentOrShadowRoot(editor);\n if (root.activeElement !== el) {\n // IS_FOCUSED should be set before calling el.focus() to ensure that\n // FocusedContext is updated to the correct value\n el.focus({ preventScroll: true });\n }\n }\n};\n","import { Node, Editor } from 'slate';\nimport { BaseElementComponent } from '../view/base';\n\n/**\n * Symbols.\n */\n\nexport const PLACEHOLDER_SYMBOL = Symbol('placeholder') as unknown as string;\n\n/**\n * Weak map for associating the html element with the component.\n */\nexport const ELEMENT_TO_COMPONENT: WeakMap<Node, BaseElementComponent> = new WeakMap();\n\nexport const EDITOR_TO_AFTER_VIEW_INIT_QUEUE: WeakMap<Editor, (() => void)[]> = new WeakMap();\n","export const IS_IOS =\n typeof navigator !== 'undefined' &&\n typeof window !== 'undefined' &&\n /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\nexport const IS_APPLE = typeof navigator !== 'undefined' && /Mac OS X/.test(navigator.userAgent);\n\nexport const IS_ANDROID = typeof navigator !== 'undefined' && /Android/.test(navigator.userAgent);\n\nexport const IS_FIREFOX = typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\n\nexport const IS_SAFARI = typeof navigator !== 'undefined' && /Version\\/[\\d\\.]+.*Safari/.test(navigator.userAgent);\n\n// \"modern\" Edge was released at 79.x\nexport const IS_EDGE_LEGACY = typeof navigator !== 'undefined' && /Edge?\\/(?:[0-6][0-9]|[0-7][0-8])(?:\\.)/i.test(navigator.userAgent);\n\nexport const IS_CHROME = typeof navigator !== 'undefined' && /Chrome/i.test(navigator.userAgent);\n\n// Native beforeInput events don't work well with react on Chrome 75 and older, Chrome 76+ can use beforeInput\nexport const IS_CHROME_LEGACY =\n typeof navigator !== 'undefined' &&\n /Chrome?\\/(?:[0-7][0-5]|[0-6][0-9])/i.test(navigator.userAgent) &&\n // Exclude Chrome version greater than 3 bits,Chrome releases v100 on 2022.03.29\n !/Chrome?\\/(?:\\d{3,})/i.test(navigator.userAgent);\n\n// Firefox did not support `beforeInput` until `v87`.\nexport const IS_FIREFOX_LEGACY =\n typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox\\/(?:[0-7][0-9]|[0-8][0-6])(?:\\.)).*/i.test(navigator.userAgent);\n\n// qq browser\nexport const IS_QQBROWSER = typeof navigator !== 'undefined' && /.*QQBrowser/.test(navigator.userAgent);\n\n// UC mobile browser\nexport const IS_UC_MOBILE = typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent);\n\n// Wechat browser\nexport const IS_WECHATBROWSER = typeof navigator !== 'undefined' && /.*Wechat/.test(navigator.userAgent);\n\n// COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event\n// Chrome Legacy doesn't support `beforeinput` correctly\nexport const HAS_BEFORE_INPUT_SUPPORT =\n !IS_CHROME_LEGACY &&\n !IS_EDGE_LEGACY &&\n // globalThis is undefined in older browsers\n typeof globalThis !== 'undefined' &&\n globalThis.InputEvent &&\n // @ts-ignore The `getTargetRanges` property isn't recognized.\n typeof globalThis.InputEvent.prototype.getTargetRanges === 'function';\n","import { isKeyHotkey } from 'is-hotkey';\nimport { IS_APPLE } from './environment';\n\n/**\n * Hotkey mappings for each platform.\n */\n\nconst HOTKEYS = {\n bold: 'mod+b',\n compose: ['down', 'left', 'right', 'up', 'backspace', 'enter'],\n moveBackward: 'left',\n moveForward: 'right',\n moveUp: 'up',\n moveDown: 'down',\n moveWordBackward: 'ctrl+left',\n moveWordForward: 'ctrl+right',\n deleteBackward: 'shift?+backspace',\n deleteForward: 'shift?+delete',\n extendBackward: 'shift+left',\n extendForward: 'shift+right',\n italic: 'mod+i',\n splitBlock: 'shift?+enter',\n undo: 'mod+z'\n};\n\nconst APPLE_HOTKEYS = {\n moveLineBackward: 'opt+up',\n moveLineForward: 'opt+down',\n moveWordBackward: 'opt+left',\n moveWordForward: 'opt+right',\n deleteBackward: ['ctrl+backspace', 'ctrl+h'],\n deleteForward: ['ctrl+delete', 'ctrl+d'],\n deleteLineBackward: 'cmd+shift?+backspace',\n deleteLineForward: ['cmd+shift?+delete', 'ctrl+k'],\n deleteWordBackward: 'opt+shift?+backspace',\n deleteWordForward: 'opt+shift?+delete',\n extendLineBackward: 'opt+shift+up',\n extendLineForward: 'opt+shift+down',\n redo: 'cmd+shift+z',\n transposeCharacter: 'ctrl+t'\n};\n\nconst WINDOWS_HOTKEYS = {\n deleteWordBackward: 'ctrl+shift?+backspace',\n deleteWordForward: 'ctrl+shift?+delete',\n redo: ['ctrl+y', 'ctrl+shift+z']\n};\n\n/**\n * Create a platform-aware hotkey checker.\n */\n\nconst create = (key: string) => {\n const generic = HOTKEYS[key];\n const apple = APPLE_HOTKEYS[key];\n const windows = WINDOWS_HOTKEYS[key];\n const isGeneric = generic && isKeyHotkey(generic);\n const isApple = apple && isKeyHotkey(apple);\n const isWindows = windows && isKeyHotkey(windows);\n\n return (event: KeyboardEvent) => {\n if (isGeneric && isGeneric(event)) {\n return true;\n }\n if (IS_APPLE && isApple && isApple(event)) {\n return true;\n }\n if (!IS_APPLE && isWindows && isWindows(event)) {\n return true;\n }\n return false;\n };\n};\n\n/**\n * Hotkeys.\n */\n\nconst hotkeys = {\n isBold: create('bold'),\n isCompose: create('compose'),\n isMoveBackward: create('moveBackward'),\n isMoveForward: create('moveForward'),\n isMoveUp: create('moveUp'),\n isMoveDown: create('moveDown'),\n isDeleteBackward: create('deleteBackward'),\n isDeleteForward: create('deleteForward'),\n isDeleteLineBackward: create('deleteLineBackward'),\n isDeleteLineForward: create('deleteLineForward'),\n isDeleteWordBackward: create('deleteWordBackward'),\n isDeleteWordForward: create('deleteWordForward'),\n isExtendBackward: create('extendBackward'),\n isExtendForward: create('extendForward'),\n isExtendLineBackward: create('extendLineBackward'),\n isExtendLineForward: create('extendLineForward'),\n isItalic: create('italic'),\n isMoveLineBackward: create('moveLineBackward'),\n isMoveLineForward: create('moveLineForward'),\n isMoveWordBackward: create('moveWordBackward'),\n isMoveWordForward: create('moveWordForward'),\n isRedo: create('redo'),\n isSplitBlock: create('splitBlock'),\n isTransposeCharacter: create('transposeCharacter'),\n isUndo: create('undo')\n};\nexport default hotkeys;\nexport { hotkeys };\n","import { TemplateRef } from '@angular/core';\nimport { ComponentType, ViewType } from '../types/view';\n\nexport function isTemplateRef<C>(value: ViewType): value is TemplateRef<C> {\n return value && value instanceof TemplateRef;\n}\n\nexport function isComponentType<T>(value: ViewType): value is ComponentType<T> {\n return !isTemplateRef(value);\n}\n","import { Range } from 'slate';\nimport { PLACEHOLDER_SYMBOL } from './weak-maps';\n\nexport const shallowCompare = (obj1: {}, obj2: {}) =>\n Object.keys(obj1).length === Object.keys(obj2).length &&\n Object.keys(obj1).every(key => obj2.hasOwnProperty(key) && obj1[key] === obj2[key]);\n\n/**\n * Check if a list of decorator ranges are equal to another.\n *\n * PERF: this requires the two lists to also have the ranges inside them in the\n * same order, but this is an okay constraint for us since decorations are\n * kept in order, and the odd case where they aren't is okay to re-render for.\n */\n\nexport const isDecoratorRangeListEqual = (list: Range[], another: Range[]): boolean => {\n if (list.length !== another.length) {\n return false;\n }\n\n for (let i = 0; i < list.length; i++) {\n const range = list[i];\n const other = another[i];\n\n const { anchor: rangeAnchor, focus: rangeFocus, ...rangeOwnProps } = range;\n const { anchor: otherAnchor, focus: otherFocus, ...otherOwnProps } = other;\n\n if (\n !Range.equals(range, other) ||\n range[PLACEHOLDER_SYMBOL] !== other[PLACEHOLDER_SYMBOL] ||\n !shallowCompare(rangeOwnProps, otherOwnProps)\n ) {\n return false;\n }\n }\n\n return true;\n};\n","import { Descendant, Element, Text } from 'slate';\n\nconst isValid = (value: Descendant) =>\n (Element.isElement(value) && value.children.length > 0 && (value.children as Descendant[]).every(child => isValid(child))) ||\n Text.isText(value);\n\nconst check = (document: Element[]) => {\n return document.every(value => Element.isElement(value) && isValid(value));\n};\n\nfunction normalize(document: Element[]) {\n return document.filter(value => Element.isElement(value) && isValid(value));\n}\n\nexport { normalize, check, isValid };\n","export const createThrottleRAF = () => {\n let timerId: number | null = null;\n const throttleRAF = (fn: () => void) => {\n const scheduleFunc = () => {\n timerId = requestAnimationFrame(() => {\n timerId = null;\n fn();\n });\n };\n if (timerId !== null) {\n cancelAnimationFrame(timerId);\n timerId = null;\n }\n scheduleFunc();\n };\n return throttleRAF;\n};\n\nexport type ThrottleRAF = (fn: () => void) => void;\n","export const isClipboardReadSupported = () => {\n return 'clipboard' in navigator && 'read' in navigator.clipboard;\n};\n\nexport const isClipboardWriteSupported = () => {\n return 'clipboard' in navigator && 'write' in navigator.clipboard;\n};\n\nexport const isClipboardWriteTextSupported = () => {\n return 'clipboard' in navigator && 'writeText' in navigator.clipboard;\n};\n\nexport const isClipboardFile = (item: ClipboardItem) => {\n return item.types.find(i => i.match(/^image\\//));\n};\n\nexport const isInvalidTable = (nodes: Element[] = []) => {\n return nodes.some(node => node.tagName.toLowerCase() === 'tr');\n};\n\nexport const stripHtml = (html: string) => {\n // See <https://github.com/developit/preact-markup/blob/4788b8d61b4e24f83688710746ee36e7464f7bbc/src/parse-markup.js#L60-L69>\n const doc = document.implementation.createHTMLDocument('');\n doc.documentElement.innerHTML = html.trim();\n return doc.body.textContent || doc.body.innerText || '';\n};\n\nexport const blobAsString = (blob: Blob) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('loadend', () => {\n const text = reader.result;\n resolve(text as string);\n });\n reader.addEventListener('error', () => {\n reject(reader.error);\n });\n reader.readAsText(blob);\n });\n};\n\nexport const completeTable = (fragment: DocumentFragment) => {\n const result = document.createDocumentFragment();\n const table = document.createElement('table');\n result.appendChild(table);\n table.appendChild(fragment);\n return result;\n};\n","import { getClipboardFromHTMLText } from './clipboard';\nimport { ClipboardData } from '../../types/clipboard';\n\nexport const setDataTransferClipboard = (dataTransfer: Pick<DataTransfer, 'getData' | 'setData'> | null, htmlText: string) => {\n dataTransfer?.setData(`text/html`, htmlText);\n};\n\nexport const setDataTransferClipboardText = (data: Pick<DataTransfer, 'getData' | 'setData'> | null, text: string) => {\n data?.setData(`text/plain`, text);\n};\n\nexport const getDataTransferClipboard = (data: Pick<DataTransfer, 'getData' | 'setData'> | null): ClipboardData => {\n const html = data?.getData(`text/html`);\n if (html) {\n const htmlClipboardData = getClipboardFromHTMLText(html);\n if (htmlClipboardData) {\n return htmlClipboardData;\n }\n const textData = getDataTransferClipboardText(data);\n if (textData) {\n return {\n html,\n ...textData\n };\n } else {\n return { html };\n }\n } else {\n const textData = getDataTransferClipboardText(data);\n return textData;\n }\n};\n\nexport const getDataTransferClipboardText = (data: Pick<DataTransfer, 'getData' | 'setData'> | null): ClipboardData => {\n if (!data) {\n return null;\n }\n const text = data?.getData(`text/plain`);\n if (text) {\n const htmlClipboardData = getClipboardFromHTMLText(text);\n if (htmlClipboardData) {\n return htmlClipboardData;\n }\n }\n return { text };\n};\n","import { Element } from 'slate';\nimport { getClipboardFromHTMLText } from './clipboard';\nimport { blobAsString, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, stripHtml } from './common';\nimport { ClipboardData } from '../../types/clipboard';\n\nexport const setNavigatorClipboard = async (htmlText: string, data: Element[], text: string = '') => {\n let textClipboard = text;\n if (isClipboardWriteSupported()) {\n await navigator.clipboard.write([\n new ClipboardItem({\n 'text/html': new Blob([htmlText], {\n type: 'text/html'\n }),\n 'text/plain': new Blob([textClipboard ?? JSON.stringify(data)], { type: 'text/plain' })\n })\n ]);\n }\n};\n\nexport const getNavigatorClipboard = async () => {\n if (!isClipboardReadSupported()) {\n return null;\n }\n const clipboardItems = await navigator.clipboard.read();\n let clipboardData: ClipboardData = {};\n\n if (Array.isArray(clipboardItems) && clipboardItems[0] instanceof ClipboardItem) {\n for (const item of clipboardItems) {\n if (isClipboardFile(item)) {\n const clipboardFiles = item.types.filter(type => type.match(/^image\\//));\n const fileBlobs = await Promise.all(clipboardFiles.map(type => item.getType(type)!));\n const urls = (fileBlobs.filter(Boolean) as (File | Blob)[]).map(blob => URL.createObjectURL(blob));\n const files = await Promise.all(\n urls.map(async url => {\n const blob = await (await fetch(url)).blob();\n return new File([blob], 'file', { type: blob.type });\n })\n );\n clipboardData = {\n ...clipboardData,\n files\n };\n }\n if (item.types.includes('text/html')) {\n const htmlContent = await blobAsString(await item.getType('text/html'));\n const htmlClipboardData = getClipboardFromHTMLText(htmlContent);\n if (htmlClipboardData) {\n clipboardData = { ...clipboardData, ...htmlClipboardData };\n return clipboardData;\n }\n if (htmlContent && htmlContent.trim()) {\n clipboardData = { ...clipboardData, html: htmlContent };\n }\n }\n if (item.types.includes('text/plain')) {\n const textContent = await blobAsString(await item.getType('text/plain'));\n clipboardData = {\n ...clipboardData,\n text: stripHtml(textContent)\n };\n }\n }\n }\n return clipboardData;\n};\n","import { DOMNode, DOMText, isDOMElement, isDOMNode } from 'slate-dom';\n\nexport const SlateFragmentAttributeKey = 'data-slate-angular-fragment';\n\n/**\n * Get x-slate-fragment attribute from data-slate-angular-fragment\n */\nconst catchSlateFragment = /data-slate-angular-fragment=\"(.+?)\"/m;\nexport const getSlateFragmentAttribute = (htmlData: string): string | void => {\n const [, fragment] = htmlData.match(catchSlateFragment) || [];\n return fragment;\n};\n\n/**\n * Check if a DOM node is an element node.\n */\nexport const isDOMText = (value: any): value is DOMText => {\n return isDOMNode(value) && value.nodeType === 3;\n};\n\n/**\n * Get a plaintext representation of the content of a node, accounting for block\n * elements which get a newline appended.\n *\n * The domNode must be attached to the DOM.\n */\nexport const getPlainText = (domNode: DOMNode) => {\n let text = '';\n\n if (isDOMText(domNode) && domNode.nodeValue) {\n return domNode.nodeValue;\n }\n\n if (isDOMElement(domNode)) {\n for (const childNode of Array.from(domNode.childNodes)) {\n text += getPlainText(childNode);\n }\n\n const display = getComputedStyle(domNode).getPropertyValue('display');\n\n if (display === 'block' || display === 'list' || domNode.tagName === 'BR') {\n text += '\\n';\n }\n }\n\n return text;\n};\n\n/**\n * Get the dom selection from Shadow Root if possible, otherwise from the document\n */\nexport const getSelection = (root: Document | ShadowRoot): Selection | null => {\n if ((root as { getSelection: () => Selection }).getSelection != null) {\n return (root as { getSelection: () => Selection }).getSelection();\n }\n return document.getSelection();\n};\n","import { Element } from 'slate';\nimport { ClipboardData } from '../../types/clipboard';\nimport { isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported } from './common';\nimport { getDataTransferClipboard, setDataTransferClipboard, setDataTransferClipboardText } from './data-transfer';\nimport { getNavigatorClipboard, setNavigatorClipboard } from './navigator-clipboard';\nimport { getSlateFragmentAttribute, SlateFragmentAttributeKey } from '../dom';\n\nexport const buildHTMLText = (wrapper: HTMLElement, attach: HTMLElement, data: Element[]) => {\n const stringObj = JSON.stringify(data);\n const encoded = window.btoa(encodeURIComponent(stringObj));\n attach.setAttribute(SlateFragmentAttributeKey, encoded);\n return wrapper.innerHTML;\n};\n\nexport const getClipboardFromHTMLText = (html: string): ClipboardData => {\n const fragmentAttribute = getSlateFragmentAttribute(html);\n if (fragmentAttribute) {\n try {\n const decoded = decodeURIComponent(window.atob(fragmentAttribute));\n const result = JSON.parse(decoded);\n if (result && Array.isArray(result) && result.length > 0) {\n return {\n elements: result\n };\n }\n } catch (error) {\n console.error(error);\n return null;\n }\n }\n return null;\n};\n\nexport const createClipboardData = (html: string, elements: Element[], text: string, files: File[]): ClipboardData => {\n const data = { elements, text, html, files };\n return data;\n};\n\nexport const getClipboardData = async (dataTransfer?: DataTransfer): Promise<ClipboardData> => {\n let clipboardData = null;\n if (dataTransfer) {\n let filesData = {};\n if (dataTransfer.files.length) {\n filesData = { ...filesData, files: Array.from(dataTransfer.files) };\n }\n clipboardData = getDataTransferClipboard(dataTransfer);\n return { ...clipboardData, ...filesData };\n }\n if (isClipboardReadSupported()) {\n return await getNavigatorClipboard();\n }\n return clipboardData;\n};\n\n/**\n * @param wrapper get wrapper.innerHTML string which will be written in clipboard\n * @param attach attach must be child element of wrapper which will be attached json data\n * @returns void\n */\nexport const setClipboardData = async (\n clipboardData: ClipboardData,\n wrapper: HTMLElement,\n attach: HTMLElement,\n dataTransfer?: Pick<DataTransfer, 'getData' | 'setData'>\n) => {\n if (!clipboardData) {\n return;\n }\n const { elements, text } = clipboardData;\n if (isClipboardWriteSupported()) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n // TODO\n // maybe fail to write when copy some cell in table\n return await setNavigatorClipboard(htmlText, elements, text);\n }\n\n if (dataTransfer) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n setDataTransferClipboard(dataTransfer, htmlText);\n setDataTransferClipboardText(dataTransfer, text);\n return;\n }\n\n // Compatible with situations where navigator.clipboard.write is not supported and dataTransfer is empty\n // Such as contextmenu copy in Firefox.\n if (isClipboardWriteTextSupported()) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n return await navigator.clipboard.writeText(htmlText);\n }\n};\n","import { Editor, Element, Node, Operation, Path, PathRef, Range, Transforms } from 'slate';\nimport { OriginEvent } from '../types/clipboard';\nimport { SlateError } from '../types/error';\nimport { completeTable, isInvalidTable } from '../utils';\nimport { getClipboardData, setClipboardData } from '../utils/clipboard/clipboard';\nimport { AngularEditor } from './angular-editor';\nimport { Key, NODE_TO_KEY, withDOM } from 'slate-dom';\nimport { getPlainText, isDOMText } from '../utils/dom';\n\nexport const withAngular = <T extends Editor>(editor: T, clipboardFormatKey = 'x-slate-fragment') => {\n let e = editor as T & AngularEditor;\n let { apply } = e;\n\n e = withDOM(e, clipboardFormatKey);\n\n e.setFragmentData = (dataTransfer?: Pick<DataTransfer, 'getData' | 'setData'>, originEvent?: OriginEvent) => {\n const { selection } = e;\n\n if (!selection) {\n return;\n }\n\n const [start, end] = Range.edges(selection);\n const startVoid = Editor.void(e, { at: start.path });\n const endVoid = Editor.void(e, { at: end.path });\n\n if (Range.isCollapsed(selection) && !startVoid) {\n return;\n }\n\n // Create a fake selection so that we can add a Base64-encoded copy of the\n // fragment to the HTML, to decode on future pastes.\n const domRange = AngularEditor.toDOMRange(e, selection);\n let contents = domRange.cloneContents();\n let attach = contents.childNodes[0] as HTMLElement;\n\n // Make sure attach is non-empty, since empty nodes will not get copied.\n const contentsArray = Array.from(contents.children);\n contentsArray.forEach(node => {\n if (node.textContent && node.textContent.trim() !== '') {\n attach = node as HTMLElement;\n }\n });\n\n // COMPAT: If the end node is a void node, we need to move the end of the\n // range from the void node's spacer span, to the end of the void node's\n // content, since the spacer is before void's content in the DOM.\n if (endVoid) {\n const [voidNode] = endVoid;\n const r = domRange.cloneRange();\n const domNode = AngularEditor.toDOMNode(e, voidNode);\n r.setEndAfter(domNode);\n contents = r.cloneContents();\n }\n\n // COMPAT: If the start node is a void node, we need to attach the encoded\n // fragment to the void node's content node instead of the spacer, because\n // attaching it to empty `<div>/<span>` nodes will end up having it erased by\n // most browsers. (2018/04/27)\n if (startVoid) {\n attach = contents.querySelector('[data-slate-spacer]')! as HTMLElement;\n }\n\n // Remove any zero-width space spans from the cloned DOM so that they don't\n // show up elsewhere when pasted.\n Array.from(contents.querySelectorAll('[data-slate-zero-width]')).forEach(zw => {\n const isNewline = zw.getAttribute('data-slate-zero-width') === 'n';\n zw.textContent = isNewline ? '\\n' : '';\n });\n\n // Set a `data-slate-fragment` attribute on a non-empty node, so it shows up\n // in the HTML, and can be used for intra-Slate pasting. If it's a text\n // node, wrap it in a `<span>` so we have something to set an attribute on.\n if (isDOMText(attach)) {\n const span = attach.ownerDocument.createElement('span');\n // COMPAT: In Chrome and Safari, if we don't add the `white-space` style\n // then leading and trailing spaces will be ignored. (2017/09/21)\n span.style.whiteSpace = 'pre';\n span.appendChild(attach);\n contents.appendChild(span);\n attach = span;\n }\n\n const fragment = e.getFragment();\n\n // Add the content to a <div> so that we can get its inner HTML.\n const div = contents.ownerDocument.createElement('div');\n const attachWrapper = document.createElement('div');\n const elements = Array.from(contents.children);\n if (isInvalidTable(elements)) {\n contents = completeTable(contents.cloneNode(true) as DocumentFragment);\n }\n\n attachWrapper.appendChild(contents);\n div.appendChild(attachWrapper);\n div.setAttribute('hidden', 'true');\n contents.ownerDocument.body.appendChild(div);\n setClipboardData({ text: getPlainText(div), elements: fragment as Element[] }, div, attachWrapper, dataTransfer);\n contents.ownerDocument.body.removeChild(div);\n };\n\n e.deleteCutData = () => {\n const { selection } = editor;\n if (selection) {\n if (Range.isExpanded(selection)) {\n Editor.deleteFragment(editor);\n } else {\n const node = Node.parent(editor, selection.anchor.path);\n if (Element.isElement(node) && Editor.isVoid(editor, node)) {\n Transforms.delete(editor);\n }\n }\n }\n };\n\n e.insertData = async (data: DataTransfer) => {\n if (!(await e.customInsertFragmentData(data))) {\n e.insertTextData(data);\n }\n };\n\n e.customInsertFragmentData = async (data: DataTransfer): Promise<boolean> => {\n /**\n * Checking copied fragment from application/x-slate-fragment or data-slate-fragment\n */\n const clipboardData = await getClipboardData(data);\n if (clipboardData && clipboardData.elements) {\n e.insertFragment(clipboardData.elements);\n return true;\n }\n return false;\n };\n\n e.customInsertTextData = async (data: DataTransfer): Promise<boolean> => {\n const clipboardData = await getClipboardData(data);\n\n if (clipboardData && clipboardData.text) {\n const lines = clipboardData.text.split(/\\r\\n|\\r|\\n/);\n let split = false;\n\n for (const line of lines) {\n if (split) {\n Transforms.splitNodes(e, { always: true });\n }\n\n e.insertText(line);\n split = true;\n }\n return true;\n }\n return false;\n };\n\n e.onKeydown = () => {};\n\n e.onClick = () => {};\n\n e.isBlockCard = element => false;\n\n e.isExpanded = element => true;\n\n e.onError = (errorData: SlateError) => {\n if (errorData.nativeError) {\n console.error(errorData.nativeError);\n } else {\n console.error(errorData);\n }\n };\n\n // exist issue for move operation in withDOM\n e.apply = (op: Operation) => {\n const matches: [Path | PathRef, Key][] = [];\n\n switch (op.type) {\n case 'insert_text':\n case 'remove_text':\n case 'set_node': {\n for (const [node, path] of Editor.levels(e, { at: op.path })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([path, key]);\n }\n\n break;\n }\n\n case 'insert_node':\n case 'remove_node':\n case 'merge_node':\n case 'split_node': {\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.path)\n })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([path, key]);\n }\n\n break;\n }\n\n case 'move_node': {\n const commonPath = Path.common(Path.parent(op.path), Path.parent(op.newPath));\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.path)\n })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([Editor.pathRef(editor, path), key]);\n }\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.newPath)\n })) {\n if (path.length > commonPath.length) {\n const key = AngularEditor.findKey(e, node);\n matches.push([Editor.pathRef(editor, path), key]);\n }\n }\n break;\n }\n }\n\n apply(op);\n\n for (const [source, key] of matches) {\n const [node] = Editor.node(e, Path.isPath(source) ? source : source.current);\n NODE_TO_KEY.set(node, key);\n }\n };\n\n return e;\n};\n","export const TOP_BLUR = 'blur';\nexport const TOP_COMPOSITION_END = 'compositionend';\nexport const TOP_COMPOSITION_START = 'compositionstart';\nexport const TOP_COMPOSITION_UPDATE = 'compositionupdate';\nexport const TOP_KEY_DOWN = 'keydown';\nexport const TOP_KEY_PRESS = 'keypress';\nexport const TOP_KEY_UP = 'keyup';\nexport const TOP_MOUSE_DOWN = 'mousedown';\nexport const TOP_MOUSE_MOVE = 'mousemove';\nexport const TOP_MOUSE_OUT = 'mouseout';\nexport const TOP_TEXT_INPUT = 'textInput';\nexport const TOP_PASTE = 'paste';\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\n\nlet root = null;\nlet startText = null;\nlet fallbackText = null;\n\nexport function initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\n\nexport function reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\n\nexport function getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n let start;\n const startValue = startText;\n const startLength = startValue.length;\n let end;\n const endValue = getText();\n const endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n const minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n const sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\n\nexport function getText() {\n if ('value' in root) {\n return root.value;\n }\n return root.textContent;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n TOP_BLUR,\n TOP_COMPOSITION_START,\n TOP_COMPOSITION_END,\n TOP_COMPOSITION_UPDATE,\n TOP_KEY_DOWN,\n TOP_KEY_PRESS,\n TOP_KEY_UP,\n TOP_MOUSE_DOWN,\n TOP_TEXT_INPUT,\n TOP_PASTE\n} from './DOMTopLevelEventTypes';\nimport {\n getData as FallbackCompositionStateGetData,\n initialize as FallbackCompositionStateInitialize,\n reset as FallbackCompositionStateReset\n} from './FallbackCompositionState';\n\nconst canUseDOM: boolean = !!(\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n);\n\nconst END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nconst START_KEYCODE = 229;\n\nconst canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\n\nlet documentMode = null;\nif (canUseDOM && 'documentMode' in document) {\n documentMode = (document as any).documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nconst canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nconst useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11));\n\nconst SPACEBAR_CODE = 32;\nconst SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nconst eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nlet hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_KEY_UP:\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case TOP_KEY_DOWN:\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case TOP_KEY_PRESS:\n case TOP_MOUSE_DOWN:\n case TOP_BLUR:\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n const detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n */\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n}\n\n// Track the current IME composition status, if any.\nlet isComposing = false;\n\nfunction getNativeBeforeInputChars(topLevelType: any, nativeEvent) {\n switch (topLevelType) {\n case TOP_COMPOSITION_END:\n return getDataFromCustomEvent(nativeEvent);\n case TOP_KEY_PRESS:\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n const which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case TOP_TEXT_INPUT:\n // Record the characters to be added to the DOM.\n const chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n */\nfunction getFallbackBeforeInputChars(topLevelType: any, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === TOP_COMPOSITION_END || (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent))) {\n const chars = FallbackCompositionStateGetData();\n FallbackCompositionStateReset();\n isComposing = false;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case TOP_PASTE:\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case TOP_KEY_PRESS:\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n return null;\n case TOP_COMPOSITION_END:\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n */\nexport function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n let chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n const beforeInputEvent = new BeforeInputEvent();\n beforeInputEvent.data = chars;\n beforeInputEvent.nativeEvent = nativeEvent;\n return beforeInputEvent;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nconst BeforeInputEventPlugin = {\n extractEvents: (topLevelType, targetInst, nativeEvent, nativeEventTarget) => {\n return extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n }\n};\n\nexport class BeforeInputEvent {\n data: string;\n nativeEvent: Event;\n}\nexport default BeforeInputEventPlugin;\n","export const BEFORE_INPUT_EVENTS: {\n name: string;\n handler: string;\n isTriggerBeforeInput: boolean;\n}[] = [\n // { name: 'blur', handler: 'onBlur', isTriggerBeforeInput: true },\n // { name: 'compositionstart', handler: 'onCompositionStart', isTriggerBeforeInput: true },\n { name: 'compositionupdate', handler: null, isTriggerBeforeInput: true },\n // { name: 'compositionend', handler: 'onCompositionEnd', isTriggerBeforeInput: false },\n // { name: 'keydown', handler: 'onKeyDown', isTriggerBeforeInput: true },\n { name: 'keypress', handler: null, isTriggerBeforeInput: true },\n { name: 'keyup', handler: 'onKeyUp', isTriggerBeforeInput: true },\n { name: 'mousedown', handler: 'onMouseDown', isTriggerBeforeInput: true },\n { name: 'textInput', handler: null, isTriggerBeforeInput: true }\n // { name: 'paste', handler: 'onPaste', isTriggerBeforeInput: true }\n];\n","import { Descendant } from 'slate';\n\nexport enum SlateErrorCode {\n ToNativeSelectionError = 2100,\n ToSlateSelectionError = 2101,\n OnDOMBeforeInputError = 2102,\n OnSyntheticBeforeInputError = 2103,\n OnDOMKeydownError = 2104,\n GetStartPointError = 2105,\n NotFoundPreviousRootNodeError = 3100,\n InvalidValueError = 4100\n}\n\nexport interface SlateError {\n code?: SlateErrorCode | number;\n name?: string;\n nativeError?: Error;\n data?: Descendant[];\n}\n","import { Component, ChangeDetectionStrategy, ViewChild, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'slate-string-template',\n templateUrl: 'template.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateStringTemplate {\n @ViewChild('compatibleStringTemplate', { read: TemplateRef, static: true })\n compatibleStringTemplate: TemplateRef<any>;\n\n @ViewChild('voidStringTemplate', { read: TemplateRef, static: true })\n voidStringTemplate: TemplateRef<any>;\n\n @ViewChild('emptyTextTemplate', { read: TemplateRef, static: true })\n emptyTextTemplate: TemplateRef<any>;\n}\n","<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n","import { Editor } from 'slate';\nimport { EDITOR_TO_ELEMENT } from 'slate-dom';\n\nexport function restoreDom(editor: Editor, execute: () => void) {\n const editable = EDITOR_TO_ELEMENT.get(editor);\n let observer = new MutationObserver(mutations => {\n mutations.reverse().forEach(mutation => {\n if (mutation.type === 'characterData') {\n // We don't want to restore the DOM for characterData mutations\n // because this interrupts the composition.\n return;\n }\n\n mutation.removedNodes.forEach(node => {\n mutation.target.insertBefore(node, mutation.nextSibling);\n });\n\n mutation.addedNodes.forEach(node => {\n mutation.target.removeChild(node);\n });\n });\n disconnect();\n execute();\n });\n const disconnect = () => {\n observer.disconnect();\n observer = null;\n };\n observer.observe(editable, { subtree: true, childList: true, characterData: true, characterDataOldValue: true });\n setTimeout(() => {\n if (observer) {\n disconnect();\n execute();\n }\n }, 0);\n}\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseElementComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseElementComponent>>('slate-default-element-token');\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseTextComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_TEXT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseTextComponent>>('slate-default-text-token');\n\nexport const SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseTextComponent>>(\n 'slate-default-void-text-token'\n);\n","import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\n\n@Component({\n selector: 'slate-children-outlet',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateChildrenOutlet {\n constructor(private elementRef: ElementRef<HTMLElement>) {}\n getNativeElement() {\n return this.elementRef.nativeElement;\n }\n}\n","export interface BeforeContextChange<T> {\n beforeContextChange: (value: T) => void;\n}\n\nexport interface AfterContextChange<> {\n afterContextChange: () => void;\n}\n\nexport function hasBeforeContextChange<T>(value): value is BeforeContextChange<T> {\n if (value.beforeContextChange) {\n return true;\n }\n return false;\n}\n\nexport function hasAfterContextChange<T>(value): value is AfterContextChange {\n if (value.afterContextChange) {\n return true;\n }\n return false;\n}\n","import { Descendant } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { isComponentType, isTemplateRef } from '../../utils/view';\nimport { SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';\nimport { SlateBlockCard } from '../../components/block-card/block-card.component';\n\nexport function createEmbeddedViewOrComponent(\n viewType: ViewType,\n context: any,\n viewContext: SlateViewContext,\n viewContainerRef: ViewContainerRef\n) {\n if (isTemplateRef(viewType)) {\n const embeddedViewContext = {\n context,\n viewContext\n };\n const embeddedViewRef = viewContainerRef.createEmbeddedView<any>(viewType, embeddedViewContext);\n embeddedViewRef.detectChanges();\n return embeddedViewRef;\n }\n if (isComponentType(viewType)) {\n const componentRef = viewContainerRef.createComponent(viewType, {\n injector: viewContainerRef.injector\n }) as ComponentRef<any>;\n componentRef.instance.viewContext = viewContext;\n componentRef.instance.context = context;\n componentRef.changeDetectorRef.detectChanges();\n return componentRef;\n }\n}\n\nexport function updateContext(\n view: EmbeddedViewRef<any> | ComponentRef<any>,\n newContext: SlateElementContext | SlateTextContext | SlateLeafContext,\n viewContext: SlateViewContext\n) {\n if (view instanceof ComponentRef) {\n view.instance.context = newContext;\n } else {\n view.context.context = newContext;\n view.context.viewContext = viewContext;\n view.detectChanges();\n }\n}\n\nexport function mount(\n views: (EmbeddedViewRef<any> | ComponentRef<any>)[],\n blockCards: (ComponentRef<SlateBlockCard> | null)[] | null,\n outletParent: HTMLElement,\n outletElement: HTMLElement | null\n) {\n if (views.length > 0) {\n const fragment = document.createDocumentFragment();\n views.forEach((view, index) => {\n const blockCard = blockCards ? blockCards[index] : undefined;\n fragment.append(...getRootNodes(view, blockCard));\n });\n if (outletElement) {\n outletElement.parentElement.insertBefore(fragment, outletElement);\n outletElement.remove();\n } else {\n outletParent.prepend(fragment);\n }\n }\n}\n\nexport function getRootNodes(ref: EmbeddedViewRef<any> | ComponentRef<any>, blockCard?: ComponentRef<SlateBlockCard>): HTMLElement[] {\n if (blockCard) {\n return [blockCard.instance.nativeElement];\n }\n if (ref instanceof ComponentRef) {\n ((ref.hostView as any).rootNodes as (HTMLElement | any)[]).forEach(ele => {\n if (!(ele instanceof HTMLElement)) {\n ele.remove();\n }\n });\n return [ref.instance.nativeElement];\n } else {\n const result: HTMLElement[] = [];\n ref.rootNodes.forEach(rootNode => {\n const isHTMLElement = rootNode instanceof HTMLElement;\n const isSlateNodeOfLeaf =\n isHTMLElement && (rootNode.hasAttribute('data-slate-node') || rootNode.hasAttribute('data-slate-leaf'));\n if (isSlateNodeOfLeaf && result.every(item => !item.contains(rootNode))) {\n result.push(rootNode);\n }\n if (!isHTMLElement) {\n rootNode.remove();\n }\n });\n return result;\n }\n}\n\nexport function mountOnItemChange(\n index: number,\n item: Descendant,\n views: (EmbeddedViewRef<any> | ComponentRef<any>)[],\n blockCards: (ComponentRef<SlateBlockCard> | null)[] | null,\n outletParent: HTMLElement,\n firstRootNode: HTMLElement | null,\n viewContext: SlateViewContext\n) {\n const view = views[index];\n let rootNodes = getRootNodes(view);\n if (blockCards) {\n const isBlockCard = viewContext.editor.isBlockCard(item);\n if (isBlockCard) {\n const blockCard = blockCards[index];\n rootNodes = [blockCard.instance.nativeElement];\n }\n }\n if (index === 0) {\n if (firstRootNode) {\n rootNodes.forEach(rootNode => {\n firstRootNode.insertAdjacentElement('beforebegin', rootNode);\n });\n } else {\n outletParent.prepend(...rootNodes);\n }\n } else {\n const previousView = views[index - 1];\n const blockCard = blockCards ? blockCards[index - 1] : null;\n const previousRootNodes = getRootNodes(previousView, blockCard);\n let previousRootNode = previousRootNodes[previousRootNodes.length - 1];\n rootNodes.forEach(rootNode => {\n previousRootNode.insertAdjacentElement('afterend', rootNode);\n previousRootNode = rootNode;\n });\n }\n}\n","import { LeafPosition, Text } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, IterableDiffer, IterableDiffers, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';\nimport { createEmbeddedViewOrComponent, getRootNodes, mount, mountOnItemChange, updateContext } from './utils';\n\nexport class LeavesRender {\n private decoratedLeaves: { leaf: Text; position?: LeafPosition }[];\n private views: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n private contexts: SlateLeafContext[] = [];\n private viewTypes: ViewType[] = [];\n private differ: IterableDiffer<any>;\n\n constructor(\n private viewContext: SlateViewContext,\n private viewContainerRef: ViewContainerRef,\n private getOutletParent: () => HTMLElement,\n private getOutletElement: () => HTMLElement\n ) {}\n\n public initialize(context: SlateTextContext) {\n const { decoratedLeaves, contexts } = this.getLeaves(context);\n this.decoratedLeaves = decoratedLeaves;\n this.contexts = contexts;\n this.decoratedLeaves.forEach((leaf, index) => {\n const context = getContext(index, this.contexts);\n const viewType = getViewType(context, this.viewContext);\n const view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n this.views.push(view);\n this.contexts.push(context);\n this.viewTypes.push(viewType);\n });\n mount(this.views, null, this.getOutletParent(), this.getOutletElement());\n const newDiffers = this.viewContainerRef.injector.get(IterableDiffers);\n this.differ = newDiffers.find(this.decoratedLeaves).create(trackBy(this.viewContext));\n this.differ.diff(this.decoratedLeaves);\n }\n\n public update(context: SlateTextContext) {\n const { decoratedLeaves, contexts } = this.getLeaves(context);\n const outletParent = this.getOutletParent();\n const diffResult = this.differ.diff(decoratedLeaves);\n if (diffResult) {\n let firstRootNode = getRootNodes(this.views[0])[0];\n const newContexts = [];\n const newViewTypes = [];\n const newViews = [];\n diffResult.forEachItem(record => {\n let context = getContext(record.currentIndex, contexts);\n const viewType = getViewType(context, this.viewContext);\n newViewTypes.push(viewType);\n let view: EmbeddedViewRef<any> | ComponentRef<any>;\n if (record.previousIndex === null) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n newContexts.push(context);\n newViews.push(view);\n mountOnItemChange(record.currentIndex, record.item, newViews, null, outletParent, firstRootNode, this.viewContext);\n } else {\n const previousView = this.views[record.previousIndex];\n const previousViewType = this.viewTypes[record.previousIndex];\n if (previousViewType !== viewType) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n const firstRootNode = getRootNodes(previousView, null)[0];\n const newRootNodes = getRootNodes(view, null);\n firstRootNode.replaceWith(...newRootNodes);\n previousView.destroy();\n } else {\n view = previousView;\n updateContext(previousView, context, this.viewContext);\n }\n newContexts.push(context);\n newViews.push(view);\n }\n });\n diffResult.forEachRemovedItem(record => {\n const view = this.views[record.previousIndex];\n view.destroy();\n });\n diffResult.forEachMovedItem(record => {\n mountOnItemChange(record.currentIndex, record.item, newViews, null, outletParent, firstRootNode, this.viewContext);\n });\n this.viewTypes = newViewTypes;\n this.views = newViews;\n this.contexts = newContexts;\n this.decoratedLeaves = decoratedLeaves;\n }\n }\n\n private getLeaves(context: SlateTextContext) {\n const decoratedLeaves = Text.decorations(context.text, context.decorations);\n const contexts: SlateLeafContext[] = decoratedLeaves.map((decoratedLeaf, index) => {\n return {\n leaf: decoratedLeaf.leaf,\n leafPosition: decoratedLeaf.position,\n text: context.text,\n parent: context.parent,\n index,\n isLast: context.isLast && index === decoratedLeaves.length - 1\n };\n });\n return { decoratedLeaves, contexts };\n }\n}\n\nexport function getContext(index: number, leafContexts: SlateLeafContext[]): SlateLeafContext {\n return leafContexts[index];\n}\n\nexport function getViewType(leafContext: SlateLeafContext, viewContext: SlateViewContext) {\n return (viewContext.renderLeaf && viewContext.renderLeaf(leafContext.leaf)) || viewContext.defaultLeaf;\n}\n\nexport function trackBy(viewContext: SlateViewContext) {\n return (index, node) => {\n return index;\n };\n}\n","import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'slate-block-card, [slateBlockCard]',\n templateUrl: 'block-card.component.html',\n standalone: true\n})\nexport class SlateBlockCard implements OnInit {\n @ViewChild('centerContianer', { static: true })\n centerContianer: ElementRef;\n\n centerRootNodes: HTMLElement[];\n\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n\n get centerContainerElement() {\n return this.centerContianer.nativeElement as HTMLElement;\n }\n\n constructor(private elementRef: ElementRef) {}\n\n ngOnInit() {\n this.nativeElement.classList.add(`slate-block-card`);\n }\n\n append() {\n this.centerRootNodes.forEach(\n rootNode => !this.centerContainerElement.contains(rootNode) && this.centerContainerElement.appendChild(rootNode)\n );\n }\n\n initializeCenter(rootNodes: HTMLElement[]) {\n this.centerRootNodes = rootNodes;\n this.append();\n }\n}\n","<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>\n","import { Ancestor, Descendant, Range, Editor, Element, Path } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, IterableDiffer, IterableDiffers, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { SlateChildrenContext, SlateElementContext, SlateTextContext, SlateViewContext } from '../context';\nimport { AngularEditor } from '../../plugins/angular-editor';\nimport { SlateErrorCode } from '../../types/error';\nimport { EDITOR_TO_AFTER_VIEW_INIT_QUEUE } from '../../utils/weak-maps';\nimport { isDecoratorRangeListEqual } from '../../utils/range-list';\nimport { SlateBlockCard } from '../../components/block-card/block-card.component';\nimport { createEmbeddedViewOrComponent, getRootNodes, mount, mountOnItemChange, updateContext } from './utils';\nimport { NODE_TO_INDEX, NODE_TO_PARENT } from 'slate-dom';\n\nexport class ListRender {\n private children: Descendant[];\n private views: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n // private addedViews: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n private blockCards: (ComponentRef<SlateBlockCard> | null)[] = [];\n private contexts: (SlateTextContext | SlateElementContext)[] = [];\n private viewTypes: ViewType[] = [];\n private differ: IterableDiffer<any> | null = null;\n public initialized = false;\n\n constructor(\n private viewContext: SlateViewContext,\n private viewContainerRef: ViewContainerRef,\n private getOutletParent: () => HTMLElement,\n private getOutletElement: () => HTMLElement | null\n ) {}\n\n public initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext) {\n this.initialized = true;\n this.children = children;\n const parentPath = AngularEditor.findPath(this.viewContext.editor, parent);\n children.forEach((descendant, index) => {\n NODE_TO_INDEX.set(descendant, index);\n NODE_TO_PARENT.set(descendant, parent);\n const context = getContext(index, descendant, parentPath, childrenContext, this.viewContext);\n const viewType = getViewType(descendant, parent, this.viewContext);\n const view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n const blockCard = createBlockCard(descendant, view, this.viewContainerRef, this.viewContext);\n this.views.push(view);\n this.contexts.push(context);\n this.viewTypes.push(viewType);\n this.blockCards.push(blockCard);\n });\n mount(this.views, this.blockCards, this.getOutletParent(), this.getOutletElement());\n const newDiffers = this.viewContainerRef.injector.get(IterableDiffers);\n this.differ = newDiffers.find(children).create(trackBy(this.viewContext));\n this.differ.diff(children);\n if (parent === this.viewContext.editor) {\n executeAfterViewInit(this.viewContext.editor);\n }\n }\n\n public update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext) {\n if (!this.initialized || this.children.length === 0) {\n this.initialize(children, parent, childrenContext);\n return;\n }\n if (!this.differ) {\n throw new Error('Exception: Can not find differ ');\n }\n const outletParent = this.getOutletParent();\n const diffResult = this.differ.diff(children);\n const parentPath = AngularEditor.findPath(this.viewContext.editor, parent);\n if (diffResult) {\n let firstRootNode = getRootNodes(this.views[0], this.blockCards[0])[0];\n const newContexts = [];\n const newViewTypes = [];\n const newViews = [];\n const newBlockCards: (ComponentRef<SlateBlockCard> | null)[] = [];\n diffResult.forEachItem(record => {\n NODE_TO_INDEX.set(record.item, record.currentIndex);\n NODE_TO_PARENT.set(record.item, parent);\n let context = getContext(record.currentIndex, record.item, parentPath, childrenContext, this.viewContext);\n const viewType = getViewType(record.item, parent, this.viewContext);\n newViewTypes.push(viewType);\n let view: EmbeddedViewRef<any> | ComponentRef<any>;\n let blockCard: ComponentRef<SlateBlockCard> | null;\n if (record.previousIndex === null) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);\n newContexts.push(context);\n newViews.push(view);\n newBlockCards.push(blockCard);\n mountOnItemChange(\n record.currentIndex,\n record.item,\n newViews,\n newBlockCards,\n outletParent,\n firstRootNode,\n this.viewContext\n );\n } else {\n const previousView = this.views[record.previousIndex];\n const previousViewType = this.viewTypes[record.previousIndex];\n const previousContext = this.contexts[record.previousIndex];\n const previousBlockCard = this.blockCards[record.previousIndex];\n if (previousViewType !== viewType) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);\n const firstRootNode = getRootNodes(previousView, previousBlockCard)[0];\n const newRootNodes = getRootNodes(view, blockCard);\n firstRootNode.replaceWith(...newRootNodes);\n previousView.destroy();\n previousBlockCard?.destroy();\n } else {\n view = previousView;\n blockCard = previousBlockCard;\n if (memoizedContext(this.viewContext, record.item, previousContext as any, context as any)) {\n context = previousContext;\n } else {\n updateContext(previousView, context, this.viewContext);\n }\n }\n newContexts.push(context);\n newViews.push(view);\n newBlockCards.push(blockCard);\n }\n });\n diffResult.forEachOperation(record => {\n // removed\n if (record.currentIndex === null) {\n const view = this.views[record.previousIndex];\n const blockCard = this.blockCards[record.previousIndex];\n view.destroy();\n blockCard?.destroy();\n }\n // moved\n if (record.previousIndex !== null && record.currentIndex !== null) {\n mountOnItemChange(\n record.currentIndex,\n record.item,\n newViews,\n newBlockCards,\n outletParent,\n firstRootNode,\n this.viewContext\n );\n // Solve the block-card DOMElement loss when moving nodes\n newBlockCards[record.currentIndex]?.instance.append();\n }\n });\n this.viewTypes = newViewTypes;\n this.views = newViews;\n this.contexts = newContexts;\n this.children = children;\n this.blockCards = newBlockCards;\n if (parent === this.viewContext.editor) {\n executeAfterViewInit(this.viewContext.editor);\n }\n } else {\n const newContexts = [];\n this.children.forEach((child, index) => {\n NODE_TO_INDEX.set(child, index);\n NODE_TO_PARENT.set(child, parent);\n let context = getContext(index, child, parentPath, childrenContext, this.viewContext);\n const previousContext = this.contexts[index];\n if (memoizedContext(this.viewContext, child, previousContext as any, context as any)) {\n context = previousContext;\n } else {\n updateContext(this.views[index], context, this.viewContext);\n }\n newContexts.push(context);\n });\n this.contexts = newContexts;\n }\n }\n\n public destroy() {\n this.children.forEach((element: Element, index: number) => {\n if (this.views[index]) {\n this.views[index].destroy();\n }\n if (this.blockCards[index]) {\n this.blockCards[index].destroy();\n }\n });\n this.views = [];\n this.blockCards = [];\n this.contexts = [];\n this.viewTypes = [];\n this.initialized = false;\n this.differ = null;\n }\n}\n\nexport function getContext(\n index: number,\n item: Descendant,\n parentPath: Path,\n childrenContext: SlateChildrenContext,\n viewContext: SlateViewContext\n): SlateElementContext | SlateTextContext {\n if (Element.isElement(item)) {\n const computedContext = getCommonContext(index, item, parentPath, viewContext, childrenContext);\n const key = AngularEditor.findKey(viewContext.editor, item);\n const isInline = viewContext.editor.isInline(item);\n const isVoid = viewContext.editor.isVoid(item);\n const elementContext: SlateElementContext = {\n element: item,\n ...computedContext,\n attributes: {\n 'data-slate-node': 'element',\n 'data-slate-key': key.id\n },\n decorate: childrenContext.decorate,\n readonly: childrenContext.readonly\n };\n if (isInline) {\n elementContext.attributes['data-slate-inline'] = true;\n }\n if (isVoid) {\n elementContext.attributes['data-slate-void'] = true;\n }\n // add contentEditable for block element only to avoid chinese input be broken\n if (isVoid && !isInline) {\n elementContext.contentEditable = false;\n }\n return elementContext;\n } else {\n const computedContext = getCommonContext(index, item, parentPath, viewContext, childrenContext);\n const isLeafBlock = AngularEditor.isLeafBlock(viewContext.editor, childrenContext.parent);\n const textContext: SlateTextContext = {\n decorations: computedContext.decorations,\n isLast: isLeafBlock && index === childrenContext.parent.children.length - 1,\n parent: childrenContext.parent as Element,\n text: item\n };\n return textContext;\n }\n}\n\nexport function getCommonContext(\n index: number,\n item: Descendant,\n parentPath: Path,\n viewContext: SlateViewContext,\n childrenContext: SlateChildrenContext\n): { selection: Range; decorations: Range[] } {\n const p = parentPath.concat(index);\n try {\n const ds = childrenContext.decorate([item, p]);\n // [list-render] performance optimization: reduce the number of calls to the `Editor.range(viewContext.editor, p)` method\n if (childrenContext.selection || childrenContext.decorations.length > 0) {\n const range = Editor.range(viewContext.editor, p);\n const sel = childrenContext.selection && Range.intersection(range, childrenContext.selection);\n for (const dec of childrenContext.decorations) {\n const d = Range.intersection(dec, range);\n if (d) {\n ds.push(d);\n }\n }\n return { selection: sel, decorations: ds };\n } else {\n return { selection: null, decorations: ds };\n }\n } catch (error) {\n viewContext.editor.onError({\n code: SlateErrorCode.GetStartPointError,\n nativeError: error\n });\n return { selection: null, decorations: [] };\n }\n}\n\nexport function getViewType(item: Descendant, parent: Ancestor, viewContext: SlateViewContext) {\n if (Element.isElement(item)) {\n return (viewContext.renderElement && viewContext.renderElement(item)) || viewContext.defaultElement;\n } else {\n const isVoid = viewContext.editor.isVoid(parent as Element);\n return isVoid ? viewContext.defaultVoidText : (viewContext.renderText && viewContext.renderText(item)) || viewContext.defaultText;\n }\n}\n\nexport function createBlockCard(\n item: Descendant,\n view: EmbeddedViewRef<any> | ComponentRef<any>,\n viewContainerRef: ViewContainerRef,\n viewContext: SlateViewContext\n) {\n const isBlockCard = viewContext.editor.isBlockCard(item);\n if (isBlockCard) {\n const rootNodes = getRootNodes(view);\n const blockCardComponentRef = viewContainerRef.createComponent<SlateBlockCard>(SlateBlockCard, {\n injector: viewContainerRef.injector\n });\n blockCardComponentRef.instance.initializeCenter(rootNodes);\n blockCardComponentRef.changeDetectorRef.detectChanges();\n return blockCardComponentRef;\n } else {\n return null;\n }\n}\n\nexport function trackBy(viewContext: SlateViewContext) {\n return (index, node) => {\n return viewContext.trackBy(node) || AngularEditor.findKey(viewContext.editor, node);\n };\n}\n\nexport function memoizedContext(\n viewContext: SlateViewContext,\n descendant: Descendant,\n prev: SlateElementContext | SlateTextContext,\n next: SlateElementContext | SlateTextContext\n): boolean {\n if (Element.isElement(descendant)) {\n return memoizedElementContext(viewContext, prev as SlateElementContext, next as SlateElementContext);\n } else {\n return memoizedTextContext(prev as SlateTextContext, next as SlateTextContext);\n }\n}\n\nexport function memoizedElementContext(viewContext: SlateViewContext, prev: SlateElementContext, next: SlateElementContext) {\n return (\n prev.element === next.element &&\n (!viewContext.isStrictDecorate || prev.decorate === next.decorate) &&\n prev.readonly === next.readonly &&\n isDecoratorRangeListEqual(prev.decorations, next.decorations) &&\n (prev.selection === next.selection || (!!prev.selection && !!next.selection && Range.equals(prev.selection, next.selection)))\n );\n}\n\nexport function memoizedTextContext(prev: SlateTextContext, next: SlateTextContext) {\n return (\n next.parent === prev.parent &&\n next.isLast === prev.isLast &&\n next.text === prev.text &&\n isDecoratorRangeListEqual(next.decorations, prev.decorations)\n );\n}\n\nexport function addAfterViewInitQueue(editor: Editor, afterViewInitCallback: () => void) {\n const queue = getAfterViewInitQueue(editor);\n queue.push(afterViewInitCallback);\n EDITOR_TO_AFTER_VIEW_INIT_QUEUE.set(editor, queue);\n}\n\nexport function getAfterViewInitQueue(editor: Editor) {\n return EDITOR_TO_AFTER_VIEW_INIT_QUEUE.get(editor) || [];\n}\n\nexport function clearAfterViewInitQueue(editor: Editor) {\n EDITOR_TO_AFTER_VIEW_INIT_QUEUE.set(editor, []);\n}\n\nexport function executeAfterViewInit(editor: Editor) {\n const queue = getAfterViewInitQueue(editor);\n queue.forEach(callback => callback());\n clearAfterViewInitQueue(editor);\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewContainerRef,\n inject\n} from '@angular/core';\nimport { Descendant, Element, Range, Text } from 'slate';\nimport { SlateChildrenOutlet } from '../components/children/children-outlet.component';\nimport { AngularEditor } from '../plugins/angular-editor';\nimport { ELEMENT_TO_COMPONENT } from '../utils/weak-maps';\nimport { SlateChildrenContext, SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from './context';\nimport { hasAfterContextChange, hasBeforeContextChange } from './context-change';\nimport { LeavesRender } from './render/leaves-render';\nimport { ListRender, addAfterViewInitQueue } from './render/list-render';\nimport { ELEMENT_TO_NODE, NODE_TO_ELEMENT } from 'slate-dom';\n\n/**\n * base class for template\n */\nexport interface BaseEmbeddedView<T, K extends AngularEditor = AngularEditor> {\n context: T;\n viewContext: SlateViewContext<K>;\n}\n\n/**\n * base class for custom element component or text component\n */\n@Directive()\nexport abstract class BaseComponent<\n T = SlateTextContext | SlateLeafContext | SlateElementContext,\n K extends AngularEditor = AngularEditor\n> {\n initialized = false;\n\n protected _context: T;\n\n @Input()\n set context(value: T) {\n if (hasBeforeContextChange<T>(this)) {\n this.beforeContextChange(value);\n }\n this._context = value;\n this.onContextChange();\n if (this.initialized) {\n this.cdr.detectChanges();\n }\n if (hasAfterContextChange<T>(this)) {\n this.afterContextChange();\n }\n }\n\n get context() {\n return this._context;\n }\n\n @Input() viewContext: SlateViewContext<K>;\n\n get editor() {\n return this.viewContext && this.viewContext.editor;\n }\n\n get nativeElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n public elementRef = inject(ElementRef);\n\n public cdr = inject(ChangeDetectorRef);\n\n abstract onContextChange();\n}\n\n/**\n * base class for custom leaf component\n */\n@Directive()\nexport class BaseLeafComponent extends BaseComponent<SlateLeafContext> implements OnInit {\n placeholderElement: HTMLSpanElement;\n\n @HostBinding('attr.data-slate-leaf') isSlateLeaf = true;\n\n get text(): Text {\n return this.context && this.context.text;\n }\n\n get leaf(): Text {\n return this.context && this.context.leaf;\n }\n\n ngOnInit() {\n this.initialized = true;\n }\n\n onContextChange() {\n if (!this.initialized) {\n return;\n }\n }\n\n renderPlaceholder() {\n // issue-1: IME input was interrupted\n // issue-2: IME input focus jumping\n // Issue occurs when the span node of the placeholder is before the slateString span node\n if (this.context.leaf['placeholder']) {\n if (!this.placeholderElement) {\n this.createPlaceholder();\n }\n this.updatePlaceholder();\n } else {\n this.destroyPlaceholder();\n }\n }\n\n createPlaceholder() {\n const placeholderElement = document.createElement('span');\n placeholderElement.innerText = this.context.leaf['placeholder'];\n placeholderElement.contentEditable = 'false';\n placeholderElement.setAttribute('data-slate-placeholder', 'true');\n this.placeholderElement = placeholderElement;\n this.nativeElement.classList.add('leaf-with-placeholder');\n this.nativeElement.appendChild(placeholderElement);\n }\n\n updatePlaceholder() {\n if (this.placeholderElement.innerText !== this.context.leaf['placeholder']) {\n this.placeholderElement.innerText = this.context.leaf['placeholder'];\n }\n }\n\n destroyPlaceholder() {\n if (this.placeholderElement) {\n this.placeholderElement.remove();\n this.placeholderElement = null;\n this.nativeElement.classList.remove('leaf-with-placeholder');\n }\n }\n}\n\n/**\n * base class for custom element component\n */\n@Directive()\nexport class BaseElementComponent<T extends Element = Element, K extends AngularEditor = AngularEditor>\n extends BaseComponent<SlateElementContext<T>, K>\n implements OnInit, OnDestroy\n{\n viewContainerRef = inject(ViewContainerRef);\n\n childrenContext: SlateChildrenContext;\n\n @ViewChild(SlateChildrenOutlet, { static: true })\n childrenOutletInstance?: SlateChildrenOutlet;\n\n get element(): T {\n return this._context && this._context.element;\n }\n\n get selection(): Range {\n return this._context && this._context.selection;\n }\n\n get decorations(): Range[] {\n return this._context && this._context.decorations;\n }\n\n get children(): Descendant[] {\n return this._context && this._context.element.children;\n }\n\n get isCollapsed() {\n return this.selection && Range.isCollapsed(this.selection);\n }\n\n get isCollapsedAndNonReadonly() {\n return this.selection && Range.isCollapsed(this.selection) && !this.readonly;\n }\n\n get readonly() {\n return this._context && this._context.readonly;\n }\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n getOutletElement = () => {\n if (this.childrenOutletInstance) {\n return this.childrenOutletInstance.getNativeElement();\n }\n return null;\n };\n\n listRender: ListRender;\n\n ngOnInit() {\n for (const key in this._context.attributes) {\n this.nativeElement.setAttribute(key, this._context.attributes[key]);\n }\n this.initialized = true;\n this.listRender = new ListRender(this.viewContext, this.viewContainerRef, this.getOutletParent, this.getOutletElement);\n if (this.editor.isExpanded(this.element)) {\n this.listRender.initialize(this.children, this.element, this.childrenContext);\n }\n addAfterViewInitQueue(this.editor, () => {\n this.afterViewInit();\n });\n }\n\n afterViewInit() {\n if (this._context.contentEditable !== undefined) {\n this.nativeElement.setAttribute('contenteditable', this._context.contentEditable + '');\n }\n }\n\n updateWeakMap() {\n NODE_TO_ELEMENT.set(this.element, this.nativeElement);\n ELEMENT_TO_NODE.set(this.nativeElement, this.element);\n ELEMENT_TO_COMPONENT.set(this.element, this);\n }\n\n ngOnDestroy() {\n if (NODE_TO_ELEMENT.get(this.element) === this.nativeElement) {\n NODE_TO_ELEMENT.delete(this.element);\n }\n ELEMENT_TO_NODE.delete(this.nativeElement);\n if (ELEMENT_TO_COMPONENT.get(this.element) === this) {\n ELEMENT_TO_COMPONENT.delete(this.element);\n }\n }\n\n onContextChange() {\n this.childrenContext = this.getChildrenContext();\n this.updateWeakMap();\n if (!this.initialized) {\n return;\n }\n this.updateChildrenView();\n }\n\n updateChildrenView() {\n if (this.editor.isExpanded(this.element)) {\n this.listRender.update(this.children, this.element, this.childrenContext);\n } else {\n if (this.listRender.initialized) {\n this.listRender.destroy();\n }\n }\n }\n\n getChildrenContext(): SlateChildrenContext {\n return {\n parent: this._context.element,\n selection: this._context.selection,\n decorations: this._context.decorations,\n decorate: this._context.decorate,\n readonly: this._context.readonly\n };\n }\n}\n\n/**\n * base class for custom text component\n */\n@Directive()\nexport class BaseTextComponent<T extends Text = Text> extends BaseComponent<SlateTextContext<T>> implements OnInit, OnDestroy {\n viewContainerRef = inject(ViewContainerRef);\n\n get text(): T {\n return this._context && this._context.text;\n }\n\n leavesRender: LeavesRender;\n\n @ViewChild(SlateChildrenOutlet, { static: true })\n childrenOutletInstance?: SlateChildrenOutlet;\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n getOutletElement = () => {\n if (this.childrenOutletInstance) {\n return this.childrenOutletInstance.getNativeElement();\n }\n return null;\n };\n\n ngOnInit() {\n this.initialized = true;\n this.leavesRender = new LeavesRender(this.viewContext, this.viewContainerRef, this.getOutletParent, this.getOutletElement);\n this.leavesRender.initialize(this.context);\n }\n\n updateWeakMap() {\n ELEMENT_TO_NODE.set(this.nativeElement, this.text);\n NODE_TO_ELEMENT.set(this.text, this.nativeElement);\n }\n\n ngOnDestroy() {\n if (NODE_TO_ELEMENT.get(this.text) === this.nativeElement) {\n NODE_TO_ELEMENT.delete(this.text);\n }\n ELEMENT_TO_NODE.delete(this.nativeElement);\n }\n\n onContextChange() {\n this.updateWeakMap();\n if (!this.initialized) {\n return;\n }\n this.leavesRender.update(this.context);\n }\n}\n","import { Component, ChangeDetectionStrategy, OnInit, OnChanges } from '@angular/core';\nimport { BaseTextComponent } from '../../view/base';\n\n@Component({\n selector: 'span[slateVoidText]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-spacer': 'true',\n class: 'slate-spacer',\n 'data-slate-node': 'text'\n }\n})\nexport class SlateVoidText extends BaseTextComponent implements OnInit, OnChanges {\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnChanges() {\n if (!this.initialized) {\n return;\n }\n }\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { BaseTextComponent } from '../../view/base';\n@Component({\n selector: 'span[slateDefaultText]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-node': 'text'\n }\n})\nexport class SlateDefaultText extends BaseTextComponent {}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { BaseElementComponent } from '../../view/base';\n\n@Component({\n selector: 'div[slateDefaultElement]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SlateDefaultElement extends BaseElementComponent {}\n","import { ComponentRef, Directive, EmbeddedViewRef, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { SlateBlockCard } from '../components/block-card/block-card.component';\nimport { AngularEditor } from '../plugins/angular-editor';\n\nimport { ViewType } from '../types/view';\nimport { isComponentType, isTemplateRef } from '../utils';\nimport { BaseComponent, BaseEmbeddedView } from './base';\nimport { SlateElementContext, SlateLeafContext, SlateStringContext, SlateTextContext, SlateViewContext } from './context';\nimport { isDOMElement } from 'slate-dom';\n\n/**\n * Dynamically create/update components or templates\n * Provide rootNodes for the view container\n * If the dynamically created component uses onpush mode, then it must call markForCheck when setting the context\n */\n@Directive()\nexport abstract class ViewContainerItem<\n T = SlateElementContext | SlateTextContext | SlateLeafContext | SlateStringContext,\n K extends BaseComponent<T> = BaseComponent<T>\n> {\n initialized = false;\n embeddedViewRef: EmbeddedViewRef<BaseEmbeddedView<T>>;\n embeddedViewContext: BaseEmbeddedView<T>;\n blockCardComponentRef: ComponentRef<SlateBlockCard>;\n componentRef: ComponentRef<K>;\n viewType: ViewType;\n\n @Input() viewContext: SlateViewContext;\n\n get rootNodes() {\n return this.getRootNodes();\n }\n\n getRootNodes(): HTMLElement[] {\n if (this.embeddedViewRef) {\n return this.embeddedViewRef.rootNodes.filter(rootNode => isDOMElement(rootNode)) as HTMLElement[];\n }\n if (this.componentRef) {\n return [this.componentRef.instance.nativeElement];\n }\n return [];\n }\n\n protected viewContainerRef = inject(ViewContainerRef);\n\n destroyView() {\n if (this.embeddedViewRef) {\n this.embeddedViewRef.destroy();\n this.embeddedViewRef = null;\n }\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n\n abstract getContext(): T;\n\n abstract getViewType(): ViewType;\n\n abstract memoizedContext(prev: T, next: T): boolean;\n\n createView() {\n this.initialized = true;\n this.viewType = this.getViewType();\n const context = this.getContext();\n if (isTemplateRef(this.viewType)) {\n this.embeddedViewContext = {\n context,\n viewContext: this.viewContext\n };\n const embeddedViewRef = this.viewContainerRef.createEmbeddedView<BaseEmbeddedView<T>>(\n this.viewType as TemplateRef<BaseEmbeddedView<T, AngularEditor>>,\n this.embeddedViewContext\n );\n this.embeddedViewRef = embeddedViewRef;\n }\n if (isComponentType(this.viewType)) {\n const componentRef = this.viewContainerRef.createComponent(this.viewType) as ComponentRef<any>;\n componentRef.instance.viewContext = this.viewContext;\n componentRef.instance.context = context;\n this.componentRef = componentRef;\n }\n }\n\n updateView() {\n const viewType = this.getViewType();\n const context = this.getContext();\n if (this.viewType === viewType) {\n if (this.componentRef) {\n if (this.memoizedContext(this.componentRef.instance.context, context)) {\n return;\n }\n this.componentRef.instance.context = context;\n }\n if (this.embeddedViewRef) {\n if (this.memoizedContext(this.embeddedViewContext.context, context)) {\n return;\n }\n this.embeddedViewContext.context = context;\n }\n } else {\n this.viewType = viewType;\n const firstRootNode = this.rootNodes[0];\n if (isTemplateRef(this.viewType)) {\n this.embeddedViewContext = {\n context,\n viewContext: this.viewContext\n };\n const embeddedViewRef = this.viewContainerRef.createEmbeddedView<BaseEmbeddedView<T>>(\n this.viewType as TemplateRef<BaseEmbeddedView<T, AngularEditor>>,\n this.embeddedViewContext\n );\n firstRootNode.replaceWith(...embeddedViewRef.rootNodes.filter(rootNode => isDOMElement(rootNode)));\n this.destroyView();\n this.embeddedViewRef = embeddedViewRef;\n }\n if (isComponentType(this.viewType)) {\n const componentRef = this.viewContainerRef.createComponent(this.viewType) as ComponentRef<any>;\n componentRef.instance.viewContext = this.viewContext;\n componentRef.instance.context = context;\n firstRootNode.replaceWith(componentRef.instance.nativeElement);\n this.destroyView();\n this.componentRef = componentRef;\n }\n }\n }\n\n appendBlockCardElement() {\n if (this.blockCardComponentRef) {\n this.blockCardComponentRef.instance.append();\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { BaseComponent } from '../../view/base';\nimport { SlateStringContext } from '../../view/context';\nimport { BeforeContextChange } from '../../view/context-change';\nimport { DOMElement } from 'slate-dom';\n\n@Component({\n selector: 'span[slateDefaultString]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateDefaultString extends BaseComponent<SlateStringContext> implements OnInit, BeforeContextChange<SlateStringContext> {\n textNode?: Text;\n brNode?: DOMElement;\n\n beforeContextChange(value: SlateStringContext) {\n if (this.context) {\n if (this.context.type === 'lineBreakEmptyString') {\n if (value.type === 'string') {\n this.removeLineBreakEmptyStringDOM();\n } else {\n this.textNode?.remove();\n this.brNode?.remove();\n }\n }\n if (this.context.type === 'string') {\n if (value.type === 'lineBreakEmptyString') {\n this.removeStringDOM();\n }\n }\n }\n }\n\n onContextChange() {\n if (this.context.type === 'string') {\n this.createStringDOM();\n } else if (this.context.type === 'lineBreakEmptyString') {\n this.createLineBreakEmptyStringDOM();\n }\n }\n\n createLineBreakEmptyStringDOM() {\n this.nativeElement.setAttribute('data-slate-zero-width', 'n');\n this.nativeElement.setAttribute('data-slate-length', `${this.context.elementStringLength}`);\n this.textNode = document.createTextNode(`\\uFEFF`);\n this.brNode = document.createElement('br');\n this.nativeElement.append(this.textNode, this.brNode);\n }\n\n removeLineBreakEmptyStringDOM() {\n this.brNode?.remove();\n // remove zero width character\n const zeroWidthCharacterIndex = this.textNode?.textContent.indexOf(`\\uFEFF`);\n this.textNode?.deleteData(zeroWidthCharacterIndex, 1);\n this.nativeElement.removeAttribute('data-slate-zero-width');\n this.nativeElement.removeAttribute('data-slate-length');\n }\n\n createStringDOM() {\n this.nativeElement.setAttribute('data-slate-string', 'true');\n this.updateStringDOM();\n }\n\n updateStringDOM() {\n // Avoid breaking some browser default behaviors, such as spellCheck, android composition input state\n if (this.nativeElement.textContent !== this.context.text) {\n this.nativeElement.textContent = this.context.text;\n }\n }\n\n removeStringDOM() {\n this.nativeElement.removeAttribute('data-slate-string');\n this.nativeElement.textContent = '';\n }\n\n ngOnInit(): void {\n this.nativeElement.setAttribute('editable-text', '');\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n Input,\n OnChanges,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { Node, Text } from 'slate';\nimport { ViewContainerItem } from '../../view/container-item';\nimport { SlateLeafContext, SlateStringContext } from '../../view/context';\nimport { SlateDefaultString } from './default-string.component';\n\n@Component({\n selector: 'span[slateString]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateString extends ViewContainerItem<SlateStringContext> implements OnInit, OnChanges, AfterViewInit {\n @Input() context: SlateLeafContext;\n\n protected elementRef = inject<any>(ElementRef);\n\n protected viewContainerRef = inject(ViewContainerRef);\n\n ngOnInit(): void {\n this.createView();\n }\n\n ngOnChanges() {\n if (!this.initialized) {\n return;\n }\n this.updateView();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.remove();\n }\n\n // COMPAT: If this is the last text node in an empty block, render a zero-\n // width space that will convert into a line break when copying and pasting\n // to support expected plain text.\n isLineBreakEmptyString() {\n return (\n this.context.leaf.text === '' &&\n this.context.parent.children[this.context.parent.children.length - 1] === this.context.text &&\n !this.viewContext.editor.isInline(this.context.parent) &&\n // [list-render] performance optimization: reduce the number of calls to the `Editor.string(editor, path)` method\n isEmpty(this.viewContext.editor, this.context.parent)\n );\n }\n\n // COMPAT: If the text is empty, it's because it's on the edge of an inline\n // node, so we render a zero-width space so that the selection can be\n // inserted next to it still.\n isEmptyText() {\n return this.context.leaf.text === '';\n }\n\n // COMPAT: Browsers will collapse trailing new lines at the end of blocks,\n // so we need to add an extra trailing new lines to prevent that.\n isCompatibleString() {\n return this.context.isLast && this.context.leaf.text.slice(-1) === '\\n';\n }\n\n // COMPAT: Render text inside void nodes with a zero-width space.\n // So the node can contain selection but the text is not visible.\n isVoid() {\n return this.viewContext.editor.isVoid(this.context.parent);\n }\n\n getViewType() {\n if (this.isVoid()) {\n return this.viewContext.templateComponent.voidStringTemplate;\n }\n\n if (this.isLineBreakEmptyString()) {\n return SlateDefaultString;\n }\n\n if (this.isEmptyText()) {\n return this.viewContext.templateComponent.emptyTextTemplate;\n }\n\n if (this.isCompatibleString()) {\n return this.viewContext.templateComponent.compatibleStringTemplate;\n }\n\n return SlateDefaultString;\n }\n\n getType(): SlateStringContext['type'] {\n if (this.isLineBreakEmptyString()) {\n return 'lineBreakEmptyString';\n }\n return 'string';\n }\n\n getContext(): SlateStringContext {\n const stringType = this.getType();\n return {\n text: this.context.leaf.text,\n elementStringLength: Node.string(this.context.parent).length,\n type: stringType\n };\n }\n\n memoizedContext(prev: SlateStringContext, next: SlateStringContext): boolean {\n return false;\n }\n}\n\n/**\n * TODO: remove when bump slate\n * copy from slate\n * @param editor\n * @param element\n * @returns\n */\nexport const isEmpty = (editor, element) => {\n const { children } = element;\n const [first] = children;\n return children.length === 0 || (children.length === 1 && Text.isText(first) && first.text === '' && !editor.isVoid(element));\n};\n","import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core';\nimport { BaseLeafComponent } from '../../view/base';\nimport { SlateString } from '../string/string.component';\n\n@Component({\n selector: 'span[slateDefaultLeaf]',\n template: `<span slateString [context]=\"context\" [viewContext]=\"viewContext\"><span></span></span>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-leaf': 'true'\n },\n imports: [SlateString]\n})\nexport class SlateDefaultLeaf extends BaseLeafComponent implements OnDestroy {\n onContextChange(): void {\n super.onContextChange();\n this.renderPlaceholder();\n }\n ngOnDestroy(): void {\n // Because the placeholder span is not in the current component, it is destroyed along with the current component\n this.destroyPlaceholder();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseLeafComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_LEAF_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseLeafComponent>>('slate-default-leaf-token');\n","import {\n Component,\n OnInit,\n Input,\n ViewChild,\n HostBinding,\n Renderer2,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n ChangeDetectorRef,\n NgZone,\n Injector,\n forwardRef,\n OnChanges,\n SimpleChanges,\n AfterViewChecked,\n DoCheck,\n Inject,\n inject,\n ViewContainerRef\n} from '@angular/core';\nimport { Text as SlateText, Element, Transforms, Editor, Range, Path, NodeEntry, Node } from 'slate';\nimport { direction } from 'direction';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { AngularEditor } from '../../plugins/angular-editor';\nimport {\n DOMElement,\n isDOMNode,\n DOMStaticRange,\n DOMRange,\n isDOMElement,\n isPlainTextOnlyPaste,\n DOMSelection,\n getDefaultView,\n EDITOR_TO_WINDOW,\n EDITOR_TO_ELEMENT,\n NODE_TO_ELEMENT,\n ELEMENT_TO_NODE,\n IS_FOCUSED,\n IS_READ_ONLY\n} from 'slate-dom';\nimport { Subject } from 'rxjs';\nimport { IS_FIREFOX, IS_SAFARI, IS_CHROME, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID } from '../../utils/environment';\nimport Hotkeys from '../../utils/hotkeys';\nimport { BeforeInputEvent, extractBeforeInputEvent } from '../../custom-event/BeforeInputEventPlugin';\nimport { BEFORE_INPUT_EVENTS } from '../../custom-event/before-input-polyfill';\nimport { SlateErrorCode } from '../../types/error';\nimport { SlateStringTemplate } from '../string/template.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { SlateChildrenContext, SlateViewContext } from '../../view/context';\nimport { ComponentType, ViewType } from '../../types/view';\nimport { HistoryEditor } from 'slate-history';\nimport { isDecoratorRangeListEqual } from '../../utils';\nimport { SlatePlaceholder } from '../../types/feature';\nimport { restoreDom } from '../../utils/restore-dom';\nimport { SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN } from '../element/default-element.component.token';\nimport { SLATE_DEFAULT_TEXT_COMPONENT_TOKEN, SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN } from '../text/token';\nimport { SlateVoidText } from '../text/void-text.component';\nimport { SlateDefaultText } from '../text/default-text.component';\nimport { SlateDefaultElement } from '../element/default-element.component';\nimport { SlateDefaultLeaf } from '../leaf/default-leaf.component';\nimport { SLATE_DEFAULT_LEAF_COMPONENT_TOKEN } from '../leaf/token';\nimport { BaseElementComponent, BaseLeafComponent, BaseTextComponent } from '../../view/base';\nimport { ListRender } from '../../view/render/list-render';\nimport { TRIPLE_CLICK, EDITOR_TO_ON_CHANGE } from 'slate-dom';\n\n// not correctly clipboardData on beforeinput\nconst forceOnDOMPaste = IS_SAFARI;\n\n@Component({\n selector: 'slate-editable',\n host: {\n class: 'slate-editable-container',\n '[attr.contenteditable]': 'readonly ? undefined : true',\n '[attr.role]': `readonly ? undefined : 'textbox'`,\n '[attr.spellCheck]': `!hasBeforeInputSupport ? false : spellCheck`,\n '[attr.autoCorrect]': `!hasBeforeInputSupport ? 'false' : autoCorrect`,\n '[attr.autoCapitalize]': `!hasBeforeInputSupport ? 'false' : autoCapitalize`\n },\n templateUrl: 'editable.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SlateEditable),\n multi: true\n },\n {\n provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,\n useValue: SlateDefaultElement\n },\n {\n provide: SLATE_DEFAULT_TEXT_COMPONENT_TOKEN,\n useValue: SlateDefaultText\n },\n {\n provide: SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN,\n useValue: SlateVoidText\n },\n {\n provide: SLATE_DEFAULT_LEAF_COMPONENT_TOKEN,\n useValue: SlateDefaultLeaf\n }\n ],\n imports: [SlateStringTemplate]\n})\nexport class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck {\n viewContext: SlateViewContext;\n context: SlateChildrenContext;\n\n private destroy$ = new Subject();\n\n isComposing = false;\n isDraggingInternally = false;\n isUpdatingSelection = false;\n latestElement = null as DOMElement | null;\n\n protected manualListeners: (() => void)[] = [];\n\n private initialized: boolean;\n\n private onTouchedCallback: () => void = () => {};\n\n private onChangeCallback: (_: any) => void = () => {};\n\n @Input() editor: AngularEditor;\n\n @Input() renderElement: (element: Element) => ViewType | null;\n\n @Input() renderLeaf: (text: SlateText) => ViewType | null;\n\n @Input() renderText: (text: SlateText) => ViewType | null;\n\n @Input() decorate: (entry: NodeEntry) => Range[] = () => [];\n\n @Input() placeholderDecorate: (editor: Editor) => SlatePlaceholder[];\n\n @Input() scrollSelectionIntoView: (editor: AngularEditor, domRange: DOMRange) => void = defaultScrollSelectionIntoView;\n\n @Input() isStrictDecorate: boolean = true;\n\n @Input() trackBy: (node: Element) => any = () => null;\n\n @Input() readonly = false;\n\n @Input() placeholder: string;\n\n //#region input event handler\n @Input() beforeInput: (event: Event) => void;\n @Input() blur: (event: Event) => void;\n @Input() click: (event: MouseEvent) => void;\n @Input() compositionEnd: (event: CompositionEvent) => void;\n @Input() compositionUpdate: (event: CompositionEvent) => void;\n @Input() compositionStart: (event: CompositionEvent) => void;\n @Input() copy: (event: ClipboardEvent) => void;\n @Input() cut: (event: ClipboardEvent) => void;\n @Input() dragOver: (event: DragEvent) => void;\n @Input() dragStart: (event: DragEvent) => void;\n @Input() dragEnd: (event: DragEvent) => void;\n @Input() drop: (event: DragEvent) => void;\n @Input() focus: (event: Event) => void;\n @Input() keydown: (event: KeyboardEvent) => void;\n @Input() paste: (event: ClipboardEvent) => void;\n //#endregion\n\n //#region DOM attr\n @Input() spellCheck = false;\n @Input() autoCorrect = false;\n @Input() autoCapitalize = false;\n\n @HostBinding('attr.data-slate-editor') dataSlateEditor = true;\n @HostBinding('attr.data-slate-node') dataSlateNode = 'value';\n @HostBinding('attr.data-gramm') dataGramm = false;\n\n get hasBeforeInputSupport() {\n return HAS_BEFORE_INPUT_SUPPORT;\n }\n //#endregion\n\n @ViewChild('templateComponent', { static: true })\n templateComponent: SlateStringTemplate;\n\n @ViewChild('templateComponent', { static: true, read: ElementRef })\n templateElementRef: ElementRef<any>;\n\n viewContainerRef = inject(ViewContainerRef);\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n listRender: ListRender;\n\n constructor(\n public elementRef: ElementRef,\n public renderer2: Renderer2,\n public cdr: ChangeDetectorRef,\n private ngZone: NgZone,\n private injector: Injector,\n @Inject(SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN)\n public defaultElement: ComponentType<BaseElementComponent>,\n @Inject(SLATE_DEFAULT_TEXT_COMPONENT_TOKEN)\n public defaultText: ComponentType<BaseTextComponent>,\n @Inject(SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN)\n public defaultVoidText: ComponentType<BaseTextComponent>,\n @Inject(SLATE_DEFAULT_LEAF_COMPONENT_TOKEN)\n public defaultLeaf: ComponentType<BaseLeafComponent>\n ) {}\n\n ngOnInit() {\n this.editor.injector = this.injector;\n this.editor.children = [];\n let window = getDefaultView(this.elementRef.nativeElement);\n EDITOR_TO_WINDOW.set(this.editor, window);\n EDITOR_TO_ELEMENT.set(this.editor, this.elementRef.nativeElement);\n NODE_TO_ELEMENT.set(this.editor, this.elementRef.nativeElement);\n ELEMENT_TO_NODE.set(this.elementRef.nativeElement, this.editor);\n IS_READ_ONLY.set(this.editor, this.readonly);\n EDITOR_TO_ON_CHANGE.set(this.editor, () => {\n this.ngZone.run(() => {\n this.onChange();\n });\n });\n this.ngZone.runOutsideAngular(() => {\n this.initialize();\n });\n this.initializeViewContext();\n this.initializeContext();\n\n // remove unused DOM, just keep templateComponent instance\n this.templateElementRef.nativeElement.remove();\n\n // add browser class\n let browserClass = IS_FIREFOX ? 'firefox' : IS_SAFARI ? 'safari' : '';\n browserClass && this.elementRef.nativeElement.classList.add(browserClass);\n this.listRender = new ListRender(this.viewContext, this.viewContainerRef, this.getOutletParent, () => null);\n }\n\n ngOnChanges(simpleChanges: SimpleChanges) {\n if (!this.initialized) {\n return;\n }\n const decorateChange = simpleChanges['decorate'];\n if (decorateChange) {\n this.forceRender();\n }\n const placeholderChange = simpleChanges['placeholder'];\n if (placeholderChange) {\n this.render();\n }\n const readonlyChange = simpleChanges['readonly'];\n if (readonlyChange) {\n IS_READ_ONLY.set(this.editor, this.readonly);\n this.render();\n this.toSlateSelection();\n }\n }\n\n registerOnChange(fn: any) {\n this.onChangeCallback = fn;\n }\n registerOnTouched(fn: any) {\n this.onTouchedCallback = fn;\n }\n\n writeValue(value: Element[]) {\n if (value && value.length) {\n this.editor.children = value;\n this.initializeContext();\n if (!this.listRender.initialized) {\n this.listRender.initialize(this.editor.children, this.editor, this.context);\n } else {\n this.listRender.update(this.editor.children, this.editor, this.context);\n }\n this.cdr.markForCheck();\n }\n }\n\n initialize() {\n this.initialized = true;\n const window = AngularEditor.getWindow(this.editor);\n this.addEventListener(\n 'selectionchange',\n event => {\n this.toSlateSelection();\n },\n window.document\n );\n if (HAS_BEFORE_INPUT_SUPPORT) {\n this.addEventListener('beforeinput', this.onDOMBeforeInput.bind(this));\n }\n this.addEventListener('blur', this.onDOMBlur.bind(this));\n this.addEventListener('click', this.onDOMClick.bind(this));\n this.addEventListener('compositionend', this.onDOMCompositionEnd.bind(this));\n this.addEventListener('compositionupdate', this.onDOMCompositionUpdate.bind(this));\n this.addEventListener('compositionstart', this.onDOMCompositionStart.bind(this));\n this.addEventListener('copy', this.onDOMCopy.bind(this));\n this.addEventListener('cut', this.onDOMCut.bind(this));\n this.addEventListener('dragover', this.onDOMDragOver.bind(this));\n this.addEventListener('dragstart', this.onDOMDragStart.bind(this));\n this.addEventListener('dragend', this.onDOMDragEnd.bind(this));\n this.addEventListener('drop', this.onDOMDrop.bind(this));\n this.addEventListener('focus', this.onDOMFocus.bind(this));\n this.addEventListener('keydown', this.onDOMKeydown.bind(this));\n this.addEventListener('paste', this.onDOMPaste.bind(this));\n BEFORE_INPUT_EVENTS.forEach(event => {\n this.addEventListener(event.name, () => {});\n });\n }\n\n toNativeSelection() {\n try {\n const { selection } = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const domSelection = (root as Document).getSelection();\n\n if ((this.isComposing && !IS_ANDROID) || !domSelection || !AngularEditor.isFocused(this.editor)) {\n return;\n }\n\n const hasDomSelection = domSelection.type !== 'None';\n\n // If the DOM selection is properly unset, we're done.\n if (!selection && !hasDomSelection) {\n return;\n }\n\n // If the DOM selection is already correct, we're done.\n // verify that the dom selection is in the editor\n const editorElement = EDITOR_TO_ELEMENT.get(this.editor)!;\n let hasDomSelectionInEditor = false;\n if (editorElement.contains(domSelection.anchorNode) && editorElement.contains(domSelection.focusNode)) {\n hasDomSelectionInEditor = true;\n }\n\n // If the DOM selection is in the editor and the editor selection is already correct, we're done.\n if (hasDomSelection && hasDomSelectionInEditor && selection && hasStringTarget(domSelection)) {\n const rangeFromDOMSelection = AngularEditor.toSlateRange(this.editor, domSelection, {\n exactMatch: false,\n suppressThrow: true\n });\n if (rangeFromDOMSelection && Range.equals(rangeFromDOMSelection, selection)) {\n return;\n }\n }\n\n // prevent updating native selection when active element is void element\n if (isTargetInsideVoid(this.editor, activeElement)) {\n return;\n }\n\n // when <Editable/> is being controlled through external value\n // then its children might just change - DOM responds to it on its own\n // but Slate's value is not being updated through any operation\n // and thus it doesn't transform selection on its own\n if (selection && !AngularEditor.hasRange(this.editor, selection)) {\n this.editor.selection = AngularEditor.toSlateRange(this.editor, domSelection, { exactMatch: false, suppressThrow: false });\n return;\n }\n\n // Otherwise the DOM selection is out of sync, so update it.\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n this.isUpdatingSelection = true;\n\n const newDomRange = selection && AngularEditor.toDOMRange(this.editor, selection);\n\n if (newDomRange) {\n // COMPAT: Since the DOM range has no concept of backwards/forwards\n // we need to check and do the right thing here.\n if (Range.isBackward(selection)) {\n // eslint-disable-next-line max-len\n domSelection.setBaseAndExtent(\n newDomRange.endContainer,\n newDomRange.endOffset,\n newDomRange.startContainer,\n newDomRange.startOffset\n );\n } else {\n // eslint-disable-next-line max-len\n domSelection.setBaseAndExtent(\n newDomRange.startContainer,\n newDomRange.startOffset,\n newDomRange.endContainer,\n newDomRange.endOffset\n );\n }\n } else {\n domSelection.removeAllRanges();\n }\n\n setTimeout(() => {\n // handle scrolling in setTimeout because of\n // dom should not have updated immediately after listRender's updating\n newDomRange && this.scrollSelectionIntoView(this.editor, newDomRange);\n // COMPAT: In Firefox, it's not enough to create a range, you also need\n // to focus the contenteditable element too. (2016/11/16)\n if (newDomRange && IS_FIREFOX) {\n el.focus();\n }\n\n this.isUpdatingSelection = false;\n });\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToNativeSelectionError,\n nativeError: error\n });\n this.isUpdatingSelection = false;\n }\n }\n\n onChange() {\n this.forceRender();\n this.onChangeCallback(this.editor.children);\n }\n\n ngAfterViewChecked() {}\n\n ngDoCheck() {}\n\n forceRender() {\n this.updateContext();\n this.listRender.update(this.editor.children, this.editor, this.context);\n // repair collaborative editing when Chinese input is interrupted by other users' cursors\n // when the DOMElement where the selection is located is removed\n // the compositionupdate and compositionend events will no longer be fired\n // so isComposing needs to be corrected\n // need exec after this.cdr.detectChanges() to render HTML\n // need exec before this.toNativeSelection() to correct native selection\n if (this.isComposing) {\n // Composition input text be not rendered when user composition input with selection is expanded\n // At this time, the following matching conditions are met, assign isComposing to false, and the status is wrong\n // this time condition is true and isComposiing is assigned false\n // Therefore, need to wait for the composition input text to be rendered before performing condition matching\n setTimeout(() => {\n const textNode = Node.get(this.editor, this.editor.selection.anchor.path);\n const textDOMNode = AngularEditor.toDOMNode(this.editor, textNode);\n let textContent = '';\n // skip decorate text\n textDOMNode.querySelectorAll('[editable-text]').forEach(stringDOMNode => {\n let text = stringDOMNode.textContent;\n const zeroChar = '\\uFEFF';\n // remove zero with char\n if (text.startsWith(zeroChar)) {\n text = text.slice(1);\n }\n if (text.endsWith(zeroChar)) {\n text = text.slice(0, text.length - 1);\n }\n textContent += text;\n });\n if (Node.string(textNode).endsWith(textContent)) {\n this.isComposing = false;\n }\n }, 0);\n }\n this.toNativeSelection();\n }\n\n render() {\n const changed = this.updateContext();\n if (changed) {\n this.listRender.update(this.editor.children, this.editor, this.context);\n }\n }\n\n updateContext() {\n const decorations = this.generateDecorations();\n if (\n this.context.selection !== this.editor.selection ||\n this.context.decorate !== this.decorate ||\n this.context.readonly !== this.readonly ||\n !isDecoratorRangeListEqual(this.context.decorations, decorations)\n ) {\n this.context = {\n parent: this.editor,\n selection: this.editor.selection,\n decorations: decorations,\n decorate: this.decorate,\n readonly: this.readonly\n };\n return true;\n }\n return false;\n }\n\n initializeContext() {\n this.context = {\n parent: this.editor,\n selection: this.editor.selection,\n decorations: this.generateDecorations(),\n decorate: this.decorate,\n readonly: this.readonly\n };\n }\n\n initializeViewContext() {\n this.viewContext = {\n editor: this.editor,\n renderElement: this.renderElement,\n renderLeaf: this.renderLeaf,\n renderText: this.renderText,\n trackBy: this.trackBy,\n isStrictDecorate: this.isStrictDecorate,\n templateComponent: this.templateComponent,\n defaultElement: this.defaultElement,\n defaultText: this.defaultText,\n defaultVoidText: this.defaultVoidText,\n defaultLeaf: this.defaultLeaf\n };\n }\n\n composePlaceholderDecorate(editor: Editor) {\n if (this.placeholderDecorate) {\n return this.placeholderDecorate(editor) || [];\n }\n\n if (this.placeholder && editor.children.length === 1 && Array.from(Node.texts(editor)).length === 1 && Node.string(editor) === '') {\n const start = Editor.start(editor, []);\n return [\n {\n placeholder: this.placeholder,\n anchor: start,\n focus: start\n }\n ];\n } else {\n return [];\n }\n }\n\n generateDecorations() {\n const decorations = this.decorate([this.editor, []]);\n const placeholderDecorations = this.isComposing ? [] : this.composePlaceholderDecorate(this.editor);\n decorations.push(...placeholderDecorations);\n return decorations;\n }\n\n //#region event proxy\n private addEventListener(eventName: string, listener: EventListener, target: HTMLElement | Document = this.elementRef.nativeElement) {\n this.manualListeners.push(\n this.renderer2.listen(target, eventName, (event: Event) => {\n const beforeInputEvent = extractBeforeInputEvent(event.type, null, event, event.target);\n if (beforeInputEvent) {\n this.onFallbackBeforeInput(beforeInputEvent);\n }\n listener(event);\n })\n );\n }\n\n private toSlateSelection() {\n if ((!this.isComposing || IS_ANDROID) && !this.isUpdatingSelection && !this.isDraggingInternally) {\n try {\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n const domSelection = (root as Document).getSelection();\n\n if (activeElement === el) {\n this.latestElement = activeElement;\n IS_FOCUSED.set(this.editor, true);\n } else {\n IS_FOCUSED.delete(this.editor);\n }\n\n if (!domSelection) {\n return Transforms.deselect(this.editor);\n }\n\n const editorElement = EDITOR_TO_ELEMENT.get(this.editor);\n const hasDomSelectionInEditor =\n editorElement.contains(domSelection.anchorNode) && editorElement.contains(domSelection.focusNode);\n if (!hasDomSelectionInEditor) {\n Transforms.deselect(this.editor);\n return;\n }\n\n // try to get the selection directly, because some terrible case can be normalize for normalizeDOMPoint\n // for example, double-click the last cell of the table to select a non-editable DOM\n const range = AngularEditor.toSlateRange(this.editor, domSelection, { exactMatch: false, suppressThrow: true });\n if (range) {\n if (this.editor.selection && Range.equals(range, this.editor.selection) && !hasStringTarget(domSelection)) {\n if (!isTargetInsideVoid(this.editor, activeElement)) {\n // force adjust DOMSelection\n this.toNativeSelection();\n }\n } else {\n Transforms.select(this.editor, range);\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToSlateSelectionError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMBeforeInput(\n event: Event & {\n inputType: string;\n isComposing: boolean;\n data: string | null;\n dataTransfer: DataTransfer | null;\n getTargetRanges(): DOMStaticRange[];\n }\n ) {\n const editor = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const { selection } = editor;\n const { inputType: type } = event;\n const data = event.dataTransfer || event.data || undefined;\n if (IS_ANDROID) {\n let targetRange: Range | null = null;\n let [nativeTargetRange] = event.getTargetRanges();\n if (nativeTargetRange) {\n targetRange = AngularEditor.toSlateRange(editor, nativeTargetRange, { exactMatch: false, suppressThrow: false });\n }\n // COMPAT: SelectionChange event is fired after the action is performed, so we\n // have to manually get the selection here to ensure it's up-to-date.\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n if (!targetRange && domSelection) {\n targetRange = AngularEditor.toSlateRange(editor, domSelection, { exactMatch: false, suppressThrow: false });\n }\n targetRange = targetRange ?? editor.selection;\n if (type === 'insertCompositionText') {\n if (data && data.toString().includes('\\n')) {\n restoreDom(editor, () => {\n Editor.insertBreak(editor);\n });\n } else {\n if (targetRange) {\n if (data) {\n restoreDom(editor, () => {\n Transforms.insertText(editor, data.toString(), { at: targetRange });\n });\n } else {\n restoreDom(editor, () => {\n Transforms.delete(editor, { at: targetRange });\n });\n }\n }\n }\n return;\n }\n if (type === 'deleteContentBackward') {\n // gboard can not prevent default action, so must use restoreDom,\n // sougou Keyboard can prevent default action(only in Chinese input mode).\n // In order to avoid weird action in Sougou Keyboard, use resotreDom only range's isCollapsed is false (recognize gboard)\n if (!Range.isCollapsed(targetRange)) {\n restoreDom(editor, () => {\n Transforms.delete(editor, { at: targetRange });\n });\n return;\n }\n }\n if (type === 'insertText') {\n restoreDom(editor, () => {\n if (typeof data === 'string') {\n Editor.insertText(editor, data);\n }\n });\n return;\n }\n }\n if (\n !this.readonly &&\n AngularEditor.hasEditableTarget(editor, event.target) &&\n !isTargetInsideVoid(editor, activeElement) &&\n !this.isDOMEventHandled(event, this.beforeInput)\n ) {\n try {\n event.preventDefault();\n\n // COMPAT: If the selection is expanded, even if the command seems like\n // a delete forward/backward command it should delete the selection.\n if (selection && Range.isExpanded(selection) && type.startsWith('delete')) {\n const direction = type.endsWith('Backward') ? 'backward' : 'forward';\n Editor.deleteFragment(editor, { direction });\n return;\n }\n\n switch (type) {\n case 'deleteByComposition':\n case 'deleteByCut':\n case 'deleteByDrag': {\n Editor.deleteFragment(editor);\n break;\n }\n\n case 'deleteContent':\n case 'deleteContentForward': {\n Editor.deleteForward(editor);\n break;\n }\n\n case 'deleteContentBackward': {\n Editor.deleteBackward(editor);\n break;\n }\n\n case 'deleteEntireSoftLine': {\n Editor.deleteBackward(editor, { unit: 'line' });\n Editor.deleteForward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteHardLineBackward': {\n Editor.deleteBackward(editor, { unit: 'block' });\n break;\n }\n\n case 'deleteSoftLineBackward': {\n Editor.deleteBackward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteHardLineForward': {\n Editor.deleteForward(editor, { unit: 'block' });\n break;\n }\n\n case 'deleteSoftLineForward': {\n Editor.deleteForward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteWordBackward': {\n Editor.deleteBackward(editor, { unit: 'word' });\n break;\n }\n\n case 'deleteWordForward': {\n Editor.deleteForward(editor, { unit: 'word' });\n break;\n }\n\n case 'insertLineBreak':\n case 'insertParagraph': {\n Editor.insertBreak(editor);\n break;\n }\n\n case 'insertFromComposition': {\n // COMPAT: in safari, `compositionend` event is dispatched after\n // the beforeinput event with the inputType \"insertFromComposition\" has been dispatched.\n // https://www.w3.org/TR/input-events-2/\n // so the following code is the right logic\n // because DOM selection in sync will be exec before `compositionend` event\n // isComposing is true will prevent DOM selection being update correctly.\n this.isComposing = false;\n preventInsertFromComposition(event, this.editor);\n }\n case 'insertFromDrop':\n case 'insertFromPaste':\n case 'insertFromYank':\n case 'insertReplacementText':\n case 'insertText': {\n // use a weak comparison instead of 'instanceof' to allow\n // programmatic access of paste events coming from external windows\n // like cypress where cy.window does not work realibly\n if (data?.constructor.name === 'DataTransfer') {\n AngularEditor.insertData(editor, data as DataTransfer);\n } else if (typeof data === 'string') {\n Editor.insertText(editor, data);\n }\n break;\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.OnDOMBeforeInputError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMBlur(event: FocusEvent) {\n if (\n this.readonly ||\n this.isUpdatingSelection ||\n !AngularEditor.hasEditableTarget(this.editor, event.target) ||\n this.isDOMEventHandled(event, this.blur)\n ) {\n return;\n }\n\n const window = AngularEditor.getWindow(this.editor);\n\n // COMPAT: If the current `activeElement` is still the previous\n // one, this is due to the window being blurred when the tab\n // itself becomes unfocused, so we want to abort early to allow to\n // editor to stay focused when the tab becomes focused again.\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n if (this.latestElement === root.activeElement) {\n return;\n }\n\n const { relatedTarget } = event;\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n\n // COMPAT: The event should be ignored if the focus is returning\n // to the editor from an embedded editable element (eg. an <input>\n // element inside a void node).\n if (relatedTarget === el) {\n return;\n }\n\n // COMPAT: The event should be ignored if the focus is moving from\n // the editor to inside a void node's spacer element.\n if (isDOMElement(relatedTarget) && relatedTarget.hasAttribute('data-slate-spacer')) {\n return;\n }\n\n // COMPAT: The event should be ignored if the focus is moving to a\n // non- editable section of an element that isn't a void node (eg.\n // a list item of the check list example).\n if (relatedTarget != null && isDOMNode(relatedTarget) && AngularEditor.hasDOMNode(this.editor, relatedTarget)) {\n const node = AngularEditor.toSlateNode(this.editor, relatedTarget);\n\n if (Element.isElement(node) && !this.editor.isVoid(node)) {\n return;\n }\n }\n\n IS_FOCUSED.delete(this.editor);\n }\n\n private onDOMClick(event: MouseEvent) {\n if (\n !this.readonly &&\n AngularEditor.hasTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.click) &&\n isDOMNode(event.target)\n ) {\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n const path = AngularEditor.findPath(this.editor, node);\n const start = Editor.start(this.editor, path);\n const end = Editor.end(this.editor, path);\n\n const startVoid = Editor.void(this.editor, { at: start });\n const endVoid = Editor.void(this.editor, { at: end });\n\n if (event.detail === TRIPLE_CLICK && path.length >= 1) {\n let blockPath = path;\n if (!(Element.isElement(node) && Editor.isBlock(this.editor, node))) {\n const block = Editor.above(this.editor, {\n match: n => Element.isElement(n) && Editor.isBlock(this.editor, n),\n at: path\n });\n\n blockPath = block?.[1] ?? path.slice(0, 1);\n }\n\n const range = Editor.range(this.editor, blockPath);\n Transforms.select(this.editor, range);\n return;\n }\n\n if (\n startVoid &&\n endVoid &&\n Path.equals(startVoid[1], endVoid[1]) &&\n !(AngularEditor.isBlockCardLeftCursor(this.editor) || AngularEditor.isBlockCardRightCursor(this.editor))\n ) {\n const range = Editor.range(this.editor, start);\n Transforms.select(this.editor, range);\n }\n }\n }\n\n private onDOMCompositionStart(event: CompositionEvent) {\n const { selection } = this.editor;\n if (selection) {\n // solve the problem of cross node Chinese input\n if (Range.isExpanded(selection)) {\n Editor.deleteFragment(this.editor);\n this.forceRender();\n }\n }\n if (AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.compositionStart)) {\n this.isComposing = true;\n }\n this.render();\n }\n\n private onDOMCompositionUpdate(event: CompositionEvent) {\n this.isDOMEventHandled(event, this.compositionUpdate);\n }\n\n private onDOMCompositionEnd(event: CompositionEvent) {\n if (!event.data && !Range.isCollapsed(this.editor.selection)) {\n Transforms.delete(this.editor);\n }\n if (AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.compositionEnd)) {\n // COMPAT: In Chrome/Firefox, `beforeinput` events for compositions\n // aren't correct and never fire the \"insertFromComposition\"\n // type that we need. So instead, insert whenever a composition\n // ends since it will already have been committed to the DOM.\n if (this.isComposing === true && !IS_SAFARI && !IS_ANDROID && event.data) {\n preventInsertFromComposition(event, this.editor);\n Editor.insertText(this.editor, event.data);\n }\n\n // COMPAT: In Firefox 87.0 CompositionEnd fire twice\n // so we need avoid repeat isnertText by isComposing === true,\n this.isComposing = false;\n }\n this.render();\n }\n\n private onDOMCopy(event: ClipboardEvent) {\n const window = AngularEditor.getWindow(this.editor);\n const isOutsideSlate = !hasStringTarget(window.getSelection()) && isTargetInsideVoid(this.editor, event.target);\n if (!isOutsideSlate && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.copy)) {\n event.preventDefault();\n AngularEditor.setFragmentData(this.editor, event.clipboardData, 'copy');\n }\n }\n\n private onDOMCut(event: ClipboardEvent) {\n if (!this.readonly && AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.cut)) {\n event.preventDefault();\n AngularEditor.setFragmentData(this.editor, event.clipboardData, 'cut');\n const { selection } = this.editor;\n\n if (selection) {\n AngularEditor.deleteCutData(this.editor);\n }\n }\n }\n\n private onDOMDragOver(event: DragEvent) {\n if (AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragOver)) {\n // Only when the target is void, call `preventDefault` to signal\n // that drops are allowed. Editable content is droppable by\n // default, and calling `preventDefault` hides the cursor.\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n\n if (Element.isElement(node) && Editor.isVoid(this.editor, node)) {\n event.preventDefault();\n }\n }\n }\n\n private onDOMDragStart(event: DragEvent) {\n if (!this.readonly && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragStart)) {\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n const path = AngularEditor.findPath(this.editor, node);\n const voidMatch =\n Element.isElement(node) && (Editor.isVoid(this.editor, node) || Editor.void(this.editor, { at: path, voids: true }));\n\n // If starting a drag on a void node, make sure it is selected\n // so that it shows up in the selection's fragment.\n if (voidMatch) {\n const range = Editor.range(this.editor, path);\n Transforms.select(this.editor, range);\n }\n\n this.isDraggingInternally = true;\n\n AngularEditor.setFragmentData(this.editor, event.dataTransfer, 'drag');\n }\n }\n\n private onDOMDrop(event: DragEvent) {\n const editor = this.editor;\n if (!this.readonly && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.drop)) {\n event.preventDefault();\n // Keep a reference to the dragged range before updating selection\n const draggedRange = editor.selection;\n\n // Find the range where the drop happened\n const range = AngularEditor.findEventRange(editor, event);\n const data = event.dataTransfer;\n\n Transforms.select(editor, range);\n\n if (this.isDraggingInternally) {\n if (draggedRange) {\n Transforms.delete(editor, {\n at: draggedRange\n });\n }\n\n this.isDraggingInternally = false;\n }\n\n AngularEditor.insertData(editor, data);\n\n // When dragging from another source into the editor, it's possible\n // that the current editor does not have focus.\n if (!AngularEditor.isFocused(editor)) {\n AngularEditor.focus(editor);\n }\n }\n }\n\n private onDOMDragEnd(event: DragEvent) {\n if (\n !this.readonly &&\n this.isDraggingInternally &&\n AngularEditor.hasTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.dragEnd)\n ) {\n this.isDraggingInternally = false;\n }\n }\n\n private onDOMFocus(event: Event) {\n if (\n !this.readonly &&\n !this.isUpdatingSelection &&\n AngularEditor.hasEditableTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.focus)\n ) {\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n this.latestElement = root.activeElement;\n\n // COMPAT: If the editor has nested editable elements, the focus\n // can go to them. In Firefox, this must be prevented because it\n // results in issues with keyboard navigation. (2017/03/30)\n if (IS_FIREFOX && event.target !== el) {\n el.focus();\n return;\n }\n\n IS_FOCUSED.set(this.editor, true);\n }\n }\n\n private onDOMKeydown(event: KeyboardEvent) {\n const editor = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n if (\n !this.readonly &&\n AngularEditor.hasEditableTarget(editor, event.target) &&\n !isTargetInsideVoid(editor, activeElement) && // stop fire keydown handle when focus void node\n !this.isComposing &&\n !this.isDOMEventHandled(event, this.keydown)\n ) {\n const nativeEvent = event;\n const { selection } = editor;\n\n const element = editor.children[selection !== null ? selection.focus.path[0] : 0];\n const isRTL = direction(Node.string(element)) === 'rtl';\n\n try {\n // COMPAT: Since we prevent the default behavior on\n // `beforeinput` events, the browser doesn't think there's ever\n // any history stack to undo or redo, so we have to manage these\n // hotkeys ourselves. (2019/11/06)\n if (Hotkeys.isRedo(nativeEvent)) {\n event.preventDefault();\n\n if (HistoryEditor.isHistoryEditor(editor)) {\n editor.redo();\n }\n\n return;\n }\n\n if (Hotkeys.isUndo(nativeEvent)) {\n event.preventDefault();\n\n if (HistoryEditor.isHistoryEditor(editor)) {\n editor.undo();\n }\n\n return;\n }\n\n // COMPAT: Certain browsers don't handle the selection updates\n // properly. In Chrome, the selection isn't properly extended.\n // And in Firefox, the selection isn't properly collapsed.\n // (2017/10/17)\n if (Hotkeys.isMoveLineBackward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line', reverse: true });\n return;\n }\n\n if (Hotkeys.isMoveLineForward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line' });\n return;\n }\n\n if (Hotkeys.isExtendLineBackward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, {\n unit: 'line',\n edge: 'focus',\n reverse: true\n });\n return;\n }\n\n if (Hotkeys.isExtendLineForward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line', edge: 'focus' });\n return;\n }\n\n // COMPAT: If a void node is selected, or a zero-width text node\n // adjacent to an inline is selected, we need to handle these\n // hotkeys manually because browsers won't be able to skip over\n // the void node with the zero-width space not being an empty\n // string.\n if (Hotkeys.isMoveBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.move(editor, { reverse: !isRTL });\n } else {\n Transforms.collapse(editor, { edge: 'start' });\n }\n\n return;\n }\n\n if (Hotkeys.isMoveForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.move(editor, { reverse: isRTL });\n } else {\n Transforms.collapse(editor, { edge: 'end' });\n }\n\n return;\n }\n\n if (Hotkeys.isMoveWordBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.collapse(editor, { edge: 'focus' });\n }\n\n Transforms.move(editor, { unit: 'word', reverse: !isRTL });\n return;\n }\n\n if (Hotkeys.isMoveWordForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.collapse(editor, { edge: 'focus' });\n }\n\n Transforms.move(editor, { unit: 'word', reverse: isRTL });\n return;\n }\n\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to guessing at the input intention for hotkeys.\n // COMPAT: In iOS, some of these hotkeys are handled in the\n if (!HAS_BEFORE_INPUT_SUPPORT) {\n // We don't have a core behavior for these, but they change the\n // DOM if we don't prevent them, so we have to.\n if (Hotkeys.isBold(nativeEvent) || Hotkeys.isItalic(nativeEvent) || Hotkeys.isTransposeCharacter(nativeEvent)) {\n event.preventDefault();\n return;\n }\n\n if (Hotkeys.isSplitBlock(nativeEvent)) {\n event.preventDefault();\n Editor.insertBreak(editor);\n return;\n }\n\n if (Hotkeys.isDeleteBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor);\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor);\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteLineBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor, { unit: 'line' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteLineForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor, { unit: 'line' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteWordBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor, { unit: 'word' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteWordForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor, { unit: 'word' });\n }\n\n return;\n }\n } else {\n if (IS_CHROME || IS_SAFARI) {\n // COMPAT: Chrome and Safari support `beforeinput` event but do not fire\n // an event when deleting backwards in a selected void inline node\n if (\n selection &&\n (Hotkeys.isDeleteBackward(nativeEvent) || Hotkeys.isDeleteForward(nativeEvent)) &&\n Range.isCollapsed(selection)\n ) {\n const currentNode = Node.parent(editor, selection.anchor.path);\n if (\n Element.isElement(currentNode) &&\n Editor.isVoid(editor, currentNode) &&\n (Editor.isInline(editor, currentNode) || Editor.isBlock(editor, currentNode))\n ) {\n event.preventDefault();\n Editor.deleteBackward(editor, {\n unit: 'block'\n });\n return;\n }\n }\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.OnDOMKeydownError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMPaste(event: ClipboardEvent) {\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to React's `onPaste` here instead.\n // COMPAT: Firefox, Chrome and Safari are not emitting `beforeinput` events\n // when \"paste without formatting\" option is used.\n // This unfortunately needs to be handled with paste events instead.\n if (\n !this.isDOMEventHandled(event, this.paste) &&\n (!HAS_BEFORE_INPUT_SUPPORT || isPlainTextOnlyPaste(event) || forceOnDOMPaste) &&\n !this.readonly &&\n AngularEditor.hasEditableTarget(this.editor, event.target)\n ) {\n event.preventDefault();\n AngularEditor.insertData(this.editor, event.clipboardData);\n }\n }\n\n private onFallbackBeforeInput(event: BeforeInputEvent) {\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to React's leaky polyfill instead just for it. It\n // only works for the `insertText` input type.\n if (\n !HAS_BEFORE_INPUT_SUPPORT &&\n !this.readonly &&\n !this.isDOMEventHandled(event.nativeEvent, this.beforeInput) &&\n AngularEditor.hasEditableTarget(this.editor, event.nativeEvent.target)\n ) {\n event.nativeEvent.preventDefault();\n try {\n const text = event.data;\n if (!Range.isCollapsed(this.editor.selection)) {\n Editor.deleteFragment(this.editor);\n }\n // just handle Non-IME input\n if (!this.isComposing) {\n Editor.insertText(this.editor, text);\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToNativeSelectionError,\n nativeError: error\n });\n }\n }\n }\n\n private isDOMEventHandled(event: Event, handler?: (event: Event) => void) {\n if (!handler) {\n return false;\n }\n handler(event);\n return event.defaultPrevented;\n }\n //#endregion\n\n ngOnDestroy() {\n NODE_TO_ELEMENT.delete(this.editor);\n this.manualListeners.forEach(manualListener => {\n manualListener();\n });\n this.destroy$.complete();\n EDITOR_TO_ON_CHANGE.delete(this.editor);\n }\n}\n\nexport const defaultScrollSelectionIntoView = (editor: AngularEditor, domRange: DOMRange) => {\n // This was affecting the selection of multiple blocks and dragging behavior,\n // so enabled only if the selection has been collapsed.\n if (domRange.getBoundingClientRect && (!editor.selection || (editor.selection && Range.isCollapsed(editor.selection)))) {\n const leafEl = domRange.startContainer.parentElement!;\n leafEl.getBoundingClientRect = domRange.getBoundingClientRect.bind(domRange);\n scrollIntoView(leafEl, {\n scrollMode: 'if-needed'\n });\n delete leafEl.getBoundingClientRect;\n }\n};\n\n/**\n * Check if the target is inside void and in the editor.\n */\n\nconst isTargetInsideVoid = (editor: AngularEditor, target: EventTarget | null): boolean => {\n let slateNode: Node | null = null;\n try {\n slateNode = AngularEditor.hasTarget(editor, target) && AngularEditor.toSlateNode(editor, target);\n } catch (error) {}\n return slateNode && Element.isElement(slateNode) && Editor.isVoid(editor, slateNode);\n};\n\nconst hasStringTarget = (domSelection: DOMSelection) => {\n return (\n (domSelection.anchorNode.parentElement.hasAttribute('data-slate-string') ||\n domSelection.anchorNode.parentElement.hasAttribute('data-slate-zero-width')) &&\n (domSelection.focusNode.parentElement.hasAttribute('data-slate-string') ||\n domSelection.focusNode.parentElement.hasAttribute('data-slate-zero-width'))\n );\n};\n\n/**\n * remove default insert from composition\n * @param text\n */\nconst preventInsertFromComposition = (event: Event, editor: AngularEditor) => {\n const types = ['compositionend', 'insertFromComposition'];\n if (!types.includes(event.type)) {\n return;\n }\n const insertText = (event as CompositionEvent).data;\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n // ensure text node insert composition input text\n if (insertText && domSelection.anchorNode instanceof Text && domSelection.anchorNode.textContent.endsWith(insertText)) {\n const textNode = domSelection.anchorNode;\n textNode.splitText(textNode.length - insertText.length).remove();\n }\n};\n","<slate-string-template #templateComponent></slate-string-template>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { BaseElementComponent } from '../../view/base';\n\n@Component({\n selector: '[slateElement]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SlateElement extends BaseElementComponent {}\n","import { Directive, ElementRef, Input, IterableDiffers } from '@angular/core';\nimport { SlateViewContext } from './context';\nimport { ViewContainerItem } from './container-item';\n\n/**\n * @deprecated\n * the special container for angular template\n * Add the rootNodes of each child component to the parentElement\n * Remove useless DOM elements, eg: comment...\n */\n@Directive()\nexport abstract class ViewContainer<T extends ViewContainerItem> {\n @Input() viewContext: SlateViewContext;\n\n constructor(\n protected elementRef: ElementRef<any>,\n protected differs: IterableDiffers\n ) {}\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { Descendant } from 'slate';\nimport { SlateChildrenContext, SlateViewContext } from '../../view/context';\nimport { ViewContainer } from '../../view/container';\n\n@Component({\n selector: 'slate-children',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateChildren extends ViewContainer<any> {\n @Input() children: Descendant[];\n\n @Input() context: SlateChildrenContext;\n\n @Input() viewContext: SlateViewContext;\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Input,\n OnChanges,\n OnInit,\n QueryList,\n SimpleChanges,\n ViewChildren\n} from '@angular/core';\nimport { Text } from 'slate';\nimport { SlateLeafContext, SlateTextContext } from '../../view/context';\nimport { ViewContainer } from '../../view/container';\n\n@Component({\n selector: 'slate-leaves',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: []\n})\nexport class SlateLeaves extends ViewContainer<any> {\n initialized = false;\n leafContexts: SlateLeafContext[];\n leaves: Text[];\n\n @Input() context: SlateTextContext;\n}\n","import { forwardRef, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SlateEditable } from './components/editable/editable.component';\nimport { SlateDefaultText } from './components/text/default-text.component';\nimport { SlateVoidText } from './components/text/void-text.component';\nimport { SlateElement } from './components/element/element.component';\nimport { SlateDefaultElement } from './components/element/default-element.component';\nimport { SlateString } from './components/string/string.component';\nimport { SlateStringTemplate } from './components/string/template.component';\nimport { SlateChildren } from './components/children/children.component';\nimport { SlateChildrenOutlet } from './components/children/children-outlet.component';\nimport { SlateBlockCard } from './components/block-card/block-card.component';\nimport { SlateDefaultLeaf } from './components/leaf/default-leaf.component';\nimport { SlateLeaves } from './components/leaves/leaves.component';\nimport { SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN } from './components/element/default-element.component.token';\nimport { SlateDefaultString } from './components/string/default-string.component';\n\n@NgModule({\n imports: [\n CommonModule,\n SlateEditable,\n SlateDefaultElement,\n SlateElement,\n SlateVoidText,\n SlateDefaultText,\n SlateString,\n SlateStringTemplate,\n SlateChildren,\n SlateBlockCard,\n SlateLeaves,\n SlateDefaultLeaf,\n SlateDefaultString,\n SlateChildrenOutlet\n ],\n exports: [SlateEditable, SlateChildren, SlateChildrenOutlet, SlateElement, SlateLeaves, SlateString, SlateDefaultString],\n providers: [\n {\n provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,\n useValue: SlateDefaultElement\n }\n ]\n})\nexport class SlateModule {}\n","/*\n * Public API Surface of slate-angular\n */\nexport * from './plugins/angular-editor';\nexport * from './plugins/with-angular';\nexport * from './components/editable/editable.component';\nexport * from './components/element/element.component';\nexport * from './components/string/string.component';\nexport * from './components/string/default-string.component';\nexport * from './components/children/children.component';\nexport * from './components/children/children-outlet.component';\nexport * from './components/leaves/leaves.component';\nexport * from './module';\nexport * from './types/error';\nexport * from './view/base';\nexport * from './view/context';\nexport * from './view/context-change';\nexport * from './utils';\nexport * from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["IS_CHROME","Text","FallbackCompositionStateGetData","FallbackCompositionStateReset","getContext","getViewType","trackBy","Hotkeys"],"mappings":";;;;;;;;;;;;AAEa,MAAA,2BAA2B,GAAG,CAAC;AAE/B,MAAA,4BAA4B,GAAG,CAAC;AAEvC,SAAU,oBAAoB,CAAC,IAAa,EAAA;IAC9C,OAAO,IAAI,KAAK,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,IAAI,YAAY,WAAW,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AACxI;AAEM,SAAU,YAAY,CAAC,SAAuB,EAAA;AAChD,IAAA,OAAO,oBAAoB,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC;AACpG;AAEM,SAAU,sBAAsB,CAAC,IAAa,EAAA;IAChD,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,YAAY,WAAW,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,C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AC9C,4BAAA,QAAQ,EAAE;AACb;AACJ;AACJ,iBAAA;;;ACzCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"slate-angular.mjs","sources":["../../packages/src/utils/block-card.ts","../../packages/src/plugins/with-dom.ts","../../packages/src/plugins/angular-editor.ts","../../packages/src/utils/weak-maps.ts","../../packages/src/utils/environment.ts","../../packages/src/utils/hotkeys.ts","../../packages/src/utils/view.ts","../../packages/src/utils/range-list.ts","../../packages/src/utils/global-normalize.ts","../../packages/src/utils/throttle.ts","../../packages/src/utils/clipboard/common.ts","../../packages/src/utils/clipboard/data-transfer.ts","../../packages/src/utils/clipboard/navigator-clipboard.ts","../../packages/src/utils/dom.ts","../../packages/src/utils/clipboard/clipboard.ts","../../packages/src/plugins/with-angular.ts","../../packages/src/custom-event/DOMTopLevelEventTypes.ts","../../packages/src/custom-event/FallbackCompositionState.ts","../../packages/src/custom-event/BeforeInputEventPlugin.ts","../../packages/src/custom-event/before-input-polyfill.ts","../../packages/src/types/error.ts","../../packages/src/components/string/template.component.ts","../../packages/src/components/string/template.component.html","../../packages/src/utils/restore-dom.ts","../../packages/src/components/element/default-element.component.token.ts","../../packages/src/components/text/token.ts","../../packages/src/components/children/children-outlet.component.ts","../../packages/src/view/context-change.ts","../../packages/src/view/render/utils.ts","../../packages/src/view/render/leaves-render.ts","../../packages/src/components/block-card/block-card.component.ts","../../packages/src/components/block-card/block-card.component.html","../../packages/src/view/render/list-render.ts","../../packages/src/view/base.ts","../../packages/src/components/text/void-text.component.ts","../../packages/src/components/text/default-text.component.ts","../../packages/src/components/element/default-element.component.ts","../../packages/src/view/container-item.ts","../../packages/src/components/string/default-string.component.ts","../../packages/src/components/string/string.component.ts","../../packages/src/components/leaf/default-leaf.component.ts","../../packages/src/components/leaf/token.ts","../../packages/src/components/editable/editable.component.ts","../../packages/src/components/editable/editable.component.html","../../packages/src/components/element/element.component.ts","../../packages/src/view/container.ts","../../packages/src/components/children/children.component.ts","../../packages/src/components/leaves/leaves.component.ts","../../packages/src/module.ts","../../packages/src/public-api.ts","../../packages/src/slate-angular.ts"],"sourcesContent":["import { DOMNode, DOMSelection } from \"slate-dom\";\n\nexport const FAKE_LEFT_BLOCK_CARD_OFFSET = -1;\n\nexport const FAKE_RIGHT_BLOCK_CARD_OFFSET = -2;\n\nexport function hasBlockCardWithNode(node: DOMNode) {\n return node && (node.parentElement.hasAttribute('card-target') || (node instanceof HTMLElement && node.hasAttribute('card-target')));\n}\n\nexport function hasBlockCard(selection: DOMSelection) {\n return hasBlockCardWithNode(selection?.anchorNode) || hasBlockCardWithNode(selection?.focusNode);\n}\n\nexport function getCardTargetAttribute(node: DOMNode) {\n return node.parentElement.attributes['card-target'] || (node instanceof HTMLElement && node.attributes['card-target']);\n}\n\nexport function isCardLeft(node: DOMNode) {\n const cardTarget = getCardTargetAttribute(node);\n return cardTarget && cardTarget.nodeValue === 'card-left';\n}\n\nexport function isCardLeftByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-left';\n}\n\nexport function isCardRightByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-right';\n}\n\nexport function isCardCenterByTargetAttr(targetAttr: any) {\n return targetAttr && targetAttr.nodeValue === 'card-center';\n}\n","import {\n FAKE_LEFT_BLOCK_CARD_OFFSET,\n FAKE_RIGHT_BLOCK_CARD_OFFSET,\n getCardTargetAttribute,\n isCardLeftByTargetAttr\n} from '../utils/block-card';\nimport { BasePoint, BaseRange, Editor, Node, Point, Range, Element, NodeEntry, point } from 'slate';\nimport {\n DOMEditor,\n DOMElement,\n DOMNode,\n DOMRange,\n DOMPoint,\n DOMSelection,\n DOMStaticRange,\n EDITOR_TO_ELEMENT,\n hasShadowRoot,\n IS_CHROME,\n isDOMElement,\n isDOMSelection,\n NODE_TO_ELEMENT,\n NODE_TO_INDEX,\n NODE_TO_PARENT,\n normalizeDOMPoint\n} from 'slate-dom';\nimport { AngularEditor } from './angular-editor';\n\nexport interface CustomDOMEditor extends DOMEditor {\n hasEditableTarget: (editor: CustomDOMEditor, target: EventTarget | null) => target is DOMNode;\n hasRange: (editor: CustomDOMEditor, range: Range) => boolean;\n hasSelectableTarget: (editor: CustomDOMEditor, target: EventTarget | null) => boolean;\n hasTarget: (editor: CustomDOMEditor, target: EventTarget | null) => target is DOMNode;\n insertData: (data: DataTransfer) => void;\n insertFragmentData: (data: DataTransfer) => boolean;\n insertTextData: (data: DataTransfer) => boolean;\n isTargetInsideNonReadonlyVoid: (editor: CustomDOMEditor, target: EventTarget | null) => boolean;\n setFragmentData: (data: DataTransfer, originEvent?: 'drag' | 'copy' | 'cut') => void;\n}\n\nconst customToDOMNode = (editor: Editor, node: Node): HTMLElement => {\n const domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : NODE_TO_ELEMENT.get(node);\n\n if (!domNode) {\n throw new Error(`Cannot resolve a DOM node from Slate node: ${JSON.stringify(node)}`);\n }\n\n return domNode;\n};\nDOMEditor.toDOMNode = customToDOMNode as unknown as (editor: DOMEditor, node: Node) => HTMLElement;\n\nconst toDOMPointForBlockCard = (editor: AngularEditor, point: Point): DOMPoint | undefined => {\n const [node] = Editor.node(editor, point.path);\n const [parentNode] = Editor.parent(editor, point.path);\n if (editor.isBlockCard(parentNode) || editor.isBlockCard(node)) {\n if (point.offset < 0) {\n if (point.offset === FAKE_LEFT_BLOCK_CARD_OFFSET) {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, node, { direction: 'left' });\n return [cursorNode, 1];\n } else {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, node, { direction: 'right' });\n return [cursorNode, 1];\n }\n }\n if (editor.selection && Range.isExpanded(editor.selection)) {\n const [start, end] = Range.edges(editor.selection);\n if (start === point) {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, parentNode, { direction: 'left' });\n return [cursorNode, 1];\n } else {\n const cursorNode = CustomDOMEditor.getCardCursorNode(editor, parentNode, { direction: 'right' });\n return [cursorNode, 1];\n }\n }\n }\n};\n\nconst customToDOMPoint = (editor: AngularEditor, point: Point): DOMPoint => {\n const [node] = Editor.node(editor, point.path);\n const el = customToDOMNode(editor, node);\n let domPoint: DOMPoint | undefined;\n\n const domPointForBlackCard = toDOMPointForBlockCard(editor, point);\n if (domPointForBlackCard) {\n return domPointForBlackCard;\n }\n\n // If we're inside a void node, force the offset to 0, otherwise the zero\n // width spacing character will result in an incorrect offset of 1\n if (Editor.void(editor, { at: point })) {\n point = { path: point.path, offset: 0 };\n }\n\n // For each leaf, we need to isolate its content, which means filtering\n // to its direct text and zero-width spans. (We have to filter out any\n // other siblings that may have been rendered alongside them.)\n const selector = `[data-slate-string], [data-slate-zero-width]`;\n const texts = Array.from(el.querySelectorAll(selector));\n let start = 0;\n\n for (const text of texts) {\n const domNode = text.childNodes[0] as HTMLElement;\n\n if (domNode == null || domNode.textContent == null) {\n continue;\n }\n\n const { length } = domNode.textContent;\n const attr = text.getAttribute('data-slate-length');\n const trueLength = attr == null ? length : parseInt(attr, 10);\n const end = start + trueLength;\n\n if (point.offset <= end) {\n const offset = Math.min(length, Math.max(0, point.offset - start));\n domPoint = [domNode, offset];\n // fixed cursor position after zero width char\n if (offset === 0 && length === 1 && domNode.textContent === '\\uFEFF') {\n domPoint = [domNode, offset + 1];\n }\n break;\n }\n\n start = end;\n }\n\n if (!domPoint) {\n throw new Error(`Cannot resolve a DOM point from Slate point: ${JSON.stringify(point)}`);\n }\n\n return domPoint;\n};\nDOMEditor.toDOMPoint = customToDOMPoint as unknown as (editor: DOMEditor, point: BasePoint) => DOMPoint;\n\nconst toSlatePointForBlockCard = (editor: AngularEditor, domPoint: DOMPoint, nearestNode: DOMNode): Point | undefined => {\n const [domNode] = domPoint;\n const cardTargetAttr = getCardTargetAttribute(domNode);\n if (cardTargetAttr) {\n const domSelection = window.getSelection();\n const blockCardEntry = CustomDOMEditor.toSlateCardEntry(editor, domNode) || CustomDOMEditor.toSlateCardEntry(editor, nearestNode);\n const [, blockPath] = blockCardEntry;\n if (domSelection.isCollapsed) {\n if (isCardLeftByTargetAttr(cardTargetAttr)) {\n return { path: blockPath, offset: -1 };\n } else {\n return { path: blockPath, offset: -2 };\n }\n }\n if (isCardLeftByTargetAttr(cardTargetAttr)) {\n return Editor.start(editor, blockPath);\n } else {\n return Editor.end(editor, blockPath);\n }\n }\n};\n\nconst customToSlatePoint = <T extends boolean>(\n editor: AngularEditor,\n domPoint: DOMPoint,\n options: {\n exactMatch: boolean;\n suppressThrow: T;\n searchDirection?: 'forward' | 'backward';\n }\n): T extends true ? Point | null : Point => {\n const { exactMatch, suppressThrow } = options;\n const [nearestNode, nearestOffset] = normalizeDOMPoint(domPoint);\n let parentNode = nearestNode.parentNode as DOMElement;\n let textNode: DOMElement | null = null;\n let offset = 0;\n\n const slatePointForBlockCard = toSlatePointForBlockCard(editor, domPoint, nearestNode);\n if (slatePointForBlockCard) {\n return slatePointForBlockCard;\n }\n\n if (parentNode) {\n const voidNode = parentNode.closest('[data-slate-void=\"true\"]');\n let leafNode = parentNode.closest('[data-slate-leaf]');\n let domNode: DOMElement | null = null;\n\n // Calculate how far into the text node the `nearestNode` is, so that we\n // can determine what the offset relative to the text node is.\n if (leafNode && CustomDOMEditor.isLeafInEditor(editor, leafNode)) {\n textNode = leafNode.closest('[data-slate-node=\"text\"]')!;\n const window = DOMEditor.getWindow(editor);\n const range = window.document.createRange();\n range.setStart(textNode, 0);\n range.setEnd(nearestNode, nearestOffset);\n const contents = range.cloneContents();\n const removals = [\n ...Array.prototype.slice.call(contents.querySelectorAll('[data-slate-zero-width]')),\n ...Array.prototype.slice.call(contents.querySelectorAll('[contenteditable=false]'))\n ];\n\n removals.forEach(el => {\n el!.parentNode!.removeChild(el);\n });\n\n // COMPAT: Edge has a bug where Range.prototype.toString() will\n // convert \\n into \\r\\n. The bug causes a loop when slate-react\n // attempts to reposition its cursor to match the native position. Use\n // textContent.length instead.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10291116/\n offset = contents.textContent!.length;\n domNode = textNode;\n } else if (voidNode) {\n // For void nodes, the element with the offset key will be a cousin, not an\n // ancestor, so find it by going down from the nearest void parent.\n const spacer = voidNode.querySelector('[data-slate-spacer=\"true\"]')!;\n leafNode = spacer.firstElementChild;\n parentNode = leafNode.firstElementChild;\n textNode = spacer;\n domNode = leafNode;\n offset = domNode.textContent!.length;\n }\n\n // COMPAT: If the parent node is a Slate zero-width space, editor is\n // because the text node should have no characters. However, during IME\n // composition the ASCII characters will be prepended to the zero-width\n // space, so subtract 1 from the offset to account for the zero-width\n // space character.\n if (domNode && offset === domNode.textContent!.length && parentNode && parentNode.hasAttribute('data-slate-zero-width')) {\n offset--;\n }\n }\n\n if (!textNode) {\n if (suppressThrow) {\n return null as T extends true ? Point | null : Point;\n }\n throw new Error(`Cannot resolve a Slate point from DOM point: ${domPoint}`);\n }\n\n // COMPAT: If someone is clicking from one Slate editor into another,\n // the select event fires twice, once for the old editor's `element`\n // first, and then afterwards for the correct `element`. (2017/03/03)\n let slateNode = null;\n try {\n slateNode = CustomDOMEditor.toSlateNode(editor, textNode);\n } catch (error) {\n if (!suppressThrow) {\n throw error;\n }\n }\n if (!slateNode && suppressThrow) {\n return null as T extends true ? Point | null : Point;\n }\n const path = CustomDOMEditor.findPath(editor, slateNode);\n return { path, offset };\n};\nDOMEditor.toSlatePoint = customToSlatePoint as unknown as <T extends boolean>(\n editor: DOMEditor,\n domPoint: DOMPoint,\n options: { exactMatch: boolean; suppressThrow: T; searchDirection?: 'forward' | 'backward' }\n) => T extends true ? BasePoint : BasePoint;\n\nconst customToSlateRange = <T extends boolean>(\n editor: CustomDOMEditor,\n domRange: DOMRange | DOMStaticRange | DOMSelection,\n options?: {\n exactMatch?: boolean;\n suppressThrow: T;\n }\n): T extends true ? Range | null : Range => {\n const { exactMatch, suppressThrow } = options || {};\n const el = isDOMSelection(domRange) ? domRange.anchorNode : domRange.startContainer;\n let anchorNode;\n let anchorOffset;\n let focusNode;\n let focusOffset;\n let isCollapsed;\n\n if (el) {\n if (isDOMSelection(domRange)) {\n anchorNode = domRange.anchorNode;\n anchorOffset = domRange.anchorOffset;\n focusNode = domRange.focusNode;\n focusOffset = domRange.focusOffset;\n // COMPAT: There's a bug in chrome that always returns `true` for\n // `isCollapsed` for a Selection that comes from a ShadowRoot.\n // (2020/08/08)\n // https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n if (IS_CHROME && hasShadowRoot(anchorNode)) {\n isCollapsed = domRange.anchorNode === domRange.focusNode && domRange.anchorOffset === domRange.focusOffset;\n } else {\n isCollapsed = domRange.isCollapsed;\n }\n } else {\n anchorNode = domRange.startContainer;\n anchorOffset = domRange.startOffset;\n focusNode = domRange.endContainer;\n focusOffset = domRange.endOffset;\n isCollapsed = domRange.collapsed;\n }\n }\n\n if (anchorNode == null || focusNode == null || anchorOffset == null || focusOffset == null) {\n throw new Error(`Cannot resolve a Slate range from DOM range: ${domRange}`);\n }\n\n const anchor = DOMEditor.toSlatePoint(editor, [anchorNode, anchorOffset], { suppressThrow, exactMatch });\n if (!anchor) {\n return null as T extends true ? Range | null : Range;\n }\n\n const focus = isCollapsed ? anchor : DOMEditor.toSlatePoint(editor, [focusNode, focusOffset], { suppressThrow, exactMatch });\n if (!focus) {\n return null as T extends true ? Range | null : Range;\n }\n\n let range: Range = { anchor: anchor as Point, focus: focus as Point };\n // if the selection is a hanging range that ends in a void\n // and the DOM focus is an Element\n // (meaning that the selection ends before the element)\n // unhang the range to avoid mistakenly including the void\n if (\n Range.isExpanded(range) &&\n Range.isForward(range) &&\n isDOMElement(focusNode) &&\n Editor.void(editor as Editor, { at: range.focus, mode: 'highest' })\n ) {\n range = Editor.unhangRange(editor as Editor, range, { voids: true });\n }\n\n return range;\n};\nDOMEditor.toSlateRange = customToSlateRange as unknown as <T extends boolean>(\n editor: DOMEditor,\n domRange: Range | StaticRange | Selection,\n options: { exactMatch: boolean; suppressThrow: T }\n) => T extends true ? BaseRange : BaseRange;\n\nexport const CustomDOMEditor = {\n ...DOMEditor,\n isNodeInEditor(editor: CustomDOMEditor, node: Node): boolean {\n let child = node;\n\n while (true) {\n const parent = NODE_TO_PARENT.get(child);\n\n if (parent == null) {\n if (Editor.isEditor(child) && child === editor) {\n return true;\n } else {\n break;\n }\n }\n\n const i = NODE_TO_INDEX.get(child);\n\n if (i == null) {\n break;\n }\n\n child = parent;\n }\n\n return false;\n },\n isLeafInEditor(editor: CustomDOMEditor, leafNode: DOMElement): boolean {\n const textNode = leafNode.closest('[data-slate-node=\"text\"]')!;\n let node: Node | null = null;\n try {\n node = CustomDOMEditor.toSlateNode(editor, textNode);\n } catch (error) {}\n if (node && CustomDOMEditor.isNodeInEditor(editor, node)) {\n return true;\n } else {\n return false;\n }\n },\n /**\n * Check if the editor is hanging right.\n */\n isBlockHangingRight(editor: Editor): boolean {\n const { selection } = editor;\n if (!selection) {\n return false;\n }\n if (Range.isCollapsed(selection)) {\n return false;\n }\n const [start, end] = Range.edges(selection);\n const endBlock = Editor.above(editor, {\n at: end,\n match: node => Element.isElement(node) && Editor.isBlock(editor, node)\n });\n return Editor.isStart(editor, end, endBlock[1]);\n },\n isBlockCardLeftCursor(editor: Editor) {\n return (\n editor.selection?.anchor?.offset === FAKE_LEFT_BLOCK_CARD_OFFSET &&\n editor.selection?.focus?.offset === FAKE_LEFT_BLOCK_CARD_OFFSET\n );\n },\n isBlockCardRightCursor(editor: Editor) {\n return (\n editor.selection?.anchor?.offset === FAKE_RIGHT_BLOCK_CARD_OFFSET &&\n editor.selection?.focus?.offset === FAKE_RIGHT_BLOCK_CARD_OFFSET\n );\n },\n getCardCursorNode(\n editor: AngularEditor,\n blockCardNode: Node,\n options: {\n direction: 'left' | 'right' | 'center';\n }\n ) {\n const blockCardElement = DOMEditor.toDOMNode(editor, blockCardNode);\n const cardCenter = blockCardElement.parentElement;\n return options.direction === 'left' ? cardCenter.previousElementSibling.firstChild : cardCenter.nextElementSibling.firstChild;\n },\n toSlateCardEntry(editor: AngularEditor, node: DOMNode): NodeEntry {\n const element = node.parentElement.closest('.slate-block-card')?.querySelector('[card-target=\"card-center\"]').firstElementChild;\n const slateNode = DOMEditor.toSlateNode(editor, element);\n const path = DOMEditor.findPath(editor, slateNode);\n return [slateNode, path];\n }\n};\n","import { Editor, Node, Path, Transforms, Element } from 'slate';\nimport { Injector } from '@angular/core';\nimport { SlateError } from '../types/error';\nimport { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET } from '../utils/block-card';\nimport { CustomDOMEditor } from './with-dom';\nimport { DOMEditor, EDITOR_TO_ELEMENT, IS_FOCUSED } from 'slate-dom';\nimport { getSelection } from '../utils/dom';\n\n/**\n * An Angular and DOM-specific version of the `Editor` interface.\n */\nexport interface AngularEditor extends CustomDOMEditor {\n deleteCutData: () => void;\n onKeydown: (event: KeyboardEvent) => void;\n onClick: (event: MouseEvent) => void;\n injector: Injector;\n isBlockCard: (node: Node) => boolean;\n isExpanded: (node: Element) => boolean;\n onError: (errorData: SlateError) => void;\n customInsertFragmentData: (data: DataTransfer) => Promise<boolean>;\n customInsertTextData: (data: DataTransfer) => Promise<boolean>;\n}\n\nexport const AngularEditor = {\n ...CustomDOMEditor,\n /**\n * handle editor error.\n */\n\n onError(errorData: SlateError) {\n if (errorData.nativeError) {\n throw errorData.nativeError;\n }\n },\n\n /**\n * onKeydown hook.\n */\n onKeydown(editor: AngularEditor, data: KeyboardEvent): void {\n editor.onKeydown(data);\n },\n\n /**\n * onClick hook.\n */\n onClick(editor: AngularEditor, data: MouseEvent): void {\n editor.onClick(data);\n },\n\n deleteCutData(editor: AngularEditor): void {\n editor.deleteCutData();\n },\n\n isLeafBlock(editor: AngularEditor, node: Node): boolean {\n return Element.isElement(node) && !editor.isInline(node) && Editor.hasInlines(editor, node);\n },\n\n /**\n * move native selection to card-left or card-right\n * @param editor\n * @param blockCardNode\n * @param options\n */\n moveBlockCard(\n editor: AngularEditor,\n blockCardNode: Node,\n options: {\n direction: 'left' | 'right';\n }\n ) {\n const cursorNode = AngularEditor.getCardCursorNode(editor, blockCardNode, options);\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n domSelection.setBaseAndExtent(cursorNode, 1, cursorNode, 1);\n },\n\n /**\n * move slate selection to card-left or card-right\n * @param editor\n * @param path\n * @param options\n */\n moveBlockCardCursor(\n editor: AngularEditor,\n path: Path,\n options: {\n direction: 'left' | 'right';\n }\n ) {\n const cursor = {\n path,\n offset: options.direction === 'left' ? FAKE_LEFT_BLOCK_CARD_OFFSET : FAKE_RIGHT_BLOCK_CARD_OFFSET\n };\n Transforms.select(editor, { anchor: cursor, focus: cursor });\n },\n focus: (editor, options = { retries: 5 }) => {\n // Return if already focused\n if (IS_FOCUSED.get(editor)) {\n return;\n }\n\n // Return if no dom node is associated with the editor, which means the editor is not yet mounted\n // or has been unmounted. This can happen especially, while retrying to focus the editor.\n if (!EDITOR_TO_ELEMENT.get(editor)) {\n return;\n }\n\n IS_FOCUSED.set(editor, true);\n const el = DOMEditor.toDOMNode(editor, editor);\n const root = DOMEditor.findDocumentOrShadowRoot(editor);\n if (root.activeElement !== el) {\n // IS_FOCUSED should be set before calling el.focus() to ensure that\n // FocusedContext is updated to the correct value\n el.focus({ preventScroll: true });\n }\n }\n};\n","import { Node, Editor } from 'slate';\nimport { BaseElementComponent } from '../view/base';\n\n/**\n * Symbols.\n */\n\nexport const PLACEHOLDER_SYMBOL = Symbol('placeholder') as unknown as string;\n\n/**\n * Weak map for associating the html element with the component.\n */\nexport const ELEMENT_TO_COMPONENT: WeakMap<Node, BaseElementComponent> = new WeakMap();\n\nexport const EDITOR_TO_AFTER_VIEW_INIT_QUEUE: WeakMap<Editor, (() => void)[]> = new WeakMap();\n","export const IS_IOS =\n typeof navigator !== 'undefined' &&\n typeof window !== 'undefined' &&\n /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\nexport const IS_APPLE = typeof navigator !== 'undefined' && /Mac OS X/.test(navigator.userAgent);\n\nexport const IS_ANDROID = typeof navigator !== 'undefined' && /Android/.test(navigator.userAgent);\n\nexport const IS_FIREFOX = typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\n\nexport const IS_SAFARI = typeof navigator !== 'undefined' && /Version\\/[\\d\\.]+.*Safari/.test(navigator.userAgent);\n\n// \"modern\" Edge was released at 79.x\nexport const IS_EDGE_LEGACY = typeof navigator !== 'undefined' && /Edge?\\/(?:[0-6][0-9]|[0-7][0-8])(?:\\.)/i.test(navigator.userAgent);\n\nexport const IS_CHROME = typeof navigator !== 'undefined' && /Chrome/i.test(navigator.userAgent);\n\n// Native beforeInput events don't work well with react on Chrome 75 and older, Chrome 76+ can use beforeInput\nexport const IS_CHROME_LEGACY =\n typeof navigator !== 'undefined' &&\n /Chrome?\\/(?:[0-7][0-5]|[0-6][0-9])/i.test(navigator.userAgent) &&\n // Exclude Chrome version greater than 3 bits,Chrome releases v100 on 2022.03.29\n !/Chrome?\\/(?:\\d{3,})/i.test(navigator.userAgent);\n\n// Firefox did not support `beforeInput` until `v87`.\nexport const IS_FIREFOX_LEGACY =\n typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox\\/(?:[0-7][0-9]|[0-8][0-6])(?:\\.)).*/i.test(navigator.userAgent);\n\n// qq browser\nexport const IS_QQBROWSER = typeof navigator !== 'undefined' && /.*QQBrowser/.test(navigator.userAgent);\n\n// UC mobile browser\nexport const IS_UC_MOBILE = typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent);\n\n// Wechat browser\nexport const IS_WECHATBROWSER = typeof navigator !== 'undefined' && /.*Wechat/.test(navigator.userAgent);\n\n// COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event\n// Chrome Legacy doesn't support `beforeinput` correctly\nexport const HAS_BEFORE_INPUT_SUPPORT =\n !IS_CHROME_LEGACY &&\n !IS_EDGE_LEGACY &&\n // globalThis is undefined in older browsers\n typeof globalThis !== 'undefined' &&\n globalThis.InputEvent &&\n // @ts-ignore The `getTargetRanges` property isn't recognized.\n typeof globalThis.InputEvent.prototype.getTargetRanges === 'function';\n","import { isKeyHotkey } from 'is-hotkey';\nimport { IS_APPLE } from './environment';\n\n/**\n * Hotkey mappings for each platform.\n */\n\nconst HOTKEYS = {\n bold: 'mod+b',\n compose: ['down', 'left', 'right', 'up', 'backspace', 'enter'],\n moveBackward: 'left',\n moveForward: 'right',\n moveUp: 'up',\n moveDown: 'down',\n moveWordBackward: 'ctrl+left',\n moveWordForward: 'ctrl+right',\n deleteBackward: 'shift?+backspace',\n deleteForward: 'shift?+delete',\n extendBackward: 'shift+left',\n extendForward: 'shift+right',\n italic: 'mod+i',\n splitBlock: 'shift?+enter',\n undo: 'mod+z'\n};\n\nconst APPLE_HOTKEYS = {\n moveLineBackward: 'opt+up',\n moveLineForward: 'opt+down',\n moveWordBackward: 'opt+left',\n moveWordForward: 'opt+right',\n deleteBackward: ['ctrl+backspace', 'ctrl+h'],\n deleteForward: ['ctrl+delete', 'ctrl+d'],\n deleteLineBackward: 'cmd+shift?+backspace',\n deleteLineForward: ['cmd+shift?+delete', 'ctrl+k'],\n deleteWordBackward: 'opt+shift?+backspace',\n deleteWordForward: 'opt+shift?+delete',\n extendLineBackward: 'opt+shift+up',\n extendLineForward: 'opt+shift+down',\n redo: 'cmd+shift+z',\n transposeCharacter: 'ctrl+t'\n};\n\nconst WINDOWS_HOTKEYS = {\n deleteWordBackward: 'ctrl+shift?+backspace',\n deleteWordForward: 'ctrl+shift?+delete',\n redo: ['ctrl+y', 'ctrl+shift+z']\n};\n\n/**\n * Create a platform-aware hotkey checker.\n */\n\nconst create = (key: string) => {\n const generic = HOTKEYS[key];\n const apple = APPLE_HOTKEYS[key];\n const windows = WINDOWS_HOTKEYS[key];\n const isGeneric = generic && isKeyHotkey(generic);\n const isApple = apple && isKeyHotkey(apple);\n const isWindows = windows && isKeyHotkey(windows);\n\n return (event: KeyboardEvent) => {\n if (isGeneric && isGeneric(event)) {\n return true;\n }\n if (IS_APPLE && isApple && isApple(event)) {\n return true;\n }\n if (!IS_APPLE && isWindows && isWindows(event)) {\n return true;\n }\n return false;\n };\n};\n\n/**\n * Hotkeys.\n */\n\nconst hotkeys = {\n isBold: create('bold'),\n isCompose: create('compose'),\n isMoveBackward: create('moveBackward'),\n isMoveForward: create('moveForward'),\n isMoveUp: create('moveUp'),\n isMoveDown: create('moveDown'),\n isDeleteBackward: create('deleteBackward'),\n isDeleteForward: create('deleteForward'),\n isDeleteLineBackward: create('deleteLineBackward'),\n isDeleteLineForward: create('deleteLineForward'),\n isDeleteWordBackward: create('deleteWordBackward'),\n isDeleteWordForward: create('deleteWordForward'),\n isExtendBackward: create('extendBackward'),\n isExtendForward: create('extendForward'),\n isExtendLineBackward: create('extendLineBackward'),\n isExtendLineForward: create('extendLineForward'),\n isItalic: create('italic'),\n isMoveLineBackward: create('moveLineBackward'),\n isMoveLineForward: create('moveLineForward'),\n isMoveWordBackward: create('moveWordBackward'),\n isMoveWordForward: create('moveWordForward'),\n isRedo: create('redo'),\n isSplitBlock: create('splitBlock'),\n isTransposeCharacter: create('transposeCharacter'),\n isUndo: create('undo')\n};\nexport default hotkeys;\nexport { hotkeys };\n","import { TemplateRef } from '@angular/core';\nimport { ComponentType, ViewType } from '../types/view';\n\nexport function isTemplateRef<C>(value: ViewType): value is TemplateRef<C> {\n return value && value instanceof TemplateRef;\n}\n\nexport function isComponentType<T>(value: ViewType): value is ComponentType<T> {\n return !isTemplateRef(value);\n}\n","import { Range } from 'slate';\nimport { PLACEHOLDER_SYMBOL } from './weak-maps';\n\nexport const shallowCompare = (obj1: {}, obj2: {}) =>\n Object.keys(obj1).length === Object.keys(obj2).length &&\n Object.keys(obj1).every(key => obj2.hasOwnProperty(key) && obj1[key] === obj2[key]);\n\n/**\n * Check if a list of decorator ranges are equal to another.\n *\n * PERF: this requires the two lists to also have the ranges inside them in the\n * same order, but this is an okay constraint for us since decorations are\n * kept in order, and the odd case where they aren't is okay to re-render for.\n */\n\nexport const isDecoratorRangeListEqual = (list: Range[], another: Range[]): boolean => {\n if (list.length !== another.length) {\n return false;\n }\n\n for (let i = 0; i < list.length; i++) {\n const range = list[i];\n const other = another[i];\n\n const { anchor: rangeAnchor, focus: rangeFocus, ...rangeOwnProps } = range;\n const { anchor: otherAnchor, focus: otherFocus, ...otherOwnProps } = other;\n\n if (\n !Range.equals(range, other) ||\n range[PLACEHOLDER_SYMBOL] !== other[PLACEHOLDER_SYMBOL] ||\n !shallowCompare(rangeOwnProps, otherOwnProps)\n ) {\n return false;\n }\n }\n\n return true;\n};\n","import { Descendant, Element, Text } from 'slate';\n\nconst isValid = (value: Descendant) =>\n (Element.isElement(value) && value.children.length > 0 && (value.children as Descendant[]).every(child => isValid(child))) ||\n Text.isText(value);\n\nconst check = (document: Element[]) => {\n return document.every(value => Element.isElement(value) && isValid(value));\n};\n\nfunction normalize(document: Element[]) {\n return document.filter(value => Element.isElement(value) && isValid(value));\n}\n\nexport { normalize, check, isValid };\n","export const createThrottleRAF = () => {\n let timerId: number | null = null;\n const throttleRAF = (fn: () => void) => {\n const scheduleFunc = () => {\n timerId = requestAnimationFrame(() => {\n timerId = null;\n fn();\n });\n };\n if (timerId !== null) {\n cancelAnimationFrame(timerId);\n timerId = null;\n }\n scheduleFunc();\n };\n return throttleRAF;\n};\n\nexport type ThrottleRAF = (fn: () => void) => void;\n","export const isClipboardReadSupported = () => {\n return 'clipboard' in navigator && 'read' in navigator.clipboard;\n};\n\nexport const isClipboardWriteSupported = () => {\n return 'clipboard' in navigator && 'write' in navigator.clipboard;\n};\n\nexport const isClipboardWriteTextSupported = () => {\n return 'clipboard' in navigator && 'writeText' in navigator.clipboard;\n};\n\nexport const isClipboardFile = (item: ClipboardItem) => {\n return item.types.find(i => i.match(/^image\\//));\n};\n\nexport const isInvalidTable = (nodes: Element[] = []) => {\n return nodes.some(node => node.tagName.toLowerCase() === 'tr');\n};\n\nexport const stripHtml = (html: string) => {\n // See <https://github.com/developit/preact-markup/blob/4788b8d61b4e24f83688710746ee36e7464f7bbc/src/parse-markup.js#L60-L69>\n const doc = document.implementation.createHTMLDocument('');\n doc.documentElement.innerHTML = html.trim();\n return doc.body.textContent || doc.body.innerText || '';\n};\n\nexport const blobAsString = (blob: Blob) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('loadend', () => {\n const text = reader.result;\n resolve(text as string);\n });\n reader.addEventListener('error', () => {\n reject(reader.error);\n });\n reader.readAsText(blob);\n });\n};\n\nexport const completeTable = (fragment: DocumentFragment) => {\n const result = document.createDocumentFragment();\n const table = document.createElement('table');\n result.appendChild(table);\n table.appendChild(fragment);\n return result;\n};\n","import { getClipboardFromHTMLText } from './clipboard';\nimport { ClipboardData } from '../../types/clipboard';\n\nexport const setDataTransferClipboard = (dataTransfer: Pick<DataTransfer, 'getData' | 'setData'> | null, htmlText: string) => {\n dataTransfer?.setData(`text/html`, htmlText);\n};\n\nexport const setDataTransferClipboardText = (data: Pick<DataTransfer, 'getData' | 'setData'> | null, text: string) => {\n data?.setData(`text/plain`, text);\n};\n\nexport const getDataTransferClipboard = (data: Pick<DataTransfer, 'getData' | 'setData'> | null): ClipboardData => {\n const html = data?.getData(`text/html`);\n if (html) {\n const htmlClipboardData = getClipboardFromHTMLText(html);\n if (htmlClipboardData) {\n return htmlClipboardData;\n }\n const textData = getDataTransferClipboardText(data);\n if (textData) {\n return {\n html,\n ...textData\n };\n } else {\n return { html };\n }\n } else {\n const textData = getDataTransferClipboardText(data);\n return textData;\n }\n};\n\nexport const getDataTransferClipboardText = (data: Pick<DataTransfer, 'getData' | 'setData'> | null): ClipboardData => {\n if (!data) {\n return null;\n }\n const text = data?.getData(`text/plain`);\n if (text) {\n const htmlClipboardData = getClipboardFromHTMLText(text);\n if (htmlClipboardData) {\n return htmlClipboardData;\n }\n }\n return { text };\n};\n","import { Element } from 'slate';\nimport { getClipboardFromHTMLText } from './clipboard';\nimport { blobAsString, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, stripHtml } from './common';\nimport { ClipboardData } from '../../types/clipboard';\n\nexport const setNavigatorClipboard = async (htmlText: string, data: Element[], text: string = '') => {\n let textClipboard = text;\n if (isClipboardWriteSupported()) {\n await navigator.clipboard.write([\n new ClipboardItem({\n 'text/html': new Blob([htmlText], {\n type: 'text/html'\n }),\n 'text/plain': new Blob([textClipboard ?? JSON.stringify(data)], { type: 'text/plain' })\n })\n ]);\n }\n};\n\nexport const getNavigatorClipboard = async () => {\n if (!isClipboardReadSupported()) {\n return null;\n }\n const clipboardItems = await navigator.clipboard.read();\n let clipboardData: ClipboardData = {};\n\n if (Array.isArray(clipboardItems) && clipboardItems[0] instanceof ClipboardItem) {\n for (const item of clipboardItems) {\n if (isClipboardFile(item)) {\n const clipboardFiles = item.types.filter(type => type.match(/^image\\//));\n const fileBlobs = await Promise.all(clipboardFiles.map(type => item.getType(type)!));\n const urls = (fileBlobs.filter(Boolean) as (File | Blob)[]).map(blob => URL.createObjectURL(blob));\n const files = await Promise.all(\n urls.map(async url => {\n const blob = await (await fetch(url)).blob();\n return new File([blob], 'file', { type: blob.type });\n })\n );\n clipboardData = {\n ...clipboardData,\n files\n };\n }\n if (item.types.includes('text/html')) {\n const htmlContent = await blobAsString(await item.getType('text/html'));\n const htmlClipboardData = getClipboardFromHTMLText(htmlContent);\n if (htmlClipboardData) {\n clipboardData = { ...clipboardData, ...htmlClipboardData };\n return clipboardData;\n }\n if (htmlContent && htmlContent.trim()) {\n clipboardData = { ...clipboardData, html: htmlContent };\n }\n }\n if (item.types.includes('text/plain')) {\n const textContent = await blobAsString(await item.getType('text/plain'));\n clipboardData = {\n ...clipboardData,\n text: stripHtml(textContent)\n };\n }\n }\n }\n return clipboardData;\n};\n","import { DOMNode, DOMText, isDOMElement, isDOMNode } from 'slate-dom';\n\nexport const SlateFragmentAttributeKey = 'data-slate-angular-fragment';\n\n/**\n * Get x-slate-fragment attribute from data-slate-angular-fragment\n */\nconst catchSlateFragment = /data-slate-angular-fragment=\"(.+?)\"/m;\nexport const getSlateFragmentAttribute = (htmlData: string): string | void => {\n const [, fragment] = htmlData.match(catchSlateFragment) || [];\n return fragment;\n};\n\n/**\n * Check if a DOM node is an element node.\n */\nexport const isDOMText = (value: any): value is DOMText => {\n return isDOMNode(value) && value.nodeType === 3;\n};\n\n/**\n * Get a plaintext representation of the content of a node, accounting for block\n * elements which get a newline appended.\n *\n * The domNode must be attached to the DOM.\n */\nexport const getPlainText = (domNode: DOMNode) => {\n let text = '';\n\n if (isDOMText(domNode) && domNode.nodeValue) {\n return domNode.nodeValue;\n }\n\n if (isDOMElement(domNode)) {\n for (const childNode of Array.from(domNode.childNodes)) {\n text += getPlainText(childNode);\n }\n\n const display = getComputedStyle(domNode).getPropertyValue('display');\n\n if (display === 'block' || display === 'list' || domNode.tagName === 'BR') {\n text += '\\n';\n }\n }\n\n return text;\n};\n\n/**\n * Get the dom selection from Shadow Root if possible, otherwise from the document\n */\nexport const getSelection = (root: Document | ShadowRoot): Selection | null => {\n if ((root as { getSelection: () => Selection }).getSelection != null) {\n return (root as { getSelection: () => Selection }).getSelection();\n }\n return document.getSelection();\n};\n","import { Element } from 'slate';\nimport { ClipboardData } from '../../types/clipboard';\nimport { isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported } from './common';\nimport { getDataTransferClipboard, setDataTransferClipboard, setDataTransferClipboardText } from './data-transfer';\nimport { getNavigatorClipboard, setNavigatorClipboard } from './navigator-clipboard';\nimport { getSlateFragmentAttribute, SlateFragmentAttributeKey } from '../dom';\n\nexport const buildHTMLText = (wrapper: HTMLElement, attach: HTMLElement, data: Element[]) => {\n const stringObj = JSON.stringify(data);\n const encoded = window.btoa(encodeURIComponent(stringObj));\n attach.setAttribute(SlateFragmentAttributeKey, encoded);\n return wrapper.innerHTML;\n};\n\nexport const getClipboardFromHTMLText = (html: string): ClipboardData => {\n const fragmentAttribute = getSlateFragmentAttribute(html);\n if (fragmentAttribute) {\n try {\n const decoded = decodeURIComponent(window.atob(fragmentAttribute));\n const result = JSON.parse(decoded);\n if (result && Array.isArray(result) && result.length > 0) {\n return {\n elements: result\n };\n }\n } catch (error) {\n console.error(error);\n return null;\n }\n }\n return null;\n};\n\nexport const createClipboardData = (html: string, elements: Element[], text: string, files: File[]): ClipboardData => {\n const data = { elements, text, html, files };\n return data;\n};\n\nexport const getClipboardData = async (dataTransfer?: DataTransfer): Promise<ClipboardData> => {\n let clipboardData = null;\n if (dataTransfer) {\n let filesData = {};\n if (dataTransfer.files.length) {\n filesData = { ...filesData, files: Array.from(dataTransfer.files) };\n }\n clipboardData = getDataTransferClipboard(dataTransfer);\n return { ...clipboardData, ...filesData };\n }\n if (isClipboardReadSupported()) {\n return await getNavigatorClipboard();\n }\n return clipboardData;\n};\n\n/**\n * @param wrapper get wrapper.innerHTML string which will be written in clipboard\n * @param attach attach must be child element of wrapper which will be attached json data\n * @returns void\n */\nexport const setClipboardData = async (\n clipboardData: ClipboardData,\n wrapper: HTMLElement,\n attach: HTMLElement,\n dataTransfer?: Pick<DataTransfer, 'getData' | 'setData'>\n) => {\n if (!clipboardData) {\n return;\n }\n const { elements, text } = clipboardData;\n if (isClipboardWriteSupported()) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n // TODO\n // maybe fail to write when copy some cell in table\n return await setNavigatorClipboard(htmlText, elements, text);\n }\n\n if (dataTransfer) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n setDataTransferClipboard(dataTransfer, htmlText);\n setDataTransferClipboardText(dataTransfer, text);\n return;\n }\n\n // Compatible with situations where navigator.clipboard.write is not supported and dataTransfer is empty\n // Such as contextmenu copy in Firefox.\n if (isClipboardWriteTextSupported()) {\n const htmlText = buildHTMLText(wrapper, attach, elements);\n return await navigator.clipboard.writeText(htmlText);\n }\n};\n","import { Editor, Element, Node, Operation, Path, PathRef, Range, Transforms } from 'slate';\nimport { OriginEvent } from '../types/clipboard';\nimport { SlateError } from '../types/error';\nimport { completeTable, isInvalidTable } from '../utils';\nimport { getClipboardData, setClipboardData } from '../utils/clipboard/clipboard';\nimport { AngularEditor } from './angular-editor';\nimport { Key, NODE_TO_KEY, withDOM } from 'slate-dom';\nimport { getPlainText, isDOMText } from '../utils/dom';\n\nexport const withAngular = <T extends Editor>(editor: T, clipboardFormatKey = 'x-slate-fragment') => {\n let e = editor as T & AngularEditor;\n let { apply } = e;\n\n e = withDOM(e, clipboardFormatKey);\n\n e.setFragmentData = (dataTransfer?: Pick<DataTransfer, 'getData' | 'setData'>, originEvent?: OriginEvent) => {\n const { selection } = e;\n\n if (!selection) {\n return;\n }\n\n const [start, end] = Range.edges(selection);\n const startVoid = Editor.void(e, { at: start.path });\n const endVoid = Editor.void(e, { at: end.path });\n\n if (Range.isCollapsed(selection) && !startVoid) {\n return;\n }\n\n // Create a fake selection so that we can add a Base64-encoded copy of the\n // fragment to the HTML, to decode on future pastes.\n const domRange = AngularEditor.toDOMRange(e, selection);\n let contents = domRange.cloneContents();\n let attach = contents.childNodes[0] as HTMLElement;\n\n // Make sure attach is non-empty, since empty nodes will not get copied.\n const contentsArray = Array.from(contents.children);\n contentsArray.forEach(node => {\n if (node.textContent && node.textContent.trim() !== '') {\n attach = node as HTMLElement;\n }\n });\n\n // COMPAT: If the end node is a void node, we need to move the end of the\n // range from the void node's spacer span, to the end of the void node's\n // content, since the spacer is before void's content in the DOM.\n if (endVoid) {\n const [voidNode] = endVoid;\n const r = domRange.cloneRange();\n const domNode = AngularEditor.toDOMNode(e, voidNode);\n r.setEndAfter(domNode);\n contents = r.cloneContents();\n }\n\n // COMPAT: If the start node is a void node, we need to attach the encoded\n // fragment to the void node's content node instead of the spacer, because\n // attaching it to empty `<div>/<span>` nodes will end up having it erased by\n // most browsers. (2018/04/27)\n if (startVoid) {\n attach = contents.querySelector('[data-slate-spacer]')! as HTMLElement;\n }\n\n // Remove any zero-width space spans from the cloned DOM so that they don't\n // show up elsewhere when pasted.\n Array.from(contents.querySelectorAll('[data-slate-zero-width]')).forEach(zw => {\n const isNewline = zw.getAttribute('data-slate-zero-width') === 'n';\n zw.textContent = isNewline ? '\\n' : '';\n });\n\n // Set a `data-slate-fragment` attribute on a non-empty node, so it shows up\n // in the HTML, and can be used for intra-Slate pasting. If it's a text\n // node, wrap it in a `<span>` so we have something to set an attribute on.\n if (isDOMText(attach)) {\n const span = attach.ownerDocument.createElement('span');\n // COMPAT: In Chrome and Safari, if we don't add the `white-space` style\n // then leading and trailing spaces will be ignored. (2017/09/21)\n span.style.whiteSpace = 'pre';\n span.appendChild(attach);\n contents.appendChild(span);\n attach = span;\n }\n\n const fragment = e.getFragment();\n\n // Add the content to a <div> so that we can get its inner HTML.\n const div = contents.ownerDocument.createElement('div');\n const attachWrapper = document.createElement('div');\n const elements = Array.from(contents.children);\n if (isInvalidTable(elements)) {\n contents = completeTable(contents.cloneNode(true) as DocumentFragment);\n }\n\n attachWrapper.appendChild(contents);\n div.appendChild(attachWrapper);\n div.setAttribute('hidden', 'true');\n contents.ownerDocument.body.appendChild(div);\n setClipboardData({ text: getPlainText(div), elements: fragment as Element[] }, div, attachWrapper, dataTransfer);\n contents.ownerDocument.body.removeChild(div);\n };\n\n e.deleteCutData = () => {\n const { selection } = editor;\n if (selection) {\n if (Range.isExpanded(selection)) {\n Editor.deleteFragment(editor);\n } else {\n const node = Node.parent(editor, selection.anchor.path);\n if (Element.isElement(node) && Editor.isVoid(editor, node)) {\n Transforms.delete(editor);\n }\n }\n }\n };\n\n e.insertData = async (data: DataTransfer) => {\n if (!(await e.customInsertFragmentData(data))) {\n e.insertTextData(data);\n }\n };\n\n e.customInsertFragmentData = async (data: DataTransfer): Promise<boolean> => {\n /**\n * Checking copied fragment from application/x-slate-fragment or data-slate-fragment\n */\n const clipboardData = await getClipboardData(data);\n if (clipboardData && clipboardData.elements) {\n e.insertFragment(clipboardData.elements);\n return true;\n }\n return false;\n };\n\n e.customInsertTextData = async (data: DataTransfer): Promise<boolean> => {\n const clipboardData = await getClipboardData(data);\n\n if (clipboardData && clipboardData.text) {\n const lines = clipboardData.text.split(/\\r\\n|\\r|\\n/);\n let split = false;\n\n for (const line of lines) {\n if (split) {\n Transforms.splitNodes(e, { always: true });\n }\n\n e.insertText(line);\n split = true;\n }\n return true;\n }\n return false;\n };\n\n e.onKeydown = () => {};\n\n e.onClick = () => {};\n\n e.isBlockCard = element => false;\n\n e.isExpanded = element => true;\n\n e.onError = (errorData: SlateError) => {\n if (errorData.nativeError) {\n console.error(errorData.nativeError);\n } else {\n console.error(errorData);\n }\n };\n\n // exist issue for move operation in withDOM\n e.apply = (op: Operation) => {\n const matches: [Path | PathRef, Key][] = [];\n\n switch (op.type) {\n case 'insert_text':\n case 'remove_text':\n case 'set_node': {\n for (const [node, path] of Editor.levels(e, { at: op.path })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([path, key]);\n }\n\n break;\n }\n\n case 'insert_node':\n case 'remove_node':\n case 'merge_node':\n case 'split_node': {\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.path)\n })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([path, key]);\n }\n\n break;\n }\n\n case 'move_node': {\n const commonPath = Path.common(Path.parent(op.path), Path.parent(op.newPath));\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.path)\n })) {\n const key = AngularEditor.findKey(e, node);\n matches.push([Editor.pathRef(editor, path), key]);\n }\n for (const [node, path] of Editor.levels(e, {\n at: Path.parent(op.newPath)\n })) {\n if (path.length > commonPath.length) {\n const key = AngularEditor.findKey(e, node);\n matches.push([Editor.pathRef(editor, path), key]);\n }\n }\n break;\n }\n }\n\n apply(op);\n\n for (const [source, key] of matches) {\n const [node] = Editor.node(e, Path.isPath(source) ? source : source.current);\n NODE_TO_KEY.set(node, key);\n }\n };\n\n return e;\n};\n","export const TOP_BLUR = 'blur';\nexport const TOP_COMPOSITION_END = 'compositionend';\nexport const TOP_COMPOSITION_START = 'compositionstart';\nexport const TOP_COMPOSITION_UPDATE = 'compositionupdate';\nexport const TOP_KEY_DOWN = 'keydown';\nexport const TOP_KEY_PRESS = 'keypress';\nexport const TOP_KEY_UP = 'keyup';\nexport const TOP_MOUSE_DOWN = 'mousedown';\nexport const TOP_MOUSE_MOVE = 'mousemove';\nexport const TOP_MOUSE_OUT = 'mouseout';\nexport const TOP_TEXT_INPUT = 'textInput';\nexport const TOP_PASTE = 'paste';\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\n\nlet root = null;\nlet startText = null;\nlet fallbackText = null;\n\nexport function initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\n\nexport function reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\n\nexport function getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n let start;\n const startValue = startText;\n const startLength = startValue.length;\n let end;\n const endValue = getText();\n const endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n const minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n const sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\n\nexport function getText() {\n if ('value' in root) {\n return root.value;\n }\n return root.textContent;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n TOP_BLUR,\n TOP_COMPOSITION_START,\n TOP_COMPOSITION_END,\n TOP_COMPOSITION_UPDATE,\n TOP_KEY_DOWN,\n TOP_KEY_PRESS,\n TOP_KEY_UP,\n TOP_MOUSE_DOWN,\n TOP_TEXT_INPUT,\n TOP_PASTE\n} from './DOMTopLevelEventTypes';\nimport {\n getData as FallbackCompositionStateGetData,\n initialize as FallbackCompositionStateInitialize,\n reset as FallbackCompositionStateReset\n} from './FallbackCompositionState';\n\nconst canUseDOM: boolean = !!(\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n);\n\nconst END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nconst START_KEYCODE = 229;\n\nconst canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\n\nlet documentMode = null;\nif (canUseDOM && 'documentMode' in document) {\n documentMode = (document as any).documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nconst canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nconst useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11));\n\nconst SPACEBAR_CODE = 32;\nconst SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nconst eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nlet hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_KEY_UP:\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case TOP_KEY_DOWN:\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case TOP_KEY_PRESS:\n case TOP_MOUSE_DOWN:\n case TOP_BLUR:\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n const detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n */\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n}\n\n// Track the current IME composition status, if any.\nlet isComposing = false;\n\nfunction getNativeBeforeInputChars(topLevelType: any, nativeEvent) {\n switch (topLevelType) {\n case TOP_COMPOSITION_END:\n return getDataFromCustomEvent(nativeEvent);\n case TOP_KEY_PRESS:\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n const which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case TOP_TEXT_INPUT:\n // Record the characters to be added to the DOM.\n const chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n */\nfunction getFallbackBeforeInputChars(topLevelType: any, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === TOP_COMPOSITION_END || (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent))) {\n const chars = FallbackCompositionStateGetData();\n FallbackCompositionStateReset();\n isComposing = false;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case TOP_PASTE:\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case TOP_KEY_PRESS:\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n return null;\n case TOP_COMPOSITION_END:\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n */\nexport function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n let chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n const beforeInputEvent = new BeforeInputEvent();\n beforeInputEvent.data = chars;\n beforeInputEvent.nativeEvent = nativeEvent;\n return beforeInputEvent;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nconst BeforeInputEventPlugin = {\n extractEvents: (topLevelType, targetInst, nativeEvent, nativeEventTarget) => {\n return extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n }\n};\n\nexport class BeforeInputEvent {\n data: string;\n nativeEvent: Event;\n}\nexport default BeforeInputEventPlugin;\n","export const BEFORE_INPUT_EVENTS: {\n name: string;\n handler: string;\n isTriggerBeforeInput: boolean;\n}[] = [\n // { name: 'blur', handler: 'onBlur', isTriggerBeforeInput: true },\n // { name: 'compositionstart', handler: 'onCompositionStart', isTriggerBeforeInput: true },\n { name: 'compositionupdate', handler: null, isTriggerBeforeInput: true },\n // { name: 'compositionend', handler: 'onCompositionEnd', isTriggerBeforeInput: false },\n // { name: 'keydown', handler: 'onKeyDown', isTriggerBeforeInput: true },\n { name: 'keypress', handler: null, isTriggerBeforeInput: true },\n { name: 'keyup', handler: 'onKeyUp', isTriggerBeforeInput: true },\n { name: 'mousedown', handler: 'onMouseDown', isTriggerBeforeInput: true },\n { name: 'textInput', handler: null, isTriggerBeforeInput: true }\n // { name: 'paste', handler: 'onPaste', isTriggerBeforeInput: true }\n];\n","import { Descendant } from 'slate';\n\nexport enum SlateErrorCode {\n ToNativeSelectionError = 2100,\n ToSlateSelectionError = 2101,\n OnDOMBeforeInputError = 2102,\n OnSyntheticBeforeInputError = 2103,\n OnDOMKeydownError = 2104,\n GetStartPointError = 2105,\n NotFoundPreviousRootNodeError = 3100,\n InvalidValueError = 4100\n}\n\nexport interface SlateError {\n code?: SlateErrorCode | number;\n name?: string;\n nativeError?: Error;\n data?: Descendant[];\n}\n","import { Component, ChangeDetectionStrategy, ViewChild, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'slate-string-template',\n templateUrl: 'template.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateStringTemplate {\n @ViewChild('compatibleStringTemplate', { read: TemplateRef, static: true })\n compatibleStringTemplate: TemplateRef<any>;\n\n @ViewChild('voidStringTemplate', { read: TemplateRef, static: true })\n voidStringTemplate: TemplateRef<any>;\n\n @ViewChild('emptyTextTemplate', { read: TemplateRef, static: true })\n emptyTextTemplate: TemplateRef<any>;\n}\n","<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n","import { Editor } from 'slate';\nimport { EDITOR_TO_ELEMENT } from 'slate-dom';\n\nexport function restoreDom(editor: Editor, execute: () => void) {\n const editable = EDITOR_TO_ELEMENT.get(editor);\n let observer = new MutationObserver(mutations => {\n mutations.reverse().forEach(mutation => {\n if (mutation.type === 'characterData') {\n // We don't want to restore the DOM for characterData mutations\n // because this interrupts the composition.\n return;\n }\n\n mutation.removedNodes.forEach(node => {\n mutation.target.insertBefore(node, mutation.nextSibling);\n });\n\n mutation.addedNodes.forEach(node => {\n mutation.target.removeChild(node);\n });\n });\n disconnect();\n execute();\n });\n const disconnect = () => {\n observer.disconnect();\n observer = null;\n };\n observer.observe(editable, { subtree: true, childList: true, characterData: true, characterDataOldValue: true });\n setTimeout(() => {\n if (observer) {\n disconnect();\n execute();\n }\n }, 0);\n}\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseElementComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseElementComponent>>('slate-default-element-token');\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseTextComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_TEXT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseTextComponent>>('slate-default-text-token');\n\nexport const SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseTextComponent>>(\n 'slate-default-void-text-token'\n);\n","import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\n\n@Component({\n selector: 'slate-children-outlet',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateChildrenOutlet {\n constructor(private elementRef: ElementRef<HTMLElement>) {}\n getNativeElement() {\n return this.elementRef.nativeElement;\n }\n}\n","export interface BeforeContextChange<T> {\n beforeContextChange: (value: T) => void;\n}\n\nexport interface AfterContextChange<> {\n afterContextChange: () => void;\n}\n\nexport function hasBeforeContextChange<T>(value): value is BeforeContextChange<T> {\n if (value.beforeContextChange) {\n return true;\n }\n return false;\n}\n\nexport function hasAfterContextChange<T>(value): value is AfterContextChange {\n if (value.afterContextChange) {\n return true;\n }\n return false;\n}\n","import { Descendant } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { isComponentType, isTemplateRef } from '../../utils/view';\nimport { SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';\nimport { SlateBlockCard } from '../../components/block-card/block-card.component';\n\nexport function createEmbeddedViewOrComponent(\n viewType: ViewType,\n context: any,\n viewContext: SlateViewContext,\n viewContainerRef: ViewContainerRef\n) {\n if (isTemplateRef(viewType)) {\n const embeddedViewContext = {\n context,\n viewContext\n };\n const embeddedViewRef = viewContainerRef.createEmbeddedView<any>(viewType, embeddedViewContext);\n embeddedViewRef.detectChanges();\n return embeddedViewRef;\n }\n if (isComponentType(viewType)) {\n const componentRef = viewContainerRef.createComponent(viewType, {\n injector: viewContainerRef.injector\n }) as ComponentRef<any>;\n componentRef.instance.viewContext = viewContext;\n componentRef.instance.context = context;\n componentRef.changeDetectorRef.detectChanges();\n return componentRef;\n }\n}\n\nexport function updateContext(\n view: EmbeddedViewRef<any> | ComponentRef<any>,\n newContext: SlateElementContext | SlateTextContext | SlateLeafContext,\n viewContext: SlateViewContext\n) {\n if (view instanceof ComponentRef) {\n view.instance.context = newContext;\n } else {\n view.context.context = newContext;\n view.context.viewContext = viewContext;\n view.detectChanges();\n }\n}\n\nexport function mount(\n views: (EmbeddedViewRef<any> | ComponentRef<any>)[],\n blockCards: (ComponentRef<SlateBlockCard> | null)[] | null,\n outletParent: HTMLElement,\n outletElement: HTMLElement | null\n) {\n if (views.length > 0) {\n const fragment = document.createDocumentFragment();\n views.forEach((view, index) => {\n const blockCard = blockCards ? blockCards[index] : undefined;\n fragment.append(...getRootNodes(view, blockCard));\n });\n if (outletElement) {\n outletElement.parentElement.insertBefore(fragment, outletElement);\n outletElement.remove();\n } else {\n outletParent.prepend(fragment);\n }\n }\n}\n\nexport function getRootNodes(ref: EmbeddedViewRef<any> | ComponentRef<any>, blockCard?: ComponentRef<SlateBlockCard>): HTMLElement[] {\n if (blockCard) {\n return [blockCard.instance.nativeElement];\n }\n if (ref instanceof ComponentRef) {\n ((ref.hostView as any).rootNodes as (HTMLElement | any)[]).forEach(ele => {\n if (!(ele instanceof HTMLElement)) {\n ele.remove();\n }\n });\n return [ref.instance.nativeElement];\n } else {\n const result: HTMLElement[] = [];\n ref.rootNodes.forEach(rootNode => {\n const isHTMLElement = rootNode instanceof HTMLElement;\n const isSlateNodeOfLeaf =\n isHTMLElement && (rootNode.hasAttribute('data-slate-node') || rootNode.hasAttribute('data-slate-leaf'));\n if (isSlateNodeOfLeaf && result.every(item => !item.contains(rootNode))) {\n result.push(rootNode);\n }\n if (!isHTMLElement) {\n rootNode.remove();\n }\n });\n return result;\n }\n}\n\nexport function mountOnItemChange(\n index: number,\n item: Descendant,\n views: (EmbeddedViewRef<any> | ComponentRef<any>)[],\n blockCards: (ComponentRef<SlateBlockCard> | null)[] | null,\n outletParent: HTMLElement,\n firstRootNode: HTMLElement | null,\n viewContext: SlateViewContext\n) {\n const view = views[index];\n let rootNodes = getRootNodes(view);\n if (blockCards) {\n const isBlockCard = viewContext.editor.isBlockCard(item);\n if (isBlockCard) {\n const blockCard = blockCards[index];\n rootNodes = [blockCard.instance.nativeElement];\n }\n }\n if (index === 0) {\n if (firstRootNode) {\n rootNodes.forEach(rootNode => {\n firstRootNode.insertAdjacentElement('beforebegin', rootNode);\n });\n } else {\n outletParent.prepend(...rootNodes);\n }\n } else {\n const previousView = views[index - 1];\n const blockCard = blockCards ? blockCards[index - 1] : null;\n const previousRootNodes = getRootNodes(previousView, blockCard);\n let previousRootNode = previousRootNodes[previousRootNodes.length - 1];\n rootNodes.forEach(rootNode => {\n previousRootNode.insertAdjacentElement('afterend', rootNode);\n previousRootNode = rootNode;\n });\n }\n}\n","import { LeafPosition, Text } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, IterableDiffer, IterableDiffers, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';\nimport { createEmbeddedViewOrComponent, getRootNodes, mount, mountOnItemChange, updateContext } from './utils';\n\nexport class LeavesRender {\n private decoratedLeaves: { leaf: Text; position?: LeafPosition }[];\n private views: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n private contexts: SlateLeafContext[] = [];\n private viewTypes: ViewType[] = [];\n private differ: IterableDiffer<any>;\n\n constructor(\n private viewContext: SlateViewContext,\n private viewContainerRef: ViewContainerRef,\n private getOutletParent: () => HTMLElement,\n private getOutletElement: () => HTMLElement\n ) {}\n\n public initialize(context: SlateTextContext) {\n const { decoratedLeaves, contexts } = this.getLeaves(context);\n this.decoratedLeaves = decoratedLeaves;\n this.contexts = contexts;\n this.decoratedLeaves.forEach((leaf, index) => {\n const context = getContext(index, this.contexts);\n const viewType = getViewType(context, this.viewContext);\n const view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n this.views.push(view);\n this.contexts.push(context);\n this.viewTypes.push(viewType);\n });\n mount(this.views, null, this.getOutletParent(), this.getOutletElement());\n const newDiffers = this.viewContainerRef.injector.get(IterableDiffers);\n this.differ = newDiffers.find(this.decoratedLeaves).create(trackBy(this.viewContext));\n this.differ.diff(this.decoratedLeaves);\n }\n\n public update(context: SlateTextContext) {\n const { decoratedLeaves, contexts } = this.getLeaves(context);\n const outletParent = this.getOutletParent();\n const diffResult = this.differ.diff(decoratedLeaves);\n if (diffResult) {\n let firstRootNode = getRootNodes(this.views[0])[0];\n const newContexts = [];\n const newViewTypes = [];\n const newViews = [];\n diffResult.forEachItem(record => {\n let context = getContext(record.currentIndex, contexts);\n const viewType = getViewType(context, this.viewContext);\n newViewTypes.push(viewType);\n let view: EmbeddedViewRef<any> | ComponentRef<any>;\n if (record.previousIndex === null) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n newContexts.push(context);\n newViews.push(view);\n mountOnItemChange(record.currentIndex, record.item, newViews, null, outletParent, firstRootNode, this.viewContext);\n } else {\n const previousView = this.views[record.previousIndex];\n const previousViewType = this.viewTypes[record.previousIndex];\n if (previousViewType !== viewType) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n const firstRootNode = getRootNodes(previousView, null)[0];\n const newRootNodes = getRootNodes(view, null);\n firstRootNode.replaceWith(...newRootNodes);\n previousView.destroy();\n } else {\n view = previousView;\n updateContext(previousView, context, this.viewContext);\n }\n newContexts.push(context);\n newViews.push(view);\n }\n });\n diffResult.forEachRemovedItem(record => {\n const view = this.views[record.previousIndex];\n view.destroy();\n });\n diffResult.forEachMovedItem(record => {\n mountOnItemChange(record.currentIndex, record.item, newViews, null, outletParent, firstRootNode, this.viewContext);\n });\n this.viewTypes = newViewTypes;\n this.views = newViews;\n this.contexts = newContexts;\n this.decoratedLeaves = decoratedLeaves;\n }\n }\n\n private getLeaves(context: SlateTextContext) {\n const decoratedLeaves = Text.decorations(context.text, context.decorations);\n const contexts: SlateLeafContext[] = decoratedLeaves.map((decoratedLeaf, index) => {\n return {\n leaf: decoratedLeaf.leaf,\n leafPosition: decoratedLeaf.position,\n text: context.text,\n parent: context.parent,\n index,\n isLast: context.isLast && index === decoratedLeaves.length - 1\n };\n });\n return { decoratedLeaves, contexts };\n }\n}\n\nexport function getContext(index: number, leafContexts: SlateLeafContext[]): SlateLeafContext {\n return leafContexts[index];\n}\n\nexport function getViewType(leafContext: SlateLeafContext, viewContext: SlateViewContext) {\n return (viewContext.renderLeaf && viewContext.renderLeaf(leafContext.leaf)) || viewContext.defaultLeaf;\n}\n\nexport function trackBy(viewContext: SlateViewContext) {\n return (index, node) => {\n return index;\n };\n}\n","import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'slate-block-card, [slateBlockCard]',\n templateUrl: 'block-card.component.html',\n standalone: true\n})\nexport class SlateBlockCard implements OnInit {\n @ViewChild('centerContianer', { static: true })\n centerContianer: ElementRef;\n\n centerRootNodes: HTMLElement[];\n\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n\n get centerContainerElement() {\n return this.centerContianer.nativeElement as HTMLElement;\n }\n\n constructor(private elementRef: ElementRef) {}\n\n ngOnInit() {\n this.nativeElement.classList.add(`slate-block-card`);\n }\n\n append() {\n this.centerRootNodes.forEach(\n rootNode => !this.centerContainerElement.contains(rootNode) && this.centerContainerElement.appendChild(rootNode)\n );\n }\n\n initializeCenter(rootNodes: HTMLElement[]) {\n this.centerRootNodes = rootNodes;\n this.append();\n }\n}\n","<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>\n","import { Ancestor, Descendant, Range, Editor, Element, Path } from 'slate';\nimport { ComponentRef, EmbeddedViewRef, IterableDiffer, IterableDiffers, ViewContainerRef } from '@angular/core';\nimport { ViewType } from '../../types/view';\nimport { SlateChildrenContext, SlateElementContext, SlateTextContext, SlateViewContext } from '../context';\nimport { AngularEditor } from '../../plugins/angular-editor';\nimport { SlateErrorCode } from '../../types/error';\nimport { EDITOR_TO_AFTER_VIEW_INIT_QUEUE } from '../../utils/weak-maps';\nimport { isDecoratorRangeListEqual } from '../../utils/range-list';\nimport { SlateBlockCard } from '../../components/block-card/block-card.component';\nimport { createEmbeddedViewOrComponent, getRootNodes, mount, mountOnItemChange, updateContext } from './utils';\nimport { NODE_TO_INDEX, NODE_TO_PARENT } from 'slate-dom';\n\nexport class ListRender {\n private children: Descendant[];\n private views: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n // private addedViews: (EmbeddedViewRef<any> | ComponentRef<any>)[] = [];\n private blockCards: (ComponentRef<SlateBlockCard> | null)[] = [];\n private contexts: (SlateTextContext | SlateElementContext)[] = [];\n private viewTypes: ViewType[] = [];\n private differ: IterableDiffer<any> | null = null;\n public initialized = false;\n\n constructor(\n private viewContext: SlateViewContext,\n private viewContainerRef: ViewContainerRef,\n private getOutletParent: () => HTMLElement,\n private getOutletElement: () => HTMLElement | null\n ) {}\n\n public initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext) {\n this.initialized = true;\n this.children = children;\n const parentPath = AngularEditor.findPath(this.viewContext.editor, parent);\n children.forEach((descendant, index) => {\n NODE_TO_INDEX.set(descendant, index);\n NODE_TO_PARENT.set(descendant, parent);\n const context = getContext(index, descendant, parentPath, childrenContext, this.viewContext);\n const viewType = getViewType(descendant, parent, this.viewContext);\n const view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n const blockCard = createBlockCard(descendant, view, this.viewContainerRef, this.viewContext);\n this.views.push(view);\n this.contexts.push(context);\n this.viewTypes.push(viewType);\n this.blockCards.push(blockCard);\n });\n mount(this.views, this.blockCards, this.getOutletParent(), this.getOutletElement());\n const newDiffers = this.viewContainerRef.injector.get(IterableDiffers);\n this.differ = newDiffers.find(children).create(trackBy(this.viewContext));\n this.differ.diff(children);\n if (parent === this.viewContext.editor) {\n executeAfterViewInit(this.viewContext.editor);\n }\n }\n\n public update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext) {\n if (!this.initialized || this.children.length === 0) {\n this.initialize(children, parent, childrenContext);\n return;\n }\n if (!this.differ) {\n throw new Error('Exception: Can not find differ ');\n }\n const outletParent = this.getOutletParent();\n const diffResult = this.differ.diff(children);\n const parentPath = AngularEditor.findPath(this.viewContext.editor, parent);\n if (diffResult) {\n let firstRootNode = getRootNodes(this.views[0], this.blockCards[0])[0];\n const newContexts = [];\n const newViewTypes = [];\n const newViews = [];\n const newBlockCards: (ComponentRef<SlateBlockCard> | null)[] = [];\n diffResult.forEachItem(record => {\n NODE_TO_INDEX.set(record.item, record.currentIndex);\n NODE_TO_PARENT.set(record.item, parent);\n let context = getContext(record.currentIndex, record.item, parentPath, childrenContext, this.viewContext);\n const viewType = getViewType(record.item, parent, this.viewContext);\n newViewTypes.push(viewType);\n let view: EmbeddedViewRef<any> | ComponentRef<any>;\n let blockCard: ComponentRef<SlateBlockCard> | null;\n if (record.previousIndex === null) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);\n newContexts.push(context);\n newViews.push(view);\n newBlockCards.push(blockCard);\n mountOnItemChange(\n record.currentIndex,\n record.item,\n newViews,\n newBlockCards,\n outletParent,\n firstRootNode,\n this.viewContext\n );\n } else {\n const previousView = this.views[record.previousIndex];\n const previousViewType = this.viewTypes[record.previousIndex];\n const previousContext = this.contexts[record.previousIndex];\n const previousBlockCard = this.blockCards[record.previousIndex];\n if (previousViewType !== viewType) {\n view = createEmbeddedViewOrComponent(viewType, context, this.viewContext, this.viewContainerRef);\n blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);\n const firstRootNode = getRootNodes(previousView, previousBlockCard)[0];\n const newRootNodes = getRootNodes(view, blockCard);\n firstRootNode.replaceWith(...newRootNodes);\n previousView.destroy();\n previousBlockCard?.destroy();\n } else {\n view = previousView;\n blockCard = previousBlockCard;\n if (memoizedContext(this.viewContext, record.item, previousContext as any, context as any)) {\n context = previousContext;\n } else {\n updateContext(previousView, context, this.viewContext);\n }\n }\n newContexts.push(context);\n newViews.push(view);\n newBlockCards.push(blockCard);\n }\n });\n diffResult.forEachOperation(record => {\n // removed\n if (record.currentIndex === null) {\n const view = this.views[record.previousIndex];\n const blockCard = this.blockCards[record.previousIndex];\n view.destroy();\n blockCard?.destroy();\n }\n // moved\n if (record.previousIndex !== null && record.currentIndex !== null) {\n mountOnItemChange(\n record.currentIndex,\n record.item,\n newViews,\n newBlockCards,\n outletParent,\n firstRootNode,\n this.viewContext\n );\n // Solve the block-card DOMElement loss when moving nodes\n newBlockCards[record.currentIndex]?.instance.append();\n }\n });\n this.viewTypes = newViewTypes;\n this.views = newViews;\n this.contexts = newContexts;\n this.children = children;\n this.blockCards = newBlockCards;\n if (parent === this.viewContext.editor) {\n executeAfterViewInit(this.viewContext.editor);\n }\n } else {\n const newContexts = [];\n this.children.forEach((child, index) => {\n NODE_TO_INDEX.set(child, index);\n NODE_TO_PARENT.set(child, parent);\n let context = getContext(index, child, parentPath, childrenContext, this.viewContext);\n const previousContext = this.contexts[index];\n if (memoizedContext(this.viewContext, child, previousContext as any, context as any)) {\n context = previousContext;\n } else {\n updateContext(this.views[index], context, this.viewContext);\n }\n newContexts.push(context);\n });\n this.contexts = newContexts;\n }\n }\n\n public destroy() {\n this.children.forEach((element: Element, index: number) => {\n if (this.views[index]) {\n this.views[index].destroy();\n }\n if (this.blockCards[index]) {\n this.blockCards[index].destroy();\n }\n });\n this.views = [];\n this.blockCards = [];\n this.contexts = [];\n this.viewTypes = [];\n this.initialized = false;\n this.differ = null;\n }\n}\n\nexport function getContext(\n index: number,\n item: Descendant,\n parentPath: Path,\n childrenContext: SlateChildrenContext,\n viewContext: SlateViewContext\n): SlateElementContext | SlateTextContext {\n if (Element.isElement(item)) {\n const computedContext = getCommonContext(index, item, parentPath, viewContext, childrenContext);\n const key = AngularEditor.findKey(viewContext.editor, item);\n const isInline = viewContext.editor.isInline(item);\n const isVoid = viewContext.editor.isVoid(item);\n const elementContext: SlateElementContext = {\n element: item,\n ...computedContext,\n attributes: {\n 'data-slate-node': 'element',\n 'data-slate-key': key.id\n },\n decorate: childrenContext.decorate,\n readonly: childrenContext.readonly\n };\n if (isInline) {\n elementContext.attributes['data-slate-inline'] = true;\n }\n if (isVoid) {\n elementContext.attributes['data-slate-void'] = true;\n }\n // add contentEditable for block element only to avoid chinese input be broken\n if (isVoid && !isInline) {\n elementContext.contentEditable = false;\n }\n return elementContext;\n } else {\n const computedContext = getCommonContext(index, item, parentPath, viewContext, childrenContext);\n const isLeafBlock = AngularEditor.isLeafBlock(viewContext.editor, childrenContext.parent);\n const textContext: SlateTextContext = {\n decorations: computedContext.decorations,\n isLast: isLeafBlock && index === childrenContext.parent.children.length - 1,\n parent: childrenContext.parent as Element,\n text: item\n };\n return textContext;\n }\n}\n\nexport function getCommonContext(\n index: number,\n item: Descendant,\n parentPath: Path,\n viewContext: SlateViewContext,\n childrenContext: SlateChildrenContext\n): { selection: Range; decorations: Range[] } {\n const p = parentPath.concat(index);\n try {\n const ds = childrenContext.decorate([item, p]);\n // [list-render] performance optimization: reduce the number of calls to the `Editor.range(viewContext.editor, p)` method\n if (childrenContext.selection || childrenContext.decorations.length > 0) {\n const range = Editor.range(viewContext.editor, p);\n const sel = childrenContext.selection && Range.intersection(range, childrenContext.selection);\n for (const dec of childrenContext.decorations) {\n const d = Range.intersection(dec, range);\n if (d) {\n ds.push(d);\n }\n }\n return { selection: sel, decorations: ds };\n } else {\n return { selection: null, decorations: ds };\n }\n } catch (error) {\n viewContext.editor.onError({\n code: SlateErrorCode.GetStartPointError,\n nativeError: error\n });\n return { selection: null, decorations: [] };\n }\n}\n\nexport function getViewType(item: Descendant, parent: Ancestor, viewContext: SlateViewContext) {\n if (Element.isElement(item)) {\n return (viewContext.renderElement && viewContext.renderElement(item)) || viewContext.defaultElement;\n } else {\n const isVoid = viewContext.editor.isVoid(parent as Element);\n return isVoid ? viewContext.defaultVoidText : (viewContext.renderText && viewContext.renderText(item)) || viewContext.defaultText;\n }\n}\n\nexport function createBlockCard(\n item: Descendant,\n view: EmbeddedViewRef<any> | ComponentRef<any>,\n viewContainerRef: ViewContainerRef,\n viewContext: SlateViewContext\n) {\n const isBlockCard = viewContext.editor.isBlockCard(item);\n if (isBlockCard) {\n const rootNodes = getRootNodes(view);\n const blockCardComponentRef = viewContainerRef.createComponent<SlateBlockCard>(SlateBlockCard, {\n injector: viewContainerRef.injector\n });\n blockCardComponentRef.instance.initializeCenter(rootNodes);\n blockCardComponentRef.changeDetectorRef.detectChanges();\n return blockCardComponentRef;\n } else {\n return null;\n }\n}\n\nexport function trackBy(viewContext: SlateViewContext) {\n return (index, node) => {\n return viewContext.trackBy(node) || AngularEditor.findKey(viewContext.editor, node);\n };\n}\n\nexport function memoizedContext(\n viewContext: SlateViewContext,\n descendant: Descendant,\n prev: SlateElementContext | SlateTextContext,\n next: SlateElementContext | SlateTextContext\n): boolean {\n if (Element.isElement(descendant)) {\n return memoizedElementContext(viewContext, prev as SlateElementContext, next as SlateElementContext);\n } else {\n return memoizedTextContext(prev as SlateTextContext, next as SlateTextContext);\n }\n}\n\nexport function memoizedElementContext(viewContext: SlateViewContext, prev: SlateElementContext, next: SlateElementContext) {\n return (\n prev.element === next.element &&\n (!viewContext.isStrictDecorate || prev.decorate === next.decorate) &&\n prev.readonly === next.readonly &&\n isDecoratorRangeListEqual(prev.decorations, next.decorations) &&\n (prev.selection === next.selection || (!!prev.selection && !!next.selection && Range.equals(prev.selection, next.selection)))\n );\n}\n\nexport function memoizedTextContext(prev: SlateTextContext, next: SlateTextContext) {\n return (\n next.parent === prev.parent &&\n next.isLast === prev.isLast &&\n next.text === prev.text &&\n isDecoratorRangeListEqual(next.decorations, prev.decorations)\n );\n}\n\nexport function addAfterViewInitQueue(editor: Editor, afterViewInitCallback: () => void) {\n const queue = getAfterViewInitQueue(editor);\n queue.push(afterViewInitCallback);\n EDITOR_TO_AFTER_VIEW_INIT_QUEUE.set(editor, queue);\n}\n\nexport function getAfterViewInitQueue(editor: Editor) {\n return EDITOR_TO_AFTER_VIEW_INIT_QUEUE.get(editor) || [];\n}\n\nexport function clearAfterViewInitQueue(editor: Editor) {\n EDITOR_TO_AFTER_VIEW_INIT_QUEUE.set(editor, []);\n}\n\nexport function executeAfterViewInit(editor: Editor) {\n const queue = getAfterViewInitQueue(editor);\n queue.forEach(callback => callback());\n clearAfterViewInitQueue(editor);\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewContainerRef,\n inject\n} from '@angular/core';\nimport { Descendant, Element, Range, Text } from 'slate';\nimport { SlateChildrenOutlet } from '../components/children/children-outlet.component';\nimport { AngularEditor } from '../plugins/angular-editor';\nimport { ELEMENT_TO_COMPONENT } from '../utils/weak-maps';\nimport { SlateChildrenContext, SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from './context';\nimport { hasAfterContextChange, hasBeforeContextChange } from './context-change';\nimport { LeavesRender } from './render/leaves-render';\nimport { ListRender, addAfterViewInitQueue } from './render/list-render';\nimport { ELEMENT_TO_NODE, NODE_TO_ELEMENT } from 'slate-dom';\n\n/**\n * base class for template\n */\nexport interface BaseEmbeddedView<T, K extends AngularEditor = AngularEditor> {\n context: T;\n viewContext: SlateViewContext<K>;\n}\n\n/**\n * base class for custom element component or text component\n */\n@Directive()\nexport abstract class BaseComponent<\n T = SlateTextContext | SlateLeafContext | SlateElementContext,\n K extends AngularEditor = AngularEditor\n> {\n initialized = false;\n\n protected _context: T;\n\n @Input()\n set context(value: T) {\n if (hasBeforeContextChange<T>(this)) {\n this.beforeContextChange(value);\n }\n this._context = value;\n this.onContextChange();\n if (this.initialized) {\n this.cdr.detectChanges();\n }\n if (hasAfterContextChange<T>(this)) {\n this.afterContextChange();\n }\n }\n\n get context() {\n return this._context;\n }\n\n @Input() viewContext: SlateViewContext<K>;\n\n get editor() {\n return this.viewContext && this.viewContext.editor;\n }\n\n get nativeElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n public elementRef = inject(ElementRef);\n\n public cdr = inject(ChangeDetectorRef);\n\n abstract onContextChange();\n}\n\n/**\n * base class for custom leaf component\n */\n@Directive()\nexport class BaseLeafComponent extends BaseComponent<SlateLeafContext> implements OnInit {\n placeholderElement: HTMLSpanElement;\n\n @HostBinding('attr.data-slate-leaf') isSlateLeaf = true;\n\n get text(): Text {\n return this.context && this.context.text;\n }\n\n get leaf(): Text {\n return this.context && this.context.leaf;\n }\n\n ngOnInit() {\n this.initialized = true;\n }\n\n onContextChange() {\n if (!this.initialized) {\n return;\n }\n }\n\n renderPlaceholder() {\n // issue-1: IME input was interrupted\n // issue-2: IME input focus jumping\n // Issue occurs when the span node of the placeholder is before the slateString span node\n if (this.context.leaf['placeholder']) {\n if (!this.placeholderElement) {\n this.createPlaceholder();\n }\n this.updatePlaceholder();\n } else {\n this.destroyPlaceholder();\n }\n }\n\n createPlaceholder() {\n const placeholderElement = document.createElement('span');\n placeholderElement.innerText = this.context.leaf['placeholder'];\n placeholderElement.contentEditable = 'false';\n placeholderElement.setAttribute('data-slate-placeholder', 'true');\n this.placeholderElement = placeholderElement;\n this.nativeElement.classList.add('leaf-with-placeholder');\n this.nativeElement.appendChild(placeholderElement);\n }\n\n updatePlaceholder() {\n if (this.placeholderElement.innerText !== this.context.leaf['placeholder']) {\n this.placeholderElement.innerText = this.context.leaf['placeholder'];\n }\n }\n\n destroyPlaceholder() {\n if (this.placeholderElement) {\n this.placeholderElement.remove();\n this.placeholderElement = null;\n this.nativeElement.classList.remove('leaf-with-placeholder');\n }\n }\n}\n\n/**\n * base class for custom element component\n */\n@Directive()\nexport class BaseElementComponent<T extends Element = Element, K extends AngularEditor = AngularEditor>\n extends BaseComponent<SlateElementContext<T>, K>\n implements OnInit, OnDestroy\n{\n viewContainerRef = inject(ViewContainerRef);\n\n childrenContext: SlateChildrenContext;\n\n @ViewChild(SlateChildrenOutlet, { static: true })\n childrenOutletInstance?: SlateChildrenOutlet;\n\n get element(): T {\n return this._context && this._context.element;\n }\n\n get selection(): Range {\n return this._context && this._context.selection;\n }\n\n get decorations(): Range[] {\n return this._context && this._context.decorations;\n }\n\n get children(): Descendant[] {\n return this._context && this._context.element.children;\n }\n\n get isCollapsed() {\n return this.selection && Range.isCollapsed(this.selection);\n }\n\n get isCollapsedAndNonReadonly() {\n return this.selection && Range.isCollapsed(this.selection) && !this.readonly;\n }\n\n get readonly() {\n return this._context && this._context.readonly;\n }\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n getOutletElement = () => {\n if (this.childrenOutletInstance) {\n return this.childrenOutletInstance.getNativeElement();\n }\n return null;\n };\n\n listRender: ListRender;\n\n ngOnInit() {\n for (const key in this._context.attributes) {\n this.nativeElement.setAttribute(key, this._context.attributes[key]);\n }\n this.initialized = true;\n this.listRender = new ListRender(this.viewContext, this.viewContainerRef, this.getOutletParent, this.getOutletElement);\n if (this.editor.isExpanded(this.element)) {\n this.listRender.initialize(this.children, this.element, this.childrenContext);\n }\n addAfterViewInitQueue(this.editor, () => {\n this.afterViewInit();\n });\n }\n\n afterViewInit() {\n if (this._context.contentEditable !== undefined) {\n this.nativeElement.setAttribute('contenteditable', this._context.contentEditable + '');\n }\n }\n\n updateWeakMap() {\n NODE_TO_ELEMENT.set(this.element, this.nativeElement);\n ELEMENT_TO_NODE.set(this.nativeElement, this.element);\n ELEMENT_TO_COMPONENT.set(this.element, this);\n }\n\n ngOnDestroy() {\n if (NODE_TO_ELEMENT.get(this.element) === this.nativeElement) {\n NODE_TO_ELEMENT.delete(this.element);\n }\n ELEMENT_TO_NODE.delete(this.nativeElement);\n if (ELEMENT_TO_COMPONENT.get(this.element) === this) {\n ELEMENT_TO_COMPONENT.delete(this.element);\n }\n }\n\n onContextChange() {\n this.childrenContext = this.getChildrenContext();\n this.updateWeakMap();\n if (!this.initialized) {\n return;\n }\n this.updateChildrenView();\n }\n\n updateChildrenView() {\n if (this.editor.isExpanded(this.element)) {\n this.listRender.update(this.children, this.element, this.childrenContext);\n } else {\n if (this.listRender.initialized) {\n this.listRender.destroy();\n }\n }\n }\n\n getChildrenContext(): SlateChildrenContext {\n return {\n parent: this._context.element,\n selection: this._context.selection,\n decorations: this._context.decorations,\n decorate: this._context.decorate,\n readonly: this._context.readonly\n };\n }\n}\n\n/**\n * base class for custom text component\n */\n@Directive()\nexport class BaseTextComponent<T extends Text = Text> extends BaseComponent<SlateTextContext<T>> implements OnInit, OnDestroy {\n viewContainerRef = inject(ViewContainerRef);\n\n get text(): T {\n return this._context && this._context.text;\n }\n\n leavesRender: LeavesRender;\n\n @ViewChild(SlateChildrenOutlet, { static: true })\n childrenOutletInstance?: SlateChildrenOutlet;\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n getOutletElement = () => {\n if (this.childrenOutletInstance) {\n return this.childrenOutletInstance.getNativeElement();\n }\n return null;\n };\n\n ngOnInit() {\n this.initialized = true;\n this.leavesRender = new LeavesRender(this.viewContext, this.viewContainerRef, this.getOutletParent, this.getOutletElement);\n this.leavesRender.initialize(this.context);\n }\n\n updateWeakMap() {\n ELEMENT_TO_NODE.set(this.nativeElement, this.text);\n NODE_TO_ELEMENT.set(this.text, this.nativeElement);\n }\n\n ngOnDestroy() {\n if (NODE_TO_ELEMENT.get(this.text) === this.nativeElement) {\n NODE_TO_ELEMENT.delete(this.text);\n }\n ELEMENT_TO_NODE.delete(this.nativeElement);\n }\n\n onContextChange() {\n this.updateWeakMap();\n if (!this.initialized) {\n return;\n }\n this.leavesRender.update(this.context);\n }\n}\n","import { Component, ChangeDetectionStrategy, OnInit, OnChanges } from '@angular/core';\nimport { BaseTextComponent } from '../../view/base';\n\n@Component({\n selector: 'span[slateVoidText]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-spacer': 'true',\n class: 'slate-spacer',\n 'data-slate-node': 'text'\n }\n})\nexport class SlateVoidText extends BaseTextComponent implements OnInit, OnChanges {\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnChanges() {\n if (!this.initialized) {\n return;\n }\n }\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { BaseTextComponent } from '../../view/base';\n@Component({\n selector: 'span[slateDefaultText]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-node': 'text'\n }\n})\nexport class SlateDefaultText extends BaseTextComponent {}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { BaseElementComponent } from '../../view/base';\n\n@Component({\n selector: 'div[slateDefaultElement]',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SlateDefaultElement extends BaseElementComponent {}\n","import { ComponentRef, Directive, EmbeddedViewRef, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { SlateBlockCard } from '../components/block-card/block-card.component';\nimport { AngularEditor } from '../plugins/angular-editor';\n\nimport { ViewType } from '../types/view';\nimport { isComponentType, isTemplateRef } from '../utils';\nimport { BaseComponent, BaseEmbeddedView } from './base';\nimport { SlateElementContext, SlateLeafContext, SlateStringContext, SlateTextContext, SlateViewContext } from './context';\nimport { isDOMElement } from 'slate-dom';\n\n/**\n * Dynamically create/update components or templates\n * Provide rootNodes for the view container\n * If the dynamically created component uses onpush mode, then it must call markForCheck when setting the context\n */\n@Directive()\nexport abstract class ViewContainerItem<\n T = SlateElementContext | SlateTextContext | SlateLeafContext | SlateStringContext,\n K extends BaseComponent<T> = BaseComponent<T>\n> {\n initialized = false;\n embeddedViewRef: EmbeddedViewRef<BaseEmbeddedView<T>>;\n embeddedViewContext: BaseEmbeddedView<T>;\n blockCardComponentRef: ComponentRef<SlateBlockCard>;\n componentRef: ComponentRef<K>;\n viewType: ViewType;\n\n @Input() viewContext: SlateViewContext;\n\n get rootNodes() {\n return this.getRootNodes();\n }\n\n getRootNodes(): HTMLElement[] {\n if (this.embeddedViewRef) {\n return this.embeddedViewRef.rootNodes.filter(rootNode => isDOMElement(rootNode)) as HTMLElement[];\n }\n if (this.componentRef) {\n return [this.componentRef.instance.nativeElement];\n }\n return [];\n }\n\n protected viewContainerRef = inject(ViewContainerRef);\n\n destroyView() {\n if (this.embeddedViewRef) {\n this.embeddedViewRef.destroy();\n this.embeddedViewRef = null;\n }\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n\n abstract getContext(): T;\n\n abstract getViewType(): ViewType;\n\n abstract memoizedContext(prev: T, next: T): boolean;\n\n createView() {\n this.initialized = true;\n this.viewType = this.getViewType();\n const context = this.getContext();\n if (isTemplateRef(this.viewType)) {\n this.embeddedViewContext = {\n context,\n viewContext: this.viewContext\n };\n const embeddedViewRef = this.viewContainerRef.createEmbeddedView<BaseEmbeddedView<T>>(\n this.viewType as TemplateRef<BaseEmbeddedView<T, AngularEditor>>,\n this.embeddedViewContext\n );\n this.embeddedViewRef = embeddedViewRef;\n }\n if (isComponentType(this.viewType)) {\n const componentRef = this.viewContainerRef.createComponent(this.viewType) as ComponentRef<any>;\n componentRef.instance.viewContext = this.viewContext;\n componentRef.instance.context = context;\n this.componentRef = componentRef;\n }\n }\n\n updateView() {\n const viewType = this.getViewType();\n const context = this.getContext();\n if (this.viewType === viewType) {\n if (this.componentRef) {\n if (this.memoizedContext(this.componentRef.instance.context, context)) {\n return;\n }\n this.componentRef.instance.context = context;\n }\n if (this.embeddedViewRef) {\n if (this.memoizedContext(this.embeddedViewContext.context, context)) {\n return;\n }\n this.embeddedViewContext.context = context;\n }\n } else {\n this.viewType = viewType;\n const firstRootNode = this.rootNodes[0];\n if (isTemplateRef(this.viewType)) {\n this.embeddedViewContext = {\n context,\n viewContext: this.viewContext\n };\n const embeddedViewRef = this.viewContainerRef.createEmbeddedView<BaseEmbeddedView<T>>(\n this.viewType as TemplateRef<BaseEmbeddedView<T, AngularEditor>>,\n this.embeddedViewContext\n );\n firstRootNode.replaceWith(...embeddedViewRef.rootNodes.filter(rootNode => isDOMElement(rootNode)));\n this.destroyView();\n this.embeddedViewRef = embeddedViewRef;\n }\n if (isComponentType(this.viewType)) {\n const componentRef = this.viewContainerRef.createComponent(this.viewType) as ComponentRef<any>;\n componentRef.instance.viewContext = this.viewContext;\n componentRef.instance.context = context;\n firstRootNode.replaceWith(componentRef.instance.nativeElement);\n this.destroyView();\n this.componentRef = componentRef;\n }\n }\n }\n\n appendBlockCardElement() {\n if (this.blockCardComponentRef) {\n this.blockCardComponentRef.instance.append();\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { BaseComponent } from '../../view/base';\nimport { SlateStringContext } from '../../view/context';\nimport { BeforeContextChange } from '../../view/context-change';\nimport { DOMElement } from 'slate-dom';\n\n@Component({\n selector: 'span[slateDefaultString]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateDefaultString extends BaseComponent<SlateStringContext> implements OnInit, BeforeContextChange<SlateStringContext> {\n textNode?: Text;\n brNode?: DOMElement;\n\n beforeContextChange(value: SlateStringContext) {\n if (this.context) {\n if (this.context.type === 'lineBreakEmptyString') {\n if (value.type === 'string') {\n this.removeLineBreakEmptyStringDOM();\n } else {\n this.textNode?.remove();\n this.brNode?.remove();\n }\n }\n if (this.context.type === 'string') {\n if (value.type === 'lineBreakEmptyString') {\n this.removeStringDOM();\n }\n }\n }\n }\n\n onContextChange() {\n if (this.context.type === 'string') {\n this.createStringDOM();\n } else if (this.context.type === 'lineBreakEmptyString') {\n this.createLineBreakEmptyStringDOM();\n }\n }\n\n createLineBreakEmptyStringDOM() {\n this.nativeElement.setAttribute('data-slate-zero-width', 'n');\n this.nativeElement.setAttribute('data-slate-length', `${this.context.elementStringLength}`);\n this.textNode = document.createTextNode(`\\uFEFF`);\n this.brNode = document.createElement('br');\n this.nativeElement.append(this.textNode, this.brNode);\n }\n\n removeLineBreakEmptyStringDOM() {\n this.brNode?.remove();\n // remove zero width character\n const zeroWidthCharacterIndex = this.textNode?.textContent.indexOf(`\\uFEFF`);\n this.textNode?.deleteData(zeroWidthCharacterIndex, 1);\n this.nativeElement.removeAttribute('data-slate-zero-width');\n this.nativeElement.removeAttribute('data-slate-length');\n }\n\n createStringDOM() {\n this.nativeElement.setAttribute('data-slate-string', 'true');\n this.updateStringDOM();\n }\n\n updateStringDOM() {\n // Avoid breaking some browser default behaviors, such as spellCheck, android composition input state\n if (this.nativeElement.textContent !== this.context.text) {\n this.nativeElement.textContent = this.context.text;\n }\n }\n\n removeStringDOM() {\n this.nativeElement.removeAttribute('data-slate-string');\n this.nativeElement.textContent = '';\n }\n\n ngOnInit(): void {\n this.nativeElement.setAttribute('editable-text', '');\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n Input,\n OnChanges,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { Node, Text } from 'slate';\nimport { ViewContainerItem } from '../../view/container-item';\nimport { SlateLeafContext, SlateStringContext } from '../../view/context';\nimport { SlateDefaultString } from './default-string.component';\n\n@Component({\n selector: 'span[slateString]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateString extends ViewContainerItem<SlateStringContext> implements OnInit, OnChanges, AfterViewInit {\n @Input() context: SlateLeafContext;\n\n protected elementRef = inject<any>(ElementRef);\n\n protected viewContainerRef = inject(ViewContainerRef);\n\n ngOnInit(): void {\n this.createView();\n }\n\n ngOnChanges() {\n if (!this.initialized) {\n return;\n }\n this.updateView();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.remove();\n }\n\n // COMPAT: If this is the last text node in an empty block, render a zero-\n // width space that will convert into a line break when copying and pasting\n // to support expected plain text.\n isLineBreakEmptyString() {\n return (\n this.context.leaf.text === '' &&\n this.context.parent.children[this.context.parent.children.length - 1] === this.context.text &&\n !this.viewContext.editor.isInline(this.context.parent) &&\n // [list-render] performance optimization: reduce the number of calls to the `Editor.string(editor, path)` method\n isEmpty(this.viewContext.editor, this.context.parent)\n );\n }\n\n // COMPAT: If the text is empty, it's because it's on the edge of an inline\n // node, so we render a zero-width space so that the selection can be\n // inserted next to it still.\n isEmptyText() {\n return this.context.leaf.text === '';\n }\n\n // COMPAT: Browsers will collapse trailing new lines at the end of blocks,\n // so we need to add an extra trailing new lines to prevent that.\n isCompatibleString() {\n return this.context.isLast && this.context.leaf.text.slice(-1) === '\\n';\n }\n\n // COMPAT: Render text inside void nodes with a zero-width space.\n // So the node can contain selection but the text is not visible.\n isVoid() {\n return this.viewContext.editor.isVoid(this.context.parent);\n }\n\n getViewType() {\n if (this.isVoid()) {\n return this.viewContext.templateComponent.voidStringTemplate;\n }\n\n if (this.isLineBreakEmptyString()) {\n return SlateDefaultString;\n }\n\n if (this.isEmptyText()) {\n return this.viewContext.templateComponent.emptyTextTemplate;\n }\n\n if (this.isCompatibleString()) {\n return this.viewContext.templateComponent.compatibleStringTemplate;\n }\n\n return SlateDefaultString;\n }\n\n getType(): SlateStringContext['type'] {\n if (this.isLineBreakEmptyString()) {\n return 'lineBreakEmptyString';\n }\n return 'string';\n }\n\n getContext(): SlateStringContext {\n const stringType = this.getType();\n return {\n text: this.context.leaf.text,\n elementStringLength: Node.string(this.context.parent).length,\n type: stringType\n };\n }\n\n memoizedContext(prev: SlateStringContext, next: SlateStringContext): boolean {\n return false;\n }\n}\n\n/**\n * TODO: remove when bump slate\n * copy from slate\n * @param editor\n * @param element\n * @returns\n */\nexport const isEmpty = (editor, element) => {\n const { children } = element;\n const [first] = children;\n return children.length === 0 || (children.length === 1 && Text.isText(first) && first.text === '' && !editor.isVoid(element));\n};\n","import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core';\nimport { BaseLeafComponent } from '../../view/base';\nimport { SlateString } from '../string/string.component';\n\n@Component({\n selector: 'span[slateDefaultLeaf]',\n template: `<span slateString [context]=\"context\" [viewContext]=\"viewContext\"><span></span></span>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slate-leaf': 'true'\n },\n imports: [SlateString]\n})\nexport class SlateDefaultLeaf extends BaseLeafComponent implements OnDestroy {\n onContextChange(): void {\n super.onContextChange();\n this.renderPlaceholder();\n }\n ngOnDestroy(): void {\n // Because the placeholder span is not in the current component, it is destroyed along with the current component\n this.destroyPlaceholder();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ComponentType } from '../../types/view';\nimport { BaseLeafComponent } from '../../view/base';\n\nexport const SLATE_DEFAULT_LEAF_COMPONENT_TOKEN = new InjectionToken<ComponentType<BaseLeafComponent>>('slate-default-leaf-token');\n","import {\n Component,\n OnInit,\n Input,\n ViewChild,\n HostBinding,\n Renderer2,\n ElementRef,\n ChangeDetectionStrategy,\n OnDestroy,\n ChangeDetectorRef,\n NgZone,\n Injector,\n forwardRef,\n OnChanges,\n SimpleChanges,\n AfterViewChecked,\n DoCheck,\n Inject,\n inject,\n ViewContainerRef\n} from '@angular/core';\nimport { Text as SlateText, Element, Transforms, Editor, Range, Path, NodeEntry, Node } from 'slate';\nimport { direction } from 'direction';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { AngularEditor } from '../../plugins/angular-editor';\nimport {\n DOMElement,\n isDOMNode,\n DOMStaticRange,\n DOMRange,\n isDOMElement,\n isPlainTextOnlyPaste,\n DOMSelection,\n getDefaultView,\n EDITOR_TO_WINDOW,\n EDITOR_TO_ELEMENT,\n NODE_TO_ELEMENT,\n ELEMENT_TO_NODE,\n IS_FOCUSED,\n IS_READ_ONLY\n} from 'slate-dom';\nimport { Subject } from 'rxjs';\nimport { IS_FIREFOX, IS_SAFARI, IS_CHROME, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID } from '../../utils/environment';\nimport Hotkeys from '../../utils/hotkeys';\nimport { BeforeInputEvent, extractBeforeInputEvent } from '../../custom-event/BeforeInputEventPlugin';\nimport { BEFORE_INPUT_EVENTS } from '../../custom-event/before-input-polyfill';\nimport { SlateErrorCode } from '../../types/error';\nimport { SlateStringTemplate } from '../string/template.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { SlateChildrenContext, SlateViewContext } from '../../view/context';\nimport { ComponentType, ViewType } from '../../types/view';\nimport { HistoryEditor } from 'slate-history';\nimport { isDecoratorRangeListEqual } from '../../utils';\nimport { SlatePlaceholder } from '../../types/feature';\nimport { restoreDom } from '../../utils/restore-dom';\nimport { SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN } from '../element/default-element.component.token';\nimport { SLATE_DEFAULT_TEXT_COMPONENT_TOKEN, SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN } from '../text/token';\nimport { SlateVoidText } from '../text/void-text.component';\nimport { SlateDefaultText } from '../text/default-text.component';\nimport { SlateDefaultElement } from '../element/default-element.component';\nimport { SlateDefaultLeaf } from '../leaf/default-leaf.component';\nimport { SLATE_DEFAULT_LEAF_COMPONENT_TOKEN } from '../leaf/token';\nimport { BaseElementComponent, BaseLeafComponent, BaseTextComponent } from '../../view/base';\nimport { ListRender } from '../../view/render/list-render';\nimport { TRIPLE_CLICK, EDITOR_TO_ON_CHANGE } from 'slate-dom';\n\n// not correctly clipboardData on beforeinput\nconst forceOnDOMPaste = IS_SAFARI;\n\n@Component({\n selector: 'slate-editable',\n host: {\n class: 'slate-editable-container',\n '[attr.contenteditable]': 'readonly ? undefined : true',\n '[attr.role]': `readonly ? undefined : 'textbox'`,\n '[attr.spellCheck]': `!hasBeforeInputSupport ? false : spellCheck`,\n '[attr.autoCorrect]': `!hasBeforeInputSupport ? 'false' : autoCorrect`,\n '[attr.autoCapitalize]': `!hasBeforeInputSupport ? 'false' : autoCapitalize`\n },\n templateUrl: 'editable.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SlateEditable),\n multi: true\n },\n {\n provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,\n useValue: SlateDefaultElement\n },\n {\n provide: SLATE_DEFAULT_TEXT_COMPONENT_TOKEN,\n useValue: SlateDefaultText\n },\n {\n provide: SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN,\n useValue: SlateVoidText\n },\n {\n provide: SLATE_DEFAULT_LEAF_COMPONENT_TOKEN,\n useValue: SlateDefaultLeaf\n }\n ],\n imports: [SlateStringTemplate]\n})\nexport class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck {\n viewContext: SlateViewContext;\n context: SlateChildrenContext;\n\n private destroy$ = new Subject();\n\n isComposing = false;\n isDraggingInternally = false;\n isUpdatingSelection = false;\n latestElement = null as DOMElement | null;\n\n protected manualListeners: (() => void)[] = [];\n\n private initialized: boolean;\n\n private onTouchedCallback: () => void = () => {};\n\n private onChangeCallback: (_: any) => void = () => {};\n\n @Input() editor: AngularEditor;\n\n @Input() renderElement: (element: Element) => ViewType | null;\n\n @Input() renderLeaf: (text: SlateText) => ViewType | null;\n\n @Input() renderText: (text: SlateText) => ViewType | null;\n\n @Input() decorate: (entry: NodeEntry) => Range[] = () => [];\n\n @Input() placeholderDecorate: (editor: Editor) => SlatePlaceholder[];\n\n @Input() scrollSelectionIntoView: (editor: AngularEditor, domRange: DOMRange) => void = defaultScrollSelectionIntoView;\n\n @Input() isStrictDecorate: boolean = true;\n\n @Input() trackBy: (node: Element) => any = () => null;\n\n @Input() readonly = false;\n\n @Input() placeholder: string;\n\n //#region input event handler\n @Input() beforeInput: (event: Event) => void;\n @Input() blur: (event: Event) => void;\n @Input() click: (event: MouseEvent) => void;\n @Input() compositionEnd: (event: CompositionEvent) => void;\n @Input() compositionUpdate: (event: CompositionEvent) => void;\n @Input() compositionStart: (event: CompositionEvent) => void;\n @Input() copy: (event: ClipboardEvent) => void;\n @Input() cut: (event: ClipboardEvent) => void;\n @Input() dragOver: (event: DragEvent) => void;\n @Input() dragStart: (event: DragEvent) => void;\n @Input() dragEnd: (event: DragEvent) => void;\n @Input() drop: (event: DragEvent) => void;\n @Input() focus: (event: Event) => void;\n @Input() keydown: (event: KeyboardEvent) => void;\n @Input() paste: (event: ClipboardEvent) => void;\n //#endregion\n\n //#region DOM attr\n @Input() spellCheck = false;\n @Input() autoCorrect = false;\n @Input() autoCapitalize = false;\n\n @HostBinding('attr.data-slate-editor') dataSlateEditor = true;\n @HostBinding('attr.data-slate-node') dataSlateNode = 'value';\n @HostBinding('attr.data-gramm') dataGramm = false;\n\n get hasBeforeInputSupport() {\n return HAS_BEFORE_INPUT_SUPPORT;\n }\n //#endregion\n\n @ViewChild('templateComponent', { static: true })\n templateComponent: SlateStringTemplate;\n\n @ViewChild('templateComponent', { static: true, read: ElementRef })\n templateElementRef: ElementRef<any>;\n\n viewContainerRef = inject(ViewContainerRef);\n\n getOutletParent = () => {\n return this.elementRef.nativeElement;\n };\n\n listRender: ListRender;\n\n constructor(\n public elementRef: ElementRef,\n public renderer2: Renderer2,\n public cdr: ChangeDetectorRef,\n private ngZone: NgZone,\n private injector: Injector,\n @Inject(SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN)\n public defaultElement: ComponentType<BaseElementComponent>,\n @Inject(SLATE_DEFAULT_TEXT_COMPONENT_TOKEN)\n public defaultText: ComponentType<BaseTextComponent>,\n @Inject(SLATE_DEFAULT_VOID_TEXT_COMPONENT_TOKEN)\n public defaultVoidText: ComponentType<BaseTextComponent>,\n @Inject(SLATE_DEFAULT_LEAF_COMPONENT_TOKEN)\n public defaultLeaf: ComponentType<BaseLeafComponent>\n ) {}\n\n ngOnInit() {\n this.editor.injector = this.injector;\n this.editor.children = [];\n let window = getDefaultView(this.elementRef.nativeElement);\n EDITOR_TO_WINDOW.set(this.editor, window);\n EDITOR_TO_ELEMENT.set(this.editor, this.elementRef.nativeElement);\n NODE_TO_ELEMENT.set(this.editor, this.elementRef.nativeElement);\n ELEMENT_TO_NODE.set(this.elementRef.nativeElement, this.editor);\n IS_READ_ONLY.set(this.editor, this.readonly);\n EDITOR_TO_ON_CHANGE.set(this.editor, () => {\n this.ngZone.run(() => {\n this.onChange();\n });\n });\n this.ngZone.runOutsideAngular(() => {\n this.initialize();\n });\n this.initializeViewContext();\n this.initializeContext();\n\n // remove unused DOM, just keep templateComponent instance\n this.templateElementRef.nativeElement.remove();\n\n // add browser class\n let browserClass = IS_FIREFOX ? 'firefox' : IS_SAFARI ? 'safari' : '';\n browserClass && this.elementRef.nativeElement.classList.add(browserClass);\n this.listRender = new ListRender(this.viewContext, this.viewContainerRef, this.getOutletParent, () => null);\n }\n\n ngOnChanges(simpleChanges: SimpleChanges) {\n if (!this.initialized) {\n return;\n }\n const decorateChange = simpleChanges['decorate'];\n if (decorateChange) {\n this.forceRender();\n }\n const placeholderChange = simpleChanges['placeholder'];\n if (placeholderChange) {\n this.render();\n }\n const readonlyChange = simpleChanges['readonly'];\n if (readonlyChange) {\n IS_READ_ONLY.set(this.editor, this.readonly);\n this.render();\n this.toSlateSelection();\n }\n }\n\n registerOnChange(fn: any) {\n this.onChangeCallback = fn;\n }\n registerOnTouched(fn: any) {\n this.onTouchedCallback = fn;\n }\n\n writeValue(value: Element[]) {\n if (value && value.length) {\n this.editor.children = value;\n this.initializeContext();\n if (!this.listRender.initialized) {\n this.listRender.initialize(this.editor.children, this.editor, this.context);\n } else {\n this.listRender.update(this.editor.children, this.editor, this.context);\n }\n this.cdr.markForCheck();\n }\n }\n\n initialize() {\n this.initialized = true;\n const window = AngularEditor.getWindow(this.editor);\n this.addEventListener(\n 'selectionchange',\n event => {\n this.toSlateSelection();\n },\n window.document\n );\n if (HAS_BEFORE_INPUT_SUPPORT) {\n this.addEventListener('beforeinput', this.onDOMBeforeInput.bind(this));\n }\n this.addEventListener('blur', this.onDOMBlur.bind(this));\n this.addEventListener('click', this.onDOMClick.bind(this));\n this.addEventListener('compositionend', this.onDOMCompositionEnd.bind(this));\n this.addEventListener('compositionupdate', this.onDOMCompositionUpdate.bind(this));\n this.addEventListener('compositionstart', this.onDOMCompositionStart.bind(this));\n this.addEventListener('copy', this.onDOMCopy.bind(this));\n this.addEventListener('cut', this.onDOMCut.bind(this));\n this.addEventListener('dragover', this.onDOMDragOver.bind(this));\n this.addEventListener('dragstart', this.onDOMDragStart.bind(this));\n this.addEventListener('dragend', this.onDOMDragEnd.bind(this));\n this.addEventListener('drop', this.onDOMDrop.bind(this));\n this.addEventListener('focus', this.onDOMFocus.bind(this));\n this.addEventListener('keydown', this.onDOMKeydown.bind(this));\n this.addEventListener('paste', this.onDOMPaste.bind(this));\n BEFORE_INPUT_EVENTS.forEach(event => {\n this.addEventListener(event.name, () => {});\n });\n }\n\n toNativeSelection() {\n try {\n const { selection } = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const domSelection = (root as Document).getSelection();\n\n if ((this.isComposing && !IS_ANDROID) || !domSelection || !AngularEditor.isFocused(this.editor)) {\n return;\n }\n\n const hasDomSelection = domSelection.type !== 'None';\n\n // If the DOM selection is properly unset, we're done.\n if (!selection && !hasDomSelection) {\n return;\n }\n\n // If the DOM selection is already correct, we're done.\n // verify that the dom selection is in the editor\n const editorElement = EDITOR_TO_ELEMENT.get(this.editor)!;\n let hasDomSelectionInEditor = false;\n if (editorElement.contains(domSelection.anchorNode) && editorElement.contains(domSelection.focusNode)) {\n hasDomSelectionInEditor = true;\n }\n\n // If the DOM selection is in the editor and the editor selection is already correct, we're done.\n if (hasDomSelection && hasDomSelectionInEditor && selection && hasStringTarget(domSelection)) {\n const rangeFromDOMSelection = AngularEditor.toSlateRange(this.editor, domSelection, {\n exactMatch: false,\n suppressThrow: true\n });\n if (rangeFromDOMSelection && Range.equals(rangeFromDOMSelection, selection)) {\n return;\n }\n }\n\n // prevent updating native selection when active element is void element\n if (isTargetInsideVoid(this.editor, activeElement)) {\n return;\n }\n\n // when <Editable/> is being controlled through external value\n // then its children might just change - DOM responds to it on its own\n // but Slate's value is not being updated through any operation\n // and thus it doesn't transform selection on its own\n if (selection && !AngularEditor.hasRange(this.editor, selection)) {\n this.editor.selection = AngularEditor.toSlateRange(this.editor, domSelection, { exactMatch: false, suppressThrow: false });\n return;\n }\n\n // Otherwise the DOM selection is out of sync, so update it.\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n this.isUpdatingSelection = true;\n\n const newDomRange = selection && AngularEditor.toDOMRange(this.editor, selection);\n\n if (newDomRange) {\n // COMPAT: Since the DOM range has no concept of backwards/forwards\n // we need to check and do the right thing here.\n if (Range.isBackward(selection)) {\n // eslint-disable-next-line max-len\n domSelection.setBaseAndExtent(\n newDomRange.endContainer,\n newDomRange.endOffset,\n newDomRange.startContainer,\n newDomRange.startOffset\n );\n } else {\n // eslint-disable-next-line max-len\n domSelection.setBaseAndExtent(\n newDomRange.startContainer,\n newDomRange.startOffset,\n newDomRange.endContainer,\n newDomRange.endOffset\n );\n }\n } else {\n domSelection.removeAllRanges();\n }\n\n setTimeout(() => {\n // handle scrolling in setTimeout because of\n // dom should not have updated immediately after listRender's updating\n newDomRange && this.scrollSelectionIntoView(this.editor, newDomRange);\n // COMPAT: In Firefox, it's not enough to create a range, you also need\n // to focus the contenteditable element too. (2016/11/16)\n if (newDomRange && IS_FIREFOX) {\n el.focus();\n }\n\n this.isUpdatingSelection = false;\n });\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToNativeSelectionError,\n nativeError: error\n });\n this.isUpdatingSelection = false;\n }\n }\n\n onChange() {\n this.forceRender();\n this.onChangeCallback(this.editor.children);\n }\n\n ngAfterViewChecked() {}\n\n ngDoCheck() {}\n\n forceRender() {\n this.updateContext();\n this.listRender.update(this.editor.children, this.editor, this.context);\n // repair collaborative editing when Chinese input is interrupted by other users' cursors\n // when the DOMElement where the selection is located is removed\n // the compositionupdate and compositionend events will no longer be fired\n // so isComposing needs to be corrected\n // need exec after this.cdr.detectChanges() to render HTML\n // need exec before this.toNativeSelection() to correct native selection\n if (this.isComposing) {\n // Composition input text be not rendered when user composition input with selection is expanded\n // At this time, the following matching conditions are met, assign isComposing to false, and the status is wrong\n // this time condition is true and isComposiing is assigned false\n // Therefore, need to wait for the composition input text to be rendered before performing condition matching\n setTimeout(() => {\n const textNode = Node.get(this.editor, this.editor.selection.anchor.path);\n const textDOMNode = AngularEditor.toDOMNode(this.editor, textNode);\n let textContent = '';\n // skip decorate text\n textDOMNode.querySelectorAll('[editable-text]').forEach(stringDOMNode => {\n let text = stringDOMNode.textContent;\n const zeroChar = '\\uFEFF';\n // remove zero with char\n if (text.startsWith(zeroChar)) {\n text = text.slice(1);\n }\n if (text.endsWith(zeroChar)) {\n text = text.slice(0, text.length - 1);\n }\n textContent += text;\n });\n if (Node.string(textNode).endsWith(textContent)) {\n this.isComposing = false;\n }\n }, 0);\n }\n this.toNativeSelection();\n }\n\n render() {\n const changed = this.updateContext();\n if (changed) {\n this.listRender.update(this.editor.children, this.editor, this.context);\n }\n }\n\n updateContext() {\n const decorations = this.generateDecorations();\n if (\n this.context.selection !== this.editor.selection ||\n this.context.decorate !== this.decorate ||\n this.context.readonly !== this.readonly ||\n !isDecoratorRangeListEqual(this.context.decorations, decorations)\n ) {\n this.context = {\n parent: this.editor,\n selection: this.editor.selection,\n decorations: decorations,\n decorate: this.decorate,\n readonly: this.readonly\n };\n return true;\n }\n return false;\n }\n\n initializeContext() {\n this.context = {\n parent: this.editor,\n selection: this.editor.selection,\n decorations: this.generateDecorations(),\n decorate: this.decorate,\n readonly: this.readonly\n };\n }\n\n initializeViewContext() {\n this.viewContext = {\n editor: this.editor,\n renderElement: this.renderElement,\n renderLeaf: this.renderLeaf,\n renderText: this.renderText,\n trackBy: this.trackBy,\n isStrictDecorate: this.isStrictDecorate,\n templateComponent: this.templateComponent,\n defaultElement: this.defaultElement,\n defaultText: this.defaultText,\n defaultVoidText: this.defaultVoidText,\n defaultLeaf: this.defaultLeaf\n };\n }\n\n composePlaceholderDecorate(editor: Editor) {\n if (this.placeholderDecorate) {\n return this.placeholderDecorate(editor) || [];\n }\n\n if (this.placeholder && editor.children.length === 1 && Array.from(Node.texts(editor)).length === 1 && Node.string(editor) === '') {\n const start = Editor.start(editor, []);\n return [\n {\n placeholder: this.placeholder,\n anchor: start,\n focus: start\n }\n ];\n } else {\n return [];\n }\n }\n\n generateDecorations() {\n const decorations = this.decorate([this.editor, []]);\n const placeholderDecorations = this.isComposing ? [] : this.composePlaceholderDecorate(this.editor);\n decorations.push(...placeholderDecorations);\n return decorations;\n }\n\n //#region event proxy\n private addEventListener(eventName: string, listener: EventListener, target: HTMLElement | Document = this.elementRef.nativeElement) {\n this.manualListeners.push(\n this.renderer2.listen(target, eventName, (event: Event) => {\n const beforeInputEvent = extractBeforeInputEvent(event.type, null, event, event.target);\n if (beforeInputEvent) {\n this.onFallbackBeforeInput(beforeInputEvent);\n }\n listener(event);\n })\n );\n }\n\n private toSlateSelection() {\n if ((!this.isComposing || IS_ANDROID) && !this.isUpdatingSelection && !this.isDraggingInternally) {\n try {\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n const domSelection = (root as Document).getSelection();\n\n if (activeElement === el) {\n this.latestElement = activeElement;\n IS_FOCUSED.set(this.editor, true);\n } else {\n IS_FOCUSED.delete(this.editor);\n }\n\n if (!domSelection) {\n return Transforms.deselect(this.editor);\n }\n\n const editorElement = EDITOR_TO_ELEMENT.get(this.editor);\n const hasDomSelectionInEditor =\n editorElement.contains(domSelection.anchorNode) && editorElement.contains(domSelection.focusNode);\n if (!hasDomSelectionInEditor) {\n Transforms.deselect(this.editor);\n return;\n }\n\n // try to get the selection directly, because some terrible case can be normalize for normalizeDOMPoint\n // for example, double-click the last cell of the table to select a non-editable DOM\n const range = AngularEditor.toSlateRange(this.editor, domSelection, { exactMatch: false, suppressThrow: true });\n if (range) {\n if (this.editor.selection && Range.equals(range, this.editor.selection) && !hasStringTarget(domSelection)) {\n if (!isTargetInsideVoid(this.editor, activeElement)) {\n // force adjust DOMSelection\n this.toNativeSelection();\n }\n } else {\n Transforms.select(this.editor, range);\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToSlateSelectionError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMBeforeInput(\n event: Event & {\n inputType: string;\n isComposing: boolean;\n data: string | null;\n dataTransfer: DataTransfer | null;\n getTargetRanges(): DOMStaticRange[];\n }\n ) {\n const editor = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n const { selection } = editor;\n const { inputType: type } = event;\n const data = event.dataTransfer || event.data || undefined;\n if (IS_ANDROID) {\n let targetRange: Range | null = null;\n let [nativeTargetRange] = event.getTargetRanges();\n if (nativeTargetRange) {\n targetRange = AngularEditor.toSlateRange(editor, nativeTargetRange, { exactMatch: false, suppressThrow: false });\n }\n // COMPAT: SelectionChange event is fired after the action is performed, so we\n // have to manually get the selection here to ensure it's up-to-date.\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n if (!targetRange && domSelection) {\n targetRange = AngularEditor.toSlateRange(editor, domSelection, { exactMatch: false, suppressThrow: false });\n }\n targetRange = targetRange ?? editor.selection;\n if (type === 'insertCompositionText') {\n if (data && data.toString().includes('\\n')) {\n restoreDom(editor, () => {\n Editor.insertBreak(editor);\n });\n } else {\n if (targetRange) {\n if (data) {\n restoreDom(editor, () => {\n Transforms.insertText(editor, data.toString(), { at: targetRange });\n });\n } else {\n restoreDom(editor, () => {\n Transforms.delete(editor, { at: targetRange });\n });\n }\n }\n }\n return;\n }\n if (type === 'deleteContentBackward') {\n // gboard can not prevent default action, so must use restoreDom,\n // sougou Keyboard can prevent default action(only in Chinese input mode).\n // In order to avoid weird action in Sougou Keyboard, use resotreDom only range's isCollapsed is false (recognize gboard)\n if (!Range.isCollapsed(targetRange)) {\n restoreDom(editor, () => {\n Transforms.delete(editor, { at: targetRange });\n });\n return;\n }\n }\n if (type === 'insertText') {\n restoreDom(editor, () => {\n if (typeof data === 'string') {\n Editor.insertText(editor, data);\n }\n });\n return;\n }\n }\n if (\n !this.readonly &&\n AngularEditor.hasEditableTarget(editor, event.target) &&\n !isTargetInsideVoid(editor, activeElement) &&\n !this.isDOMEventHandled(event, this.beforeInput)\n ) {\n try {\n event.preventDefault();\n\n // COMPAT: If the selection is expanded, even if the command seems like\n // a delete forward/backward command it should delete the selection.\n if (selection && Range.isExpanded(selection) && type.startsWith('delete')) {\n const direction = type.endsWith('Backward') ? 'backward' : 'forward';\n Editor.deleteFragment(editor, { direction });\n return;\n }\n\n switch (type) {\n case 'deleteByComposition':\n case 'deleteByCut':\n case 'deleteByDrag': {\n Editor.deleteFragment(editor);\n break;\n }\n\n case 'deleteContent':\n case 'deleteContentForward': {\n Editor.deleteForward(editor);\n break;\n }\n\n case 'deleteContentBackward': {\n Editor.deleteBackward(editor);\n break;\n }\n\n case 'deleteEntireSoftLine': {\n Editor.deleteBackward(editor, { unit: 'line' });\n Editor.deleteForward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteHardLineBackward': {\n Editor.deleteBackward(editor, { unit: 'block' });\n break;\n }\n\n case 'deleteSoftLineBackward': {\n Editor.deleteBackward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteHardLineForward': {\n Editor.deleteForward(editor, { unit: 'block' });\n break;\n }\n\n case 'deleteSoftLineForward': {\n Editor.deleteForward(editor, { unit: 'line' });\n break;\n }\n\n case 'deleteWordBackward': {\n Editor.deleteBackward(editor, { unit: 'word' });\n break;\n }\n\n case 'deleteWordForward': {\n Editor.deleteForward(editor, { unit: 'word' });\n break;\n }\n\n case 'insertLineBreak':\n case 'insertParagraph': {\n Editor.insertBreak(editor);\n break;\n }\n\n case 'insertFromComposition': {\n // COMPAT: in safari, `compositionend` event is dispatched after\n // the beforeinput event with the inputType \"insertFromComposition\" has been dispatched.\n // https://www.w3.org/TR/input-events-2/\n // so the following code is the right logic\n // because DOM selection in sync will be exec before `compositionend` event\n // isComposing is true will prevent DOM selection being update correctly.\n this.isComposing = false;\n preventInsertFromComposition(event, this.editor);\n }\n case 'insertFromDrop':\n case 'insertFromPaste':\n case 'insertFromYank':\n case 'insertReplacementText':\n case 'insertText': {\n // use a weak comparison instead of 'instanceof' to allow\n // programmatic access of paste events coming from external windows\n // like cypress where cy.window does not work realibly\n if (data?.constructor.name === 'DataTransfer') {\n AngularEditor.insertData(editor, data as DataTransfer);\n } else if (typeof data === 'string') {\n Editor.insertText(editor, data);\n }\n break;\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.OnDOMBeforeInputError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMBlur(event: FocusEvent) {\n if (\n this.readonly ||\n this.isUpdatingSelection ||\n !AngularEditor.hasEditableTarget(this.editor, event.target) ||\n this.isDOMEventHandled(event, this.blur)\n ) {\n return;\n }\n\n const window = AngularEditor.getWindow(this.editor);\n\n // COMPAT: If the current `activeElement` is still the previous\n // one, this is due to the window being blurred when the tab\n // itself becomes unfocused, so we want to abort early to allow to\n // editor to stay focused when the tab becomes focused again.\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n if (this.latestElement === root.activeElement) {\n return;\n }\n\n const { relatedTarget } = event;\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n\n // COMPAT: The event should be ignored if the focus is returning\n // to the editor from an embedded editable element (eg. an <input>\n // element inside a void node).\n if (relatedTarget === el) {\n return;\n }\n\n // COMPAT: The event should be ignored if the focus is moving from\n // the editor to inside a void node's spacer element.\n if (isDOMElement(relatedTarget) && relatedTarget.hasAttribute('data-slate-spacer')) {\n return;\n }\n\n // COMPAT: The event should be ignored if the focus is moving to a\n // non- editable section of an element that isn't a void node (eg.\n // a list item of the check list example).\n if (relatedTarget != null && isDOMNode(relatedTarget) && AngularEditor.hasDOMNode(this.editor, relatedTarget)) {\n const node = AngularEditor.toSlateNode(this.editor, relatedTarget);\n\n if (Element.isElement(node) && !this.editor.isVoid(node)) {\n return;\n }\n }\n\n IS_FOCUSED.delete(this.editor);\n }\n\n private onDOMClick(event: MouseEvent) {\n if (\n !this.readonly &&\n AngularEditor.hasTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.click) &&\n isDOMNode(event.target)\n ) {\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n const path = AngularEditor.findPath(this.editor, node);\n const start = Editor.start(this.editor, path);\n const end = Editor.end(this.editor, path);\n\n const startVoid = Editor.void(this.editor, { at: start });\n const endVoid = Editor.void(this.editor, { at: end });\n\n if (event.detail === TRIPLE_CLICK && path.length >= 1) {\n let blockPath = path;\n if (!(Element.isElement(node) && Editor.isBlock(this.editor, node))) {\n const block = Editor.above(this.editor, {\n match: n => Element.isElement(n) && Editor.isBlock(this.editor, n),\n at: path\n });\n\n blockPath = block?.[1] ?? path.slice(0, 1);\n }\n\n const range = Editor.range(this.editor, blockPath);\n Transforms.select(this.editor, range);\n return;\n }\n\n if (\n startVoid &&\n endVoid &&\n Path.equals(startVoid[1], endVoid[1]) &&\n !(AngularEditor.isBlockCardLeftCursor(this.editor) || AngularEditor.isBlockCardRightCursor(this.editor))\n ) {\n const range = Editor.range(this.editor, start);\n Transforms.select(this.editor, range);\n }\n }\n }\n\n private onDOMCompositionStart(event: CompositionEvent) {\n const { selection } = this.editor;\n if (selection) {\n // solve the problem of cross node Chinese input\n if (Range.isExpanded(selection)) {\n Editor.deleteFragment(this.editor);\n this.forceRender();\n }\n }\n if (AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.compositionStart)) {\n this.isComposing = true;\n }\n this.render();\n }\n\n private onDOMCompositionUpdate(event: CompositionEvent) {\n this.isDOMEventHandled(event, this.compositionUpdate);\n }\n\n private onDOMCompositionEnd(event: CompositionEvent) {\n if (!event.data && !Range.isCollapsed(this.editor.selection)) {\n Transforms.delete(this.editor);\n }\n if (AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.compositionEnd)) {\n // COMPAT: In Chrome/Firefox, `beforeinput` events for compositions\n // aren't correct and never fire the \"insertFromComposition\"\n // type that we need. So instead, insert whenever a composition\n // ends since it will already have been committed to the DOM.\n if (this.isComposing === true && !IS_SAFARI && !IS_ANDROID && event.data) {\n preventInsertFromComposition(event, this.editor);\n Editor.insertText(this.editor, event.data);\n }\n\n // COMPAT: In Firefox 87.0 CompositionEnd fire twice\n // so we need avoid repeat isnertText by isComposing === true,\n this.isComposing = false;\n }\n this.render();\n }\n\n private onDOMCopy(event: ClipboardEvent) {\n const window = AngularEditor.getWindow(this.editor);\n const isOutsideSlate = !hasStringTarget(window.getSelection()) && isTargetInsideVoid(this.editor, event.target);\n if (!isOutsideSlate && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.copy)) {\n event.preventDefault();\n AngularEditor.setFragmentData(this.editor, event.clipboardData, 'copy');\n }\n }\n\n private onDOMCut(event: ClipboardEvent) {\n if (!this.readonly && AngularEditor.hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.cut)) {\n event.preventDefault();\n AngularEditor.setFragmentData(this.editor, event.clipboardData, 'cut');\n const { selection } = this.editor;\n\n if (selection) {\n AngularEditor.deleteCutData(this.editor);\n }\n }\n }\n\n private onDOMDragOver(event: DragEvent) {\n if (AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragOver)) {\n // Only when the target is void, call `preventDefault` to signal\n // that drops are allowed. Editable content is droppable by\n // default, and calling `preventDefault` hides the cursor.\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n\n if (Element.isElement(node) && Editor.isVoid(this.editor, node)) {\n event.preventDefault();\n }\n }\n }\n\n private onDOMDragStart(event: DragEvent) {\n if (!this.readonly && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragStart)) {\n const node = AngularEditor.toSlateNode(this.editor, event.target);\n const path = AngularEditor.findPath(this.editor, node);\n const voidMatch =\n Element.isElement(node) && (Editor.isVoid(this.editor, node) || Editor.void(this.editor, { at: path, voids: true }));\n\n // If starting a drag on a void node, make sure it is selected\n // so that it shows up in the selection's fragment.\n if (voidMatch) {\n const range = Editor.range(this.editor, path);\n Transforms.select(this.editor, range);\n }\n\n this.isDraggingInternally = true;\n\n AngularEditor.setFragmentData(this.editor, event.dataTransfer, 'drag');\n }\n }\n\n private onDOMDrop(event: DragEvent) {\n const editor = this.editor;\n if (!this.readonly && AngularEditor.hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.drop)) {\n event.preventDefault();\n // Keep a reference to the dragged range before updating selection\n const draggedRange = editor.selection;\n\n // Find the range where the drop happened\n const range = AngularEditor.findEventRange(editor, event);\n const data = event.dataTransfer;\n\n Transforms.select(editor, range);\n\n if (this.isDraggingInternally) {\n if (draggedRange) {\n Transforms.delete(editor, {\n at: draggedRange\n });\n }\n\n this.isDraggingInternally = false;\n }\n\n AngularEditor.insertData(editor, data);\n\n // When dragging from another source into the editor, it's possible\n // that the current editor does not have focus.\n if (!AngularEditor.isFocused(editor)) {\n AngularEditor.focus(editor);\n }\n }\n }\n\n private onDOMDragEnd(event: DragEvent) {\n if (\n !this.readonly &&\n this.isDraggingInternally &&\n AngularEditor.hasTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.dragEnd)\n ) {\n this.isDraggingInternally = false;\n }\n }\n\n private onDOMFocus(event: Event) {\n if (\n !this.readonly &&\n !this.isUpdatingSelection &&\n AngularEditor.hasEditableTarget(this.editor, event.target) &&\n !this.isDOMEventHandled(event, this.focus)\n ) {\n const el = AngularEditor.toDOMNode(this.editor, this.editor);\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n this.latestElement = root.activeElement;\n\n // COMPAT: If the editor has nested editable elements, the focus\n // can go to them. In Firefox, this must be prevented because it\n // results in issues with keyboard navigation. (2017/03/30)\n if (IS_FIREFOX && event.target !== el) {\n el.focus();\n return;\n }\n\n IS_FOCUSED.set(this.editor, true);\n }\n }\n\n private onDOMKeydown(event: KeyboardEvent) {\n const editor = this.editor;\n const root = AngularEditor.findDocumentOrShadowRoot(this.editor);\n const { activeElement } = root;\n if (\n !this.readonly &&\n AngularEditor.hasEditableTarget(editor, event.target) &&\n !isTargetInsideVoid(editor, activeElement) && // stop fire keydown handle when focus void node\n !this.isComposing &&\n !this.isDOMEventHandled(event, this.keydown)\n ) {\n const nativeEvent = event;\n const { selection } = editor;\n\n const element = editor.children[selection !== null ? selection.focus.path[0] : 0];\n const isRTL = direction(Node.string(element)) === 'rtl';\n\n try {\n // COMPAT: Since we prevent the default behavior on\n // `beforeinput` events, the browser doesn't think there's ever\n // any history stack to undo or redo, so we have to manage these\n // hotkeys ourselves. (2019/11/06)\n if (Hotkeys.isRedo(nativeEvent)) {\n event.preventDefault();\n\n if (HistoryEditor.isHistoryEditor(editor)) {\n editor.redo();\n }\n\n return;\n }\n\n if (Hotkeys.isUndo(nativeEvent)) {\n event.preventDefault();\n\n if (HistoryEditor.isHistoryEditor(editor)) {\n editor.undo();\n }\n\n return;\n }\n\n // COMPAT: Certain browsers don't handle the selection updates\n // properly. In Chrome, the selection isn't properly extended.\n // And in Firefox, the selection isn't properly collapsed.\n // (2017/10/17)\n if (Hotkeys.isMoveLineBackward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line', reverse: true });\n return;\n }\n\n if (Hotkeys.isMoveLineForward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line' });\n return;\n }\n\n if (Hotkeys.isExtendLineBackward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, {\n unit: 'line',\n edge: 'focus',\n reverse: true\n });\n return;\n }\n\n if (Hotkeys.isExtendLineForward(nativeEvent)) {\n event.preventDefault();\n Transforms.move(editor, { unit: 'line', edge: 'focus' });\n return;\n }\n\n // COMPAT: If a void node is selected, or a zero-width text node\n // adjacent to an inline is selected, we need to handle these\n // hotkeys manually because browsers won't be able to skip over\n // the void node with the zero-width space not being an empty\n // string.\n if (Hotkeys.isMoveBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.move(editor, { reverse: !isRTL });\n } else {\n Transforms.collapse(editor, { edge: 'start' });\n }\n\n return;\n }\n\n if (Hotkeys.isMoveForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.move(editor, { reverse: isRTL });\n } else {\n Transforms.collapse(editor, { edge: 'end' });\n }\n\n return;\n }\n\n if (Hotkeys.isMoveWordBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.collapse(editor, { edge: 'focus' });\n }\n\n Transforms.move(editor, { unit: 'word', reverse: !isRTL });\n return;\n }\n\n if (Hotkeys.isMoveWordForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.collapse(editor, { edge: 'focus' });\n }\n\n Transforms.move(editor, { unit: 'word', reverse: isRTL });\n return;\n }\n\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to guessing at the input intention for hotkeys.\n // COMPAT: In iOS, some of these hotkeys are handled in the\n if (!HAS_BEFORE_INPUT_SUPPORT) {\n // We don't have a core behavior for these, but they change the\n // DOM if we don't prevent them, so we have to.\n if (Hotkeys.isBold(nativeEvent) || Hotkeys.isItalic(nativeEvent) || Hotkeys.isTransposeCharacter(nativeEvent)) {\n event.preventDefault();\n return;\n }\n\n if (Hotkeys.isSplitBlock(nativeEvent)) {\n event.preventDefault();\n Editor.insertBreak(editor);\n return;\n }\n\n if (Hotkeys.isDeleteBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor);\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor);\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteLineBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor, { unit: 'line' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteLineForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor, { unit: 'line' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteWordBackward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'backward'\n });\n } else {\n Editor.deleteBackward(editor, { unit: 'word' });\n }\n\n return;\n }\n\n if (Hotkeys.isDeleteWordForward(nativeEvent)) {\n event.preventDefault();\n\n if (selection && Range.isExpanded(selection)) {\n Editor.deleteFragment(editor, {\n direction: 'forward'\n });\n } else {\n Editor.deleteForward(editor, { unit: 'word' });\n }\n\n return;\n }\n } else {\n if (IS_CHROME || IS_SAFARI) {\n // COMPAT: Chrome and Safari support `beforeinput` event but do not fire\n // an event when deleting backwards in a selected void inline node\n if (\n selection &&\n (Hotkeys.isDeleteBackward(nativeEvent) || Hotkeys.isDeleteForward(nativeEvent)) &&\n Range.isCollapsed(selection)\n ) {\n const currentNode = Node.parent(editor, selection.anchor.path);\n if (\n Element.isElement(currentNode) &&\n Editor.isVoid(editor, currentNode) &&\n (Editor.isInline(editor, currentNode) || Editor.isBlock(editor, currentNode))\n ) {\n event.preventDefault();\n Editor.deleteBackward(editor, {\n unit: 'block'\n });\n return;\n }\n }\n }\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.OnDOMKeydownError,\n nativeError: error\n });\n }\n }\n }\n\n private onDOMPaste(event: ClipboardEvent) {\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to React's `onPaste` here instead.\n // COMPAT: Firefox, Chrome and Safari are not emitting `beforeinput` events\n // when \"paste without formatting\" option is used.\n // This unfortunately needs to be handled with paste events instead.\n if (\n !this.isDOMEventHandled(event, this.paste) &&\n (!HAS_BEFORE_INPUT_SUPPORT || isPlainTextOnlyPaste(event) || forceOnDOMPaste) &&\n !this.readonly &&\n AngularEditor.hasEditableTarget(this.editor, event.target)\n ) {\n event.preventDefault();\n AngularEditor.insertData(this.editor, event.clipboardData);\n }\n }\n\n private onFallbackBeforeInput(event: BeforeInputEvent) {\n // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n // fall back to React's leaky polyfill instead just for it. It\n // only works for the `insertText` input type.\n if (\n !HAS_BEFORE_INPUT_SUPPORT &&\n !this.readonly &&\n !this.isDOMEventHandled(event.nativeEvent, this.beforeInput) &&\n AngularEditor.hasEditableTarget(this.editor, event.nativeEvent.target)\n ) {\n event.nativeEvent.preventDefault();\n try {\n const text = event.data;\n if (!Range.isCollapsed(this.editor.selection)) {\n Editor.deleteFragment(this.editor);\n }\n // just handle Non-IME input\n if (!this.isComposing) {\n Editor.insertText(this.editor, text);\n }\n } catch (error) {\n this.editor.onError({\n code: SlateErrorCode.ToNativeSelectionError,\n nativeError: error\n });\n }\n }\n }\n\n private isDOMEventHandled(event: Event, handler?: (event: Event) => void) {\n if (!handler) {\n return false;\n }\n handler(event);\n return event.defaultPrevented;\n }\n //#endregion\n\n ngOnDestroy() {\n NODE_TO_ELEMENT.delete(this.editor);\n this.manualListeners.forEach(manualListener => {\n manualListener();\n });\n this.destroy$.complete();\n EDITOR_TO_ON_CHANGE.delete(this.editor);\n }\n}\n\nexport const defaultScrollSelectionIntoView = (editor: AngularEditor, domRange: DOMRange) => {\n // This was affecting the selection of multiple blocks and dragging behavior,\n // so enabled only if the selection has been collapsed.\n if (domRange.getBoundingClientRect && (!editor.selection || (editor.selection && Range.isCollapsed(editor.selection)))) {\n const leafEl = domRange.startContainer.parentElement!;\n\n // COMPAT: In Chrome, domRange.getBoundingClientRect() can return zero dimensions for valid ranges (e.g. line breaks).\n // When this happens, do not scroll like most editors do.\n const domRect = domRange.getBoundingClientRect();\n const isZeroDimensionRect = domRect.width === 0 && domRect.height === 0 && domRect.x === 0 && domRect.y === 0;\n\n if (isZeroDimensionRect) {\n const leafRect = leafEl.getBoundingClientRect();\n const leafHasDimensions = leafRect.width > 0 || leafRect.height > 0;\n\n if (leafHasDimensions) {\n return;\n }\n }\n\n leafEl.getBoundingClientRect = domRange.getBoundingClientRect.bind(domRange);\n scrollIntoView(leafEl, {\n scrollMode: 'if-needed'\n });\n delete leafEl.getBoundingClientRect;\n }\n};\n\n/**\n * Check if the target is inside void and in the editor.\n */\n\nconst isTargetInsideVoid = (editor: AngularEditor, target: EventTarget | null): boolean => {\n let slateNode: Node | null = null;\n try {\n slateNode = AngularEditor.hasTarget(editor, target) && AngularEditor.toSlateNode(editor, target);\n } catch (error) {}\n return slateNode && Element.isElement(slateNode) && Editor.isVoid(editor, slateNode);\n};\n\nconst hasStringTarget = (domSelection: DOMSelection) => {\n return (\n (domSelection.anchorNode.parentElement.hasAttribute('data-slate-string') ||\n domSelection.anchorNode.parentElement.hasAttribute('data-slate-zero-width')) &&\n (domSelection.focusNode.parentElement.hasAttribute('data-slate-string') ||\n domSelection.focusNode.parentElement.hasAttribute('data-slate-zero-width'))\n );\n};\n\n/**\n * remove default insert from composition\n * @param text\n */\nconst preventInsertFromComposition = (event: Event, editor: AngularEditor) => {\n const types = ['compositionend', 'insertFromComposition'];\n if (!types.includes(event.type)) {\n return;\n }\n const insertText = (event as CompositionEvent).data;\n const window = AngularEditor.getWindow(editor);\n const domSelection = window.getSelection();\n // ensure text node insert composition input text\n if (insertText && domSelection.anchorNode instanceof Text && domSelection.anchorNode.textContent.endsWith(insertText)) {\n const textNode = domSelection.anchorNode;\n textNode.splitText(textNode.length - insertText.length).remove();\n }\n};\n","<slate-string-template #templateComponent></slate-string-template>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { BaseElementComponent } from '../../view/base';\n\n@Component({\n selector: '[slateElement]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SlateElement extends BaseElementComponent {}\n","import { Directive, ElementRef, Input, IterableDiffers } from '@angular/core';\nimport { SlateViewContext } from './context';\nimport { ViewContainerItem } from './container-item';\n\n/**\n * @deprecated\n * the special container for angular template\n * Add the rootNodes of each child component to the parentElement\n * Remove useless DOM elements, eg: comment...\n */\n@Directive()\nexport abstract class ViewContainer<T extends ViewContainerItem> {\n @Input() viewContext: SlateViewContext;\n\n constructor(\n protected elementRef: ElementRef<any>,\n protected differs: IterableDiffers\n ) {}\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { Descendant } from 'slate';\nimport { SlateChildrenContext, SlateViewContext } from '../../view/context';\nimport { ViewContainer } from '../../view/container';\n\n@Component({\n selector: 'slate-children',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SlateChildren extends ViewContainer<any> {\n @Input() children: Descendant[];\n\n @Input() context: SlateChildrenContext;\n\n @Input() viewContext: SlateViewContext;\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Input,\n OnChanges,\n OnInit,\n QueryList,\n SimpleChanges,\n ViewChildren\n} from '@angular/core';\nimport { Text } from 'slate';\nimport { SlateLeafContext, SlateTextContext } from '../../view/context';\nimport { ViewContainer } from '../../view/container';\n\n@Component({\n selector: 'slate-leaves',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: []\n})\nexport class SlateLeaves extends ViewContainer<any> {\n initialized = false;\n leafContexts: SlateLeafContext[];\n leaves: Text[];\n\n @Input() context: SlateTextContext;\n}\n","import { forwardRef, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SlateEditable } from './components/editable/editable.component';\nimport { SlateDefaultText } from './components/text/default-text.component';\nimport { SlateVoidText } from './components/text/void-text.component';\nimport { SlateElement } from './components/element/element.component';\nimport { SlateDefaultElement } from './components/element/default-element.component';\nimport { SlateString } from './components/string/string.component';\nimport { SlateStringTemplate } from './components/string/template.component';\nimport { SlateChildren } from './components/children/children.component';\nimport { SlateChildrenOutlet } from './components/children/children-outlet.component';\nimport { SlateBlockCard } from './components/block-card/block-card.component';\nimport { SlateDefaultLeaf } from './components/leaf/default-leaf.component';\nimport { SlateLeaves } from './components/leaves/leaves.component';\nimport { SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN } from './components/element/default-element.component.token';\nimport { SlateDefaultString } from './components/string/default-string.component';\n\n@NgModule({\n imports: [\n CommonModule,\n SlateEditable,\n SlateDefaultElement,\n SlateElement,\n SlateVoidText,\n SlateDefaultText,\n SlateString,\n SlateStringTemplate,\n SlateChildren,\n SlateBlockCard,\n SlateLeaves,\n SlateDefaultLeaf,\n SlateDefaultString,\n SlateChildrenOutlet\n ],\n exports: [SlateEditable, SlateChildren, SlateChildrenOutlet, SlateElement, SlateLeaves, SlateString, SlateDefaultString],\n providers: [\n {\n provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,\n useValue: SlateDefaultElement\n }\n ]\n})\nexport class SlateModule {}\n","/*\n * Public API Surface of slate-angular\n */\nexport * from './plugins/angular-editor';\nexport * from './plugins/with-angular';\nexport * from './components/editable/editable.component';\nexport * from './components/element/element.component';\nexport * from './components/string/string.component';\nexport * from './components/string/default-string.component';\nexport * from './components/children/children.component';\nexport * from './components/children/children-outlet.component';\nexport * from './components/leaves/leaves.component';\nexport * from './module';\nexport * from './types/error';\nexport * from './view/base';\nexport * from './view/context';\nexport * from './view/context-change';\nexport * from './utils';\nexport * from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["IS_CHROME","Text","FallbackCompositionStateGetData","FallbackCompositionStateReset","getContext","getViewType","trackBy","Hotkeys"],"mappings":";;;;;;;;;;;;AAEa,MAAA,2BAA2B,GAAG,CAAC;AAE/B,MAAA,4BAA4B,GAAG,CAAC;AAEvC,SAAU,oBAAoB,CAAC,IAAa,EAAA;IAC9C,OAAO,IAAI,KAAK,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,IAAI,YAAY,WAAW,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AACxI;AAEM,SAAU,YAAY,CAAC,SAAuB,EAA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