@coco-vexel/coco-office-editor 1.0.9 → 1.0.11
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/index.cjs +107 -53
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +107 -53
- package/dist/{model-DT8Dw2G6.d.cts → model-CgISL5eB.d.cts} +2 -0
- package/dist/{model-DT8Dw2G6.d.ts → model-CgISL5eB.d.ts} +2 -0
- package/dist/{native-C3ZdrIcW.d.ts → native-D9lhNG94.d.ts} +2 -1
- package/dist/{native-wR2uhZvi.d.cts → native-DVRWKaOC.d.cts} +2 -1
- package/dist/word-native.cjs +84 -30
- package/dist/word-native.d.cts +2 -2
- package/dist/word-native.d.ts +2 -2
- package/dist/word-native.js +84 -30
- package/dist/word.cjs +91 -37
- package/dist/word.d.cts +5 -5
- package/dist/word.d.ts +5 -5
- package/dist/word.js +91 -37
- package/package.json +3 -3
- package/src/styles/editor.css +64 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coco-vexel/coco-office-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"THIRD_PARTY_NOTICES.md"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@coco-vexel/coco-office": "^1.0.
|
|
76
|
+
"@coco-vexel/coco-office": "^1.0.11",
|
|
77
77
|
"prosemirror-commands": "^1.7.2",
|
|
78
78
|
"prosemirror-keymap": "^1.2.3",
|
|
79
79
|
"prosemirror-model": "^1.25.12",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"jszip": "^3.10.2",
|
|
87
87
|
"vite": "^8.3.5",
|
|
88
88
|
"vitest": "^5.0.5",
|
|
89
|
-
"@coco-vexel/coco-office-oojson": "^1.0.
|
|
89
|
+
"@coco-vexel/coco-office-oojson": "^1.0.11"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "tsup",
|
package/src/styles/editor.css
CHANGED
|
@@ -668,6 +668,16 @@ coco-word-native-page > coco-word-native-story[data-story-kind="header"] {
|
|
|
668
668
|
top: var(--coco-word-header-distance, 0);
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
+
/* With a nonnegative top margin Word moves the body down if the header outgrows
|
|
672
|
+
its reserved space. Let the same flex layout that pagination measures do this. */
|
|
673
|
+
coco-word-native-page:not([data-fixed-top-margin]) > coco-word-native-story[data-story-kind="header"] {
|
|
674
|
+
position: relative;
|
|
675
|
+
inset: auto;
|
|
676
|
+
flex: none;
|
|
677
|
+
margin-top: calc(var(--coco-word-header-distance) - var(--coco-word-page-margin-top));
|
|
678
|
+
min-height: max(0px, calc(var(--coco-word-page-margin-top) - var(--coco-word-header-distance)));
|
|
679
|
+
}
|
|
680
|
+
|
|
671
681
|
coco-word-native-page > coco-word-native-story[data-story-kind="footer"] {
|
|
672
682
|
bottom: var(--coco-word-footer-distance, 0);
|
|
673
683
|
}
|
|
@@ -729,7 +739,7 @@ coco-word-native-p.has-tab-stops {
|
|
|
729
739
|
display: grid;
|
|
730
740
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
731
741
|
align-items: baseline;
|
|
732
|
-
width: 100
|
|
742
|
+
width: min(100%, var(--coco-word-tab-stop, 100%));
|
|
733
743
|
column-gap: 12pt;
|
|
734
744
|
}
|
|
735
745
|
|
|
@@ -737,7 +747,8 @@ coco-word-native-p.has-tab-stops {
|
|
|
737
747
|
.coco-word-tab-row.has-leader-hyphen,
|
|
738
748
|
.coco-word-tab-row.has-leader-underscore,
|
|
739
749
|
.coco-word-tab-row.has-leader-heavy,
|
|
740
|
-
.coco-word-tab-row.has-leader-middleDot
|
|
750
|
+
.coco-word-tab-row.has-leader-middleDot,
|
|
751
|
+
.coco-word-tab-row.has-underlined-tab {
|
|
741
752
|
column-gap: 4pt;
|
|
742
753
|
line-height: 2;
|
|
743
754
|
}
|
|
@@ -754,7 +765,8 @@ coco-word-native-p.has-tab-stops {
|
|
|
754
765
|
text-align: left;
|
|
755
766
|
}
|
|
756
767
|
|
|
757
|
-
.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0
|
|
768
|
+
.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0,
|
|
769
|
+
.coco-word-tab-row.is-right-tab.has-underlined-tab .coco-word-tab-segment.is-segment-0 {
|
|
758
770
|
display: flex;
|
|
759
771
|
align-items: baseline;
|
|
760
772
|
white-space: nowrap;
|
|
@@ -764,9 +776,9 @@ coco-word-native-p.has-tab-stops {
|
|
|
764
776
|
content: "";
|
|
765
777
|
flex: 1 1 auto;
|
|
766
778
|
min-width: 12pt;
|
|
767
|
-
margin: 0
|
|
779
|
+
margin: 0;
|
|
768
780
|
border-bottom: 1px dotted currentColor;
|
|
769
|
-
transform: translateY(
|
|
781
|
+
transform: translateY(0.08em);
|
|
770
782
|
}
|
|
771
783
|
|
|
772
784
|
.coco-word-tab-row.is-right-tab.has-leader-hyphen .coco-word-tab-segment.is-segment-0::after {
|
|
@@ -782,6 +794,14 @@ coco-word-native-p.has-tab-stops {
|
|
|
782
794
|
border-bottom-width: 2px;
|
|
783
795
|
}
|
|
784
796
|
|
|
797
|
+
.coco-word-tab-row.is-right-tab.has-underlined-tab .coco-word-underlined-tab-run {
|
|
798
|
+
flex: 1 1 auto;
|
|
799
|
+
min-width: 12pt;
|
|
800
|
+
box-sizing: border-box;
|
|
801
|
+
border-bottom: 1px solid currentColor;
|
|
802
|
+
text-decoration-line: none !important;
|
|
803
|
+
}
|
|
804
|
+
|
|
785
805
|
.coco-word-tab-segment.is-segment-1 {
|
|
786
806
|
text-align: center;
|
|
787
807
|
}
|
|
@@ -796,6 +816,12 @@ coco-word-native-p.has-tab-stops {
|
|
|
796
816
|
display: none;
|
|
797
817
|
}
|
|
798
818
|
|
|
819
|
+
/* In a monospace face the ASCII space and '0' both advance by exactly 1ch. */
|
|
820
|
+
.coco-word-songti-spaces {
|
|
821
|
+
font-family: monospace;
|
|
822
|
+
word-spacing: calc(0.5em - 1ch);
|
|
823
|
+
}
|
|
824
|
+
|
|
799
825
|
coco-word-native-p[data-numbering="true"] {
|
|
800
826
|
margin-left: 2.8em;
|
|
801
827
|
padding-right: 0.5em;
|
|
@@ -826,20 +852,37 @@ coco-word-native-table {
|
|
|
826
852
|
margin: 0;
|
|
827
853
|
max-width: 100%;
|
|
828
854
|
overflow: auto;
|
|
829
|
-
scrollbar-gutter: stable;
|
|
830
855
|
--coco-word-doc-grid-line-height: 1em;
|
|
831
856
|
white-space: pre-wrap;
|
|
832
857
|
}
|
|
833
858
|
|
|
834
859
|
coco-word-native-table table {
|
|
835
860
|
box-sizing: border-box;
|
|
836
|
-
|
|
861
|
+
width: 100%;
|
|
837
862
|
max-width: none;
|
|
838
863
|
margin: 0;
|
|
839
864
|
border-collapse: collapse;
|
|
840
865
|
table-layout: fixed;
|
|
841
866
|
}
|
|
842
867
|
|
|
868
|
+
coco-word-native-table table[data-layout="autofit"] {
|
|
869
|
+
table-layout: auto;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
coco-word-native-table table[data-layout="autofit"] > tbody > tr > td {
|
|
873
|
+
min-width: 0;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/* Keep whole words in the intrinsic width used by AutoFit. */
|
|
877
|
+
coco-word-native-table table[data-layout="autofit"] > tbody > tr > td > coco-word-native-p {
|
|
878
|
+
word-break: normal;
|
|
879
|
+
overflow-wrap: break-word;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
coco-word-native-table table[data-layout="autofit"] > tbody > tr > td > coco-word-native-p.is-single-cjk-word {
|
|
883
|
+
word-break: keep-all;
|
|
884
|
+
}
|
|
885
|
+
|
|
843
886
|
coco-word-native-table tbody {
|
|
844
887
|
display: table-row-group;
|
|
845
888
|
}
|
|
@@ -861,9 +904,20 @@ coco-word-native-table td {
|
|
|
861
904
|
vertical-align: top;
|
|
862
905
|
}
|
|
863
906
|
|
|
864
|
-
/*
|
|
865
|
-
|
|
866
|
-
|
|
907
|
+
/* Guides sit inside the cell so they don't affect text wrapping or pagination. */
|
|
908
|
+
@media screen {
|
|
909
|
+
coco-word-native-table td.has-editing-gridlines {
|
|
910
|
+
position: relative;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
coco-word-native-table td.has-editing-gridlines::before {
|
|
914
|
+
content: "";
|
|
915
|
+
position: absolute;
|
|
916
|
+
inset: 0;
|
|
917
|
+
pointer-events: none;
|
|
918
|
+
border: dashed #bfc3c8;
|
|
919
|
+
border-width: var(--coco-word-grid-widths);
|
|
920
|
+
}
|
|
867
921
|
}
|
|
868
922
|
|
|
869
923
|
coco-word-native-table td coco-word-native-p {
|