@harbour-enterprises/superdoc 0.25.0-next.1 → 0.25.0-next.3
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/dist/chunks/{PdfViewer-CvksDDwi.cjs → PdfViewer-DDL0V0l5.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BEbvklge.es.js → PdfViewer-Y13XRanw.es.js} +1 -1
- package/dist/chunks/{index-Bf3lSVG2.cjs → index-Bo5YCvD5.cjs} +5 -7
- package/dist/chunks/{index-B9Ad3j3k.es.js → index-DKNVSdr6.es.js} +5 -7
- package/dist/chunks/{super-editor.es--RpCOiR4.es.js → super-editor.es-CYtLh0Ob.es.js} +28 -15
- package/dist/chunks/{super-editor.es-Bh07I_ue.cjs → super-editor.es-Ct2sXbNV.cjs} +28 -15
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +57 -54
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{editor-CyBtLJFF.js → editor-CoX24lXQ.js} +11 -7
- package/dist/super-editor/chunks/{toolbar-1Ejr8Exl.js → toolbar-BTw9-jfX.js} +3 -3
- package/dist/super-editor/editor.es.js +1 -1
- package/dist/super-editor/style.css +30 -27
- package/dist/super-editor/super-editor/src/components/toolbar/use-toolbar-item.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/trackChangesHelpers/markDeletion.d.ts +1 -1
- package/dist/super-editor/super-editor.es.js +18 -9
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +31 -20
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -438,20 +438,20 @@ span[data-v-53e13009] {
|
|
|
438
438
|
width: 16px;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
.toolbar-item[data-v-
|
|
441
|
+
.toolbar-item[data-v-ea93b080] {
|
|
442
442
|
position: relative;
|
|
443
443
|
z-index: 1;
|
|
444
444
|
min-width: 30px;
|
|
445
445
|
margin: 0 1px;
|
|
446
446
|
}
|
|
447
|
-
.visually-hidden[data-v-
|
|
447
|
+
.visually-hidden[data-v-ea93b080] {
|
|
448
448
|
position: absolute;
|
|
449
449
|
left: -9999px;
|
|
450
450
|
height: 1px;
|
|
451
451
|
width: 1px;
|
|
452
452
|
overflow: hidden;
|
|
453
453
|
}
|
|
454
|
-
.toolbar-button[data-v-
|
|
454
|
+
.toolbar-button[data-v-ea93b080] {
|
|
455
455
|
padding: 5px;
|
|
456
456
|
height: 32px;
|
|
457
457
|
max-height: 32px;
|
|
@@ -467,21 +467,21 @@ span[data-v-53e13009] {
|
|
|
467
467
|
position: relative;
|
|
468
468
|
box-sizing: border-box;
|
|
469
469
|
}
|
|
470
|
-
.toolbar-button[data-v-
|
|
470
|
+
.toolbar-button[data-v-ea93b080]:hover {
|
|
471
471
|
background-color: #dbdbdb;
|
|
472
472
|
}
|
|
473
|
-
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-
|
|
473
|
+
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-ea93b080] {
|
|
474
474
|
color: #fff;
|
|
475
475
|
}
|
|
476
|
-
.toolbar-button:hover.high-contrast[data-v-
|
|
476
|
+
.toolbar-button:hover.high-contrast[data-v-ea93b080] {
|
|
477
477
|
background-color: #000;
|
|
478
478
|
color: #fff;
|
|
479
479
|
}
|
|
480
|
-
.toolbar-button[data-v-
|
|
481
|
-
.active[data-v-
|
|
480
|
+
.toolbar-button[data-v-ea93b080]:active,
|
|
481
|
+
.active[data-v-ea93b080] {
|
|
482
482
|
background-color: #c8d0d8;
|
|
483
483
|
}
|
|
484
|
-
.button-label[data-v-
|
|
484
|
+
.button-label[data-v-ea93b080] {
|
|
485
485
|
overflow: hidden;
|
|
486
486
|
width: 100%;
|
|
487
487
|
text-align: center;
|
|
@@ -491,37 +491,37 @@ span[data-v-53e13009] {
|
|
|
491
491
|
font-size: 15px;
|
|
492
492
|
margin: 5px;
|
|
493
493
|
}
|
|
494
|
-
.toolbar-icon + .dropdown-caret[data-v-
|
|
494
|
+
.toolbar-icon + .dropdown-caret[data-v-ea93b080] {
|
|
495
495
|
margin-left: 4px;
|
|
496
496
|
}
|
|
497
|
-
.left[data-v-
|
|
498
|
-
.right[data-v-
|
|
497
|
+
.left[data-v-ea93b080],
|
|
498
|
+
.right[data-v-ea93b080] {
|
|
499
499
|
width: 50%;
|
|
500
500
|
height: 100%;
|
|
501
501
|
background-color: #dbdbdb;
|
|
502
502
|
border-radius: 60%;
|
|
503
503
|
}
|
|
504
|
-
.has-inline-text-input[data-v-
|
|
504
|
+
.has-inline-text-input[data-v-ea93b080]:hover {
|
|
505
505
|
cursor: text;
|
|
506
506
|
}
|
|
507
|
-
.disabled[data-v-
|
|
507
|
+
.disabled[data-v-ea93b080] {
|
|
508
508
|
cursor: default;
|
|
509
509
|
}
|
|
510
|
-
.disabled[data-v-
|
|
510
|
+
.disabled[data-v-ea93b080]:hover {
|
|
511
511
|
cursor: default;
|
|
512
512
|
background-color: initial;
|
|
513
513
|
}
|
|
514
|
-
.disabled .toolbar-icon[data-v-
|
|
515
|
-
.disabled .caret[data-v-
|
|
516
|
-
.disabled .button-label[data-v-
|
|
514
|
+
.disabled .toolbar-icon[data-v-ea93b080],
|
|
515
|
+
.disabled .caret[data-v-ea93b080],
|
|
516
|
+
.disabled .button-label[data-v-ea93b080] {
|
|
517
517
|
opacity: 0.35;
|
|
518
518
|
}
|
|
519
|
-
.caret[data-v-
|
|
519
|
+
.caret[data-v-ea93b080] {
|
|
520
520
|
font-size: 1em;
|
|
521
521
|
padding-left: 2px;
|
|
522
522
|
padding-right: 2px;
|
|
523
523
|
}
|
|
524
|
-
.button-text-input[data-v-
|
|
524
|
+
.button-text-input[data-v-ea93b080] {
|
|
525
525
|
color: #47484a;
|
|
526
526
|
border-radius: 4px;
|
|
527
527
|
text-align: center;
|
|
@@ -535,13 +535,16 @@ span[data-v-53e13009] {
|
|
|
535
535
|
border: 1px solid #d8dee5;
|
|
536
536
|
box-sizing: border-box;
|
|
537
537
|
}
|
|
538
|
-
.button-text-input.high-contrast[data-v-
|
|
538
|
+
.button-text-input.high-contrast[data-v-ea93b080] {
|
|
539
539
|
background-color: #fff;
|
|
540
540
|
}
|
|
541
|
-
.button-text-input[data-v-
|
|
541
|
+
.button-text-input--font-size[data-v-ea93b080] {
|
|
542
|
+
width: 36px;
|
|
543
|
+
}
|
|
544
|
+
.button-text-input[data-v-ea93b080]::placeholder {
|
|
542
545
|
color: #47484a;
|
|
543
546
|
}
|
|
544
|
-
.dropdown-caret[data-v-
|
|
547
|
+
.dropdown-caret[data-v-ea93b080] {
|
|
545
548
|
display: inline-flex;
|
|
546
549
|
align-items: center;
|
|
547
550
|
justify-content: center;
|
|
@@ -551,16 +554,16 @@ span[data-v-53e13009] {
|
|
|
551
554
|
height: 10px;
|
|
552
555
|
}
|
|
553
556
|
@media (max-width: 1280px) {
|
|
554
|
-
.toolbar-item--doc-mode .button-label[data-v-
|
|
557
|
+
.toolbar-item--doc-mode .button-label[data-v-ea93b080] {
|
|
555
558
|
display: none;
|
|
556
559
|
}
|
|
557
|
-
.toolbar-item--doc-mode .toolbar-icon[data-v-
|
|
560
|
+
.toolbar-item--doc-mode .toolbar-icon[data-v-ea93b080] {
|
|
558
561
|
margin-right: 5px;
|
|
559
562
|
}
|
|
560
|
-
.toolbar-item--linked-styles[data-v-
|
|
563
|
+
.toolbar-item--linked-styles[data-v-ea93b080] {
|
|
561
564
|
width: auto !important;
|
|
562
565
|
}
|
|
563
|
-
.toolbar-item--linked-styles .button-label[data-v-
|
|
566
|
+
.toolbar-item--linked-styles .button-label[data-v-ea93b080] {
|
|
564
567
|
display: none;
|
|
565
568
|
}
|
|
566
569
|
}
|
|
@@ -2471,46 +2474,46 @@ img[data-v-7dd69850] {
|
|
|
2471
2474
|
box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.05);
|
|
2472
2475
|
}
|
|
2473
2476
|
|
|
2474
|
-
.superdoc[data-v-
|
|
2477
|
+
.superdoc[data-v-715d68b1] {
|
|
2475
2478
|
display: flex;
|
|
2476
2479
|
}
|
|
2477
|
-
.right-sidebar[data-v-
|
|
2480
|
+
.right-sidebar[data-v-715d68b1] {
|
|
2478
2481
|
min-width: 320px;
|
|
2479
2482
|
}
|
|
2480
|
-
.floating-comments[data-v-
|
|
2483
|
+
.floating-comments[data-v-715d68b1] {
|
|
2481
2484
|
min-width: 300px;
|
|
2482
2485
|
width: 300px;
|
|
2483
2486
|
}
|
|
2484
|
-
.superdoc__layers[data-v-
|
|
2487
|
+
.superdoc__layers[data-v-715d68b1] {
|
|
2485
2488
|
height: 100%;
|
|
2486
2489
|
position: relative;
|
|
2487
2490
|
box-sizing: border-box;
|
|
2488
2491
|
}
|
|
2489
|
-
.superdoc__document[data-v-
|
|
2492
|
+
.superdoc__document[data-v-715d68b1] {
|
|
2490
2493
|
width: 100%;
|
|
2491
2494
|
position: relative;
|
|
2492
2495
|
}
|
|
2493
|
-
.superdoc__sub-document[data-v-
|
|
2496
|
+
.superdoc__sub-document[data-v-715d68b1] {
|
|
2494
2497
|
width: 100%;
|
|
2495
2498
|
position: relative;
|
|
2496
2499
|
}
|
|
2497
|
-
.superdoc__selection-layer[data-v-
|
|
2500
|
+
.superdoc__selection-layer[data-v-715d68b1] {
|
|
2498
2501
|
position: absolute;
|
|
2499
2502
|
min-width: 100%;
|
|
2500
2503
|
min-height: 100%;
|
|
2501
2504
|
z-index: 10;
|
|
2502
2505
|
pointer-events: none;
|
|
2503
2506
|
}
|
|
2504
|
-
.superdoc__temp-selection[data-v-
|
|
2507
|
+
.superdoc__temp-selection[data-v-715d68b1] {
|
|
2505
2508
|
position: absolute;
|
|
2506
2509
|
}
|
|
2507
|
-
.superdoc__comments-layer[data-v-
|
|
2510
|
+
.superdoc__comments-layer[data-v-715d68b1] {
|
|
2508
2511
|
/* position: absolute; */
|
|
2509
2512
|
top: 0;
|
|
2510
2513
|
height: 100%;
|
|
2511
2514
|
position: relative;
|
|
2512
2515
|
}
|
|
2513
|
-
.superdoc__right-sidebar[data-v-
|
|
2516
|
+
.superdoc__right-sidebar[data-v-715d68b1] {
|
|
2514
2517
|
width: 320px;
|
|
2515
2518
|
min-width: 320px;
|
|
2516
2519
|
padding: 0 10px;
|
|
@@ -2520,14 +2523,14 @@ img[data-v-7dd69850] {
|
|
|
2520
2523
|
}
|
|
2521
2524
|
|
|
2522
2525
|
/* Tools styles */
|
|
2523
|
-
.tools[data-v-
|
|
2526
|
+
.tools[data-v-715d68b1] {
|
|
2524
2527
|
position: absolute;
|
|
2525
2528
|
z-index: 3;
|
|
2526
2529
|
display: flex;
|
|
2527
2530
|
flex-direction: column;
|
|
2528
2531
|
gap: 6px;
|
|
2529
2532
|
}
|
|
2530
|
-
.tools .tool-icon[data-v-
|
|
2533
|
+
.tools .tool-icon[data-v-715d68b1] {
|
|
2531
2534
|
font-size: 20px;
|
|
2532
2535
|
border-radius: 12px;
|
|
2533
2536
|
border: none;
|
|
@@ -2535,7 +2538,7 @@ img[data-v-7dd69850] {
|
|
|
2535
2538
|
background-color: #dbdbdb;
|
|
2536
2539
|
cursor: pointer;
|
|
2537
2540
|
}
|
|
2538
|
-
.tools-item[data-v-
|
|
2541
|
+
.tools-item[data-v-715d68b1] {
|
|
2539
2542
|
display: flex;
|
|
2540
2543
|
align-items: center;
|
|
2541
2544
|
justify-content: center;
|
|
@@ -2545,10 +2548,10 @@ img[data-v-7dd69850] {
|
|
|
2545
2548
|
border-radius: 12px;
|
|
2546
2549
|
cursor: pointer;
|
|
2547
2550
|
}
|
|
2548
|
-
.tools-item i[data-v-
|
|
2551
|
+
.tools-item i[data-v-715d68b1] {
|
|
2549
2552
|
cursor: pointer;
|
|
2550
2553
|
}
|
|
2551
|
-
.superdoc__tools-icon[data-v-
|
|
2554
|
+
.superdoc__tools-icon[data-v-715d68b1] {
|
|
2552
2555
|
width: 20px;
|
|
2553
2556
|
height: 20px;
|
|
2554
2557
|
flex-shrink: 0;
|
|
@@ -2563,15 +2566,15 @@ img[data-v-7dd69850] {
|
|
|
2563
2566
|
|
|
2564
2567
|
/* 834px is iPad screen size in portrait orientation */
|
|
2565
2568
|
@media (max-width: 834px) {
|
|
2566
|
-
.superdoc .superdoc__layers[data-v-
|
|
2569
|
+
.superdoc .superdoc__layers[data-v-715d68b1] {
|
|
2567
2570
|
margin: 0;
|
|
2568
2571
|
border: 0 !important;
|
|
2569
2572
|
box-shadow: none;
|
|
2570
2573
|
}
|
|
2571
|
-
.superdoc__sub-document[data-v-
|
|
2574
|
+
.superdoc__sub-document[data-v-715d68b1] {
|
|
2572
2575
|
max-width: 100%;
|
|
2573
2576
|
}
|
|
2574
|
-
.superdoc__right-sidebar[data-v-
|
|
2577
|
+
.superdoc__right-sidebar[data-v-715d68b1] {
|
|
2575
2578
|
padding: 10px;
|
|
2576
2579
|
width: 55px;
|
|
2577
2580
|
position: relative;
|
|
@@ -2579,7 +2582,7 @@ img[data-v-7dd69850] {
|
|
|
2579
2582
|
}
|
|
2580
2583
|
|
|
2581
2584
|
/* AI Writer styles */
|
|
2582
|
-
.ai-writer-container[data-v-
|
|
2585
|
+
.ai-writer-container[data-v-715d68b1] {
|
|
2583
2586
|
position: fixed;
|
|
2584
2587
|
z-index: 1000;
|
|
2585
2588
|
background: white;
|
|
@@ -2597,13 +2600,13 @@ img[data-v-7dd69850] {
|
|
|
2597
2600
|
} */
|
|
2598
2601
|
|
|
2599
2602
|
/* Tools styles */
|
|
2600
|
-
.tools[data-v-
|
|
2603
|
+
.tools[data-v-715d68b1] {
|
|
2601
2604
|
position: absolute;
|
|
2602
2605
|
z-index: 3;
|
|
2603
2606
|
display: flex;
|
|
2604
2607
|
gap: 6px;
|
|
2605
2608
|
}
|
|
2606
|
-
.tools .tool-icon[data-v-
|
|
2609
|
+
.tools .tool-icon[data-v-715d68b1] {
|
|
2607
2610
|
font-size: 20px;
|
|
2608
2611
|
border-radius: 12px;
|
|
2609
2612
|
border: none;
|
|
@@ -2611,7 +2614,7 @@ img[data-v-7dd69850] {
|
|
|
2611
2614
|
background-color: #dbdbdb;
|
|
2612
2615
|
cursor: pointer;
|
|
2613
2616
|
}
|
|
2614
|
-
.tools-item[data-v-
|
|
2617
|
+
.tools-item[data-v-715d68b1] {
|
|
2615
2618
|
display: flex;
|
|
2616
2619
|
align-items: center;
|
|
2617
2620
|
justify-content: center;
|
|
@@ -2622,18 +2625,18 @@ img[data-v-7dd69850] {
|
|
|
2622
2625
|
border-radius: 12px;
|
|
2623
2626
|
cursor: pointer;
|
|
2624
2627
|
}
|
|
2625
|
-
.tools-item i[data-v-
|
|
2628
|
+
.tools-item i[data-v-715d68b1] {
|
|
2626
2629
|
cursor: pointer;
|
|
2627
2630
|
}
|
|
2628
|
-
.superdoc__tools-icon[data-v-
|
|
2631
|
+
.superdoc__tools-icon[data-v-715d68b1] {
|
|
2629
2632
|
width: 20px;
|
|
2630
2633
|
height: 20px;
|
|
2631
2634
|
flex-shrink: 0;
|
|
2632
2635
|
}
|
|
2633
|
-
.ai-tool > svg[data-v-
|
|
2636
|
+
.ai-tool > svg[data-v-715d68b1] {
|
|
2634
2637
|
fill: transparent;
|
|
2635
2638
|
}
|
|
2636
|
-
.ai-tool[data-v-
|
|
2639
|
+
.ai-tool[data-v-715d68b1]::before {
|
|
2637
2640
|
content: '';
|
|
2638
2641
|
position: absolute;
|
|
2639
2642
|
width: 20px;
|
|
@@ -2654,7 +2657,7 @@ img[data-v-7dd69850] {
|
|
|
2654
2657
|
filter: brightness(1.2);
|
|
2655
2658
|
transition: filter 0.2s ease;
|
|
2656
2659
|
}
|
|
2657
|
-
.ai-tool[data-v-
|
|
2660
|
+
.ai-tool[data-v-715d68b1]:hover::before {
|
|
2658
2661
|
filter: brightness(1.3);
|
|
2659
2662
|
}
|
|
2660
2663
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
2
|
import { T as TextSelection } from "./chunks/converter-gSy6s2VK.js";
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-CoX24lXQ.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -11034,7 +11034,7 @@ const markInsertion = ({ tr, from: from2, to, user, date }) => {
|
|
|
11034
11034
|
});
|
|
11035
11035
|
return insertionMark;
|
|
11036
11036
|
};
|
|
11037
|
-
const markDeletion = ({ tr, from: from2, to, user, date }) => {
|
|
11037
|
+
const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
|
|
11038
11038
|
let trackedMark = findTrackedMarkBetween({
|
|
11039
11039
|
tr,
|
|
11040
11040
|
from: from2,
|
|
@@ -11043,7 +11043,9 @@ const markDeletion = ({ tr, from: from2, to, user, date }) => {
|
|
|
11043
11043
|
attrs: { authorEmail: user.email }
|
|
11044
11044
|
});
|
|
11045
11045
|
let id;
|
|
11046
|
-
if (
|
|
11046
|
+
if (providedId) {
|
|
11047
|
+
id = providedId;
|
|
11048
|
+
} else if (trackedMark) {
|
|
11047
11049
|
id = trackedMark.mark.attrs.id;
|
|
11048
11050
|
} else {
|
|
11049
11051
|
id = v4();
|
|
@@ -12315,7 +12317,8 @@ const replaceStep = ({ state, tr, step, newTr, map: map2, user, date, originalSt
|
|
|
12315
12317
|
from: step.from,
|
|
12316
12318
|
to: step.to,
|
|
12317
12319
|
user,
|
|
12318
|
-
date
|
|
12320
|
+
date,
|
|
12321
|
+
id: meta.insertedMark?.attrs?.id
|
|
12319
12322
|
});
|
|
12320
12323
|
meta.deletionNodes = deletionNodes;
|
|
12321
12324
|
meta.deletionMark = deletionMark2;
|
|
@@ -15287,6 +15290,7 @@ init_fn = function() {
|
|
|
15287
15290
|
this.on("paginationUpdate", this.options.onPaginationUpdate);
|
|
15288
15291
|
this.on("comment-positions", this.options.onCommentLocationsUpdate);
|
|
15289
15292
|
this.on("list-definitions-change", this.options.onListDefinitionsChange);
|
|
15293
|
+
this.on("fonts-resolved", this.options.onFontsResolved);
|
|
15290
15294
|
this.on("exception", this.options.onException);
|
|
15291
15295
|
if (!this.options.isHeadless) {
|
|
15292
15296
|
this.initializeCollaborationData();
|
|
@@ -15490,7 +15494,7 @@ checkFonts_fn = async function() {
|
|
|
15490
15494
|
if (!("queryLocalFonts" in window)) {
|
|
15491
15495
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15492
15496
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15493
|
-
this.
|
|
15497
|
+
this.emit("fonts-resolved", {
|
|
15494
15498
|
documentFonts: fontsUsedInDocument,
|
|
15495
15499
|
unsupportedFonts
|
|
15496
15500
|
});
|
|
@@ -15500,7 +15504,7 @@ checkFonts_fn = async function() {
|
|
|
15500
15504
|
if (localFontAccess.state === "denied") {
|
|
15501
15505
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15502
15506
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15503
|
-
this.
|
|
15507
|
+
this.emit("fonts-resolved", {
|
|
15504
15508
|
documentFonts: fontsUsedInDocument,
|
|
15505
15509
|
unsupportedFonts
|
|
15506
15510
|
});
|
|
@@ -15510,14 +15514,14 @@ checkFonts_fn = async function() {
|
|
|
15510
15514
|
const localFonts = await window.queryLocalFonts();
|
|
15511
15515
|
const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
|
|
15512
15516
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
|
|
15513
|
-
this.
|
|
15517
|
+
this.emit("fonts-resolved", {
|
|
15514
15518
|
documentFonts: fontsUsedInDocument,
|
|
15515
15519
|
unsupportedFonts
|
|
15516
15520
|
});
|
|
15517
15521
|
} catch {
|
|
15518
15522
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15519
15523
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15520
|
-
this.
|
|
15524
|
+
this.emit("fonts-resolved", {
|
|
15521
15525
|
documentFonts: fontsUsedInDocument,
|
|
15522
15526
|
unsupportedFonts
|
|
15523
15527
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
2
|
import { p as process$1 } from "./converter-gSy6s2VK.js";
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CoX24lXQ.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -326,7 +326,7 @@ const _sfc_main$4 = {
|
|
|
326
326
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
327
327
|
onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
328
328
|
type: "text",
|
|
329
|
-
class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode) }]),
|
|
329
|
+
class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode) }]),
|
|
330
330
|
id: "inlineTextInput-" + unref(name),
|
|
331
331
|
autocomplete: "off",
|
|
332
332
|
ref_key: "inlineInput",
|
|
@@ -360,7 +360,7 @@ const _sfc_main$4 = {
|
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
363
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ea93b080"]]);
|
|
364
364
|
const _hoisted_1$2 = {
|
|
365
365
|
class: "toolbar-separator",
|
|
366
366
|
role: "separator",
|
|
@@ -64,20 +64,20 @@
|
|
|
64
64
|
width: 16px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.toolbar-item[data-v-
|
|
67
|
+
.toolbar-item[data-v-ea93b080] {
|
|
68
68
|
position: relative;
|
|
69
69
|
z-index: 1;
|
|
70
70
|
min-width: 30px;
|
|
71
71
|
margin: 0 1px;
|
|
72
72
|
}
|
|
73
|
-
.visually-hidden[data-v-
|
|
73
|
+
.visually-hidden[data-v-ea93b080] {
|
|
74
74
|
position: absolute;
|
|
75
75
|
left: -9999px;
|
|
76
76
|
height: 1px;
|
|
77
77
|
width: 1px;
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
}
|
|
80
|
-
.toolbar-button[data-v-
|
|
80
|
+
.toolbar-button[data-v-ea93b080] {
|
|
81
81
|
padding: 5px;
|
|
82
82
|
height: 32px;
|
|
83
83
|
max-height: 32px;
|
|
@@ -93,21 +93,21 @@
|
|
|
93
93
|
position: relative;
|
|
94
94
|
box-sizing: border-box;
|
|
95
95
|
}
|
|
96
|
-
.toolbar-button[data-v-
|
|
96
|
+
.toolbar-button[data-v-ea93b080]:hover {
|
|
97
97
|
background-color: #dbdbdb;
|
|
98
98
|
}
|
|
99
|
-
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-
|
|
99
|
+
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-ea93b080] {
|
|
100
100
|
color: #fff;
|
|
101
101
|
}
|
|
102
|
-
.toolbar-button:hover.high-contrast[data-v-
|
|
102
|
+
.toolbar-button:hover.high-contrast[data-v-ea93b080] {
|
|
103
103
|
background-color: #000;
|
|
104
104
|
color: #fff;
|
|
105
105
|
}
|
|
106
|
-
.toolbar-button[data-v-
|
|
107
|
-
.active[data-v-
|
|
106
|
+
.toolbar-button[data-v-ea93b080]:active,
|
|
107
|
+
.active[data-v-ea93b080] {
|
|
108
108
|
background-color: #c8d0d8;
|
|
109
109
|
}
|
|
110
|
-
.button-label[data-v-
|
|
110
|
+
.button-label[data-v-ea93b080] {
|
|
111
111
|
overflow: hidden;
|
|
112
112
|
width: 100%;
|
|
113
113
|
text-align: center;
|
|
@@ -117,37 +117,37 @@
|
|
|
117
117
|
font-size: 15px;
|
|
118
118
|
margin: 5px;
|
|
119
119
|
}
|
|
120
|
-
.toolbar-icon + .dropdown-caret[data-v-
|
|
120
|
+
.toolbar-icon + .dropdown-caret[data-v-ea93b080] {
|
|
121
121
|
margin-left: 4px;
|
|
122
122
|
}
|
|
123
|
-
.left[data-v-
|
|
124
|
-
.right[data-v-
|
|
123
|
+
.left[data-v-ea93b080],
|
|
124
|
+
.right[data-v-ea93b080] {
|
|
125
125
|
width: 50%;
|
|
126
126
|
height: 100%;
|
|
127
127
|
background-color: #dbdbdb;
|
|
128
128
|
border-radius: 60%;
|
|
129
129
|
}
|
|
130
|
-
.has-inline-text-input[data-v-
|
|
130
|
+
.has-inline-text-input[data-v-ea93b080]:hover {
|
|
131
131
|
cursor: text;
|
|
132
132
|
}
|
|
133
|
-
.disabled[data-v-
|
|
133
|
+
.disabled[data-v-ea93b080] {
|
|
134
134
|
cursor: default;
|
|
135
135
|
}
|
|
136
|
-
.disabled[data-v-
|
|
136
|
+
.disabled[data-v-ea93b080]:hover {
|
|
137
137
|
cursor: default;
|
|
138
138
|
background-color: initial;
|
|
139
139
|
}
|
|
140
|
-
.disabled .toolbar-icon[data-v-
|
|
141
|
-
.disabled .caret[data-v-
|
|
142
|
-
.disabled .button-label[data-v-
|
|
140
|
+
.disabled .toolbar-icon[data-v-ea93b080],
|
|
141
|
+
.disabled .caret[data-v-ea93b080],
|
|
142
|
+
.disabled .button-label[data-v-ea93b080] {
|
|
143
143
|
opacity: 0.35;
|
|
144
144
|
}
|
|
145
|
-
.caret[data-v-
|
|
145
|
+
.caret[data-v-ea93b080] {
|
|
146
146
|
font-size: 1em;
|
|
147
147
|
padding-left: 2px;
|
|
148
148
|
padding-right: 2px;
|
|
149
149
|
}
|
|
150
|
-
.button-text-input[data-v-
|
|
150
|
+
.button-text-input[data-v-ea93b080] {
|
|
151
151
|
color: #47484a;
|
|
152
152
|
border-radius: 4px;
|
|
153
153
|
text-align: center;
|
|
@@ -161,13 +161,16 @@
|
|
|
161
161
|
border: 1px solid #d8dee5;
|
|
162
162
|
box-sizing: border-box;
|
|
163
163
|
}
|
|
164
|
-
.button-text-input.high-contrast[data-v-
|
|
164
|
+
.button-text-input.high-contrast[data-v-ea93b080] {
|
|
165
165
|
background-color: #fff;
|
|
166
166
|
}
|
|
167
|
-
.button-text-input[data-v-
|
|
167
|
+
.button-text-input--font-size[data-v-ea93b080] {
|
|
168
|
+
width: 36px;
|
|
169
|
+
}
|
|
170
|
+
.button-text-input[data-v-ea93b080]::placeholder {
|
|
168
171
|
color: #47484a;
|
|
169
172
|
}
|
|
170
|
-
.dropdown-caret[data-v-
|
|
173
|
+
.dropdown-caret[data-v-ea93b080] {
|
|
171
174
|
display: inline-flex;
|
|
172
175
|
align-items: center;
|
|
173
176
|
justify-content: center;
|
|
@@ -177,16 +180,16 @@
|
|
|
177
180
|
height: 10px;
|
|
178
181
|
}
|
|
179
182
|
@media (max-width: 1280px) {
|
|
180
|
-
.toolbar-item--doc-mode .button-label[data-v-
|
|
183
|
+
.toolbar-item--doc-mode .button-label[data-v-ea93b080] {
|
|
181
184
|
display: none;
|
|
182
185
|
}
|
|
183
|
-
.toolbar-item--doc-mode .toolbar-icon[data-v-
|
|
186
|
+
.toolbar-item--doc-mode .toolbar-icon[data-v-ea93b080] {
|
|
184
187
|
margin-right: 5px;
|
|
185
188
|
}
|
|
186
|
-
.toolbar-item--linked-styles[data-v-
|
|
189
|
+
.toolbar-item--linked-styles[data-v-ea93b080] {
|
|
187
190
|
width: auto !important;
|
|
188
191
|
}
|
|
189
|
-
.toolbar-item--linked-styles .button-label[data-v-
|
|
192
|
+
.toolbar-item--linked-styles .button-label[data-v-ea93b080] {
|
|
190
193
|
display: none;
|
|
191
194
|
}
|
|
192
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function markDeletion({ tr, from, to, user, date }: Transaction): any;
|
|
1
|
+
export function markDeletion({ tr, from, to, user, date, id: providedId }: Transaction): any;
|
|
@@ -11,10 +11,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
12
|
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, a as Plugin } from "./chunks/converter-gSy6s2VK.js";
|
|
13
13
|
import { c1, a5, i, a2 } from "./chunks/converter-gSy6s2VK.js";
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, M as Mark, n as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { q, C, t, T, o, v, p } from "./chunks/editor-
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, M as Mark, n as Extension, A as Attribute, N as Node } from "./chunks/editor-CoX24lXQ.js";
|
|
15
|
+
import { q, C, t, T, o, v, p } from "./chunks/editor-CoX24lXQ.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BTw9-jfX.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
19
|
import { D } from "./chunks/docx-zipper-CceGxV02.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
@@ -236,8 +236,8 @@ const useToolbarItem = (options) => {
|
|
|
236
236
|
if (!Array.isArray(options.options)) throw new Error("Invalid toolbar item options - " + options.options);
|
|
237
237
|
nestedOptions.value?.push(...options.options);
|
|
238
238
|
}
|
|
239
|
-
const activate = (attrs) => {
|
|
240
|
-
onActivate(attrs);
|
|
239
|
+
const activate = (attrs, ...args) => {
|
|
240
|
+
onActivate(attrs, ...args);
|
|
241
241
|
if (suppressActiveHighlight.value) return;
|
|
242
242
|
active.value = true;
|
|
243
243
|
};
|
|
@@ -1538,7 +1538,12 @@ const makeDefaultItems = ({
|
|
|
1538
1538
|
ariaLabel: "Font size"
|
|
1539
1539
|
},
|
|
1540
1540
|
options: fontSizeOptions,
|
|
1541
|
-
onActivate: ({ fontSize: size }) => {
|
|
1541
|
+
onActivate: ({ fontSize: size }, isMultiple = false) => {
|
|
1542
|
+
if (isMultiple) {
|
|
1543
|
+
fontSize.label.value = "";
|
|
1544
|
+
fontSize.selectedValue.value = "";
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1542
1547
|
const defaultSize = fontSizeOptions.find((i2) => i2.label === String(fontSize.defaultLabel.value));
|
|
1543
1548
|
if (!size) {
|
|
1544
1549
|
fontSize.label.value = fontSize.defaultLabel.value;
|
|
@@ -1555,8 +1560,6 @@ const makeDefaultItems = ({
|
|
|
1555
1560
|
});
|
|
1556
1561
|
if (foundSize) {
|
|
1557
1562
|
fontSize.selectedValue.value = foundSize.key;
|
|
1558
|
-
} else if (defaultSize) {
|
|
1559
|
-
fontSize.selectedValue.value = defaultSize.key;
|
|
1560
1563
|
} else {
|
|
1561
1564
|
fontSize.selectedValue.value = "";
|
|
1562
1565
|
}
|
|
@@ -3020,7 +3023,13 @@ class SuperToolbar extends EventEmitter {
|
|
|
3020
3023
|
const markNegated = rawActiveMark ? isNegatedMark(rawActiveMark.name, rawActiveMark.attrs) : false;
|
|
3021
3024
|
const activeMark = markNegated ? null : rawActiveMark;
|
|
3022
3025
|
if (activeMark) {
|
|
3023
|
-
|
|
3026
|
+
if (activeMark.name === "fontSize") {
|
|
3027
|
+
const fontSizes = marks.filter((i2) => i2.name === "fontSize").map((i2) => i2.attrs.fontSize);
|
|
3028
|
+
const isMultiple = [...new Set(fontSizes)].length > 1;
|
|
3029
|
+
item.activate(activeMark.attrs, isMultiple);
|
|
3030
|
+
} else {
|
|
3031
|
+
item.activate(activeMark.attrs);
|
|
3032
|
+
}
|
|
3024
3033
|
} else {
|
|
3025
3034
|
item.deactivate();
|
|
3026
3035
|
}
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Ct2sXbNV.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|