@omegagrid/markdown 0.6.26 → 0.6.28

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.
Files changed (45) hide show
  1. package/dist/components/features/blockEdit.d.ts +1 -1
  2. package/dist/components/features/blockEdit.d.ts.map +1 -1
  3. package/dist/components/features/blockEdit.js +128 -7
  4. package/dist/components/features/blockEditMenu.d.ts +1 -1
  5. package/dist/components/features/blockEditMenu.d.ts.map +1 -1
  6. package/dist/components/features/blockEditMenu.js +226 -5
  7. package/dist/components/features/codeBlock.js +132 -1
  8. package/dist/components/features/htmlBlock.d.ts +1 -1
  9. package/dist/components/features/htmlBlock.d.ts.map +1 -1
  10. package/dist/components/features/htmlBlock.js +132 -11
  11. package/dist/components/features/index.js +178 -1
  12. package/dist/components/features/linkEdit/component.d.ts +1 -1
  13. package/dist/components/features/linkEdit/component.d.ts.map +1 -1
  14. package/dist/components/features/linkEdit/component.js +42 -5
  15. package/dist/components/features/linkEdit/config.js +64 -1
  16. package/dist/components/features/linkEdit/index.js +14 -1
  17. package/dist/components/features/linkEdit/slices.js +23 -1
  18. package/dist/components/features/linkEdit/utils.js +33 -1
  19. package/dist/components/features/linkEdit/view.js +135 -1
  20. package/dist/components/features/placeholder.js +50 -1
  21. package/dist/components/features/toolbar.d.ts +1 -1
  22. package/dist/components/features/toolbar.d.ts.map +1 -1
  23. package/dist/components/features/toolbar.js +127 -13
  24. package/dist/components/features/utils.js +64 -1
  25. package/dist/components/index.js +4 -1
  26. package/dist/components/markdownEditor.d.ts +1 -1
  27. package/dist/components/markdownEditor.d.ts.map +1 -1
  28. package/dist/components/markdownEditor.js +138 -2
  29. package/dist/components/markdownEditor.style.js +22 -2
  30. package/dist/components/markdownView.js +19 -1
  31. package/dist/components/markdownView.style.js +4 -2
  32. package/dist/components/styles/block-edit.js +4 -2
  33. package/dist/components/styles/cursor.js +4 -2
  34. package/dist/components/styles/image-block.js +4 -2
  35. package/dist/components/styles/index.js +19 -1
  36. package/dist/components/styles/link-tooltip.js +4 -2
  37. package/dist/components/styles/list-item.js +4 -2
  38. package/dist/components/styles/placeholder.js +4 -2
  39. package/dist/components/styles/prosemirror.js +4 -2
  40. package/dist/components/styles/table.js +4 -2
  41. package/dist/constants.js +5 -1
  42. package/dist/index.js +4 -1
  43. package/dist/loader.js +46 -1
  44. package/dist/utils.js +62 -1
  45. package/package.json +6 -6
