@krainovsd/markdown-editor 0.4.9 → 0.4.10

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 +0,0 @@
1
- {"version":3,"file":"get-change-event.js","sources":["../../../../src/extensions/listeners/get-change-event.ts"],"sourcesContent":["import { EditorView } from \"@codemirror/view\";\nimport type { EditorViewUpdate } from \"@/module\";\n\nexport type GetChangeEventOptions = {\n onChange?: HandleChangeEditorFunction;\n};\n\nexport type HandleChangeEditorFunction = (view: EditorViewUpdate) => void;\n\nexport function getChangeEvent({ onChange }: GetChangeEventOptions) {\n return onChange\n ? EditorView.updateListener.of((event) => {\n if (event.docChanged) {\n onChange(event);\n }\n })\n : [];\n}\n"],"names":[],"mappings":";;AASgB,SAAA,cAAc,CAAC,EAAE,QAAQ,EAAyB,EAAA;AAChE,IAAA,OAAO;UACH,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,KAAI;AACrC,YAAA,IAAI,KAAK,CAAC,UAAU,EAAE;gBACpB,QAAQ,CAAC,KAAK,CAAC;;AAEnB,SAAC;UACD,EAAE;AACR;;;;"}
@@ -1,16 +0,0 @@
1
- import { EditorView } from '@codemirror/view';
2
-
3
- function getFocusEvent({ onBlur, onFocus }) {
4
- return onFocus || onBlur
5
- ? EditorView.focusChangeEffect.of((event, focus) => {
6
- if (focus && onFocus)
7
- onFocus(event);
8
- else if (!focus && onBlur)
9
- onBlur(event);
10
- return null;
11
- })
12
- : [];
13
- }
14
-
15
- export { getFocusEvent };
16
- //# sourceMappingURL=get-focus-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-focus-event.js","sources":["../../../../src/extensions/listeners/get-focus-event.ts"],"sourcesContent":["import { EditorView } from \"@codemirror/view\";\nimport type { EditorState } from \"@/module\";\n\nexport type GetFocusEventOptions = {\n onFocus?: HandleFocusEditorFunction;\n onBlur?: HandleBlurEditorFunction;\n};\n\nexport type HandleFocusEditorFunction = (state: EditorState) => void;\nexport type HandleBlurEditorFunction = (state: EditorState) => void;\n\nexport function getFocusEvent({ onBlur, onFocus }: GetFocusEventOptions) {\n return onFocus || onBlur\n ? EditorView.focusChangeEffect.of((event, focus) => {\n if (focus && onFocus) onFocus(event);\n else if (!focus && onBlur) onBlur(event);\n\n return null;\n })\n : [];\n}\n"],"names":[],"mappings":";;SAWgB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAwB,EAAA;IACrE,OAAO,OAAO,IAAI;AAChB,UAAE,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAI;YAC/C,IAAI,KAAK,IAAI,OAAO;gBAAE,OAAO,CAAC,KAAK,CAAC;iBAC/B,IAAI,CAAC,KAAK,IAAI,MAAM;gBAAE,MAAM,CAAC,KAAK,CAAC;AAExC,YAAA,OAAO,IAAI;AACb,SAAC;UACD,EAAE;AACR;;;;"}