@hailin-zheng/editor-core 2.2.3 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/editor.css +694 -610
  2. package/index-cjs.d.ts +32 -31
  3. package/index-cjs.js +22649 -22205
  4. package/index-cjs.js.map +1 -1
  5. package/index.d.ts +32 -31
  6. package/index.js +22647 -22207
  7. package/index.js.map +1 -1
  8. package/med_editor/doc-editor.d.ts +493 -464
  9. package/med_editor/doc-rule.d.ts +46 -46
  10. package/med_editor/editor-core.d.ts +21 -21
  11. package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
  12. package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
  13. package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +23 -23
  14. package/med_editor/framework/doc-layout/document-arrange.d.ts +86 -86
  15. package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +107 -107
  16. package/med_editor/framework/document-change.d.ts +314 -295
  17. package/med_editor/framework/document-combine.d.ts +24 -24
  18. package/med_editor/framework/document-comment.d.ts +38 -38
  19. package/med_editor/framework/document-context.d.ts +138 -133
  20. package/med_editor/framework/document-event.d.ts +251 -251
  21. package/med_editor/framework/document-input-cursor.d.ts +32 -43
  22. package/med_editor/framework/document-paginator.d.ts +46 -46
  23. package/med_editor/framework/document-svg.d.ts +36 -36
  24. package/med_editor/framework/document-template.d.ts +13 -13
  25. package/med_editor/framework/document-textline-mode.d.ts +6 -6
  26. package/med_editor/framework/element-define.d.ts +413 -409
  27. package/med_editor/framework/element-event-define.d.ts +104 -107
  28. package/med_editor/framework/element-props.d.ts +343 -343
  29. package/med_editor/framework/element-reader.d.ts +20 -20
  30. package/med_editor/framework/element-serialize.d.ts +36 -36
  31. package/med_editor/framework/element-type-handler.d.ts +8 -9
  32. package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
  33. package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
  34. package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
  35. package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
  36. package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
  37. package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
  38. package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
  39. package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -0
  40. package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +15 -15
  41. package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
  42. package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +96 -96
  43. package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
  44. package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
  45. package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +17 -17
  46. package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
  47. package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
  48. package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
  49. package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
  50. package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
  51. package/med_editor/framework/impl/document/doc-body-impl.d.ts +19 -19
  52. package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
  53. package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
  54. package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
  55. package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
  56. package/med_editor/framework/impl/document/doc-impl.d.ts +72 -72
  57. package/med_editor/framework/impl/index.d.ts +40 -39
  58. package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
  59. package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
  60. package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
  61. package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
  62. package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
  63. package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
  64. package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
  65. package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
  66. package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
  67. package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
  68. package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
  69. package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
  70. package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
  71. package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
  72. package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
  73. package/med_editor/framework/impl/table/table-split-cell.d.ts +93 -92
  74. package/med_editor/framework/impl/table/table-util.d.ts +180 -180
  75. package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
  76. package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
  77. package/med_editor/framework/infrastructure/event-subject.d.ts +57 -56
  78. package/med_editor/framework/infrastructure/notify.d.ts +13 -13
  79. package/med_editor/framework/print/document-print-offscreen.d.ts +58 -58
  80. package/med_editor/framework/print/document-print.d.ts +18 -18
  81. package/med_editor/framework/render-context.d.ts +111 -111
  82. package/med_editor/framework/render-define.d.ts +141 -141
  83. package/med_editor/framework/selection/document-selection.d.ts +92 -91
  84. package/med_editor/framework/selection/range-util.d.ts +36 -36
  85. package/med_editor/framework/selection/selection-overlays.d.ts +32 -32
  86. package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -0
  87. package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
  88. package/med_editor/framework/util/common-util.d.ts +76 -76
  89. package/med_editor/framework/util/document-segmenter.d.ts +2 -2
  90. package/med_editor/framework/util/element-util.d.ts +410 -410
  91. package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +42 -42
  92. package/package.json +19 -19