@@ -1 +1,135 @@
1
- var _LinkEditView_provider,_LinkEditView_slice,_LinkEditView_content,_LinkEditView_hovering,_LinkEditView_data,_LinkEditView_hide,_LinkEditView_onMouseEnter,_LinkEditView_onMouseLeave,_LinkEditView_enterEditMode,_LinkEditView_reset,__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,i,t,s,a){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?e!==i||!a:!i.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?a.call(e,t):a?a.value=t:i.set(e,t),t},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,i,t,s){if("a"===t&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?e!==i||!s:!i.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?s:"a"===t?s.call(e):s?s.value:i.get(e)};import{dom}from"@omegagrid/core";import{md}from"../../../loader";import{getLinkEditAPI,getLinkEditState}from"./slices";const defaultData={from:-1,to:-1,mark:null};export class LinkEditView{constructor(e,i){this.ctx=e,_LinkEditView_provider.set(this,void 0),_LinkEditView_slice.set(this,void 0),_LinkEditView_content.set(this,void 0),_LinkEditView_hovering.set(this,!1),_LinkEditView_data.set(this,{...defaultData}),this._onChange=e=>{const{from:i,to:t,mark:s}=__classPrivateFieldGet(this,_LinkEditView_data,"f");if(null==e.value||""===e.value)this.ctx.get(getLinkEditAPI().key).removeLink(i,t);else{const a=this.ctx.get(md.core.editorViewCtx),_=md.presets.commonmark.linkSchema.type(this.ctx);if(s&&s.attrs.href===e.value)return void __classPrivateFieldGet(this,_LinkEditView_reset,"f").call(this);const d=a.state.tr;s&&d.removeMark(i,t,s),d.addMark(i,t,_.create({href:e.value})),a.dispatch(d),__classPrivateFieldGet(this,_LinkEditView_reset,"f").call(this)}__classPrivateFieldGet(this,_LinkEditView_hide,"f").call(this)},this.update=e=>{const{state:i}=e,{selection:t}=i;if(!(t instanceof md.prose.state.TextSelection))return;const{from:s,to:a}=t;s===__classPrivateFieldGet(this,_LinkEditView_data,"f").from&&a===__classPrivateFieldGet(this,_LinkEditView_data,"f").to||__classPrivateFieldGet(this,_LinkEditView_reset,"f").call(this)},this.destroy=()=>{__classPrivateFieldGet(this,_LinkEditView_provider,"f").destroy(),__classPrivateFieldGet(this,_LinkEditView_content,"f").remove()},this.show=(e,i,t,s)=>{__classPrivateFieldSet(this,_LinkEditView_data,{from:i,to:t,mark:e},"f"),s.height=__classPrivateFieldGet(this,_LinkEditView_content,"f").offsetHeight||20,s.width=__classPrivateFieldGet(this,_LinkEditView_content,"f").offsetWidth||150,__classPrivateFieldGet(this,_LinkEditView_provider,"f").show({getBoundingClientRect:()=>s}),__classPrivateFieldGet(this,_LinkEditView_provider,"f").element.addEventListener("mouseenter",__classPrivateFieldGet(this,_LinkEditView_onMouseEnter,"f")),__classPrivateFieldGet(this,_LinkEditView_provider,"f").element.addEventListener("mouseleave",__classPrivateFieldGet(this,_LinkEditView_onMouseLeave,"f")),__classPrivateFieldGet(this,_LinkEditView_content,"f").value=e?.attrs.href??"",dom.showElement(__classPrivateFieldGet(this,_LinkEditView_content,"f"))},this.hide=()=>{__classPrivateFieldGet(this,_LinkEditView_hovering,"f")||__classPrivateFieldGet(this,_LinkEditView_hide,"f").call(this)},_LinkEditView_hide.set(this,(()=>{dom.hideElement(__classPrivateFieldGet(this,_LinkEditView_content,"f")),__classPrivateFieldGet(this,_LinkEditView_provider,"f").hide(),__classPrivateFieldGet(this,_LinkEditView_provider,"f").element.removeEventListener("mouseenter",__classPrivateFieldGet(this,_LinkEditView_onMouseEnter,"f")),__classPrivateFieldGet(this,_LinkEditView_provider,"f").element.removeEventListener("mouseleave",__classPrivateFieldGet(this,_LinkEditView_onMouseLeave,"f"))})),_LinkEditView_onMouseEnter.set(this,(()=>{__classPrivateFieldSet(this,_LinkEditView_hovering,!0,"f")})),_LinkEditView_onMouseLeave.set(this,(()=>{__classPrivateFieldSet(this,_LinkEditView_hovering,!1,"f")})),_LinkEditView_enterEditMode.set(this,((e,i,t)=>{__classPrivateFieldGet(this,_LinkEditView_content,"f").value=e;const s=this.ctx.get(md.core.editorViewCtx);this.show(null,i,t,md.prose.posToDOMRect(s,i,t));const a=s.state.tr;s.dispatch(a.setSelection(md.prose.state.TextSelection.create(s.state.doc,i,t)))})),_LinkEditView_reset.set(this,(()=>{__classPrivateFieldGet(this,_LinkEditView_provider,"f").hide(),__classPrivateFieldSet(this,_LinkEditView_data,{...defaultData},"f")})),this.addLink=(e,i)=>{__classPrivateFieldSet(this,_LinkEditView_data,{from:e,to:i,mark:null},"f"),console.log(this),__classPrivateFieldGet(this,_LinkEditView_enterEditMode,"f").call(this,"",e,i)},this.editLink=(e,i,t)=>{__classPrivateFieldSet(this,_LinkEditView_data,{from:i,to:t,mark:e},"f"),__classPrivateFieldGet(this,_LinkEditView_enterEditMode,"f").call(this,e.attrs.href,i,t)},this.removeLink=(e,i)=>{const t=this.ctx.get(md.core.editorViewCtx),s=t.state.tr;s.removeMark(e,i,md.presets.commonmark.linkSchema.type(this.ctx)),t.dispatch(s),__classPrivateFieldGet(this,_LinkEditView_reset,"f").call(this)};const t=dom.createElement("og-markdown-linkedit");t.addEventListener("change",this._onChange),t.ctx=e,__classPrivateFieldSet(this,_LinkEditView_content,t,"f"),__classPrivateFieldSet(this,_LinkEditView_provider,new md.plugins.tooltip.TooltipProvider({content:__classPrivateFieldGet(this,_LinkEditView_content,"f"),offset:10,debounce:0,shouldShow:()=>!1}),"f"),__classPrivateFieldGet(this,_LinkEditView_provider,"f").update(i),__classPrivateFieldSet(this,_LinkEditView_slice,e.use(getLinkEditState().key),"f")}}_LinkEditView_provider=new WeakMap,_LinkEditView_slice=new WeakMap,_LinkEditView_content=new WeakMap,_LinkEditView_hovering=new WeakMap,_LinkEditView_data=new WeakMap,_LinkEditView_hide=new WeakMap,_LinkEditView_onMouseEnter=new WeakMap,_LinkEditView_onMouseLeave=new WeakMap,_LinkEditView_enterEditMode=new WeakMap,_LinkEditView_reset=new WeakMap;
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _LinkEditView_provider, _LinkEditView_slice, _LinkEditView_content, _LinkEditView_hovering, _LinkEditView_data, _LinkEditView_hide, _LinkEditView_onMouseEnter, _LinkEditView_onMouseLeave, _LinkEditView_enterEditMode, _LinkEditView_reset;
13
+ import { dom } from "@omegagrid/core";
14
+ import { md } from "../../../loader";
15
+ import { getLinkEditAPI, getLinkEditState } from "./slices";
16
+ const defaultData = {
17
+ from: -1,
18
+ to: -1,
19
+ mark: null,
20
+ };
21
+ export class LinkEditView {
22
+ constructor(ctx, view) {
23
+ this.ctx = ctx;
24
+ _LinkEditView_provider.set(this, void 0);
25
+ _LinkEditView_slice.set(this, void 0);
26
+ _LinkEditView_content.set(this, void 0);
27
+ _LinkEditView_hovering.set(this, false);
28
+ _LinkEditView_data.set(this, { ...defaultData });
29
+ this._onChange = (e) => {
30
+ const { from, to, mark } = __classPrivateFieldGet(this, _LinkEditView_data, "f");
31
+ if (e.value == null || e.value === '') {
32
+ this.ctx.get(getLinkEditAPI().key).removeLink(from, to);
33
+ }
34
+ else {
35
+ const view = this.ctx.get(md.core.editorViewCtx);
36
+ const type = md.presets.commonmark.linkSchema.type(this.ctx);
37
+ if (mark && mark.attrs.href === e.value) {
38
+ __classPrivateFieldGet(this, _LinkEditView_reset, "f").call(this);
39
+ return;
40
+ }
41
+ const tr = view.state.tr;
42
+ if (mark)
43
+ tr.removeMark(from, to, mark);
44
+ tr.addMark(from, to, type.create({ href: e.value }));
45
+ view.dispatch(tr);
46
+ __classPrivateFieldGet(this, _LinkEditView_reset, "f").call(this);
47
+ }
48
+ __classPrivateFieldGet(this, _LinkEditView_hide, "f").call(this);
49
+ };
50
+ this.update = (view) => {
51
+ const { state } = view;
52
+ const { selection } = state;
53
+ if (!(selection instanceof md.prose.state.TextSelection))
54
+ return;
55
+ const { from, to } = selection;
56
+ if (from === __classPrivateFieldGet(this, _LinkEditView_data, "f").from && to === __classPrivateFieldGet(this, _LinkEditView_data, "f").to)
57
+ return;
58
+ __classPrivateFieldGet(this, _LinkEditView_reset, "f").call(this);
59
+ };
60
+ this.destroy = () => {
61
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").destroy();
62
+ __classPrivateFieldGet(this, _LinkEditView_content, "f").remove();
63
+ };
64
+ this.show = (mark, from, to, rect) => {
65
+ __classPrivateFieldSet(this, _LinkEditView_data, { from, to, mark }, "f");
66
+ rect.height = __classPrivateFieldGet(this, _LinkEditView_content, "f").offsetHeight || 20;
67
+ rect.width = __classPrivateFieldGet(this, _LinkEditView_content, "f").offsetWidth || 150;
68
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").show({
69
+ getBoundingClientRect: () => rect,
70
+ });
71
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").element.addEventListener('mouseenter', __classPrivateFieldGet(this, _LinkEditView_onMouseEnter, "f"));
72
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").element.addEventListener('mouseleave', __classPrivateFieldGet(this, _LinkEditView_onMouseLeave, "f"));
73
+ __classPrivateFieldGet(this, _LinkEditView_content, "f").value = mark?.attrs.href ?? '';
74
+ dom.showElement(__classPrivateFieldGet(this, _LinkEditView_content, "f"));
75
+ };
76
+ this.hide = () => {
77
+ if (__classPrivateFieldGet(this, _LinkEditView_hovering, "f"))
78
+ return;
79
+ __classPrivateFieldGet(this, _LinkEditView_hide, "f").call(this);
80
+ };
81
+ _LinkEditView_hide.set(this, () => {
82
+ dom.hideElement(__classPrivateFieldGet(this, _LinkEditView_content, "f"));
83
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").hide();
84
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").element.removeEventListener('mouseenter', __classPrivateFieldGet(this, _LinkEditView_onMouseEnter, "f"));
85
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").element.removeEventListener('mouseleave', __classPrivateFieldGet(this, _LinkEditView_onMouseLeave, "f"));
86
+ });
87
+ _LinkEditView_onMouseEnter.set(this, () => {
88
+ __classPrivateFieldSet(this, _LinkEditView_hovering, true, "f");
89
+ });
90
+ _LinkEditView_onMouseLeave.set(this, () => {
91
+ __classPrivateFieldSet(this, _LinkEditView_hovering, false, "f");
92
+ });
93
+ _LinkEditView_enterEditMode.set(this, (value, from, to) => {
94
+ __classPrivateFieldGet(this, _LinkEditView_content, "f").value = value;
95
+ const view = this.ctx.get(md.core.editorViewCtx);
96
+ this.show(null, from, to, md.prose.posToDOMRect(view, from, to));
97
+ const tr = view.state.tr;
98
+ view.dispatch(tr.setSelection(md.prose.state.TextSelection.create(view.state.doc, from, to)));
99
+ });
100
+ _LinkEditView_reset.set(this, () => {
101
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").hide();
102
+ __classPrivateFieldSet(this, _LinkEditView_data, { ...defaultData }, "f");
103
+ });
104
+ this.addLink = (from, to) => {
105
+ __classPrivateFieldSet(this, _LinkEditView_data, { from, to, mark: null }, "f");
106
+ console.log(this);
107
+ __classPrivateFieldGet(this, _LinkEditView_enterEditMode, "f").call(this, '', from, to);
108
+ };
109
+ this.editLink = (mark, from, to) => {
110
+ __classPrivateFieldSet(this, _LinkEditView_data, { from, to, mark }, "f");
111
+ __classPrivateFieldGet(this, _LinkEditView_enterEditMode, "f").call(this, mark.attrs.href, from, to);
112
+ };
113
+ this.removeLink = (from, to) => {
114
+ const view = this.ctx.get(md.core.editorViewCtx);
115
+ const tr = view.state.tr;
116
+ tr.removeMark(from, to, md.presets.commonmark.linkSchema.type(this.ctx));
117
+ view.dispatch(tr);
118
+ __classPrivateFieldGet(this, _LinkEditView_reset, "f").call(this);
119
+ };
120
+ const content = dom.createElement('og-markdown-linkedit');
121
+ content.addEventListener('change', this._onChange);
122
+ content.ctx = ctx;
123
+ __classPrivateFieldSet(this, _LinkEditView_content, content, "f");
124
+ __classPrivateFieldSet(this, _LinkEditView_provider, new md.plugins.tooltip.TooltipProvider({
125
+ content: __classPrivateFieldGet(this, _LinkEditView_content, "f"),
126
+ offset: 10,
127
+ debounce: 0,
128
+ shouldShow: () => false
129
+ }), "f");
130
+ __classPrivateFieldGet(this, _LinkEditView_provider, "f").update(view);
131
+ __classPrivateFieldSet(this, _LinkEditView_slice, ctx.use(getLinkEditState().key), "f");
132
+ }
133
+ }
134
+ _LinkEditView_provider = new WeakMap(), _LinkEditView_slice = new WeakMap(), _LinkEditView_content = new WeakMap(), _LinkEditView_hovering = new WeakMap(), _LinkEditView_data = new WeakMap(), _LinkEditView_hide = new WeakMap(), _LinkEditView_onMouseEnter = new WeakMap(), _LinkEditView_onMouseLeave = new WeakMap(), _LinkEditView_enterEditMode = new WeakMap(), _LinkEditView_reset = new WeakMap();
135
+ //# sourceMappingURL=view.js.map
@@ -1 +1,50 @@
1
- import{isInCodeBlock,isInList}from"./utils";function isDocEmpty(e){return e.childCount<=1&&!e.firstChild?.content.size}function createPlaceholderDecoration(e,t,o){const{selection:n}=t;if(!n.empty)return null;const r=n.$anchor,l=r.parent;if(l.content.size>0)return null;const c=e.prose.findParent((e=>"table"===e.type.name))(r);if(c)return null;const i=r.before();return e.prose.view.Decoration.node(i,i+l.nodeSize,{class:"crepe-placeholder","data-placeholder":o})}export const defaultPlaceholderConfig={text:"Please enter...",mode:"block"};export const createPlaceHolder=e=>{const t=e.utils.$ctx(defaultPlaceholderConfig,"placeholderConfigCtx");return{plugin:e.utils.$prose((o=>new e.prose.state.Plugin({key:new e.prose.state.PluginKey("MARKDOWN_PLACEHOLDER"),props:{decorations:n=>{const r=o.get(t.key);if("doc"===r.mode&&!isDocEmpty(n.doc))return null;if(isInCodeBlock(n.selection)||isInList(n.selection))return null;const l=r.text??"Please enter...",c=createPlaceholderDecoration(e,n,l);return c?e.prose.view.DecorationSet.create(n.doc,[c]):null}}}))),config:t}};
1
+ import { isInCodeBlock, isInList } from './utils';
2
+ function isDocEmpty(doc) {
3
+ return doc.childCount <= 1 && !doc.firstChild?.content.size;
4
+ }
5
+ function createPlaceholderDecoration(md, state, placeholderText) {
6
+ const { selection } = state;
7
+ if (!selection.empty)
8
+ return null;
9
+ const $pos = selection.$anchor;
10
+ const node = $pos.parent;
11
+ if (node.content.size > 0)
12
+ return null;
13
+ const inTable = md.prose.findParent((node) => node.type.name === 'table')($pos);
14
+ if (inTable)
15
+ return null;
16
+ const before = $pos.before();
17
+ return md.prose.view.Decoration.node(before, before + node.nodeSize, {
18
+ class: 'crepe-placeholder',
19
+ 'data-placeholder': placeholderText,
20
+ });
21
+ }
22
+ export const defaultPlaceholderConfig = {
23
+ text: 'Please enter...',
24
+ mode: 'block',
25
+ };
26
+ export const createPlaceHolder = (md) => {
27
+ const placeholderConfig = md.utils.$ctx(defaultPlaceholderConfig, 'placeholderConfigCtx');
28
+ const placeholderPlugin = md.utils.$prose(ctx => new md.prose.state.Plugin({
29
+ key: new md.prose.state.PluginKey('MARKDOWN_PLACEHOLDER'),
30
+ props: {
31
+ decorations: (state) => {
32
+ const config = ctx.get(placeholderConfig.key);
33
+ if (config.mode === 'doc' && !isDocEmpty(state.doc))
34
+ return null;
35
+ if (isInCodeBlock(state.selection) || isInList(state.selection))
36
+ return null;
37
+ const placeholderText = config.text ?? 'Please enter...';
38
+ const deco = createPlaceholderDecoration(md, state, placeholderText);
39
+ if (!deco)
40
+ return null;
41
+ return md.prose.view.DecorationSet.create(state.doc, [deco]);
42
+ },
43
+ }
44
+ }));
45
+ return {
46
+ plugin: placeholderPlugin,
47
+ config: placeholderConfig,
48
+ };
49
+ };
50
+ //# sourceMappingURL=placeholder.js.map
@@ -12,7 +12,7 @@ export declare class Toolbar extends LitElement {
12
12
  isActive: (mark: MarkType) => boolean;
13
13
  constructor();
14
14
  command(key: milkdown.core.CmdKey<unknown>): void;
15
- render: () => import("lit").TemplateResult<1>;
15
+ render: () => import("lit-html").TemplateResult<1>;
16
16
  }
