@wangeditor-next/core 1.5.3 → 1.5.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/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.5.5](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/core@1.5.3...@wangeditor-next/core@1.5.5) (2024-07-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * hoverbar misalignment when scroll is set to false ([7761c86](https://github.com/cycleccc/wangEditor/commit/7761c8689ad0124bbf3cc5d864a97c3903c21e49))
12
+ * some Android browsers identified as Safari ([b37cabd](https://github.com/cycleccc/wangEditor/commit/b37cabdae056fdee0cee5585edace55b6cce02f2))
13
+ * support micro-frontend iframe ([659faf3](https://github.com/cycleccc/wangEditor/commit/659faf39c74998218667a229651505b74a70db78))
14
+
15
+
16
+
17
+
18
+
19
+ ## [1.5.4](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/core@1.5.3...@wangeditor-next/core@1.5.4) (2024-07-21)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * hoverbar misalignment when scroll is set to false ([7761c86](https://github.com/cycleccc/wangEditor/commit/7761c8689ad0124bbf3cc5d864a97c3903c21e49))
25
+ * some Android browsers identified as Safari ([b37cabd](https://github.com/cycleccc/wangEditor/commit/b37cabdae056fdee0cee5585edace55b6cce02f2))
26
+
27
+
28
+
29
+
30
+
6
31
  ## [1.5.3](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/core@1.5.2...@wangeditor-next/core@1.5.3) (2024-07-17)
7
32
 
8
33
  **Note:** Version bump only for package @wangeditor-next/core
@@ -5,6 +5,10 @@
5
5
  import $, { Dom7Array } from 'dom7';
6
6
  export { Dom7Array } from 'dom7';
7
7
  export default $;
8
+ export declare const isDocument: (value: any) => value is Document;
9
+ export declare const isShadowRoot: (value: any) => value is ShadowRoot;
10
+ export declare const isDataTransfer: (value: any) => value is DataTransfer;
11
+ export declare const isHTMLElememt: (value: any) => value is HTMLElement;
8
12
  import DOMNode = globalThis.Node;
9
13
  import DOMComment = globalThis.Comment;
10
14
  import DOMElement = globalThis.Element;
@@ -25,3 +25,4 @@ export declare function replaceHtmlSpecialSymbols(str: string): string;
25
25
  * @param str html str
26
26
  */
27
27
  export declare function deReplaceHtmlSpecialSymbols(str: string): string;
28
+ export declare const toString: (val: unknown) => string;
@@ -1,387 +1 @@
1
- .w-e-text-container *,
2
- .w-e-toolbar * {
3
- padding: 0;
4
- margin: 0;
5
- box-sizing: border-box;
6
- outline: none;
7
- }
8
- .w-e-text-container p,
9
- .w-e-text-container li,
10
- .w-e-text-container td,
11
- .w-e-text-container th,
12
- .w-e-text-container blockquote {
13
- line-height: 1.5;
14
- }
15
- .w-e-toolbar * {
16
- line-height: 1.5;
17
- }
18
- .w-e-text-container {
19
- color: var(--w-e-textarea-color);
20
- background-color: var(--w-e-textarea-bg-color);
21
- position: relative;
22
- height: 100%;
23
- }
24
- .w-e-text-container .w-e-scroll {
25
- height: 100%;
26
- -webkit-overflow-scrolling: touch;
27
- }
28
- .w-e-text-container [data-slate-editor] {
29
- outline: 0;
30
- white-space: pre-wrap;
31
- /* 【重要】可以显示空格,在连续多空格的情况下 */
32
- word-wrap: break-word;
33
- padding: 0 10px;
34
- border-top: 1px solid transparent;
35
- min-height: 100%;
36
- }
37
- .w-e-text-container [data-slate-editor] p {
38
- margin: 15px 0;
39
- }
40
- .w-e-text-container [data-slate-editor] h1,
41
- .w-e-text-container [data-slate-editor] h2,
42
- .w-e-text-container [data-slate-editor] h3,
43
- .w-e-text-container [data-slate-editor] h4,
44
- .w-e-text-container [data-slate-editor] h5 {
45
- margin: 20px 0 20px 0;
46
- }
47
- .w-e-text-container [data-slate-editor] img {
48
- max-width: 100%;
49
- min-width: 20px;
50
- min-height: 20px;
51
- cursor: default;
52
- display: inline !important;
53
- }
54
- .w-e-text-container [data-slate-editor] span {
55
- text-indent: 0;
56
- }
57
- .w-e-text-container [data-slate-editor] [data-selected="true"] {
58
- box-shadow: 0 0 0 2px var(--w-e-textarea-selected-border-color);
59
- }
60
- .w-e-text-placeholder {
61
- color: var(--w-e-textarea-slight-color);
62
- position: absolute;
63
- font-style: italic;
64
- width: 90%;
65
- left: 10px;
66
- top: 17px;
67
- pointer-events: none;
68
- -webkit-user-select: none;
69
- -moz-user-select: none;
70
- user-select: none;
71
- }
72
- .w-e-max-length-info {
73
- position: absolute;
74
- color: var(--w-e-textarea-slight-color);
75
- bottom: 0.5em;
76
- right: 1em;
77
- pointer-events: none;
78
- -webkit-user-select: none;
79
- -moz-user-select: none;
80
- user-select: none;
81
- }
82
- .w-e-bar {
83
- background-color: var(--w-e-toolbar-bg-color);
84
- padding: 0 5px;
85
- font-size: 14px;
86
- color: var(--w-e-toolbar-color);
87
- }
88
- .w-e-bar svg {
89
- width: 14px;
90
- height: 14px;
91
- fill: var(--w-e-toolbar-color);
92
- }
93
- .w-e-bar-show {
94
- display: flex;
95
- }
96
- .w-e-bar-hidden {
97
- display: none;
98
- }
99
- .w-e-hover-bar {
100
- position: absolute;
101
- border: 1px solid var(--w-e-toolbar-border-color);
102
- border-radius: 3px;
103
- box-shadow: 0 2px 5px #0000001f;
104
- }
105
- .w-e-toolbar {
106
- flex-wrap: wrap;
107
- position: relative;
108
- }
109
- .w-e-bar-divider {
110
- display: inline-flex;
111
- width: 1px;
112
- height: 40px;
113
- background-color: var(--w-e-toolbar-border-color);
114
- margin: 0 5px;
115
- }
116
- .w-e-bar-item {
117
- position: relative;
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- text-align: center;
122
- padding: 4px;
123
- height: 40px;
124
- }
125
- .w-e-bar-item button {
126
- border: none;
127
- background: transparent;
128
- height: calc(40px - 8px);
129
- padding: 0 8px;
130
- cursor: pointer;
131
- display: inline-flex;
132
- justify-content: center;
133
- align-items: center;
134
- color: var(--w-e-toolbar-color);
135
- white-space: nowrap;
136
- /* 不换行 */
137
- overflow: hidden;
138
- }
139
- .w-e-bar-item button:hover {
140
- background-color: var(--w-e-toolbar-active-bg-color);
141
- color: var(--w-e-toolbar-active-color);
142
- }
143
- .w-e-bar-item button .title {
144
- margin-left: 5px;
145
- }
146
- .w-e-bar-item .active {
147
- background-color: var(--w-e-toolbar-active-bg-color);
148
- color: var(--w-e-toolbar-active-color);
149
- }
150
- .w-e-bar-item .disabled {
151
- color: var(--w-e-toolbar-disabled-color);
152
- cursor: not-allowed;
153
- }
154
- .w-e-bar-item .disabled svg {
155
- fill: var(--w-e-toolbar-disabled-color);
156
- }
157
- .w-e-bar-item .disabled:hover {
158
- background-color: var(--w-e-toolbar-bg-color);
159
- color: var(--w-e-toolbar-disabled-color);
160
- }
161
- .w-e-bar-item .disabled:hover svg {
162
- fill: var(--w-e-toolbar-disabled-color);
163
- }
164
- .w-e-menu-tooltip-v5:before {
165
- content: attr(data-tooltip);
166
- position: absolute;
167
- background-color: var(--w-e-toolbar-active-color);
168
- color: var(--w-e-toolbar-bg-color);
169
- text-align: center;
170
- padding: 5px 10px;
171
- border-radius: 5px;
172
- z-index: 1;
173
- opacity: 0;
174
- transition: opacity 0.6s;
175
- font-size: 0.75em;
176
- visibility: hidden;
177
- top: 40px;
178
- white-space: pre;
179
- }
180
- .w-e-menu-tooltip-v5:after {
181
- content: "";
182
- position: absolute;
183
- border-width: 5px;
184
- border-style: solid;
185
- opacity: 0;
186
- transition: opacity 0.6s;
187
- border-color: transparent transparent var(--w-e-toolbar-active-color) transparent;
188
- visibility: hidden;
189
- top: 30px;
190
- }
191
- .w-e-menu-tooltip-v5:hover:before,
192
- .w-e-menu-tooltip-v5:hover:after {
193
- opacity: 1;
194
- visibility: visible;
195
- }
196
- .w-e-menu-tooltip-v5.tooltip-right:before {
197
- left: 100%;
198
- top: 10px;
199
- }
200
- .w-e-menu-tooltip-v5.tooltip-right:after {
201
- left: 100%;
202
- margin-left: -10px;
203
- top: 16px;
204
- border-color: transparent var(--w-e-toolbar-active-color) transparent transparent;
205
- }
206
- .w-e-bar-item-group .w-e-bar-item-menus-container {
207
- display: none;
208
- /* 默认隐藏 */
209
- z-index: 1;
210
- background-color: var(--w-e-toolbar-bg-color);
211
- position: absolute;
212
- top: 0;
213
- left: 0;
214
- margin-top: 40px;
215
- border: 1px solid var(--w-e-toolbar-border-color);
216
- border-radius: 3px;
217
- box-shadow: 0 2px 10px #0000001f;
218
- }
219
- .w-e-bar-item-group:hover {
220
- /* hover 时显示下级菜单 */
221
- }
222
- .w-e-bar-item-group:hover .w-e-bar-item-menus-container {
223
- display: block;
224
- }
225
- .w-e-select-list {
226
- z-index: 1;
227
- position: absolute;
228
- left: 0;
229
- top: 0;
230
- background-color: var(--w-e-toolbar-bg-color);
231
- margin-top: 40px;
232
- min-width: 100px;
233
- border: 1px solid var(--w-e-toolbar-border-color);
234
- border-radius: 3px;
235
- box-shadow: 0 2px 10px #0000001f;
236
- max-height: 350px;
237
- overflow-y: auto;
238
- }
239
- .w-e-select-list ul {
240
- list-style: none;
241
- line-height: 1;
242
- }
243
- .w-e-select-list ul .selected {
244
- background-color: var(--w-e-toolbar-active-bg-color);
245
- }
246
- .w-e-select-list ul li {
247
- cursor: pointer;
248
- padding: 7px 0 7px 25px;
249
- position: relative;
250
- text-align: left;
251
- white-space: nowrap;
252
- /* 不换行 */
253
- }
254
- .w-e-select-list ul li:hover {
255
- background-color: var(--w-e-toolbar-active-bg-color);
256
- }
257
- .w-e-select-list ul li svg {
258
- position: absolute;
259
- left: 0;
260
- margin-left: 5px;
261
- top: 50%;
262
- margin-top: -7px;
263
- }
264
- .w-e-bar-bottom .w-e-select-list {
265
- top: inherit;
266
- bottom: 0;
267
- margin-top: 0;
268
- margin-bottom: 40px;
269
- }
270
- .w-e-drop-panel {
271
- z-index: 1;
272
- background-color: var(--w-e-toolbar-bg-color);
273
- position: absolute;
274
- top: 0;
275
- border: 1px solid var(--w-e-toolbar-border-color);
276
- border-radius: 3px;
277
- box-shadow: 0 2px 10px #0000001f;
278
- margin-top: 40px;
279
- min-width: 200px;
280
- padding: 10px;
281
- }
282
- .w-e-bar-bottom .w-e-drop-panel {
283
- top: inherit;
284
- bottom: 0;
285
- margin-top: 0;
286
- margin-bottom: 40px;
287
- }
288
- .w-e-modal {
289
- z-index: 1;
290
- background-color: var(--w-e-toolbar-bg-color);
291
- position: absolute;
292
- padding: 20px 15px 0 15px;
293
- min-width: 100px;
294
- min-height: 40px;
295
- color: var(--w-e-toolbar-color);
296
- text-align: left;
297
- font-size: 14px;
298
- border: 1px solid var(--w-e-toolbar-border-color);
299
- border-radius: 3px;
300
- box-shadow: 0 2px 10px #0000001f;
301
- }
302
- .w-e-modal .btn-close {
303
- position: absolute;
304
- right: 8px;
305
- top: 7px;
306
- cursor: pointer;
307
- padding: 5px;
308
- line-height: 1;
309
- }
310
- .w-e-modal .btn-close svg {
311
- width: 10px;
312
- height: 10px;
313
- fill: var(--w-e-toolbar-color);
314
- }
315
- .w-e-modal .babel-container {
316
- display: block;
317
- margin-bottom: 15px;
318
- }
319
- .w-e-modal .babel-container span {
320
- display: block;
321
- margin-bottom: 10px;
322
- }
323
- .w-e-modal .button-container {
324
- margin-bottom: 15px;
325
- }
326
- .w-e-modal button {
327
- font-weight: 400;
328
- white-space: nowrap;
329
- cursor: pointer;
330
- transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
331
- -webkit-user-select: none;
332
- -moz-user-select: none;
333
- user-select: none;
334
- touch-action: manipulation;
335
- height: 32px;
336
- padding: 4.5px 15px;
337
- color: var(--w-e-toolbar-color);
338
- background-color: var(--w-e-modal-button-bg-color);
339
- text-align: center;
340
- border: 1px solid var(--w-e-modal-button-border-color);
341
- border-radius: 4px;
342
- }
343
- .w-e-modal textarea,
344
- .w-e-modal input[type="text"],
345
- .w-e-modal input[type="number"] {
346
- font-variant: tabular-nums;
347
- font-feature-settings: "tnum";
348
- padding: 4.5px 11px;
349
- color: var(--w-e-toolbar-color);
350
- background-color: var(--w-e-toolbar-bg-color);
351
- border: 1px solid var(--w-e-modal-button-border-color);
352
- border-radius: 4px;
353
- transition: all 0.3s;
354
- width: 100%;
355
- }
356
- .w-e-modal textarea {
357
- min-height: 60px;
358
- }
359
- body .w-e-modal {
360
- box-sizing: border-box;
361
- }
362
- body .w-e-modal * {
363
- box-sizing: border-box;
364
- }
365
- .w-e-progress-bar {
366
- position: absolute;
367
- width: 0;
368
- height: 1px;
369
- background-color: var(--w-e-textarea-handler-bg-color);
370
- transition: width 0.3s;
371
- }
372
- .w-e-full-screen-container {
373
- position: fixed;
374
- margin: 0 !important;
375
- padding: 0 !important;
376
- top: 0 !important;
377
- left: 0 !important;
378
- right: 0 !important;
379
- bottom: 0 !important;
380
- height: 100% !important;
381
- width: 100% !important;
382
- display: flex !important;
383
- flex-direction: column !important;
384
- }
385
- .w-e-full-screen-container [data-w-e-textarea="true"] {
386
- flex: 1 !important;
387
- }
1
+ .w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;margin:0;outline:none;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.no-scroll{position:absolute;width:100%}.w-e-text-container .w-e-scroll{-webkit-overflow-scrolling:touch;height:100%}.w-e-text-container [data-slate-editor]{word-wrap:break-word;border-top:1px solid transparent;min-height:100%;outline:0;padding:0 10px;white-space:pre-wrap}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;display:inline!important;max-width:100%;min-height:20px;min-width:20px}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{font-style:italic;left:10px;top:17px;width:90%}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);font-size:14px;padding:0 5px}.w-e-bar svg{fill:var(--w-e-toolbar-color);height:14px;width:14px}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 5px #0000001f;position:absolute}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);display:inline-flex;height:40px;margin:0 5px;width:1px}.w-e-bar-item{display:flex;height:40px;padding:4px;position:relative;text-align:center}.w-e-bar-item,.w-e-bar-item button{align-items:center;justify-content:center}.w-e-bar-item button{background:transparent;border:none;color:var(--w-e-toolbar-color);cursor:pointer;display:inline-flex;height:32px;overflow:hidden;padding:0 8px;white-space:nowrap}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);border-radius:5px;color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);font-size:.75em;padding:5px 10px;text-align:center;top:40px;white-space:pre;z-index:1}.w-e-menu-tooltip-v5:after,.w-e-menu-tooltip-v5:before{opacity:0;position:absolute;transition:opacity .6s;visibility:hidden}.w-e-menu-tooltip-v5:after{border:5px solid transparent;border-bottom:5px solid var(--w-e-toolbar-active-color);content:"";top:30px}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{left:100%;top:10px}.w-e-menu-tooltip-v5.tooltip-right:after{border-bottom-color:transparent;border-left-color:transparent;border-right-color:var(--w-e-toolbar-active-color);border-top-color:transparent;left:100%;margin-left:-10px;top:16px}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;display:none;left:0;margin-top:40px;position:absolute;top:0;z-index:1}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;left:0;margin-top:40px;max-height:350px;min-width:100px;overflow-y:auto;position:absolute;top:0;z-index:1}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;padding:7px 0 7px 25px;position:relative;text-align:left;white-space:nowrap}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{left:0;margin-left:5px;margin-top:-7px;position:absolute;top:50%}.w-e-bar-bottom .w-e-select-list{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;margin-top:40px;min-width:200px;padding:10px;position:absolute;top:0;z-index:1}.w-e-bar-bottom .w-e-drop-panel{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;color:var(--w-e-toolbar-color);font-size:14px;min-height:40px;min-width:100px;padding:20px 15px 0;position:absolute;text-align:left;z-index:1}.w-e-modal .btn-close{cursor:pointer;line-height:1;padding:5px;position:absolute;right:8px;top:7px}.w-e-modal .btn-close svg{fill:var(--w-e-toolbar-color);height:10px;width:10px}.w-e-modal .babel-container{display:block;margin-bottom:15px}.w-e-modal .babel-container span{display:block;margin-bottom:10px}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);cursor:pointer;font-weight:400;height:32px;padding:4.5px 15px;text-align:center;touch-action:manipulation;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.w-e-modal button,.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color)}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{font-feature-settings:"tnum";background-color:var(--w-e-toolbar-bg-color);font-variant:tabular-nums;padding:4.5px 11px;transition:all .3s;width:100%}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);height:1px;position:absolute;transition:width .3s;width:0}.w-e-full-screen-container{bottom:0!important;display:flex!important;flex-direction:column!important;height:100%!important;left:0!important;margin:0!important;padding:0!important;position:fixed;right:0!important;top:0!important;width:100%!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important}