@aquera/nile-elements 2.0.3 → 2.0.5
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.
- package/README.md +21 -0
- package/demo/nxtgen-classes.css +596 -2
- package/demo/nxtgen-dark.css +240 -21
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +598 -4
- package/demo/nxtgen.css +57 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +458 -317
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.esm.js +28 -15
- package/dist/nile-combobox/nile-combobox.esm.js +11 -8
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js.map +1 -1
- package/dist/nile-combobox/portal-manager.esm.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js.map +1 -1
- package/dist/nile-combobox/renderer.esm.js +31 -43
- package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.esm.js +129 -6
- package/dist/nile-empty-state/nile-empty-state.esm.js +45 -31
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.esm.js +25 -25
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +1 -1
- package/dist/src/nile-combobox/nile-combobox.css.js +28 -15
- package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
- package/dist/src/nile-combobox/nile-combobox.js +49 -10
- package/dist/src/nile-combobox/nile-combobox.js.map +1 -1
- package/dist/src/nile-combobox/portal-manager.js +2 -22
- package/dist/src/nile-combobox/portal-manager.js.map +1 -1
- package/dist/src/nile-combobox/renderer.d.ts +2 -3
- package/dist/src/nile-combobox/renderer.js +14 -45
- package/dist/src/nile-combobox/renderer.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.css.js +127 -4
- package/dist/src/nile-empty-state/nile-empty-state.css.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +35 -5
- package/dist/src/nile-empty-state/nile-empty-state.js +159 -42
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.d.ts +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.test.js +186 -15
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.js +5 -5
- package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +11 -3
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/dist/xml-09119317.cjs.js +2 -0
- package/dist/xml-09119317.cjs.js.map +1 -0
- package/dist/{xml-25c4108a.esm.js → xml-9bf771b3.esm.js} +1 -1
- package/package.json +2 -1
- package/scripts/replace-version.cjs +12 -10
- package/src/nile-combobox/nile-combobox.css.ts +28 -15
- package/src/nile-combobox/nile-combobox.ts +61 -12
- package/src/nile-combobox/portal-manager.ts +4 -22
- package/src/nile-combobox/renderer.ts +26 -69
- package/src/nile-empty-state/nile-empty-state.css.ts +127 -4
- package/src/nile-empty-state/nile-empty-state.test.ts +192 -15
- package/src/nile-empty-state/nile-empty-state.ts +195 -34
- package/src/nile-pagination/nile-pagination.ts +5 -5
- package/src/version.ts +11 -2
- package/vscode-html-custom-data.json +79 -16
- package/dist/xml-90fd974e.cjs.js +0 -2
- package/dist/xml-90fd974e.cjs.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{__decorate as i}from"tslib";import{html as
|
|
1
|
+
import{__decorate as i}from"tslib";import{html as t}from"lit";import{property as e,state as n,query as s,customElement as r}from"lit/decorators.js";import{s as a}from"./nile-pagination.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{c as l,g as h,a as d,b as c}from"./nile-pagination-utils.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let p=class extends o{constructor(){super(...arguments),this.totalItems=0,this.currentPage=1,this.pageSize=50,this.pageSizeOptions=[10,25,50,100],this.variant="fluid",this.disabled=!1,this.showTitle=!0,this.portal=!1,this._pageSizeOpen=!1,this._pageOpen=!1,this._miniPageOpen=!1}static get styles(){return[a]}firstUpdated(){this._pageSizeDropdown&&(this._pageSizeDropdown.addEventListener("nile-show",(()=>{this._pageSizeOpen=!0})),this._pageSizeDropdown.addEventListener("nile-after-hide",(()=>{this._pageSizeOpen=!1})))}get totalPages(){return Math.max(1,l(this.totalItems,this.pageSize))}goToPage(i){if(this.disabled)return;const t=this.currentPage;this.currentPage=i,this.emit("nile-change",{page:i,previousPage:t,pageSize:this.pageSize})}onPageSizeSelect(i){if(this.disabled||this.pageSize===i)return;const t=this.currentPage;this.pageSize=i,this.currentPage=1,this.emit("nile-change",{page:1,previousPage:t,pageSize:i})}renderCompactRangeText(){const i=h(this.totalItems,this.pageSize,this.currentPage).replace(/^Showing\s*/,"");return t`<div class="range-text">${i}</div>`}renderRangeText(){return 0===this.totalItems?t`<div class="range-text">Showing 0 of 0</div>`:t`
|
|
2
2
|
<div part="range-text" class="range-text">
|
|
3
3
|
${h(this.totalItems,this.pageSize,this.currentPage)}
|
|
4
4
|
</div>
|
|
5
|
-
`}renderPageSizeSelect(){return"fluid"!==this.variant?null:
|
|
5
|
+
`}renderPageSizeSelect(){return"fluid"!==this.variant?null:t`
|
|
6
6
|
<div class="page-size-select">
|
|
7
7
|
<nile-dropdown class="page-size-dropdown" ?portal=${this.portal} ?disabled=${this.disabled}>
|
|
8
8
|
<nile-button
|
|
@@ -20,8 +20,8 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
20
20
|
></nile-icon>
|
|
21
21
|
</nile-button>
|
|
22
22
|
<nile-menu>
|
|
23
|
-
<div class="down-scroll-wrapper">
|
|
24
|
-
${this.pageSizeOptions.map((i=>
|
|
23
|
+
<div part="dropdown-list" class="down-scroll-wrapper">
|
|
24
|
+
${this.pageSizeOptions.map((i=>t`
|
|
25
25
|
<nile-menu-item
|
|
26
26
|
?disabled=${this.disabled}
|
|
27
27
|
@click=${()=>this.onPageSizeSelect(i)}
|
|
@@ -34,7 +34,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
34
34
|
</nile-dropdown>
|
|
35
35
|
<span part="pagesize-label" class="page-size-label">Items per page</span>
|
|
36
36
|
</div>
|
|
37
|
-
`}renderCompactPageSize(){return
|
|
37
|
+
`}renderCompactPageSize(){return t`
|
|
38
38
|
<nile-dropdown
|
|
39
39
|
class="compact-dropdown"
|
|
40
40
|
?portal=${this.portal}
|
|
@@ -57,8 +57,8 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
57
57
|
></nile-icon>
|
|
58
58
|
</nile-button>
|
|
59
59
|
<nile-menu>
|
|
60
|
-
<div class="compact-scroll-wrapper">
|
|
61
|
-
${this.pageSizeOptions.map((i=>
|
|
60
|
+
<div part="dropdown-list" class="compact-scroll-wrapper">
|
|
61
|
+
${this.pageSizeOptions.map((i=>t`
|
|
62
62
|
<nile-menu-item
|
|
63
63
|
?disabled=${this.disabled}
|
|
64
64
|
@click=${()=>this.onPageSizeSelect(i)}
|
|
@@ -69,7 +69,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
69
69
|
</div>
|
|
70
70
|
</nile-menu>
|
|
71
71
|
</nile-dropdown>
|
|
72
|
-
`}renderPrevButton(){return
|
|
72
|
+
`}renderPrevButton(){return t`
|
|
73
73
|
<li>
|
|
74
74
|
<nile-button
|
|
75
75
|
variant="tertiary"
|
|
@@ -80,7 +80,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
80
80
|
<nile-icon name="var(--nile-icon-arrow-left, var(--ng-icon-chevron-left))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="14"></nile-icon>
|
|
81
81
|
</nile-button>
|
|
82
82
|
</li>
|
|
83
|
-
`}renderNextButton(){return
|
|
83
|
+
`}renderNextButton(){return t`
|
|
84
84
|
<li>
|
|
85
85
|
<nile-button
|
|
86
86
|
variant="tertiary"
|
|
@@ -91,15 +91,15 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
91
91
|
<nile-icon name="var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="14"></nile-icon>
|
|
92
92
|
</nile-button>
|
|
93
93
|
</li>
|
|
94
|
-
`}renderPageItem(i,
|
|
94
|
+
`}renderPageItem(i,e,n){return"…"===i?t`
|
|
95
95
|
<li>
|
|
96
96
|
<nile-dropdown class="ellipsis-dropdown" ?portal=${this.portal} ?disabled=${this.disabled}>
|
|
97
97
|
<nile-button slot="trigger" variant="ghost" ?disabled=${this.disabled}>
|
|
98
98
|
…
|
|
99
99
|
</nile-button>
|
|
100
100
|
<nile-menu>
|
|
101
|
-
<div class="ellipsis-scroll-wrapper">
|
|
102
|
-
${d(this.totalPages,n,this.currentPage,
|
|
101
|
+
<div part="dropdown-list" class="ellipsis-scroll-wrapper">
|
|
102
|
+
${d(this.totalPages,n,this.currentPage,e<n.indexOf(this.currentPage)?"left":"right").map((i=>t`
|
|
103
103
|
<nile-menu-item
|
|
104
104
|
?disabled=${this.disabled}
|
|
105
105
|
@click=${()=>this.goToPage(i)}
|
|
@@ -111,7 +111,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
111
111
|
</nile-menu>
|
|
112
112
|
</nile-dropdown>
|
|
113
113
|
</li>
|
|
114
|
-
`:
|
|
114
|
+
`:t`
|
|
115
115
|
<li>
|
|
116
116
|
<nile-button
|
|
117
117
|
variant=${i===this.currentPage?"primary":"ghost"}
|
|
@@ -121,7 +121,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
121
121
|
${i}
|
|
122
122
|
</nile-button>
|
|
123
123
|
</li>
|
|
124
|
-
`}renderMiniPrevButton(){return
|
|
124
|
+
`}renderMiniPrevButton(){return t`
|
|
125
125
|
<li>
|
|
126
126
|
<nile-button
|
|
127
127
|
variant="tertiary"
|
|
@@ -132,7 +132,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
132
132
|
<nile-icon name="var(--nile-icon-arrow-left, var(--ng-icon-chevron-left))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="12"></nile-icon>
|
|
133
133
|
</nile-button>
|
|
134
134
|
</li>
|
|
135
|
-
`}renderMiniNextButton(){return
|
|
135
|
+
`}renderMiniNextButton(){return t`
|
|
136
136
|
<li>
|
|
137
137
|
<nile-button
|
|
138
138
|
variant="tertiary"
|
|
@@ -143,7 +143,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
143
143
|
<nile-icon name="var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="12"></nile-icon>
|
|
144
144
|
</nile-button>
|
|
145
145
|
</li>
|
|
146
|
-
`}renderMini(){return
|
|
146
|
+
`}renderMini(){return t`
|
|
147
147
|
<div part="wrapper" class="pagination-wrapper mini">
|
|
148
148
|
<span part="mini-showing-label" class="mini-showing-label">Showing</span>
|
|
149
149
|
<nile-dropdown
|
|
@@ -169,8 +169,8 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
169
169
|
></nile-icon>
|
|
170
170
|
</nile-button>
|
|
171
171
|
<nile-menu>
|
|
172
|
-
<div class="mini-scroll-wrapper">
|
|
173
|
-
${Array.from({length:this.totalPages},((i,
|
|
172
|
+
<div part="dropdown-list" class="mini-scroll-wrapper">
|
|
173
|
+
${Array.from({length:this.totalPages},((i,t)=>t+1)).map((i=>t`
|
|
174
174
|
<nile-menu-item
|
|
175
175
|
?disabled=${this.disabled}
|
|
176
176
|
@click=${()=>this.goToPage(i)}
|
|
@@ -189,7 +189,7 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
189
189
|
</ul>
|
|
190
190
|
</nav>
|
|
191
191
|
</div>
|
|
192
|
-
`}renderPageList(){if("compact"===this.variant)return
|
|
192
|
+
`}renderPageList(){if("compact"===this.variant)return t`
|
|
193
193
|
<nav aria-label="Pagination">
|
|
194
194
|
<ul class="pagination compact-pagination">
|
|
195
195
|
${this.renderPrevButton()}
|
|
@@ -216,8 +216,8 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
216
216
|
></nile-icon>
|
|
217
217
|
</nile-button>
|
|
218
218
|
<nile-menu>
|
|
219
|
-
<div class="compact-scroll-wrapper1">
|
|
220
|
-
${Array.from({length:this.totalPages},((i,
|
|
219
|
+
<div part="dropdown-list" class="compact-scroll-wrapper1">
|
|
220
|
+
${Array.from({length:this.totalPages},((i,t)=>t+1)).map((i=>t`
|
|
221
221
|
<nile-menu-item
|
|
222
222
|
?disabled=${this.disabled}
|
|
223
223
|
@click=${()=>this.goToPage(i)}
|
|
@@ -232,15 +232,15 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
232
232
|
${this.renderNextButton()}
|
|
233
233
|
</ul>
|
|
234
234
|
</nav>
|
|
235
|
-
`;const i=c(this.totalPages,this.currentPage);return
|
|
235
|
+
`;const i=c(this.totalPages,this.currentPage);return t`
|
|
236
236
|
<nav aria-label="Pagination">
|
|
237
237
|
<ul part="page-list" class="pagination">
|
|
238
238
|
${this.renderPrevButton()}
|
|
239
|
-
${i.map(((e
|
|
239
|
+
${i.map(((t,e)=>this.renderPageItem(t,e,i)))}
|
|
240
240
|
${this.renderNextButton()}
|
|
241
241
|
</ul>
|
|
242
242
|
</nav>
|
|
243
|
-
`}render(){return"mini"===this.variant?this.renderMini():
|
|
243
|
+
`}render(){return"mini"===this.variant?this.renderMini():t`
|
|
244
244
|
<div part="wrapper" class="pagination-wrapper ${this.variant}">
|
|
245
245
|
<div part="pager-container" class="pager-container">
|
|
246
246
|
${"fluid"===this.variant&&this.showTitle?this.renderRangeText():"compact"===this.variant?this.renderCompactRangeText():null}
|
|
@@ -248,4 +248,4 @@ import{__decorate as i}from"tslib";import{html as e}from"lit";import{property as
|
|
|
248
248
|
</div>
|
|
249
249
|
${this.renderPageList()}
|
|
250
250
|
</div>
|
|
251
|
-
`}};i([
|
|
251
|
+
`}};i([e({attribute:"totalitems",reflect:!0,converter:{fromAttribute:i=>{const t=Number(i);return Number.isFinite(t)&&t>=0?Math.floor(t):0}}})],p.prototype,"totalItems",void 0),i([e({attribute:"currentpage",reflect:!0,converter:{fromAttribute:i=>{const t=Number(i);return Number.isFinite(t)&&t>=1?Math.floor(t):1}}})],p.prototype,"currentPage",void 0),i([e({attribute:"pagesize",reflect:!0,converter:{fromAttribute:i=>{const t=Number(i);return Number.isFinite(t)&&t>=1?Math.floor(t):50}}})],p.prototype,"pageSize",void 0),i([e({attribute:"pagesizeoptions",reflect:!1,converter:{fromAttribute:i=>{try{const t=JSON.parse(i);if(Array.isArray(t)&&t.every((i=>"number"==typeof i)))return t}catch{}return[10,25,50,100]}}})],p.prototype,"pageSizeOptions",void 0),i([e({type:String})],p.prototype,"variant",void 0),i([e({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),i([e({type:Boolean})],p.prototype,"showTitle",void 0),i([e({type:Boolean,reflect:!0})],p.prototype,"portal",void 0),i([n()],p.prototype,"_pageSizeOpen",void 0),i([n()],p.prototype,"_pageOpen",void 0),i([n()],p.prototype,"_miniPageOpen",void 0),i([s(".page-size-dropdown")],p.prototype,"_pageSizeDropdown",void 0),p=i([r("nile-pagination")],p);export{p as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["../../index-89c520e9.cjs.js","./commands.cjs.js","../../index-c3210a9c.cjs.js","../../index-3ca67627.cjs.js","./keymap.cjs.js","./inputrules.cjs.js","./plugins/placeholder.cjs.js","./plugins/link.cjs.js","./plugins/single-line.cjs.js","./plugins/tables.cjs.js","./plugins/image.cjs.js","./plugins/suggestions.cjs.js","./plugins/find-replace.cjs.js","./plugins/max-length.cjs.js","./plugins/code-highlight.cjs.js","./plugins/embeds.cjs.js","./plugins/paste.cjs.js","./plugins/format-painter.cjs.js","./schema.cjs.js","../../index-178e1e57.cjs.js","../../index-403841c7.cjs.js","./markdown-parse.cjs.js","./serializer.cjs.js","./sanitize.cjs.js","../../xml-90fd974e.cjs.js"],function(_export,_context){"use strict";var t,e,s,r,i,n,o,l,u,a,h,f,c,p,m,g,d,j,w,v,x,b,k,S,y,O,T,z,C,F,L,D,N,R,B;function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function A(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor;}function E(t,e){var s="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,i,n){var o=t.selection,l=e>0?o.$to:o.$from,u=o.empty;if(o instanceof r){if(!n.endOfTextblock(s)||0==l.depth)return!1;u=!1,l=t.doc.resolve(e>0?l.after():l.before());}var a=F.findGapCursorFrom(l,e,u);return!!a&&(i&&i(t.tr.setSelection(new F(a))),!0);};}function M(t,e,s){if(!t||!t.editable)return!1;var r=t.state.doc.resolve(e);if(!F.valid(r))return!1;var n=t.posAtCoords({left:s.clientX,top:s.clientY});return!(n&&n.inside>-1&&i.isSelectable(t.state.doc.nodeAt(n.inside)))&&(t.dispatch(t.state.tr.setSelection(new F(r))),!0);}function P(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof F))return!1;var s=t.state.selection.$from,i=s.parent.contentMatchAt(s.index()).findWrapping(t.state.schema.nodes.text);if(!i)return!1;var l=n.empty;for(var _t6=i.length-1;_t6>=0;_t6--)l=n.from(i[_t6].createAndFill(null,l));var u=t.state.tr.replace(s.pos,s.pos,new o(l,0,0));return u.setSelection(r.near(u.doc.resolve(s.pos+1))),t.dispatch(u),!1;}function J(t){if(!(t.selection instanceof F))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",f.create(t.doc,[c.widget(t.selection.head,e,{key:"gapcursor"})]);}function G(){var _e$schema,_e$getPlaceholder;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var s=(_e$schema=e.schema)!==null&&_e$schema!==void 0?_e$schema:z,r=[];return e.mentions&&r.push(x(N,e.mentions)),e.slashCommands&&r.push(x(R,_objectSpread(_objectSpread({},e.slashCommands),{},{getTriggers:function getTriggers(){return["/"];},startOfLine:!0}))),e.emoji&&r.push(x(B,_objectSpread(_objectSpread({},e.emoji),{},{getTriggers:function getTriggers(){return[":"];},minQueryLength:2}))),r.push.apply(r,[m(s,{textTransform:e.textTransform})].concat(_toConsumableArray(p(s,{onLinkShortcut:e.onLinkShortcut,onFindShortcut:e.onFindShortcut,onShortcutHelp:e.onShortcutHelp})),[a(),function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new t({view:function view(t){return new C(t,e);}});}(),new t({props:{decorations:J,createSelectionBetween:function createSelectionBetween(t,e,s){return e.pos==s.pos&&F.valid(s)?new F(s):null;},handleClick:M,handleKeyDown:D,handleDOMEvents:{beforeinput:P}}}),g((_e$getPlaceholder=e.getPlaceholder)!==null&&_e$getPlaceholder!==void 0?_e$getPlaceholder:function(){return"";}),d({onOpenLink:e.onOpenLink})],_toConsumableArray(w()),[v({onImageFiles:e.onImageFiles}),b(),S(),y(),T(),O(s,{getForcePlainText:e.getForcePlainText,getMarkdownPaste:e.getMarkdownPaste,getSanitize:e.getSanitize})])),e.getMaxLength&&r.push(k(e.getMaxLength)),e.singleLine&&r.push(j()),e.plugins&&r.push.apply(r,_toConsumableArray(e.plugins)),u.create({schema:s,doc:e.doc,plugins:r});}_export("c",G);return{setters:[function(_index00bCjsJs){t=_index00bCjsJs.b;e=_index00bCjsJs.e;s=_index00bCjsJs.S;r=_index00bCjsJs.T;i=_index00bCjsJs.c;n=_index00bCjsJs.F;o=_index00bCjsJs.d;l=_index00bCjsJs.P;u=_index00bCjsJs.E;},function(_commandsCjsJs){a=_commandsCjsJs.h;},function(_index001CjsJs){h=_index001CjsJs.b;},function(_index00aCjsJs){f=_index00aCjsJs.D;c=_index00aCjsJs.a;},function(_keymapCjsJs){p=_keymapCjsJs.b;},function(_inputrulesCjsJs){m=_inputrulesCjsJs.b;},function(_pluginsPlaceholderCjsJs){g=_pluginsPlaceholderCjsJs.p;},function(_pluginsLinkCjsJs){d=_pluginsLinkCjsJs.l;},function(_pluginsSingleLineCjsJs){j=_pluginsSingleLineCjsJs.s;},function(_pluginsTablesCjsJs){w=_pluginsTablesCjsJs.t;},function(_pluginsImageCjsJs){v=_pluginsImageCjsJs.i;},function(_pluginsSuggestionsCjsJs){x=_pluginsSuggestionsCjsJs.s;},function(_pluginsFindReplaceCjsJs){b=_pluginsFindReplaceCjsJs.f;},function(_pluginsMaxLengthCjsJs){k=_pluginsMaxLengthCjsJs.m;},function(_pluginsCodeHighlightCjsJs){S=_pluginsCodeHighlightCjsJs.c;},function(_pluginsEmbedsCjsJs){y=_pluginsEmbedsCjsJs.e;},function(_pluginsPasteCjsJs){O=_pluginsPasteCjsJs.a;},function(_pluginsFormatPainterCjsJs){T=_pluginsFormatPainterCjsJs.f;},function(_schemaCjsJs){z=_schemaCjsJs.d;},function(_index008CjsJs){},function(_index00dCjsJs){},function(_markdownParseCjsJs){},function(_serializerCjsJs){},function(_sanitizeCjsJs){},function(_xml00cCjsJs){}],execute:function execute(){C=/*#__PURE__*/function(){function C(t,e){var _this=this;_classCallCheck(this,C);var s;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!==(s=e.width)&&void 0!==s?s:1,this.color=!1===e.color?void 0:e.color||"black",this["class"]=e["class"],this.handlers=["dragover","dragend","drop","dragleave"].map(function(e){var s=function s(t){_this[e](t);};return t.dom.addEventListener(e,s),{name:e,handler:s};});}return _createClass(C,[{key:"destroy",value:function destroy(){var _this2=this;this.handlers.forEach(function(_ref){var t=_ref.name,e=_ref.handler;return _this2.editorView.dom.removeEventListener(t,e);});}},{key:"update",value:function update(t,e){if(null!=this.cursorPos&&e.doc!=t.state.doc)if(this.lastDragEvent){var _t=this.computeTarget(this.lastDragEvent);_t==this.cursorPos?this.updateOverlay():this.setCursor(_t);}else this.updateOverlay();}},{key:"setCursor",value:function setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay());}},{key:"updateOverlay",value:function updateOverlay(){var t,e=this.editorView.state.doc.resolve(this.cursorPos),s=!e.parent.inlineContent,r=this.editorView.dom,i=r.getBoundingClientRect(),n=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(s){var _s=e.nodeBefore,_r=e.nodeAfter;if(_s||_r){var _e=this.editorView.nodeDOM(this.cursorPos-(_s?_s.nodeSize:0));if(_e){var _i=_e.getBoundingClientRect(),_n=_s?_i.bottom:_i.top;_s&&_r&&(_n=(_n+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);var _l=this.width/2*o;t={left:_i.left,right:_i.right,top:_n-_l,bottom:_n+_l};}}}if(!t){var _e2=this.editorView.coordsAtPos(this.cursorPos),_s2=this.width/2*n;t={left:_e2.left-_s2,right:_e2.left+_s2,top:_e2.top,bottom:_e2.bottom};}var l,u,a=this.editorView.dom.offsetParent;if(this.element||(this.element=a.appendChild(document.createElement("div")),this["class"]&&(this.element.className=this["class"]),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",s),this.element.classList.toggle("prosemirror-dropcursor-inline",!s),!a||a==document.body&&"static"==getComputedStyle(a).position)l=-pageXOffset,u=-pageYOffset;else{var _t2=a.getBoundingClientRect(),_e3=_t2.width/a.offsetWidth,_s3=_t2.height/a.offsetHeight;l=_t2.left-a.scrollLeft*_e3,u=_t2.top-a.scrollTop*_s3;}this.element.style.left=(t.left-l)/n+"px",this.element.style.top=(t.top-u)/o+"px",this.element.style.width=(t.right-t.left)/n+"px",this.element.style.height=(t.bottom-t.top)/o+"px";}},{key:"scheduleRemoval",value:function scheduleRemoval(t){var _this3=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return _this3.setCursor(null);},t);}},{key:"computeTarget",value:function computeTarget(t){var s=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=s&&s.inside>=0&&this.editorView.state.doc.nodeAt(s.inside),i=r&&r.type.spec.disableDropCursor,n="function"==typeof i?i(this.editorView,s,t):i;if(!s||n)return null;var o=s.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var _t3=e(this.editorView.state.doc,o,this.editorView.dragging.slice);null!=_t3&&(o=_t3);}return o;}},{key:"dragover",value:function dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;var e=this.computeTarget(t);null!=e&&(this.setCursor(e),this.scheduleRemoval(5e3));}},{key:"dragend",value:function dragend(){this.scheduleRemoval(20);}},{key:"drop",value:function drop(){this.scheduleRemoval(20);}},{key:"dragleave",value:function dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null);}}]);}();F=/*#__PURE__*/function(_s4){function F(t){_classCallCheck(this,F);return _callSuper(this,F,[t,t]);}_inherits(F,_s4);return _createClass(F,[{key:"map",value:function map(t,e){var r=t.resolve(e.map(this.head));return F.valid(r)?new F(r):s.near(r);}},{key:"content",value:function content(){return o.empty;}},{key:"eq",value:function eq(t){return t instanceof F&&t.head==this.head;}},{key:"toJSON",value:function toJSON(){return{type:"gapcursor",pos:this.head};}},{key:"getBookmark",value:function getBookmark(){return new L(this.anchor);}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new F(t.resolve(e.pos));}},{key:"valid",value:function valid(t){var e=t.parent;if(e.inlineContent||!function(t){for(var _e4=t.depth;_e4>=0;_e4--){var _s5=t.index(_e4),_r2=t.node(_e4);if(0!=_s5)for(var _t4=_r2.child(_s5-1);;_t4=_t4.lastChild){if(0==_t4.childCount&&!_t4.inlineContent||A(_t4.type))return!0;if(_t4.inlineContent)return!1;}else if(_r2.type.spec.isolating)return!0;}return!0;}(t)||!function(t){for(var _e5=t.depth;_e5>=0;_e5--){var _s6=t.indexAfter(_e5),_r3=t.node(_e5);if(_s6!=_r3.childCount)for(var _t5=_r3.child(_s6);;_t5=_t5.firstChild){if(0==_t5.childCount&&!_t5.inlineContent||A(_t5.type))return!0;if(_t5.inlineContent)return!1;}else if(_r3.type.spec.isolating)return!0;}return!0;}(t))return!1;var s=e.type.spec.allowGapCursor;if(null!=s)return s;var r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock;}},{key:"findGapCursorFrom",value:function findGapCursorFrom(t,e){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;t:for(;;){if(!s&&F.valid(t))return t;var _r4=t.pos,_n2=null;for(var _s7=t.depth;;_s7--){var _i2=t.node(_s7);if(e>0?t.indexAfter(_s7)<_i2.childCount:t.index(_s7)>0){_n2=_i2.child(e>0?t.indexAfter(_s7):t.index(_s7)-1);break;}if(0==_s7)return null;_r4+=e;var _o=t.doc.resolve(_r4);if(F.valid(_o))return _o;}for(;;){var _o2=e>0?_n2.firstChild:_n2.lastChild;if(!_o2){if(_n2.isAtom&&!_n2.isText&&!i.isSelectable(_n2)){t=t.doc.resolve(_r4+_n2.nodeSize*e),s=!1;continue t;}break;}_n2=_o2,_r4+=e;var _l2=t.doc.resolve(_r4);if(F.valid(_l2))return _l2;}return null;}}}]);}(s);F.prototype.visible=!1,F.findFrom=F.findGapCursorFrom,s.jsonID("gapcursor",F);L=/*#__PURE__*/function(){function L(t){_classCallCheck(this,L);this.pos=t;}return _createClass(L,[{key:"map",value:function map(t){return new L(t.map(this.pos));}},{key:"resolve",value:function resolve(t){var e=t.resolve(this.pos);return F.valid(e)?new F(e):s.near(e);}}]);}();D=h({ArrowLeft:E("horiz",-1),ArrowRight:E("horiz",1),ArrowUp:E("vert",-1),ArrowDown:E("vert",1)});N=new l("nileMentionSuggest"),R=new l("nileSlashSuggest"),B=new l("nileEmojiSuggest");}};});
|
|
1
|
+
System.register(["../../index-89c520e9.cjs.js","./commands.cjs.js","../../index-c3210a9c.cjs.js","../../index-3ca67627.cjs.js","./keymap.cjs.js","./inputrules.cjs.js","./plugins/placeholder.cjs.js","./plugins/link.cjs.js","./plugins/single-line.cjs.js","./plugins/tables.cjs.js","./plugins/image.cjs.js","./plugins/suggestions.cjs.js","./plugins/find-replace.cjs.js","./plugins/max-length.cjs.js","./plugins/code-highlight.cjs.js","./plugins/embeds.cjs.js","./plugins/paste.cjs.js","./plugins/format-painter.cjs.js","./schema.cjs.js","../../index-178e1e57.cjs.js","../../index-403841c7.cjs.js","./markdown-parse.cjs.js","./serializer.cjs.js","./sanitize.cjs.js","../../xml-09119317.cjs.js"],function(_export,_context){"use strict";var t,e,s,r,i,n,o,l,u,a,h,f,c,p,m,g,d,j,w,v,x,b,k,S,y,O,T,z,C,F,L,D,N,R,B;function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function A(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor;}function E(t,e){var s="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,i,n){var o=t.selection,l=e>0?o.$to:o.$from,u=o.empty;if(o instanceof r){if(!n.endOfTextblock(s)||0==l.depth)return!1;u=!1,l=t.doc.resolve(e>0?l.after():l.before());}var a=F.findGapCursorFrom(l,e,u);return!!a&&(i&&i(t.tr.setSelection(new F(a))),!0);};}function M(t,e,s){if(!t||!t.editable)return!1;var r=t.state.doc.resolve(e);if(!F.valid(r))return!1;var n=t.posAtCoords({left:s.clientX,top:s.clientY});return!(n&&n.inside>-1&&i.isSelectable(t.state.doc.nodeAt(n.inside)))&&(t.dispatch(t.state.tr.setSelection(new F(r))),!0);}function P(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof F))return!1;var s=t.state.selection.$from,i=s.parent.contentMatchAt(s.index()).findWrapping(t.state.schema.nodes.text);if(!i)return!1;var l=n.empty;for(var _t6=i.length-1;_t6>=0;_t6--)l=n.from(i[_t6].createAndFill(null,l));var u=t.state.tr.replace(s.pos,s.pos,new o(l,0,0));return u.setSelection(r.near(u.doc.resolve(s.pos+1))),t.dispatch(u),!1;}function J(t){if(!(t.selection instanceof F))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",f.create(t.doc,[c.widget(t.selection.head,e,{key:"gapcursor"})]);}function G(){var _e$schema,_e$getPlaceholder;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var s=(_e$schema=e.schema)!==null&&_e$schema!==void 0?_e$schema:z,r=[];return e.mentions&&r.push(x(N,e.mentions)),e.slashCommands&&r.push(x(R,_objectSpread(_objectSpread({},e.slashCommands),{},{getTriggers:function getTriggers(){return["/"];},startOfLine:!0}))),e.emoji&&r.push(x(B,_objectSpread(_objectSpread({},e.emoji),{},{getTriggers:function getTriggers(){return[":"];},minQueryLength:2}))),r.push.apply(r,[m(s,{textTransform:e.textTransform})].concat(_toConsumableArray(p(s,{onLinkShortcut:e.onLinkShortcut,onFindShortcut:e.onFindShortcut,onShortcutHelp:e.onShortcutHelp})),[a(),function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new t({view:function view(t){return new C(t,e);}});}(),new t({props:{decorations:J,createSelectionBetween:function createSelectionBetween(t,e,s){return e.pos==s.pos&&F.valid(s)?new F(s):null;},handleClick:M,handleKeyDown:D,handleDOMEvents:{beforeinput:P}}}),g((_e$getPlaceholder=e.getPlaceholder)!==null&&_e$getPlaceholder!==void 0?_e$getPlaceholder:function(){return"";}),d({onOpenLink:e.onOpenLink})],_toConsumableArray(w()),[v({onImageFiles:e.onImageFiles}),b(),S(),y(),T(),O(s,{getForcePlainText:e.getForcePlainText,getMarkdownPaste:e.getMarkdownPaste,getSanitize:e.getSanitize})])),e.getMaxLength&&r.push(k(e.getMaxLength)),e.singleLine&&r.push(j()),e.plugins&&r.push.apply(r,_toConsumableArray(e.plugins)),u.create({schema:s,doc:e.doc,plugins:r});}_export("c",G);return{setters:[function(_index00bCjsJs){t=_index00bCjsJs.b;e=_index00bCjsJs.e;s=_index00bCjsJs.S;r=_index00bCjsJs.T;i=_index00bCjsJs.c;n=_index00bCjsJs.F;o=_index00bCjsJs.d;l=_index00bCjsJs.P;u=_index00bCjsJs.E;},function(_commandsCjsJs){a=_commandsCjsJs.h;},function(_index001CjsJs){h=_index001CjsJs.b;},function(_index00aCjsJs){f=_index00aCjsJs.D;c=_index00aCjsJs.a;},function(_keymapCjsJs){p=_keymapCjsJs.b;},function(_inputrulesCjsJs){m=_inputrulesCjsJs.b;},function(_pluginsPlaceholderCjsJs){g=_pluginsPlaceholderCjsJs.p;},function(_pluginsLinkCjsJs){d=_pluginsLinkCjsJs.l;},function(_pluginsSingleLineCjsJs){j=_pluginsSingleLineCjsJs.s;},function(_pluginsTablesCjsJs){w=_pluginsTablesCjsJs.t;},function(_pluginsImageCjsJs){v=_pluginsImageCjsJs.i;},function(_pluginsSuggestionsCjsJs){x=_pluginsSuggestionsCjsJs.s;},function(_pluginsFindReplaceCjsJs){b=_pluginsFindReplaceCjsJs.f;},function(_pluginsMaxLengthCjsJs){k=_pluginsMaxLengthCjsJs.m;},function(_pluginsCodeHighlightCjsJs){S=_pluginsCodeHighlightCjsJs.c;},function(_pluginsEmbedsCjsJs){y=_pluginsEmbedsCjsJs.e;},function(_pluginsPasteCjsJs){O=_pluginsPasteCjsJs.a;},function(_pluginsFormatPainterCjsJs){T=_pluginsFormatPainterCjsJs.f;},function(_schemaCjsJs){z=_schemaCjsJs.d;},function(_index008CjsJs){},function(_index00dCjsJs){},function(_markdownParseCjsJs){},function(_serializerCjsJs){},function(_sanitizeCjsJs){},function(_xml00cCjsJs){}],execute:function execute(){C=/*#__PURE__*/function(){function C(t,e){var _this=this;_classCallCheck(this,C);var s;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!==(s=e.width)&&void 0!==s?s:1,this.color=!1===e.color?void 0:e.color||"black",this["class"]=e["class"],this.handlers=["dragover","dragend","drop","dragleave"].map(function(e){var s=function s(t){_this[e](t);};return t.dom.addEventListener(e,s),{name:e,handler:s};});}return _createClass(C,[{key:"destroy",value:function destroy(){var _this2=this;this.handlers.forEach(function(_ref){var t=_ref.name,e=_ref.handler;return _this2.editorView.dom.removeEventListener(t,e);});}},{key:"update",value:function update(t,e){if(null!=this.cursorPos&&e.doc!=t.state.doc)if(this.lastDragEvent){var _t=this.computeTarget(this.lastDragEvent);_t==this.cursorPos?this.updateOverlay():this.setCursor(_t);}else this.updateOverlay();}},{key:"setCursor",value:function setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay());}},{key:"updateOverlay",value:function updateOverlay(){var t,e=this.editorView.state.doc.resolve(this.cursorPos),s=!e.parent.inlineContent,r=this.editorView.dom,i=r.getBoundingClientRect(),n=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(s){var _s=e.nodeBefore,_r=e.nodeAfter;if(_s||_r){var _e=this.editorView.nodeDOM(this.cursorPos-(_s?_s.nodeSize:0));if(_e){var _i=_e.getBoundingClientRect(),_n=_s?_i.bottom:_i.top;_s&&_r&&(_n=(_n+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);var _l=this.width/2*o;t={left:_i.left,right:_i.right,top:_n-_l,bottom:_n+_l};}}}if(!t){var _e2=this.editorView.coordsAtPos(this.cursorPos),_s2=this.width/2*n;t={left:_e2.left-_s2,right:_e2.left+_s2,top:_e2.top,bottom:_e2.bottom};}var l,u,a=this.editorView.dom.offsetParent;if(this.element||(this.element=a.appendChild(document.createElement("div")),this["class"]&&(this.element.className=this["class"]),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",s),this.element.classList.toggle("prosemirror-dropcursor-inline",!s),!a||a==document.body&&"static"==getComputedStyle(a).position)l=-pageXOffset,u=-pageYOffset;else{var _t2=a.getBoundingClientRect(),_e3=_t2.width/a.offsetWidth,_s3=_t2.height/a.offsetHeight;l=_t2.left-a.scrollLeft*_e3,u=_t2.top-a.scrollTop*_s3;}this.element.style.left=(t.left-l)/n+"px",this.element.style.top=(t.top-u)/o+"px",this.element.style.width=(t.right-t.left)/n+"px",this.element.style.height=(t.bottom-t.top)/o+"px";}},{key:"scheduleRemoval",value:function scheduleRemoval(t){var _this3=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return _this3.setCursor(null);},t);}},{key:"computeTarget",value:function computeTarget(t){var s=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=s&&s.inside>=0&&this.editorView.state.doc.nodeAt(s.inside),i=r&&r.type.spec.disableDropCursor,n="function"==typeof i?i(this.editorView,s,t):i;if(!s||n)return null;var o=s.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var _t3=e(this.editorView.state.doc,o,this.editorView.dragging.slice);null!=_t3&&(o=_t3);}return o;}},{key:"dragover",value:function dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;var e=this.computeTarget(t);null!=e&&(this.setCursor(e),this.scheduleRemoval(5e3));}},{key:"dragend",value:function dragend(){this.scheduleRemoval(20);}},{key:"drop",value:function drop(){this.scheduleRemoval(20);}},{key:"dragleave",value:function dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null);}}]);}();F=/*#__PURE__*/function(_s4){function F(t){_classCallCheck(this,F);return _callSuper(this,F,[t,t]);}_inherits(F,_s4);return _createClass(F,[{key:"map",value:function map(t,e){var r=t.resolve(e.map(this.head));return F.valid(r)?new F(r):s.near(r);}},{key:"content",value:function content(){return o.empty;}},{key:"eq",value:function eq(t){return t instanceof F&&t.head==this.head;}},{key:"toJSON",value:function toJSON(){return{type:"gapcursor",pos:this.head};}},{key:"getBookmark",value:function getBookmark(){return new L(this.anchor);}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new F(t.resolve(e.pos));}},{key:"valid",value:function valid(t){var e=t.parent;if(e.inlineContent||!function(t){for(var _e4=t.depth;_e4>=0;_e4--){var _s5=t.index(_e4),_r2=t.node(_e4);if(0!=_s5)for(var _t4=_r2.child(_s5-1);;_t4=_t4.lastChild){if(0==_t4.childCount&&!_t4.inlineContent||A(_t4.type))return!0;if(_t4.inlineContent)return!1;}else if(_r2.type.spec.isolating)return!0;}return!0;}(t)||!function(t){for(var _e5=t.depth;_e5>=0;_e5--){var _s6=t.indexAfter(_e5),_r3=t.node(_e5);if(_s6!=_r3.childCount)for(var _t5=_r3.child(_s6);;_t5=_t5.firstChild){if(0==_t5.childCount&&!_t5.inlineContent||A(_t5.type))return!0;if(_t5.inlineContent)return!1;}else if(_r3.type.spec.isolating)return!0;}return!0;}(t))return!1;var s=e.type.spec.allowGapCursor;if(null!=s)return s;var r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock;}},{key:"findGapCursorFrom",value:function findGapCursorFrom(t,e){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;t:for(;;){if(!s&&F.valid(t))return t;var _r4=t.pos,_n2=null;for(var _s7=t.depth;;_s7--){var _i2=t.node(_s7);if(e>0?t.indexAfter(_s7)<_i2.childCount:t.index(_s7)>0){_n2=_i2.child(e>0?t.indexAfter(_s7):t.index(_s7)-1);break;}if(0==_s7)return null;_r4+=e;var _o=t.doc.resolve(_r4);if(F.valid(_o))return _o;}for(;;){var _o2=e>0?_n2.firstChild:_n2.lastChild;if(!_o2){if(_n2.isAtom&&!_n2.isText&&!i.isSelectable(_n2)){t=t.doc.resolve(_r4+_n2.nodeSize*e),s=!1;continue t;}break;}_n2=_o2,_r4+=e;var _l2=t.doc.resolve(_r4);if(F.valid(_l2))return _l2;}return null;}}}]);}(s);F.prototype.visible=!1,F.findFrom=F.findGapCursorFrom,s.jsonID("gapcursor",F);L=/*#__PURE__*/function(){function L(t){_classCallCheck(this,L);this.pos=t;}return _createClass(L,[{key:"map",value:function map(t){return new L(t.map(this.pos));}},{key:"resolve",value:function resolve(t){var e=t.resolve(this.pos);return F.valid(e)?new F(e):s.near(e);}}]);}();D=h({ArrowLeft:E("horiz",-1),ArrowRight:E("horiz",1),ArrowUp:E("vert",-1),ArrowDown:E("vert",1)});N=new l("nileMentionSuggest"),R=new l("nileSlashSuggest"),B=new l("nileEmojiSuggest");}};});
|
|
2
2
|
//# sourceMappingURL=create-state.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,e,S as s,T as r,c as i,F as n,d as o,P as l,E as u}from"../../index-6f3fa4ab.esm.js";import{h as a}from"./commands.esm.js";import{b as m}from"../../index-7b1c9857.esm.js";import{D as h,a as f}from"../../index-ba47645d.esm.js";import{b as p}from"./keymap.esm.js";import{b as c}from"./inputrules.esm.js";import{p as g}from"./plugins/placeholder.esm.js";import{l as d}from"./plugins/link.esm.js";import{s as w}from"./plugins/single-line.esm.js";import{t as j}from"./plugins/tables.esm.js";import{i as v}from"./plugins/image.esm.js";import{s as x}from"./plugins/suggestions.esm.js";import{f as b}from"./plugins/find-replace.esm.js";import{m as k}from"./plugins/max-length.esm.js";import{c as S}from"./plugins/code-highlight.esm.js";import{e as y}from"./plugins/embeds.esm.js";import{a as O}from"./plugins/paste.esm.js";import{f as T}from"./plugins/format-painter.esm.js";import{d as z}from"./schema.esm.js";import"../../index-920675c4.esm.js";import"../../index-1faa963c.esm.js";import"./markdown-parse.esm.js";import"./serializer.esm.js";import"./sanitize.esm.js";import"../../xml-
|
|
1
|
+
import{b as t,e,S as s,T as r,c as i,F as n,d as o,P as l,E as u}from"../../index-6f3fa4ab.esm.js";import{h as a}from"./commands.esm.js";import{b as m}from"../../index-7b1c9857.esm.js";import{D as h,a as f}from"../../index-ba47645d.esm.js";import{b as p}from"./keymap.esm.js";import{b as c}from"./inputrules.esm.js";import{p as g}from"./plugins/placeholder.esm.js";import{l as d}from"./plugins/link.esm.js";import{s as w}from"./plugins/single-line.esm.js";import{t as j}from"./plugins/tables.esm.js";import{i as v}from"./plugins/image.esm.js";import{s as x}from"./plugins/suggestions.esm.js";import{f as b}from"./plugins/find-replace.esm.js";import{m as k}from"./plugins/max-length.esm.js";import{c as S}from"./plugins/code-highlight.esm.js";import{e as y}from"./plugins/embeds.esm.js";import{a as O}from"./plugins/paste.esm.js";import{f as T}from"./plugins/format-painter.esm.js";import{d as z}from"./schema.esm.js";import"../../index-920675c4.esm.js";import"../../index-1faa963c.esm.js";import"./markdown-parse.esm.js";import"./serializer.esm.js";import"./sanitize.esm.js";import"../../xml-9bf771b3.esm.js";class C{constructor(t,e){var s;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!==(s=e.width)&&void 0!==s?s:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let s=t=>{this[e](t)};return t.dom.addEventListener(e,s),{name:e,handler:s}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){if(null!=this.cursorPos&&e.doc!=t.state.doc)if(this.lastDragEvent){let t=this.computeTarget(this.lastDragEvent);t==this.cursorPos?this.updateOverlay():this.setCursor(t)}else this.updateOverlay()}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),s=!e.parent.inlineContent,r=this.editorView.dom,i=r.getBoundingClientRect(),n=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(s){let s=e.nodeBefore,r=e.nodeAfter;if(s||r){let e=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(e){let i=e.getBoundingClientRect(),n=s?i.bottom:i.top;s&&r&&(n=(n+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let l=this.width/2*o;t={left:i.left,right:i.right,top:n-l,bottom:n+l}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),s=this.width/2*n;t={left:e.left-s,right:e.left+s,top:e.top,bottom:e.bottom}}let l,u,a=this.editorView.dom.offsetParent;if(this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",s),this.element.classList.toggle("prosemirror-dropcursor-inline",!s),!a||a==document.body&&"static"==getComputedStyle(a).position)l=-pageXOffset,u=-pageYOffset;else{let t=a.getBoundingClientRect(),e=t.width/a.offsetWidth,s=t.height/a.offsetHeight;l=t.left-a.scrollLeft*e,u=t.top-a.scrollTop*s}this.element.style.left=(t.left-l)/n+"px",this.element.style.top=(t.top-u)/o+"px",this.element.style.width=(t.right-t.left)/n+"px",this.element.style.height=(t.bottom-t.top)/o+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}computeTarget(t){let s=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=s&&s.inside>=0&&this.editorView.state.doc.nodeAt(s.inside),i=r&&r.type.spec.disableDropCursor,n="function"==typeof i?i(this.editorView,s,t):i;if(!s||n)return null;let o=s.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=e(this.editorView.state.doc,o,this.editorView.dragging.slice);null!=t&&(o=t)}return o}dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;let e=this.computeTarget(t);null!=e&&(this.setCursor(e),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class F extends s{constructor(t){super(t,t)}map(t,e){let r=t.resolve(e.map(this.head));return F.valid(r)?new F(r):s.near(r)}content(){return o.empty}eq(t){return t instanceof F&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new F(t.resolve(e.pos))}getBookmark(){return new L(this.anchor)}static valid(t){let e=t.parent;if(e.inlineContent||!function(t){for(let e=t.depth;e>=0;e--){let s=t.index(e),r=t.node(e);if(0!=s)for(let t=r.child(s-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||A(t.type))return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let s=t.indexAfter(e),r=t.node(e);if(s!=r.childCount)for(let t=r.child(s);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||A(t.type))return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;let s=e.type.spec.allowGapCursor;if(null!=s)return s;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,s=!1){t:for(;;){if(!s&&F.valid(t))return t;let r=t.pos,n=null;for(let s=t.depth;;s--){let i=t.node(s);if(e>0?t.indexAfter(s)<i.childCount:t.index(s)>0){n=i.child(e>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;r+=e;let o=t.doc.resolve(r);if(F.valid(o))return o}for(;;){let o=e>0?n.firstChild:n.lastChild;if(!o){if(n.isAtom&&!n.isText&&!i.isSelectable(n)){t=t.doc.resolve(r+n.nodeSize*e),s=!1;continue t}break}n=o,r+=e;let l=t.doc.resolve(r);if(F.valid(l))return l}return null}}}F.prototype.visible=!1,F.findFrom=F.findGapCursorFrom,s.jsonID("gapcursor",F);class L{constructor(t){this.pos=t}map(t){return new L(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return F.valid(e)?new F(e):s.near(e)}}function A(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}const D=m({ArrowLeft:E("horiz",-1),ArrowRight:E("horiz",1),ArrowUp:E("vert",-1),ArrowDown:E("vert",1)});function E(t,e){const s="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,i,n){let o=t.selection,l=e>0?o.$to:o.$from,u=o.empty;if(o instanceof r){if(!n.endOfTextblock(s)||0==l.depth)return!1;u=!1,l=t.doc.resolve(e>0?l.after():l.before())}let a=F.findGapCursorFrom(l,e,u);return!!a&&(i&&i(t.tr.setSelection(new F(a))),!0)}}function M(t,e,s){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!F.valid(r))return!1;let n=t.posAtCoords({left:s.clientX,top:s.clientY});return!(n&&n.inside>-1&&i.isSelectable(t.state.doc.nodeAt(n.inside)))&&(t.dispatch(t.state.tr.setSelection(new F(r))),!0)}function P(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof F))return!1;let{$from:s}=t.state.selection,i=s.parent.contentMatchAt(s.index()).findWrapping(t.state.schema.nodes.text);if(!i)return!1;let l=n.empty;for(let t=i.length-1;t>=0;t--)l=n.from(i[t].createAndFill(null,l));let u=t.state.tr.replace(s.pos,s.pos,new o(l,0,0));return u.setSelection(r.near(u.doc.resolve(s.pos+1))),t.dispatch(u),!1}function J(t){if(!(t.selection instanceof F))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",h.create(t.doc,[f.widget(t.selection.head,e,{key:"gapcursor"})])}const N=new l("nileMentionSuggest"),R=new l("nileSlashSuggest"),B=new l("nileEmojiSuggest");function G(e={}){const s=e.schema??z,r=[];return e.mentions&&r.push(x(N,e.mentions)),e.slashCommands&&r.push(x(R,{...e.slashCommands,getTriggers:()=>["/"],startOfLine:!0})),e.emoji&&r.push(x(B,{...e.emoji,getTriggers:()=>[":"],minQueryLength:2})),r.push(c(s,{textTransform:e.textTransform}),...p(s,{onLinkShortcut:e.onLinkShortcut,onFindShortcut:e.onFindShortcut,onShortcutHelp:e.onShortcutHelp}),a(),function(e={}){return new t({view:t=>new C(t,e)})}(),new t({props:{decorations:J,createSelectionBetween:(t,e,s)=>e.pos==s.pos&&F.valid(s)?new F(s):null,handleClick:M,handleKeyDown:D,handleDOMEvents:{beforeinput:P}}}),g(e.getPlaceholder??(()=>"")),d({onOpenLink:e.onOpenLink}),...j(),v({onImageFiles:e.onImageFiles}),b(),S(),y(),T(),O(s,{getForcePlainText:e.getForcePlainText,getMarkdownPaste:e.getMarkdownPaste,getSanitize:e.getSanitize})),e.getMaxLength&&r.push(k(e.getMaxLength)),e.singleLine&&r.push(w()),e.plugins&&r.push(...e.plugins),u.create({schema:s,doc:e.doc,plugins:r})}export{G as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./schema.cjs.js","./sanitize.cjs.js","./serializer.cjs.js","./commands.cjs.js","./markdown.cjs.js","./markdown-parse.cjs.js","./office-paste.cjs.js","./export.cjs.js","./plugins/image-view.cjs.js","./plugins/embed-view.cjs.js","./plugins/style-block-view.cjs.js","./plugins/math-view.cjs.js","./selection-state.cjs.js","./create-state.cjs.js","./plugins/max-length.cjs.js","./plugins/task-list.cjs.js","./plugins/code-highlight.cjs.js","./plugins/embeds.cjs.js","./plugins/find-replace.cjs.js","./plugins/placeholder.cjs.js","./plugins/format-painter.cjs.js","./plugins/link.cjs.js","./plugins/single-line.cjs.js","./plugins/tables.cjs.js","./plugins/image.cjs.js","./plugins/paste.cjs.js","../../index-89c520e9.cjs.js","../../index-c3210a9c.cjs.js","../../index-3ca67627.cjs.js","../../index-178e1e57.cjs.js","./keymap.cjs.js","../../index-403841c7.cjs.js","./inputrules.cjs.js","./plugins/suggestions.cjs.js","../../xml-
|
|
1
|
+
System.register(["./schema.cjs.js","./sanitize.cjs.js","./serializer.cjs.js","./commands.cjs.js","./markdown.cjs.js","./markdown-parse.cjs.js","./office-paste.cjs.js","./export.cjs.js","./plugins/image-view.cjs.js","./plugins/embed-view.cjs.js","./plugins/style-block-view.cjs.js","./plugins/math-view.cjs.js","./selection-state.cjs.js","./create-state.cjs.js","./plugins/max-length.cjs.js","./plugins/task-list.cjs.js","./plugins/code-highlight.cjs.js","./plugins/embeds.cjs.js","./plugins/find-replace.cjs.js","./plugins/placeholder.cjs.js","./plugins/format-painter.cjs.js","./plugins/link.cjs.js","./plugins/single-line.cjs.js","./plugins/tables.cjs.js","./plugins/image.cjs.js","./plugins/paste.cjs.js","../../index-89c520e9.cjs.js","../../index-c3210a9c.cjs.js","../../index-3ca67627.cjs.js","../../index-178e1e57.cjs.js","./keymap.cjs.js","../../index-403841c7.cjs.js","./inputrules.cjs.js","./plugins/suggestions.cjs.js","../../xml-09119317.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_schemaCjsJs){},function(_sanitizeCjsJs){},function(_serializerCjsJs){},function(_commandsCjsJs){},function(_markdownCjsJs){},function(_markdownParseCjsJs){},function(_officePasteCjsJs){},function(_exportCjsJs){},function(_pluginsImageViewCjsJs){},function(_pluginsEmbedViewCjsJs){},function(_pluginsStyleBlockViewCjsJs){},function(_pluginsMathViewCjsJs){},function(_selectionStateCjsJs){},function(_createStateCjsJs){},function(_pluginsMaxLengthCjsJs){},function(_pluginsTaskListCjsJs){},function(_pluginsCodeHighlightCjsJs){},function(_pluginsEmbedsCjsJs){},function(_pluginsFindReplaceCjsJs){},function(_pluginsPlaceholderCjsJs){},function(_pluginsFormatPainterCjsJs){},function(_pluginsLinkCjsJs){},function(_pluginsSingleLineCjsJs){},function(_pluginsTablesCjsJs){},function(_pluginsImageCjsJs){},function(_pluginsPasteCjsJs){},function(_index00bCjsJs){},function(_index001CjsJs){},function(_index00aCjsJs){},function(_index008CjsJs){},function(_keymapCjsJs){},function(_index00dCjsJs){},function(_inputrulesCjsJs){},function(_pluginsSuggestionsCjsJs){},function(_xml00cCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./schema.esm.js";import"./sanitize.esm.js";import"./serializer.esm.js";import"./commands.esm.js";import"./markdown.esm.js";import"./markdown-parse.esm.js";import"./office-paste.esm.js";import"./export.esm.js";import"./plugins/image-view.esm.js";import"./plugins/embed-view.esm.js";import"./plugins/style-block-view.esm.js";import"./plugins/math-view.esm.js";import"./selection-state.esm.js";import"./create-state.esm.js";import"./plugins/max-length.esm.js";import"./plugins/task-list.esm.js";import"./plugins/code-highlight.esm.js";import"./plugins/embeds.esm.js";import"./plugins/find-replace.esm.js";import"./plugins/placeholder.esm.js";import"./plugins/format-painter.esm.js";import"./plugins/link.esm.js";import"./plugins/single-line.esm.js";import"./plugins/tables.esm.js";import"./plugins/image.esm.js";import"./plugins/paste.esm.js";import"../../index-6f3fa4ab.esm.js";import"../../index-7b1c9857.esm.js";import"../../index-ba47645d.esm.js";import"../../index-920675c4.esm.js";import"./keymap.esm.js";import"../../index-1faa963c.esm.js";import"./inputrules.esm.js";import"./plugins/suggestions.esm.js";import"../../xml-
|
|
1
|
+
import"./schema.esm.js";import"./sanitize.esm.js";import"./serializer.esm.js";import"./commands.esm.js";import"./markdown.esm.js";import"./markdown-parse.esm.js";import"./office-paste.esm.js";import"./export.esm.js";import"./plugins/image-view.esm.js";import"./plugins/embed-view.esm.js";import"./plugins/style-block-view.esm.js";import"./plugins/math-view.esm.js";import"./selection-state.esm.js";import"./create-state.esm.js";import"./plugins/max-length.esm.js";import"./plugins/task-list.esm.js";import"./plugins/code-highlight.esm.js";import"./plugins/embeds.esm.js";import"./plugins/find-replace.esm.js";import"./plugins/placeholder.esm.js";import"./plugins/format-painter.esm.js";import"./plugins/link.esm.js";import"./plugins/single-line.esm.js";import"./plugins/tables.esm.js";import"./plugins/image.esm.js";import"./plugins/paste.esm.js";import"../../index-6f3fa4ab.esm.js";import"../../index-7b1c9857.esm.js";import"../../index-ba47645d.esm.js";import"../../index-920675c4.esm.js";import"./keymap.esm.js";import"../../index-1faa963c.esm.js";import"./inputrules.esm.js";import"./plugins/suggestions.esm.js";import"../../xml-9bf771b3.esm.js";
|