17
17
  export declare class ToolbarView implements PluginView {
18
18
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/features/toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAGzD,qBACa,OAAQ,SAAQ,UAAU;IAEtC,MAAM,CAAC,MAAM,0BA6BX;IAEF,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;IACtB,EAAE,EAAE,OAAO,QAAQ,CAAC;IAEpB,IAAI,UAAU,iDAAwC;IACtD,IAAI,GAAG,0CAAiC;IAExC,QAAQ,SAAU,QAAQ,aAKzB;;IAkBD,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1C,MAAM,wCAiDJ;CACF;AAGD,qBAAa,WAAY,YAAW,UAAU;;gBAKjC,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,QAAQ;IAgCxE,MAAM,SAAU,UAAU,cAAc,WAAW,UAElD;IAED,OAAO,aAGN;IAED,IAAI,aAEH;CAED"}
1
+ {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/features/toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAGzD,qBACa,OAAQ,SAAQ,UAAU;IAEtC,MAAM,CAAC,MAAM,0BA6BX;IAEF,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;IACtB,EAAE,EAAE,OAAO,QAAQ,CAAC;IAEpB,IAAI,UAAU,iDAAwC;IACtD,IAAI,GAAG,0CAAiC;IAExC,QAAQ,SAAU,QAAQ,aAKzB;;IAkBD,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1C,MAAM,6CAiDJ;CACF;AAGD,qBAAa,WAAY,YAAW,UAAU;;gBAKjC,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,QAAQ;IAgCxE,MAAM,SAAU,UAAU,cAAc,WAAW,UAElD;IAED,OAAO,aAGN;IAED,IAAI,aAEH;CAED"}
@@ -1,41 +1,102 @@
1
- var _ToolbarView_provider,_ToolbarView_ctx,_ToolbarView_content,__decorate=this&&this.__decorate||function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,o,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,o):r?r.value=o:e.set(t,o),o},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,o,i){if("a"===o&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?i:"a"===o?i.call(t):i?i.value:e.get(t)};import{LitElement,css,html}from"lit";import{customElement}from"lit/decorators.js";import{dom}from"@omegagrid/core";import{getLinkEditAPI}from"./linkEdit/slices";let Toolbar=class extends LitElement{get commonmark(){return this.md.presets.commonmark}get gfm(){return this.md.presets.gfm}constructor(){super(),this.isActive=t=>{if(!this.ctx)return!1;const e=this.ctx.get(this.md.core.editorViewCtx),{state:{doc:o,selection:i}}=e;return o.rangeHasMark(i.from,i.to,t)},this.render=()=>html`
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8
+ if (kind === "m") throw new TypeError("Private method is not writable");
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
+ };
13
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
+ };
18
+ var _ToolbarView_provider, _ToolbarView_ctx, _ToolbarView_content;
19
+ import { LitElement, css, html } from "lit";
20
+ import { customElement } from "lit/decorators.js";
21
+ import { dom } from "@omegagrid/core";
22
+ import { getLinkEditAPI } from "./linkEdit/slices";
23
+ let Toolbar = class Toolbar extends LitElement {
24
+ get commonmark() { return this.md.presets.commonmark; }
25
+ get gfm() { return this.md.presets.gfm; }
26
+ constructor() {
27
+ super();
28
+ this.isActive = (mark) => {
29
+ if (!this.ctx)
30
+ return false;
31
+ const view = this.ctx.get(this.md.core.editorViewCtx);
32
+ const { state: { doc, selection } } = view;
33
+ return doc.rangeHasMark(selection.from, selection.to, mark);
34
+ };
35
+ this.render = () => html `
2
36
  <div>
3
37
  <og-button
4
- .state="${this.isActive(this.commonmark.strongSchema.type(this.ctx))?"checked":"unchecked"}"
38
+ .state="${this.isActive(this.commonmark.strongSchema.type(this.ctx)) ? 'checked' : 'unchecked'}"
5
39
  type="toggle"
6
40
  icon="bold"
7
- @click="${()=>this.command(this.commonmark.toggleStrongCommand.key)}">
41
+ @click="${() => this.command(this.commonmark.toggleStrongCommand.key)}">
8
42
  </og-button>
9
43
 
10
44
  <og-button
11
- .state="${this.isActive(this.commonmark.emphasisSchema.type(this.ctx))?"checked":"unchecked"}"
45
+ .state="${this.isActive(this.commonmark.emphasisSchema.type(this.ctx)) ? 'checked' : 'unchecked'}"
12
46
  type="toggle"
13
47
  icon="italic"
14
- @click="${()=>this.command(this.commonmark.toggleEmphasisCommand.key)}">
48
+ @click="${() => this.command(this.commonmark.toggleEmphasisCommand.key)}">
15
49
  </og-button>
16
50
 
17
51
  <og-button
18
- .state="${this.isActive(this.gfm.strikethroughSchema.type(this.ctx))?"checked":"unchecked"}"
52
+ .state="${this.isActive(this.gfm.strikethroughSchema.type(this.ctx)) ? 'checked' : 'unchecked'}"
19
53
  type="toggle"
20
54
  icon="strikethrough"
21
- @click="${()=>this.command(this.gfm.toggleStrikethroughCommand.key)}">
55
+ @click="${() => this.command(this.gfm.toggleStrikethroughCommand.key)}">
22
56
  </og-button>
23
57
 
24
58
  <og-button
25
- .state="${this.isActive(this.commonmark.inlineCodeSchema.type(this.ctx))?"checked":"unchecked"}"
59
+ .state="${this.isActive(this.commonmark.inlineCodeSchema.type(this.ctx)) ? 'checked' : 'unchecked'}"
26
60
  type="toggle"
27
61
  icon="code"
28
- @click="${()=>this.command(this.commonmark.toggleInlineCodeCommand.key)}">
62
+ @click="${() => this.command(this.commonmark.toggleInlineCodeCommand.key)}">
29
63
  </og-button>
30
64
 
31
65
  <og-button
32
- .state="${this.isActive(this.commonmark.linkSchema.type(this.ctx))?"checked":"unchecked"}"
66
+ .state="${this.isActive(this.commonmark.linkSchema.type(this.ctx)) ? 'checked' : 'unchecked'}"
33
67
  type="toggle"
34
68
  icon="link"
35
- @click="${()=>{const t=this.ctx.get(this.md.core.editorViewCtx),{selection:e}=t.state;this.isActive(this.commonmark.linkSchema.type(this.ctx))?this.ctx.get(getLinkEditAPI().key).removeLink(e.from,e.to):(this.ctx.get(getLinkEditAPI().key).addLink(e.from,e.to),this.dispatchEvent(new Event("hide")))}}">
69
+ @click="${() => {
70
+ const view = this.ctx.get(this.md.core.editorViewCtx);
71
+ const { selection } = view.state;
72
+ if (this.isActive(this.commonmark.linkSchema.type(this.ctx))) {
73
+ this.ctx.get(getLinkEditAPI().key).removeLink(selection.from, selection.to);
74
+ return;
75
+ }
76
+ this.ctx.get(getLinkEditAPI().key).addLink(selection.from, selection.to);
77
+ this.dispatchEvent(new Event('hide'));
78
+ }}">
36
79
  </og-button>
37
80
  </div>
38
- `,this.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()})),this.addEventListener("mousedown",(t=>{t.stopPropagation(),t.preventDefault()})),this.addEventListener("mouseup",(t=>{t.stopPropagation(),t.preventDefault()}))}command(t){this.ctx.get(this.md.core.commandsCtx).call(t)}};Toolbar.styles=css`
81
+ `;
82
+ this.addEventListener('click', (e) => {
83
+ e.stopPropagation();
84
+ e.preventDefault();
85
+ });
86
+ this.addEventListener('mousedown', (e) => {
87
+ e.stopPropagation();
88
+ e.preventDefault();
89
+ });
90
+ this.addEventListener('mouseup', (e) => {
91
+ e.stopPropagation();
92
+ e.preventDefault();
93
+ });
94
+ }
95
+ command(key) {
96
+ this.ctx.get(this.md.core.commandsCtx).call(key);
97
+ }
98
+ };
99
+ Toolbar.styles = css `
39
100
  * {
40
101
  box-sizing: border-box;
41
102
  }
@@ -64,4 +125,57 @@ var _ToolbarView_provider,_ToolbarView_ctx,_ToolbarView_content,__decorate=this&
64
125
  flex: 0;
65
126
  text-align: center;
66
127
  }