package/editor.css CHANGED
@@ -1,610 +1,694 @@
1
- .svg-container {
2
- background: #f2f4f7;
3
- overflow: hidden;
4
- flex: 1;
5
- height: 100%;
6
- position: relative;
7
- }
8
-
9
- .svg-container * {
10
- white-space: pre;
11
- }
12
-
13
- .drop-container {
14
- position: absolute;
15
- left: 0;
16
- top: 0;
17
- }
18
-
19
- .data-list > div {
20
- padding: 10px 6px;
21
- display: flex;
22
- align-items: center;
23
- gap: 10px;
24
- border-bottom: 1px solid #ccc;
25
- cursor: default;
26
- }
27
-
28
- .data-list > div:hover {
29
- background-color: #ccc;
30
- }
31
-
32
- .data-list > div:last-child {
33
- border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
34
- }
35
-
36
- @keyframes hover-color {
37
- from {
38
- border-color: #c0c0c0;
39
- }
40
- to {
41
- border-color: #3e97eb;
42
- }
43
- }
44
-
45
- .magic-radio,
46
- .magic-checkbox {
47
- position: absolute;
48
- display: none;
49
- }
50
-
51
- .magic-radio[disabled],
52
- .magic-checkbox[disabled] {
53
- cursor: not-allowed;
54
- }
55
-
56
- .magic-radio + label,
57
- .magic-checkbox + label {
58
- position: relative;
59
- display: block;
60
- padding-left: 30px;
61
- cursor: pointer;
62
- vertical-align: middle;
63
- }
64
-
65
- .magic-radio + label:hover:before,
66
- .magic-checkbox + label:hover:before {
67
- animation-duration: 0.4s;
68
- animation-fill-mode: both;
69
- animation-name: hover-color;
70
- }
71
-
72
- .magic-radio + label:before,
73
- .magic-checkbox + label:before {
74
- position: absolute;
75
- top: 0;
76
- left: 0;
77
- display: inline-block;
78
- width: 20px;
79
- height: 20px;
80
- content: "";
81
- border: 1px solid #c0c0c0;
82
- }
83
-
84
- .magic-radio + label:after,
85
- .magic-checkbox + label:after {
86
- position: absolute;
87
- display: none;
88
- content: "";
89
- }
90
-
91
- .magic-radio[disabled] + label,
92
- .magic-checkbox[disabled] + label {
93
- cursor: not-allowed;
94
- color: #e4e4e4;
95
- }
96
-
97
- .magic-radio[disabled] + label:hover,
98
- .magic-radio[disabled] + label:before,
99
- .magic-radio[disabled] + label:after,
100
- .magic-checkbox[disabled] + label:hover,
101
- .magic-checkbox[disabled] + label:before,
102
- .magic-checkbox[disabled] + label:after {
103
- cursor: not-allowed;
104
- }
105
-
106
- .magic-radio[disabled] + label:hover:before,
107
- .magic-checkbox[disabled] + label:hover:before {
108
- border: 1px solid #e4e4e4;
109
- animation-name: none;
110
- }
111
-
112
- .magic-radio[disabled] + label:before,
113
- .magic-checkbox[disabled] + label:before {
114
- border-color: #e4e4e4;
115
- }
116
-
117
- .magic-radio:checked + label:before,
118
- .magic-checkbox:checked + label:before {
119
- animation-name: none;
120
- }
121
-
122
- .magic-radio:checked + label:after,
123
- .magic-checkbox:checked + label:after {
124
- display: block;
125
- }
126
-
127
- .magic-radio + label:before {
128
- border-radius: 50%;
129
- }
130
-
131
- .magic-radio + label:after {
132
- top: 7px;
133
- left: 7px;
134
- width: 8px;
135
- height: 8px;
136
- border-radius: 50%;
137
- background: #3e97eb;
138
- }
139
-
140
- .magic-radio:checked + label:before {
141
- border: 1px solid #3e97eb;
142
- }
143
-
144
- .magic-radio:checked[disabled] + label:before {
145
- border: 1px solid #c9e2f9;
146
- }
147
-
148
- .magic-radio:checked[disabled] + label:after {
149
- background: #c9e2f9;
150
- }
151
-
152
- .magic-checkbox + label:before {
153
- border-radius: 3px;
154
- }
155
-
156
- .magic-checkbox + label:after {
157
- top: 2px;
158
- left: 7px;
159
- box-sizing: border-box;
160
- width: 6px;
161
- height: 12px;
162
- transform: rotate(45deg);
163
- border-width: 2px;
164
- border-style: solid;
165
- border-color: #fff;
166
- border-top: 0;
167
- border-left: 0;
168
- }
169
-
170
- .magic-checkbox:checked + label:before {
171
- border: #3e97eb;
172
- background: #3e97eb;
173
- }
174
-
175
- .magic-checkbox:checked[disabled] + label:before {
176
- border: #c9e2f9;
177
- background: #c9e2f9;
178
- }
179
- /* 样式化 radio box 的外观 */
180
- .editor-list-radiobox {
181
- width: 16px;
182
- height: 16px;
183
- border: 1px solid #000;
184
- border-radius: 50%;
185
- cursor: pointer;
186
- display: inline-block;
187
- position: relative;
188
- }
189
- /* 选中状态的样式 */
190
- .editor-list-radiobox.checked::after {
191
- content: "";
192
- width: 8px;
193
- height: 8px;
194
- background-color: #007bff;
195
- border-radius: 50%;
196
- position: absolute;
197
- top: 50%;
198
- left: 50%;
199
- transform: translate(-50%, -50%);
200
- }
201
- /* 样式化 checkbox 的外观 */
202
- .editor-list-checkbox {
203
- width: 16px;
204
- height: 16px;
205
- border: 1px solid #000;
206
- cursor: pointer;
207
- }
208
- /* 选中状态的样式 */
209
- .editor-list-checkbox.checked::after {
210
- content: "✔";
211
- font-size: 14px;
212
- color: #007bff;
213
- display: block;
214
- text-align: center;
215
- line-height: 16px;
216
- }
217
-
218
- .decorate-container {
219
- position: absolute;
220
- cursor: default;
221
- z-index: 1;
222
- }
223
-
224
- .tg-container {
225
- font-size: 12px;
226
- border: 1px solid #ccc;
227
- padding: 10px;
228
- position: absolute;
229
- width: 200px;
230
- background: #fff;
231
- box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
232
- }
233
-
234
- .tg-container--selected {
235
- box-shadow: 0 2px 16px 0 rgb(0 0 0 / 20%);;
236
- }
237
-
238
- .tg-container > .header {
239
- display: flex;
240
- justify-content: space-between;
241
- align-items: center;
242
- }
243
-
244
- .tg-container > .content {
245
- margin-top: 10px;
246
- white-space: normal;
247
- word-break: break-all;
248
- }
249
-
250
- .tg-container > .header > .header-user {
251
- color: #3e97eb;
252
- }
253
-
254
- .tg-container > .header > .header-date {
255
- color: #c0c0c0;
256
- padding-right: 10px;
257
- }
258
- .tg-container > .bg{
259
- position: absolute;
260
- left: 0;
261
- top:0;
262
- width: 4px;
263
- height: 100%;
264
- }
265
-
266
- .editor-calendar {
267
- width: 212px;
268
- height: 272px;
269
- border: 1px solid #ccc;
270
- background: #fff;
271
- cursor: default;
272
- user-select: none;
273
- font-size: 12px;
274
- }
275
-
276
- .editor-calendar-header {
277
- display: flex;
278
- justify-content: space-between;
279
- align-items: center;
280
- height: 30px;
281
- }
282
-
283
- .editor-calendar-header-left {
284
- display: flex;
285
- align-items: center;
286
- }
287
-
288
- .editor-calendar-header-left-year {
289
- padding: 0 5px;
290
- }
291
-
292
- .editor-calendar-header-left-year:hover {
293
- background: #ccc;
294
- }
295
-
296
- .editor-calendar-item:hover {
297
- background: #ccc;
298
- }
299
-
300
- .editor-calendar-header-left-month {
301
- padding: 0 5px;
302
- }
303
-
304
- .editor-calendar-header-left-month:hover {
305
- background: #ccc;
306
- }
307
-
308
- .editor-calendar-header-right {
309
- display: flex;
310
- align-items: center;
311
- }
312
-
313
- .editor-calendar-header-right-prev {
314
- padding: 0 5px;
315
- }
316
-
317
- .editor-calendar-header-right-prev:hover {
318
- background-color: #ccc;
319
- }
320
-
321
- .editor-calendar-header-right-next {
322
- padding: 0 5px;
323
- }
324
-
325
- .editor-calendar-header-right-next:hover {
326
- background-color: #ccc;
327
- }
328
-
329
- .editor-calendar-body {
330
- display: flex;
331
- flex-direction: column;
332
- }
333
-
334
- .editor-calendar-body-week {
335
- display: flex;
336
- }
337
-
338
- .editor-calendar-body-week-item {
339
- width: 30px;
340
- height: 30px;
341
- line-height: 30px;
342
- text-align: center;
343
- }
344
-
345
- .editor-calendar-body-day {
346
- display: flex;
347
- flex-wrap: wrap;
348
- }
349
-
350
- .editor-calendar-body-day-item {
351
- width: 30px;
352
- height: 30px;
353
- line-height: 30px;
354
- text-align: center;
355
- opacity: 0.6;
356
- }
357
-
358
- .editor-calendar-body-day-item--current-month {
359
- opacity: 1;
360
- }
361
-
362
- .editor-calendar-body-day-item--today {
363
- background: #2b88d8;
364
- color: #fff;
365
- }
366
-
367
- .editor-calendar-body-day-item--selected {
368
- outline: #2b88d8 1px solid;
369
- font-weight: bold;
370
- }
371
-
372
- .editor-calendar-body-day-item:hover {
373
- background-color: #ccc;
374
- }
375
- .editor-calendar-footer{
376
- display: flex;
377
- justify-content: space-between;
378
- }
379
-
380
- .editor-calendar-footer-right {
381
- display: flex;
382
- justify-content: flex-end;
383
- align-items: center;
384
- height: 30px;
385
- font-size: 12px;
386
- }
387
-
388
- .editor-calendar-footer-right-btn {
389
- padding: 2px 3px;
390
- cursor: default;
391
- user-select: none;
392
- }
393
-
394
- .editor-calendar-footer-right-btn:hover {
395
- outline: 1px solid rgb(118, 142, 222);
396
- }
397
-
398
- .editor-calendar-footer-right-btn:active {
399
- outline: 1px solid rgb(95, 19, 216);
400
- }
401
- .invert{
402
- filter: invert(100%);
403
- }
404
-
405
- .editor-calendar-month {
406
- width: 210px;
407
- height: 180px;
408
- border: 1px solid #ccc;
409
- background: #fff;
410
- cursor: default;
411
- }
412
-
413
- .editor-calendar-month-header {
414
- display: flex;
415
- justify-content: space-between;
416
- align-items: center;
417
- height: 30px;
418
- }
419
-
420
- .editor-calendar-month-header-left {
421
- display: flex;
422
- align-items: center;
423
- }
424
-
425
- .editor-calendar-month-header-left-year {
426
- padding-left: 10px;
427
- }
428
-
429
- .editor-calendar-month-header-right {
430
- display: flex;
431
- align-items: center;
432
- }
433
-
434
- .editor-calendar-month-header-right-prev {
435
- padding: 0 5px;
436
- }
437
-
438
- .editor-calendar-month-header-right-next {
439
- padding: 0 5px;
440
- }
441
-
442
- .editor-calendar-month-body {
443
- display: flex;
444
- flex-direction: column;
445
- }
446
-
447
- .editor-calendar-month-body-month {
448
- display: flex;
449
- flex-wrap: wrap;
450
- }
451
-
452
- .editor-calendar-month-body-month-item {
453
- width: 52px;
454
- height: 50px;
455
- line-height: 50px;
456
- text-align: center;
457
- }
458
-
459
- .editor-calendar-month-body-month-item--current {
460
- outline: #2b88d8 1px solid;
461
- font-weight: bold;
462
- }
463
-
464
- .editor-calendar-year {
465
- width: 210px;
466
- height: 210px;
467
- border: 1px solid #ccc;
468
- background: #fff;
469
- cursor: default;
470
- }
471
-
472
- .editor-calendar-year-header {
473
- display: flex;
474
- justify-content: space-between;
475
- align-items: center;
476
- height: 30px;
477
- }
478
-
479
- .editor-calendar-year-header-left {
480
- display: flex;
481
- align-items: center;
482
- }
483
-
484
- .editor-calendar-year-header-left-year {
485
- padding: 0 5px;
486
- }
487
-
488
- .editor-calendar-year-header-right {
489
- display: flex;
490
- align-items: center;
491
- }
492
-
493
- .editor-calendar-year-header-right-prev {
494
- padding: 0 5px;
495
- }
496
-
497
- .editor-calendar-year-header-right-next {
498
- padding: 0 5px;
499
- }
500
-
501
- .editor-calendar-year-body {
502
- display: flex;
503
- flex-direction: column;
504
- }
505
-
506
- .editor-calendar-year-body-year {
507
- display: flex;
508
- flex-wrap: wrap;
509
- }
510
-
511
- .editor-calendar-year-body-year-item {
512
- width: 52px;
513
- height: 36px;
514
- line-height: 36px;
515
- text-align: center;
516
- }
517
-
518
- .editor-contextmenu{
519
- z-index: 1000;
520
- position: absolute;
521
- background: white;
522
- box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
523
- }
524
- .editor-overlays-menus {
525
- font-size: 14px;
526
- font-family: "宋体", serif;
527
- margin: 0;
528
- cursor: pointer;
529
- padding: 0;
530
- list-style: none;
531
- user-select: none;
532
- }
533
- .editor-overlays-menus {
534
- padding: 3px;
535
- }
536
- .editor-overlays-menus > li {
537
- padding: 8px 12px;
538
- display: flex;
539
- align-items: center;
540
- word-break: keep-all;
541
- border-bottom: 1px solid #ccc; /* 在每个列表项的底部添加一条边框线 */
542
- }
543
-
544
- .editor-overlays-menus > li:hover {
545
- background-color: #ccc;
546
- }
547
-
548
- .editor-overlays-menus > li:last-child {
549
- border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
550
- }
551
-
552
- /*.scale-container > *{*/
553
- /* transform-origin: center top;*/
554
- /*}*/
555
- .doc-rule{
556
- position: absolute;
557
- font-size: 0;
558
- background: white;
559
- box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
560
- cursor: default;
561
- left: 0;
562
- top: 0;
563
- }
564
- .editor-calendar-footer-left{
565
- display: flex;
566
- }
567
- .editor-calendar-footer-left-time{
568
- outline: none;
569
- width: 110px;
570
- text-align: center;
571
- padding: 0;
572
- margin: 0;
573
- font-size: 14px;
574
- }
575
- .editor-input-cursor{
576
- position: absolute;
577
- width: 1.6px;
578
- padding: 0;
579
- border: none;
580
- outline: none;
581
- background: black;
582
- pointer-events: none;
583
- opacity: 0;
584
- animation: editor-cursor-blink 1s infinite steps(1, start);
585
- }
586
- @keyframes editor-cursor-blink {
587
- 0% {
588
- opacity: 1;
589
- }
590
- 50% {
591
- opacity: 0;
592
- }
593
- 100% {
594
- opacity: 1;
595
- }
596
- }
597
- .doc-triangle {
598
- position: absolute;
599
- width: 0;
600
- height: 0;
601
- border-left: 5px solid transparent;
602
- border-right: 5px solid transparent;
603
- border-bottom: 10px solid red; /* 修改颜色 */
604
- }
605
- .doc-triangle-line{
606
- position: absolute;
607
- height: 1px;
608
- background: red;
609
- transform-origin: top left
610
- }
1
+ .svg-container {
2
+ background: #f2f4f7;
3
+ overflow: hidden;
4
+ flex: 1;
5
+ height: 100%;
6
+ position: relative;
7
+ }
8
+
9
+ .svg-container * {
10
+ white-space: pre;
11
+ }
12
+
13
+ .drop-container {
14
+ position: absolute;
15
+ left: 0;
16
+ top: 0;
17
+ }
18
+
19
+ .data-list > div {
20
+ padding: 10px 6px;
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 10px;
24
+ border-bottom: 1px solid #ccc;
25
+ cursor: default;
26
+ }
27
+
28
+ .data-list > div:hover {
29
+ background-color: #ccc;
30
+ }
31
+
32
+ .data-list > div:last-child {
33
+ border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
34
+ }
35
+
36
+ @keyframes hover-color {
37
+ from {
38
+ border-color: #c0c0c0;
39
+ }
40
+ to {
41
+ border-color: #3e97eb;
42
+ }
43
+ }
44
+
45
+ .magic-radio,
46
+ .magic-checkbox {
47
+ position: absolute;
48
+ display: none;
49
+ }
50
+
51
+ .magic-radio[disabled],
52
+ .magic-checkbox[disabled] {
53
+ cursor: not-allowed;
54
+ }
55
+
56
+ .magic-radio + label,
57
+ .magic-checkbox + label {
58
+ position: relative;
59
+ display: block;
60
+ padding-left: 30px;
61
+ cursor: pointer;
62
+ vertical-align: middle;
63
+ }
64
+
65
+ .magic-radio + label:hover:before,
66
+ .magic-checkbox + label:hover:before {
67
+ animation-duration: 0.4s;
68
+ animation-fill-mode: both;
69
+ animation-name: hover-color;
70
+ }
71
+
72
+ .magic-radio + label:before,
73
+ .magic-checkbox + label:before {
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ display: inline-block;
78
+ width: 20px;
79
+ height: 20px;
80
+ content: "";
81
+ border: 1px solid #c0c0c0;
82
+ }
83
+
84
+ .magic-radio + label:after,
85
+ .magic-checkbox + label:after {
86
+ position: absolute;
87
+ display: none;
88
+ content: "";
89
+ }
90
+
91
+ .magic-radio[disabled] + label,
92
+ .magic-checkbox[disabled] + label {
93
+ cursor: not-allowed;
94
+ color: #e4e4e4;
95
+ }
96
+
97
+ .magic-radio[disabled] + label:hover,
98
+ .magic-radio[disabled] + label:before,
99
+ .magic-radio[disabled] + label:after,
100
+ .magic-checkbox[disabled] + label:hover,
101
+ .magic-checkbox[disabled] + label:before,
102
+ .magic-checkbox[disabled] + label:after {
103
+ cursor: not-allowed;
104
+ }
105
+
106
+ .magic-radio[disabled] + label:hover:before,
107
+ .magic-checkbox[disabled] + label:hover:before {
108
+ border: 1px solid #e4e4e4;
109
+ animation-name: none;
110
+ }
111
+
112
+ .magic-radio[disabled] + label:before,
113
+ .magic-checkbox[disabled] + label:before {
114
+ border-color: #e4e4e4;
115
+ }
116
+
117
+ .magic-radio:checked + label:before,
118
+ .magic-checkbox:checked + label:before {
119
+ animation-name: none;
120
+ }
121
+
122
+ .magic-radio:checked + label:after,
123
+ .magic-checkbox:checked + label:after {
124
+ display: block;
125
+ }
126
+
127
+ .magic-radio + label:before {
128
+ border-radius: 50%;
129
+ }
130
+
131
+ .magic-radio + label:after {
132
+ top: 7px;
133
+ left: 7px;
134
+ width: 8px;
135
+ height: 8px;
136
+ border-radius: 50%;
137
+ background: #3e97eb;
138
+ }
139
+
140
+ .magic-radio:checked + label:before {
141
+ border: 1px solid #3e97eb;
142
+ }
143
+
144
+ .magic-radio:checked[disabled] + label:before {
145
+ border: 1px solid #c9e2f9;
146
+ }
147
+
148
+ .magic-radio:checked[disabled] + label:after {
149
+ background: #c9e2f9;
150
+ }
151
+
152
+ .magic-checkbox + label:before {
153
+ border-radius: 3px;
154
+ }
155
+
156
+ .magic-checkbox + label:after {
157
+ top: 2px;
158
+ left: 7px;
159
+ box-sizing: border-box;
160
+ width: 6px;
161
+ height: 12px;
162
+ transform: rotate(45deg);
163
+ border-width: 2px;
164
+ border-style: solid;
165
+ border-color: #fff;
166
+ border-top: 0;
167
+ border-left: 0;
168
+ }
169
+
170
+ .magic-checkbox:checked + label:before {
171
+ border: #3e97eb;
172
+ background: #3e97eb;
173
+ }
174
+
175
+ .magic-checkbox:checked[disabled] + label:before {
176
+ border: #c9e2f9;
177
+ background: #c9e2f9;
178
+ }
179
+
180
+ /* 样式化 radio box 的外观 */
181
+ .editor-list-radiobox {
182
+ width: 16px;
183
+ height: 16px;
184
+ border: 1px solid #000;
185
+ border-radius: 50%;
186
+ cursor: pointer;
187
+ display: inline-block;
188
+ position: relative;
189
+ }
190
+
191
+ /* 选中状态的样式 */
192
+ .editor-list-radiobox.checked::after {
193
+ content: "";
194
+ width: 8px;
195
+ height: 8px;
196
+ background-color: #007bff;
197
+ border-radius: 50%;
198
+ position: absolute;
199
+ top: 50%;
200
+ left: 50%;
201
+ transform: translate(-50%, -50%);
202
+ }
203
+
204
+ /* 样式化 checkbox 的外观 */
205
+ .editor-list-checkbox {
206
+ width: 16px;
207
+ height: 16px;
208
+ border: 1px solid #000;
209
+ cursor: pointer;
210
+ }
211
+
212
+ /* 选中状态的样式 */
213
+ .editor-list-checkbox.checked::after {
214
+ content: "✔";
215
+ font-size: 14px;
216
+ color: #007bff;
217
+ display: block;
218
+ text-align: center;
219
+ line-height: 16px;
220
+ }
221
+
222
+ .decorate-container {
223
+ position: absolute;
224
+ cursor: default;
225
+ z-index: 1;
226
+ }
227
+
228
+ .tg-container {
229
+ font-size: 12px;
230
+ border: 1px solid #ccc;
231
+ padding: 10px;
232
+ position: absolute;
233
+ width: 200px;
234
+ background: #fff;
235
+ box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
236
+ }
237
+
238
+ .tg-container--selected {
239
+ box-shadow: 0 2px 16px 0 rgb(0 0 0 / 20%);;
240
+ }
241
+
242
+ .tg-container > .header {
243
+ display: flex;
244
+ justify-content: space-between;
245
+ align-items: center;
246
+ }
247
+
248
+ .tg-container > .content {
249
+ margin-top: 10px;
250
+ white-space: normal;
251
+ word-break: break-all;
252
+ }
253
+
254
+ .tg-container > .header > .header-user {
255
+ color: #3e97eb;
256
+ }
257
+
258
+ .tg-container > .header > .header-date {
259
+ color: #c0c0c0;
260
+ padding-right: 10px;
261
+ }
262
+
263
+ .tg-container > .bg {
264
+ position: absolute;
265
+ left: 0;
266
+ top: 0;
267
+ width: 4px;
268
+ height: 100%;
269
+ }
270
+
271
+ .editor-calendar {
272
+ width: 212px;
273
+ height: 272px;
274
+ border: 1px solid #ccc;
275
+ background: #fff;
276
+ cursor: default;
277
+ user-select: none;
278
+ font-size: 12px;
279
+ }
280
+
281
+ .editor-calendar-header {
282
+ display: flex;
283
+ justify-content: space-between;
284
+ align-items: center;
285
+ height: 30px;
286
+ }
287
+
288
+ .editor-calendar-header-left {
289
+ display: flex;
290
+ align-items: center;
291
+ }
292
+
293
+ .editor-calendar-header-left-year {
294
+ padding: 0 5px;
295
+ }
296
+
297
+ .editor-calendar-header-left-year:hover {
298
+ background: #ccc;
299
+ }
300
+
301
+ .editor-calendar-item:hover {
302
+ background: #ccc;
303
+ }
304
+
305
+ .editor-calendar-header-left-month {
306
+ padding: 0 5px;
307
+ }
308
+
309
+ .editor-calendar-header-left-month:hover {
310
+ background: #ccc;
311
+ }
312
+
313
+ .editor-calendar-header-right {
314
+ display: flex;
315
+ align-items: center;
316
+ }
317
+
318
+ .editor-calendar-header-right-prev {
319
+ padding: 0 5px;
320
+ }
321
+
322
+ .editor-calendar-header-right-prev:hover {
323
+ background-color: #ccc;
324
+ }
325
+
326
+ .editor-calendar-header-right-next {
327
+ padding: 0 5px;
328
+ }
329
+
330
+ .editor-calendar-header-right-next:hover {
331
+ background-color: #ccc;
332
+ }
333
+
334
+ .editor-calendar-body {
335
+ display: flex;
336
+ flex-direction: column;
337
+ }
338
+
339
+ .editor-calendar-body-week {
340
+ display: flex;
341
+ }
342
+
343
+ .editor-calendar-body-week-item {
344
+ width: 30px;
345
+ height: 30px;
346
+ line-height: 30px;
347
+ text-align: center;
348
+ }
349
+
350
+ .editor-calendar-body-day {
351
+ display: flex;
352
+ flex-wrap: wrap;
353
+ }
354
+
355
+ .editor-calendar-body-day-item {
356
+ width: 30px;
357
+ height: 30px;
358
+ line-height: 30px;
359
+ text-align: center;
360
+ opacity: 0.6;
361
+ }
362
+
363
+ .editor-calendar-body-day-item--current-month {
364
+ opacity: 1;
365
+ }
366
+
367
+ .editor-calendar-body-day-item--today {
368
+ background: #2b88d8;
369
+ color: #fff;
370
+ }
371
+
372
+ .editor-calendar-body-day-item--selected {
373
+ outline: #2b88d8 1px solid;
374
+ font-weight: bold;
375
+ }
376
+
377
+ .editor-calendar-body-day-item:hover {
378
+ background-color: #ccc;
379
+ }
380
+
381
+ .editor-calendar-footer {
382
+ display: flex;
383
+ justify-content: space-between;
384
+ }
385
+
386
+ .editor-calendar-footer-right {
387
+ display: flex;
388
+ justify-content: flex-end;
389
+ align-items: center;
390
+ height: 30px;
391
+ font-size: 12px;
392
+ }
393
+
394
+ .editor-calendar-footer-right-btn {
395
+ padding: 2px 3px;
396
+ cursor: default;
397
+ user-select: none;
398
+ }
399
+
400
+ .editor-calendar-footer-right-btn:hover {
401
+ outline: 1px solid rgb(118, 142, 222);
402
+ }
403
+
404
+ .editor-calendar-footer-right-btn:active {
405
+ outline: 1px solid rgb(95, 19, 216);
406
+ }
407
+
408
+ .invert {
409
+ filter: invert(100%);
410
+ }
411
+
412
+ .editor-calendar-month {
413
+ width: 210px;
414
+ height: 180px;
415
+ border: 1px solid #ccc;
416
+ background: #fff;
417
+ cursor: default;
418
+ }
419
+
420
+ .editor-calendar-month-header {
421
+ display: flex;
422
+ justify-content: space-between;
423
+ align-items: center;
424
+ height: 30px;
425
+ }
426
+
427
+ .editor-calendar-month-header-left {
428
+ display: flex;
429
+ align-items: center;
430
+ }
431
+
432
+ .editor-calendar-month-header-left-year {
433
+ padding-left: 10px;
434
+ }
435
+
436
+ .editor-calendar-month-header-right {
437
+ display: flex;
438
+ align-items: center;
439
+ }
440
+
441
+ .editor-calendar-month-header-right-prev {
442
+ padding: 0 5px;
443
+ }
444
+
445
+ .editor-calendar-month-header-right-next {
446
+ padding: 0 5px;
447
+ }
448
+
449
+ .editor-calendar-month-body {
450
+ display: flex;
451
+ flex-direction: column;
452
+ }
453
+
454
+ .editor-calendar-month-body-month {
455
+ display: flex;
456
+ flex-wrap: wrap;
457
+ }
458
+
459
+ .editor-calendar-month-body-month-item {
460
+ width: 52px;
461
+ height: 50px;
462
+ line-height: 50px;
463
+ text-align: center;
464
+ }
465
+
466
+ .editor-calendar-month-body-month-item--current {
467
+ outline: #2b88d8 1px solid;
468
+ font-weight: bold;
469
+ }
470
+
471
+ .editor-calendar-year {
472
+ width: 210px;
473
+ height: 210px;
474
+ border: 1px solid #ccc;
475
+ background: #fff;
476
+ cursor: default;
477
+ }
478
+
479
+ .editor-calendar-year-header {
480
+ display: flex;
481
+ justify-content: space-between;
482
+ align-items: center;
483
+ height: 30px;
484
+ }
485
+
486
+ .editor-calendar-year-header-left {
487
+ display: flex;
488
+ align-items: center;
489
+ }
490
+
491
+ .editor-calendar-year-header-left-year {
492
+ padding: 0 5px;
493
+ }
494
+
495
+ .editor-calendar-year-header-right {
496
+ display: flex;
497
+ align-items: center;
498
+ }
499
+
500
+ .editor-calendar-year-header-right-prev {
501
+ padding: 0 5px;
502
+ }
503
+
504
+ .editor-calendar-year-header-right-next {
505
+ padding: 0 5px;
506
+ }
507
+
508
+ .editor-calendar-year-body {
509
+ display: flex;
510
+ flex-direction: column;
511
+ }
512
+
513
+ .editor-calendar-year-body-year {
514
+ display: flex;
515
+ flex-wrap: wrap;
516
+ }
517
+
518
+ .editor-calendar-year-body-year-item {
519
+ width: 52px;
520
+ height: 36px;
521
+ line-height: 36px;
522
+ text-align: center;
523
+ }
524
+
525
+ .editor-contextmenu {
526
+ z-index: 1000;
527
+ position: absolute;
528
+ background: white;
529
+ box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
530
+ }
531
+
532
+ .editor-overlays-menus {
533
+ font-size: 14px;
534
+ font-family: "宋体", serif;
535
+ margin: 0;
536
+ cursor: pointer;
537
+ padding: 0;
538
+ list-style: none;
539
+ user-select: none;
540
+ }
541
+
542
+ .editor-overlays-menus {
543
+ padding: 3px;
544
+ }
545
+
546
+ .editor-overlays-menus > li {
547
+ padding: 8px 12px;
548
+ display: flex;
549
+ gap: 6px;
550
+ align-items: center;
551
+ word-break: keep-all;
552
+ border-bottom: 1px solid #ccc; /* 在每个列表项的底部添加一条边框线 */
553
+ position: relative;
554
+ }
555
+ .editor-overlays-menus > li >ul{
556
+ display: none;
557
+ position: absolute;
558
+ left: calc(100% + 5px);
559
+ top: 0;
560
+ z-index: 1;
561
+ background: #fff;
562
+ box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
563
+ }
564
+ .editor-overlays-menus .sub:after{
565
+ content:'▸';
566
+ margin-left: auto;
567
+ }
568
+ .editor-overlays-menus > li:hover >ul{
569
+ display: block;
570
+ }
571
+
572
+ .editor-overlays-menus > li:hover {
573
+ background-color: #ccc;
574
+ }
575
+
576
+ .editor-overlays-menus > li:last-child {
577
+ border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
578
+ }
579
+
580
+ /*.scale-container > *{*/
581
+ /* transform-origin: center top;*/
582
+ /*}*/
583
+ .doc-rule {
584
+ position: absolute;
585
+ font-size: 0;
586
+ background: white;
587
+ box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
588
+ cursor: default;
589
+ left: 0;
590
+ top: 0;
591
+ }
592
+
593
+ .editor-calendar-footer-left {
594
+ display: flex;
595
+ }
596
+
597
+ .editor-calendar-footer-left-time {
598
+ outline: none;
599
+ width: 110px;
600
+ text-align: center;
601
+ padding: 0;
602
+ margin: 0;
603
+ font-size: 14px;
604
+ }
605
+
606
+ .editor-input-cursor {
607
+ position: absolute;
608
+ width: 1.6px;
609
+ padding: 0;
610
+ border: none;
611
+ outline: none;
612
+ background: black;
613
+ pointer-events: none;
614
+ opacity: 0;
615
+ animation: editor-cursor-blink 1s infinite steps(1, start);
616
+ }
617
+
618
+ @keyframes editor-cursor-blink {
619
+ 0% {
620
+ opacity: 1;
621
+ }
622
+ 50% {
623
+ opacity: 0;
624
+ }
625
+ 100% {
626
+ opacity: 1;
627
+ }
628
+ }
629
+
630
+ .doc-triangle {
631
+ position: absolute;
632
+ width: 0;
633
+ height: 0;
634
+ border-left: 5px solid transparent;
635
+ border-right: 5px solid transparent;
636
+ border-bottom: 10px solid red; /* 修改颜色 */
637
+ }
638
+
639
+ .doc-triangle-line {
640
+ position: absolute;
641
+ height: 1px;
642
+ background: red;
643
+ transform-origin: top left
644
+ }
645
+
646
+ .data-list-container {
647
+ min-width: 100px;
648
+ background-color: white;
649
+ z-index: 1000;
650
+ box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
651
+ user-select: none;
652
+ }
653
+ .editor-suggestions-container{
654
+ z-index: 1000;
655
+ position: absolute;
656
+ background: white;
657
+ box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
658
+ max-height: 300px;
659
+ overflow: auto;
660
+ }
661
+
662
+ .editor-suggestions {
663
+ font-size: 14px;
664
+ font-family: "宋体", serif;
665
+ margin: 0;
666
+ cursor: pointer;
667
+ padding: 0;
668
+ list-style: none;
669
+ user-select: none;
670
+ }
671
+
672
+ .editor-suggestions {
673
+ padding: 3px;
674
+ }
675
+
676
+ .editor-suggestions > li {
677
+ padding: 8px 12px;
678
+ display: flex;
679
+ gap: 6px;
680
+ align-items: center;
681
+ word-break: keep-all;
682
+ border-bottom: 1px solid #ccc; /* 在每个列表项的底部添加一条边框线 */
683
+ position: relative;
684
+ }
685
+
686
+ .editor-suggestions > li:hover {
687
+ background-color: #eee;
688
+ }
689
+ .editor-suggestions > li.hovered{
690
+ background-color: #ccc;
691
+ }
692
+ .editor-suggestions > li:last-child {
693
+ border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
694
+ }