67
- `,Toolbar=__decorate([customElement("og-markdown-toolbar")],Toolbar);export{Toolbar};export class ToolbarView{constructor(t,e,o){_ToolbarView_provider.set(this,void 0),_ToolbarView_ctx.set(this,void 0),_ToolbarView_content.set(this,void 0),this.update=(t,e)=>{__classPrivateFieldGet(this,_ToolbarView_provider,"f").update(t,e)},this.destroy=()=>{__classPrivateFieldGet(this,_ToolbarView_provider,"f").destroy(),__classPrivateFieldGet(this,_ToolbarView_content,"f").remove()},this.hide=()=>{__classPrivateFieldGet(this,_ToolbarView_provider,"f").hide()},__classPrivateFieldSet(this,_ToolbarView_ctx,t,"f");const i=dom.createElement("og-markdown-toolbar");i.addEventListener("hide",(()=>__classPrivateFieldGet(this,_ToolbarView_provider,"f").hide())),i.ctx=t,i.md=o,__classPrivateFieldSet(this,_ToolbarView_content,i,"f"),__classPrivateFieldSet(this,_ToolbarView_provider,new o.plugins.tooltip.TooltipProvider({content:__classPrivateFieldGet(this,_ToolbarView_content,"f"),offset:10,debounce:20,shouldShow(t){const{doc:e,selection:r}=t.state,{empty:s,from:a,to:n}=r,c=!e.textBetween(a,n).length&&r instanceof o.prose.state.TextSelection,l=!(r instanceof o.prose.state.TextSelection),d=t.dom.getRootNode().activeElement,h=i.contains(d),m=!t.hasFocus()&&!h,_=!t.editable;return!(m||l||s||c||_)}}),"f"),__classPrivateFieldGet(this,_ToolbarView_provider,"f").onShow=()=>{dom.showElement(__classPrivateFieldGet(this,_ToolbarView_content,"f")),__classPrivateFieldGet(this,_ToolbarView_content,"f").requestUpdate()},__classPrivateFieldGet(this,_ToolbarView_provider,"f").onHide=()=>dom.hideElement(__classPrivateFieldGet(this,_ToolbarView_content,"f")),this.update(e)}}_ToolbarView_provider=new WeakMap,_ToolbarView_ctx=new WeakMap,_ToolbarView_content=new WeakMap;
128
+ `;
129
+ Toolbar = __decorate([
130
+ customElement('og-markdown-toolbar')
131
+ ], Toolbar);
132
+ export { Toolbar };
133
+ export class ToolbarView {
134
+ constructor(ctx, view, md) {
135
+ _ToolbarView_provider.set(this, void 0);
136
+ _ToolbarView_ctx.set(this, void 0);
137
+ _ToolbarView_content.set(this, void 0);
138
+ this.update = (view, prevState) => {
139
+ __classPrivateFieldGet(this, _ToolbarView_provider, "f").update(view, prevState);
140
+ };
141
+ this.destroy = () => {
142
+ __classPrivateFieldGet(this, _ToolbarView_provider, "f").destroy();
143
+ __classPrivateFieldGet(this, _ToolbarView_content, "f").remove();
144
+ };
145
+ this.hide = () => {
146
+ __classPrivateFieldGet(this, _ToolbarView_provider, "f").hide();
147
+ };
148
+ __classPrivateFieldSet(this, _ToolbarView_ctx, ctx, "f");
149
+ const content = dom.createElement('og-markdown-toolbar');
150
+ content.addEventListener('hide', () => __classPrivateFieldGet(this, _ToolbarView_provider, "f").hide());
151
+ content.ctx = ctx;
152
+ content.md = md;
153
+ __classPrivateFieldSet(this, _ToolbarView_content, content, "f");
154
+ __classPrivateFieldSet(this, _ToolbarView_provider, new md.plugins.tooltip.TooltipProvider({
155
+ content: __classPrivateFieldGet(this, _ToolbarView_content, "f"),
156
+ offset: 10,
157
+ debounce: 20,
158
+ shouldShow(view) {
159
+ const { doc, selection } = view.state;
160
+ const { empty, from, to } = selection;
161
+ const isEmptyTextBlock = !doc.textBetween(from, to).length && selection instanceof md.prose.state.TextSelection;
162
+ const isNotTextBlock = !(selection instanceof md.prose.state.TextSelection);
163
+ const activeElement = view.dom.getRootNode().activeElement;
164
+ const isTooltipChildren = content.contains(activeElement);
165
+ const notHasFocus = !view.hasFocus() && !isTooltipChildren;
166
+ const isReadonly = !view.editable;
167
+ if (notHasFocus || isNotTextBlock || empty || isEmptyTextBlock || isReadonly)
168
+ return false;
169
+ return true;
170
+ }
171
+ }), "f");
172
+ __classPrivateFieldGet(this, _ToolbarView_provider, "f").onShow = () => {
173
+ dom.showElement(__classPrivateFieldGet(this, _ToolbarView_content, "f"));
174
+ __classPrivateFieldGet(this, _ToolbarView_content, "f").requestUpdate();
175
+ };
176
+ __classPrivateFieldGet(this, _ToolbarView_provider, "f").onHide = () => dom.hideElement(__classPrivateFieldGet(this, _ToolbarView_content, "f"));
177
+ this.update(view);
178
+ }
179
+ }
180
+ _ToolbarView_provider = new WeakMap(), _ToolbarView_ctx = new WeakMap(), _ToolbarView_content = new WeakMap();
181
+ //# sourceMappingURL=toolbar.js.map
@@ -1 +1,64 @@
1
- import{MilkdownLoader}from"../../loader";export function clearRange(e){const{$from:n,$to:o}=e.selection,t=n.pos-n.node().content.size;return t>=0&&(e=e.deleteRange(t,o.pos)),e}export function setBlockType(e,n,o=null){const{from:t,to:r}=e.selection;return e.setBlockType(t,r,n,o)}export function wrapInBlockType(e,n,o=null){const{$from:t,$to:r}=e.selection,l=t.blockRange(r),c=l&&MilkdownLoader.getSync().prose.transform.findWrapping(l,n,o);return c?e.wrap(l,c):null}export function addBlockType(e,n,o=null){const t=n.createAndFill(o);return t?e.replaceSelectionWith(t):null}export function clearContentAndSetBlockType(e,n=null){return(o,t)=>(t&&t(setBlockType(clearRange(o.tr),e,n).scrollIntoView()),!0)}export function clearContentAndWrapInBlockType(e,n=null){return(o,t)=>{const r=wrapInBlockType(clearRange(o.tr),e,n);return!!r&&(t&&t(r.scrollIntoView()),!0)}}export function clearContentAndAddBlockType(e,n=null){return(o,t)=>{const r=addBlockType(clearRange(o.tr),e,n);return!!r&&(t&&t(r.scrollIntoView()),!0)}}export function isInCodeBlock(e){return"code_block"===e.$from.parent.type.name}export function isInList(e){const n=e.$from.node(e.$from.depth-1)?.type;return"list_item"===n?.name}
1
+ import { MilkdownLoader } from "../../loader";
2
+ export function clearRange(tr) {
3
+ const { $from, $to } = tr.selection;
4
+ const from = $from.pos - $from.node().content.size;
5
+ if (from >= 0)
6
+ tr = tr.deleteRange(from, $to.pos);
7
+ return tr;
8
+ }
9
+ export function setBlockType(tr, nodeType, attrs = null) {
10
+ const { from, to } = tr.selection;
11
+ return tr.setBlockType(from, to, nodeType, attrs);
12
+ }
13
+ export function wrapInBlockType(tr, nodeType, attrs = null) {
14
+ const { $from, $to } = tr.selection;
15
+ const range = $from.blockRange($to);
16
+ const wrapping = range && (MilkdownLoader.getSync()).prose.transform.findWrapping(range, nodeType, attrs);
17
+ if (!wrapping)
18
+ return null;
19
+ return tr.wrap(range, wrapping);
20
+ }
21
+ export function addBlockType(tr, nodeType, attrs = null) {
22
+ const node = nodeType.createAndFill(attrs);
23
+ if (!node)
24
+ return null;
25
+ return tr.replaceSelectionWith(node);
26
+ }
27
+ export function clearContentAndSetBlockType(nodeType, attrs = null) {
28
+ return (state, dispatch) => {
29
+ if (dispatch) {
30
+ const tr = setBlockType(clearRange(state.tr), nodeType, attrs);
31
+ dispatch(tr.scrollIntoView());
32
+ }
33
+ return true;
34
+ };
35
+ }
36
+ export function clearContentAndWrapInBlockType(nodeType, attrs = null) {
37
+ return (state, dispatch) => {
38
+ const tr = wrapInBlockType(clearRange(state.tr), nodeType, attrs);
39
+ if (!tr)
40
+ return false;
41
+ if (dispatch)
42
+ dispatch(tr.scrollIntoView());
43
+ return true;
44
+ };
45
+ }
46
+ export function clearContentAndAddBlockType(nodeType, attrs = null) {
47
+ return (state, dispatch) => {
48
+ const tr = addBlockType(clearRange(state.tr), nodeType, attrs);
49
+ if (!tr)
50
+ return false;
51
+ if (dispatch)
52
+ dispatch(tr.scrollIntoView());
53
+ return true;
54
+ };
55
+ }
56
+ export function isInCodeBlock(selection) {
57
+ const type = selection.$from.parent.type;
58
+ return type.name === 'code_block';
59
+ }
60
+ export function isInList(selection) {
61
+ const type = selection.$from.node(selection.$from.depth - 1)?.type;
62
+ return type?.name === 'list_item';
63
+ }
64
+ //# sourceMappingURL=utils.js.map
@@ -1 +1,4 @@
1
- export*from"./markdownView";export*from"./markdownEditor";export*from"./features";
1
+ export * from './markdownView';
2
+ export * from './markdownEditor';
3
+ export * from './features';
4
+ //# sourceMappingURL=index.js.map
@@ -28,7 +28,7 @@ export declare class MarkdownEditor extends LitElement implements Layout {
28
28
  _onChange: (markdown: string, prevMarkdown: string) => void;
29
29
  updated(): Promise<void>;
30
30
  disconnectedCallback(): void;
31
- render: () => import("lit").TemplateResult<1>;
31
+ render: () => import("lit-html").TemplateResult<1>;
32
32
  layout(): void;
33
33
  }
34
34
  //# sourceMappingURL=markdownEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownEditor.d.ts","sourceRoot":"","sources":["../../src/components/markdownEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEzD,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;gBAErB,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAI5C;AAED,qBACa,cAAe,SAAQ,UAAW,YAAW,MAAM;;IAE/D,MAAM,CAAC,MAAM,4BAAsB;IAGnC,IACI,OAAO,IACM,MAAM,CADe;IACtC,IAAI,OAAO,CAAC,GAAG,EAAE,MAAM,EAKtB;IAGD,eAAe,SAAO;IAGtB,gBAAgB,EAAE,kBAAkB,CAAU;IAG9C,QAAQ,UAAS;IAGjB,SAAS,EAAE,cAAc,CAAC;IAG1B,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAG1C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAC,MAAM,CAAC;IAIzD,IAAI,WAAW,IAAiD,WAAW,CAAE;IAC7E,IAAI,MAAM,yBAA0B;;IAwBpC,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAOjC,iBAAiB;IAKjB,WAAW;IAKX,SAAS,aAAc,MAAM,gBAAgB,MAAM,UAGlD;IAEK,OAAO;IAab,oBAAoB;IAOpB,MAAM,wCAMJ;IAEF,MAAM;CAEN"}
1
+ {"version":3,"file":"markdownEditor.d.ts","sourceRoot":"","sources":["../../src/components/markdownEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEzD,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;gBAErB,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAI5C;AAED,qBACa,cAAe,SAAQ,UAAW,YAAW,MAAM;;IAE/D,MAAM,CAAC,MAAM,4BAAsB;IAGnC,IACI,OAAO,IACM,MAAM,CADe;IACtC,IAAI,OAAO,CAAC,GAAG,EAAE,MAAM,EAKtB;IAGD,eAAe,SAAO;IAGtB,gBAAgB,EAAE,kBAAkB,CAAU;IAG9C,QAAQ,UAAS;IAGjB,SAAS,EAAE,cAAc,CAAC;IAG1B,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAG1C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAC,MAAM,CAAC;IAIzD,IAAI,WAAW,IAAiD,WAAW,CAAE;IAC7E,IAAI,MAAM,yBAA0B;;IAwBpC,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAOjC,iBAAiB;IAKjB,WAAW;IAKX,SAAS,aAAc,MAAM,gBAAgB,MAAM,UAGlD;IAEK,OAAO;IAab,oBAAoB;IAOpB,MAAM,6CAMJ;IAEF,MAAM;CAEN"}