@ones-editor/editor 2.1.7 → 2.1.8-beta.1
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/tooltips/index.d.ts +21 -9
- package/@ones-editor/versions/src/constant/index.d.ts +1 -0
- package/@ones-editor/versions/src/history-render/index.d.ts +1 -1
- package/@ones-editor/versions/src/history-tooltip/index.d.ts +10 -0
- package/@ones-editor/versions/src/version-dialog/index.d.ts +1 -0
- package/dist/index.js +340 -172
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ div.editor-root {
|
|
|
37
37
|
--text-color: #303030;
|
|
38
38
|
--primary-color: #0064ff;
|
|
39
39
|
--background-selection: #0064ff1A;
|
|
40
|
-
--background-code: #
|
|
40
|
+
--background-code: #F8F8F8;
|
|
41
41
|
}
|
|
42
42
|
div.editor-root {
|
|
43
43
|
color: #2d2d2e;
|
|
@@ -4915,112 +4915,134 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
4915
4915
|
.editor-root.history .editor-content {
|
|
4916
4916
|
padding: 30px 75px;
|
|
4917
4917
|
}
|
|
4918
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]
|
|
4919
|
-
|
|
4918
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].list-block {
|
|
4919
|
+
position: relative;
|
|
4920
|
+
}
|
|
4921
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].list-block::before {
|
|
4922
|
+
content: "";
|
|
4923
|
+
position: absolute;
|
|
4924
|
+
top: 2px;
|
|
4925
|
+
bottom: 2px;
|
|
4926
|
+
left: 0px;
|
|
4927
|
+
right: 0px;
|
|
4928
|
+
background-color: var(--op-selected-color);
|
|
4929
|
+
border-radius: 0px;
|
|
4930
|
+
pointer-events: none;
|
|
4920
4931
|
}
|
|
4921
|
-
.editor-root.history .history-inserted-block[data-type=editor-block] {
|
|
4932
|
+
.editor-root.history .history-inserted-block[data-type=editor-block]:is(.text-block, [data-style-quoted=true]) {
|
|
4922
4933
|
position: relative;
|
|
4923
4934
|
}
|
|
4924
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]:
|
|
4925
|
-
content:
|
|
4935
|
+
.editor-root.history .history-inserted-block[data-type=editor-block]:is(.text-block, [data-style-quoted=true])::before {
|
|
4936
|
+
content: "";
|
|
4926
4937
|
position: absolute;
|
|
4927
|
-
top:
|
|
4928
|
-
|
|
4929
|
-
left:
|
|
4930
|
-
|
|
4931
|
-
background-color: var(--op-color);
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
color: white;
|
|
4935
|
-
padding: 0 8px;
|
|
4936
|
-
z-index: 10;
|
|
4937
|
-
font-size: 14px;
|
|
4938
|
-
font-weight: normal;
|
|
4939
|
-
white-space: nowrap;
|
|
4940
|
-
border-radius: 3px;
|
|
4938
|
+
top: 0px;
|
|
4939
|
+
bottom: 0px;
|
|
4940
|
+
left: 0px;
|
|
4941
|
+
right: 0px;
|
|
4942
|
+
background-color: var(--op-selected-color);
|
|
4943
|
+
border-radius: 0px;
|
|
4944
|
+
pointer-events: none;
|
|
4941
4945
|
}
|
|
4942
4946
|
.editor-root.history .history-inserted-block[data-type=editor-block].table-block table {
|
|
4943
|
-
|
|
4947
|
+
position: relative;
|
|
4948
|
+
}
|
|
4949
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].table-block table::before {
|
|
4950
|
+
content: "";
|
|
4951
|
+
position: absolute;
|
|
4952
|
+
top: -5px;
|
|
4953
|
+
bottom: -5px;
|
|
4954
|
+
left: -5px;
|
|
4955
|
+
right: -5px;
|
|
4956
|
+
background-color: var(--op-selected-color);
|
|
4957
|
+
border-radius: 3px;
|
|
4958
|
+
pointer-events: none;
|
|
4944
4959
|
}
|
|
4945
4960
|
.editor-root.history .history-inserted-block[data-type=editor-block].table-block table .child {
|
|
4946
4961
|
pointer-events: none;
|
|
4947
4962
|
}
|
|
4948
|
-
.editor-root.history .history-inserted-block[data-type=editor-block].table-block {
|
|
4963
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
|
|
4964
|
+
top: 0;
|
|
4965
|
+
}
|
|
4966
|
+
.editor-root.history .history-inserted-block[data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block) {
|
|
4949
4967
|
position: relative;
|
|
4950
4968
|
}
|
|
4951
|
-
.editor-root.history .history-inserted-block[data-type=editor-block].table-block
|
|
4952
|
-
content:
|
|
4969
|
+
.editor-root.history .history-inserted-block[data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block)::before {
|
|
4970
|
+
content: "";
|
|
4953
4971
|
position: absolute;
|
|
4954
|
-
top: -
|
|
4955
|
-
|
|
4956
|
-
left:
|
|
4957
|
-
|
|
4958
|
-
background-color: var(--op-color);
|
|
4959
|
-
min-width: 20px;
|
|
4960
|
-
opacity: 1;
|
|
4961
|
-
color: white;
|
|
4962
|
-
padding: 0 8px;
|
|
4963
|
-
z-index: 10;
|
|
4964
|
-
font-size: 14px;
|
|
4965
|
-
font-weight: normal;
|
|
4966
|
-
white-space: nowrap;
|
|
4972
|
+
top: -5px;
|
|
4973
|
+
bottom: -5px;
|
|
4974
|
+
left: -5px;
|
|
4975
|
+
right: -5px;
|
|
4976
|
+
background-color: var(--op-selected-color);
|
|
4967
4977
|
border-radius: 3px;
|
|
4978
|
+
pointer-events: none;
|
|
4968
4979
|
}
|
|
4969
|
-
.editor-root.history .history-
|
|
4970
|
-
|
|
4980
|
+
.editor-root.history .history-deleted-block[data-type=editor-block].list-block {
|
|
4981
|
+
position: relative;
|
|
4971
4982
|
}
|
|
4972
|
-
.editor-root.history .history-deleted-block
|
|
4973
|
-
|
|
4983
|
+
.editor-root.history .history-deleted-block[data-type=editor-block].list-block::before {
|
|
4984
|
+
content: "";
|
|
4985
|
+
position: absolute;
|
|
4986
|
+
top: 2px;
|
|
4987
|
+
bottom: 2px;
|
|
4988
|
+
left: 0;
|
|
4989
|
+
right: 0;
|
|
4990
|
+
background-color: var(--op-selected-color);
|
|
4991
|
+
border-radius: 0px;
|
|
4992
|
+
pointer-events: none;
|
|
4974
4993
|
}
|
|
4975
|
-
.editor-root.history .history-deleted-block
|
|
4994
|
+
.editor-root.history .history-deleted-block[data-type=editor-block]:is(.text-block, [data-style-quoted=true]) {
|
|
4976
4995
|
position: relative;
|
|
4977
4996
|
}
|
|
4978
|
-
.editor-root.history .history-deleted-block
|
|
4979
|
-
content: "
|
|
4997
|
+
.editor-root.history .history-deleted-block[data-type=editor-block]:is(.text-block, [data-style-quoted=true])::before {
|
|
4998
|
+
content: "";
|
|
4980
4999
|
position: absolute;
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
align-content: center;
|
|
5000
|
+
top: 0px;
|
|
5001
|
+
bottom: 0px;
|
|
5002
|
+
left: 0px;
|
|
5003
|
+
right: 0px;
|
|
5004
|
+
background-color: var(--op-selected-color);
|
|
5005
|
+
border-radius: 0px;
|
|
4988
5006
|
pointer-events: none;
|
|
4989
|
-
overflow: visible;
|
|
4990
|
-
max-width: 100%;
|
|
4991
|
-
max-height: 100%;
|
|
4992
|
-
/* border: 4px solid var(--op-color); */
|
|
4993
|
-
left: calc(50% - 16px);
|
|
4994
|
-
top: calc(50% - 2px);
|
|
4995
|
-
width: 32px;
|
|
4996
|
-
height: 4px;
|
|
4997
|
-
background-color: var(--op-color);
|
|
4998
|
-
transform: rotate(45deg);
|
|
4999
|
-
opacity: 1;
|
|
5000
5007
|
}
|
|
5001
|
-
.editor-root.history .history-deleted-block
|
|
5002
|
-
|
|
5008
|
+
.editor-root.history .history-deleted-block[data-type=editor-block].table-block table {
|
|
5009
|
+
position: relative;
|
|
5003
5010
|
}
|
|
5004
|
-
.editor-root.history .history-deleted-block {
|
|
5011
|
+
.editor-root.history .history-deleted-block[data-type=editor-block].table-block table::after {
|
|
5012
|
+
content: "";
|
|
5013
|
+
position: absolute;
|
|
5014
|
+
top: -5px;
|
|
5015
|
+
bottom: -5px;
|
|
5016
|
+
left: -5px;
|
|
5017
|
+
right: -5px;
|
|
5018
|
+
background-color: var(--op-selected-color);
|
|
5019
|
+
border-radius: 3px;
|
|
5020
|
+
pointer-events: none;
|
|
5021
|
+
background-repeat: no-repeat;
|
|
5022
|
+
background-position: center;
|
|
5023
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
5024
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5025
|
+
}
|
|
5026
|
+
.editor-root.history .history-deleted-block[data-type=editor-block].table-block table .child {
|
|
5027
|
+
pointer-events: none;
|
|
5028
|
+
}
|
|
5029
|
+
.editor-root.history .history-deleted-block[data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block) {
|
|
5005
5030
|
position: relative;
|
|
5006
5031
|
}
|
|
5007
|
-
.editor-root.history .history-deleted-block:
|
|
5008
|
-
content:
|
|
5032
|
+
.editor-root.history .history-deleted-block[data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block)::after {
|
|
5033
|
+
content: "";
|
|
5009
5034
|
position: absolute;
|
|
5010
|
-
top: -
|
|
5011
|
-
|
|
5012
|
-
left:
|
|
5013
|
-
|
|
5035
|
+
top: -5px;
|
|
5036
|
+
bottom: -5px;
|
|
5037
|
+
left: -5px;
|
|
5038
|
+
right: -5px;
|
|
5014
5039
|
background-color: var(--op-color);
|
|
5015
|
-
min-width: 20px;
|
|
5016
|
-
opacity: 1;
|
|
5017
|
-
color: white;
|
|
5018
|
-
padding: 0 8px;
|
|
5019
|
-
z-index: 10;
|
|
5020
|
-
font-size: 14px;
|
|
5021
|
-
font-weight: normal;
|
|
5022
|
-
white-space: nowrap;
|
|
5023
5040
|
border-radius: 3px;
|
|
5041
|
+
pointer-events: none;
|
|
5042
|
+
background-repeat: no-repeat;
|
|
5043
|
+
background-position: center;
|
|
5044
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
5045
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5024
5046
|
}
|
|
5025
5047
|
.editor-root.history .history-deleted-block.history-deleted-box {
|
|
5026
5048
|
background-color: unset !important;
|
|
@@ -5029,55 +5051,65 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5029
5051
|
.editor-root.history .history-deleted-block.history-deleted-box:hover::after {
|
|
5030
5052
|
opacity: 0;
|
|
5031
5053
|
}
|
|
5032
|
-
.editor-root.history .history-
|
|
5033
|
-
|
|
5054
|
+
.editor-root.history .history-deleted-empty-text-block.list-block {
|
|
5055
|
+
position: relative;
|
|
5056
|
+
}
|
|
5057
|
+
.editor-root.history .history-deleted-empty-text-block.list-block::after {
|
|
5058
|
+
content: "";
|
|
5059
|
+
position: absolute;
|
|
5060
|
+
top: 2px;
|
|
5061
|
+
bottom: 2px;
|
|
5062
|
+
left: 0;
|
|
5063
|
+
right: 0;
|
|
5034
5064
|
background-color: var(--op-selected-color);
|
|
5065
|
+
border-radius: 0px;
|
|
5066
|
+
pointer-events: none;
|
|
5067
|
+
background-repeat: no-repeat;
|
|
5068
|
+
background-position: center;
|
|
5069
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
5070
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5035
5071
|
}
|
|
5036
|
-
.editor-root.history .history-
|
|
5072
|
+
.editor-root.history .history-deleted-empty-text-block:is(.text-block, [data-style-quoted=true]) {
|
|
5037
5073
|
position: relative;
|
|
5038
5074
|
}
|
|
5039
|
-
.editor-root.history .history-
|
|
5040
|
-
content:
|
|
5075
|
+
.editor-root.history .history-deleted-empty-text-block:is(.text-block, [data-style-quoted=true])::after {
|
|
5076
|
+
content: "";
|
|
5041
5077
|
position: absolute;
|
|
5042
|
-
top:
|
|
5043
|
-
|
|
5044
|
-
left:
|
|
5045
|
-
|
|
5046
|
-
background-color: var(--op-color);
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
font-weight: normal;
|
|
5054
|
-
white-space: nowrap;
|
|
5055
|
-
border-radius: 3px;
|
|
5078
|
+
top: 0px;
|
|
5079
|
+
bottom: 0px;
|
|
5080
|
+
left: 0px;
|
|
5081
|
+
right: 0px;
|
|
5082
|
+
background-color: var(--op-selected-color);
|
|
5083
|
+
border-radius: 0px;
|
|
5084
|
+
pointer-events: none;
|
|
5085
|
+
background-repeat: no-repeat;
|
|
5086
|
+
background-position: center;
|
|
5087
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
5088
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5056
5089
|
}
|
|
5057
|
-
.editor-root.history .history-deleted-box {
|
|
5090
|
+
.editor-root.history .history-deleted-block .history-inserted-text, .editor-root.history .history-deleted-block .history-inserted-box, .editor-root.history .history-deleted-block .history-deleted-box, .editor-root.history .history-deleted-block .history-deleted-block, .editor-root.history .history-deleted-block .history-inserted-block, .editor-root.history .history-inserted-block .history-inserted-text, .editor-root.history .history-inserted-block .history-inserted-box, .editor-root.history .history-inserted-block .history-deleted-box, .editor-root.history .history-inserted-block .history-deleted-block, .editor-root.history .history-inserted-block .history-inserted-block {
|
|
5091
|
+
background-color: unset;
|
|
5092
|
+
pointer-events: none;
|
|
5093
|
+
}
|
|
5094
|
+
.editor-root.history .history-deleted-block .history-inserted-text::before, .editor-root.history .history-deleted-block .history-inserted-text::after, .editor-root.history .history-deleted-block .history-inserted-box::before, .editor-root.history .history-deleted-block .history-inserted-box::after, .editor-root.history .history-deleted-block .history-deleted-box::before, .editor-root.history .history-deleted-block .history-deleted-box::after, .editor-root.history .history-deleted-block .history-deleted-block::before, .editor-root.history .history-deleted-block .history-deleted-block::after, .editor-root.history .history-deleted-block .history-inserted-block::before, .editor-root.history .history-deleted-block .history-inserted-block::after, .editor-root.history .history-inserted-block .history-inserted-text::before, .editor-root.history .history-inserted-block .history-inserted-text::after, .editor-root.history .history-inserted-block .history-inserted-box::before, .editor-root.history .history-inserted-block .history-inserted-box::after, .editor-root.history .history-inserted-block .history-deleted-box::before, .editor-root.history .history-inserted-block .history-deleted-box::after, .editor-root.history .history-inserted-block .history-deleted-block::before, .editor-root.history .history-inserted-block .history-deleted-block::after, .editor-root.history .history-inserted-block .history-inserted-block::before, .editor-root.history .history-inserted-block .history-inserted-block::after {
|
|
5095
|
+
display: none;
|
|
5096
|
+
}
|
|
5097
|
+
.editor-root.history .history-inserted-text, .editor-root.history .history-inserted-box {
|
|
5098
|
+
line-height: revert !important;
|
|
5058
5099
|
background-color: var(--op-selected-color);
|
|
5059
|
-
text-decoration: line-through;
|
|
5060
5100
|
}
|
|
5061
5101
|
.editor-root.history .history-deleted-box {
|
|
5062
|
-
|
|
5102
|
+
text-decoration: line-through;
|
|
5063
5103
|
}
|
|
5064
|
-
.editor-root.history .history-deleted-box
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
opacity: 1;
|
|
5074
|
-
color: white;
|
|
5075
|
-
padding: 0 8px;
|
|
5076
|
-
z-index: 10;
|
|
5077
|
-
font-size: 14px;
|
|
5078
|
-
font-weight: normal;
|
|
5079
|
-
white-space: nowrap;
|
|
5080
|
-
border-radius: 3px;
|
|
5104
|
+
.editor-root.history .history-deleted-box[class=history-deleted-box] {
|
|
5105
|
+
color: var(--op-color);
|
|
5106
|
+
}
|
|
5107
|
+
.editor-root.history .history-deleted-box.math-box {
|
|
5108
|
+
text-decoration: none;
|
|
5109
|
+
background-color: var(--op-selected-color);
|
|
5110
|
+
}
|
|
5111
|
+
.editor-root.history .history-deleted-box.file-box {
|
|
5112
|
+
color: var(--primary-color);
|
|
5081
5113
|
}
|
|
5082
5114
|
.editor-root.history [data-box-type=history-deleted-box] > span[data-type=box-content] {
|
|
5083
5115
|
border: none !important;
|
|
@@ -5437,6 +5469,21 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5437
5469
|
}
|
|
5438
5470
|
[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container:hover .editor-checkbox-wrapper:not(.checked) > span.editor-checkbox > span.editor-checkbox-inner {
|
|
5439
5471
|
border-color: #0064ff;
|
|
5472
|
+
}:root div.tippy-box[data-theme=editor-history-tooltip] {
|
|
5473
|
+
background-color: unset;
|
|
5474
|
+
}
|
|
5475
|
+
:root div.tippy-box[data-theme=editor-history-tooltip] > .tippy-content {
|
|
5476
|
+
color: unset;
|
|
5477
|
+
line-height: initial;
|
|
5478
|
+
padding: 0;
|
|
5479
|
+
}
|
|
5480
|
+
:root div.tippy-box[data-theme=editor-history-tooltip] > .tippy-content .editor-history-tooltip-content {
|
|
5481
|
+
line-height: 30px;
|
|
5482
|
+
font-size: 14px;
|
|
5483
|
+
padding: 0 5px;
|
|
5484
|
+
border-radius: 3px;
|
|
5485
|
+
background-color: var(--op-selected-color);
|
|
5486
|
+
color: white;
|
|
5440
5487
|
}.editor-root.readonly .editor-content div[data-type=editor-block].focused div[data-type=block-tools] .block-helper .heading-marker, .editor-root.readonly .editor-content div[data-type=editor-block].highlighted div[data-type=block-tools] .block-helper .heading-marker {
|
|
5441
5488
|
display: flex;
|
|
5442
5489
|
}
|
|
@@ -7871,7 +7918,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7871
7918
|
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
7872
7919
|
};
|
|
7873
7920
|
});
|
|
7874
|
-
var index$
|
|
7921
|
+
var index$h = function() {
|
|
7875
7922
|
if (typeof global$1.ResizeObserver !== "undefined") {
|
|
7876
7923
|
return global$1.ResizeObserver;
|
|
7877
7924
|
}
|
|
@@ -11049,7 +11096,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11049
11096
|
this.editor = editor;
|
|
11050
11097
|
this.rootContainer = rootContainer;
|
|
11051
11098
|
this.editor = editor;
|
|
11052
|
-
this.resizeObserver = new index$
|
|
11099
|
+
this.resizeObserver = new index$h(this.handleResize);
|
|
11053
11100
|
this.bindEvents(rootContainer);
|
|
11054
11101
|
}
|
|
11055
11102
|
bindEvents(rootContainer) {
|
|
@@ -37969,7 +38016,7 @@ ${codeText}
|
|
|
37969
38016
|
const TreeIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.80894 1.37566L9.19382 1.05649V1.05649L8.80894 1.37566ZM7.26945 1.37566L6.88457 1.05649V1.05649L7.26945 1.37566ZM12.7147 6.08541L13.0996 5.76623V5.76623L12.7147 6.08541ZM11.4874 7.72375V7.22375H10.1891L11.152 8.09459L11.4874 7.72375ZM14.159 10.1399L14.4944 9.76908L14.159 10.1399ZM10.0508 11.8816V11.3816H9.55085V11.8816H10.0508ZM10.0508 15V15.5H10.5508V15H10.0508ZM6.02806 15H5.52806V15.5H6.02806V15ZM6.02806 11.8816H6.52806V11.3816H6.02806V11.8816ZM1.91945 10.1399L2.25483 10.5108H2.25483L1.91945 10.1399ZM4.59108 7.72375L4.92646 8.09459L5.88936 7.22375H4.59108V7.72375ZM3.36368 6.0854L3.74855 6.40458L3.36368 6.0854ZM9.19382 1.05649C8.59399 0.333182 7.48441 0.333182 6.88457 1.05649L7.65432 1.69483C7.85427 1.45373 8.22413 1.45373 8.42407 1.69483L9.19382 1.05649ZM13.0996 5.76623L9.19382 1.05649L8.42407 1.69483L12.3298 6.40458L13.0996 5.76623ZM11.945 8.22375C13.215 8.22375 13.9103 6.74387 13.0996 5.76623L12.3298 6.40458C12.6001 6.73046 12.3683 7.22375 11.945 7.22375V8.22375ZM11.4874 8.22375H11.945V7.22375H11.4874V8.22375ZM14.4944 9.76908L11.8227 7.35292L11.152 8.09459L13.8236 10.5108L14.4944 9.76908ZM13.4882 12.3816C14.8612 12.3816 15.5126 10.69 14.4944 9.76908L13.8236 10.5108C14.163 10.8177 13.9459 11.3816 13.4882 11.3816V12.3816ZM10.0508 12.3816H13.4882V11.3816H10.0508V12.3816ZM9.55085 11.8816V15H10.5508V11.8816H9.55085ZM10.0508 14.5H6.02806V15.5H10.0508V14.5ZM6.52806 15V11.8816H5.52806V15H6.52806ZM2.59021 12.3816H6.02806V11.3816H2.59021V12.3816ZM1.58407 9.76909C0.565789 10.69 1.21726 12.3816 2.59021 12.3816V11.3816C2.13256 11.3816 1.9154 10.8177 2.25483 10.5108L1.58407 9.76909ZM4.2557 7.35292L1.58407 9.76909L2.25483 10.5108L4.92646 8.09459L4.2557 7.35292ZM4.13343 8.22375H4.59108V7.22375H4.13343V8.22375ZM2.97881 5.76623C2.16805 6.74387 2.86334 8.22375 4.13343 8.22375V7.22375C3.71007 7.22375 3.4783 6.73046 3.74855 6.40458L2.97881 5.76623ZM6.88457 1.05649L2.97881 5.76623L3.74855 6.40458L7.65432 1.69483L6.88457 1.05649Z" fill="currentColor"/>\n</svg>\n';
|
|
37970
38017
|
const TimeIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 8C1.5 4.41023 4.41023 1.5 8 1.5C11.5898 1.5 14.5 4.41023 14.5 8C14.5 11.5898 11.5898 14.5 8 14.5C4.41023 14.5 1.5 11.5898 1.5 8ZM8 0.5C3.85794 0.5 0.5 3.85794 0.5 8C0.5 12.1421 3.85794 15.5 8 15.5C12.1421 15.5 15.5 12.1421 15.5 8C15.5 3.85794 12.1421 0.5 8 0.5ZM7.5 3V8V8.5H8H12V7.5H8.5V3H7.5Z" fill="currentColor"/>\n</svg>\n';
|
|
37971
38018
|
const SearchIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10.8597 11.4183L14.0962 14.8891M12.5 7.5C12.5 10.5376 10.0376 13 7 13C3.96243 13 1.5 10.5376 1.5 7.5C1.5 4.46243 3.96243 2 7 2C10.0376 2 12.5 4.46243 12.5 7.5Z" stroke="#87888A" stroke-width="2"/>\n</svg>\n';
|
|
37972
|
-
const index$
|
|
38019
|
+
const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
37973
38020
|
__proto__: null,
|
|
37974
38021
|
DownloadIcon: DownloadIcon$1,
|
|
37975
38022
|
AddEmojiIcon,
|
|
@@ -40324,7 +40371,7 @@ ${codeText}
|
|
|
40324
40371
|
var _a;
|
|
40325
40372
|
return (_a = item.subText) != null ? _a : "";
|
|
40326
40373
|
}
|
|
40327
|
-
const index$
|
|
40374
|
+
const index$f = "";
|
|
40328
40375
|
class EmojiSearch {
|
|
40329
40376
|
constructor(parent, options) {
|
|
40330
40377
|
__publicField(this, "input");
|
|
@@ -40673,7 +40720,7 @@ ${codeText}
|
|
|
40673
40720
|
(_a = this.observer) == null ? void 0 : _a.disconnect();
|
|
40674
40721
|
}
|
|
40675
40722
|
}
|
|
40676
|
-
const index$
|
|
40723
|
+
const index$e = "";
|
|
40677
40724
|
class EmojiPalette extends tinyTypedEmitter.TypedEmitter {
|
|
40678
40725
|
constructor() {
|
|
40679
40726
|
super();
|
|
@@ -43718,7 +43765,7 @@ ${codeText}
|
|
|
43718
43765
|
});
|
|
43719
43766
|
this.scrollCore = scrollCore;
|
|
43720
43767
|
this.callback = callback;
|
|
43721
|
-
this.resizeObserver = new index$
|
|
43768
|
+
this.resizeObserver = new index$h(this.handleContentResize);
|
|
43722
43769
|
}
|
|
43723
43770
|
get containers() {
|
|
43724
43771
|
return this.scrollCore.containers;
|
|
@@ -43853,7 +43900,7 @@ ${codeText}
|
|
|
43853
43900
|
calcScrollbarPos(this.scrollCore, scrollContainer);
|
|
43854
43901
|
});
|
|
43855
43902
|
this.scrollCore = scrollCore;
|
|
43856
|
-
this.resizeObserver = new index$
|
|
43903
|
+
this.resizeObserver = new index$h(this.handleScrollWrapResize);
|
|
43857
43904
|
}
|
|
43858
43905
|
get containers() {
|
|
43859
43906
|
return this.scrollCore.containers;
|
|
@@ -43892,7 +43939,7 @@ ${codeText}
|
|
|
43892
43939
|
});
|
|
43893
43940
|
this.scrollCore = scrollCore;
|
|
43894
43941
|
this.callback = callback;
|
|
43895
|
-
this.resizeObserver = new index$
|
|
43942
|
+
this.resizeObserver = new index$h(this.handleResize);
|
|
43896
43943
|
}
|
|
43897
43944
|
bind(scrollContainer) {
|
|
43898
43945
|
var _a, _b;
|
|
@@ -44813,7 +44860,7 @@ ${codeText}
|
|
|
44813
44860
|
function getToolbar(editor) {
|
|
44814
44861
|
return editor.findCustom("toolbar-handler");
|
|
44815
44862
|
}
|
|
44816
|
-
const index$
|
|
44863
|
+
const index$d = "";
|
|
44817
44864
|
class LinkEditor {
|
|
44818
44865
|
constructor() {
|
|
44819
44866
|
__publicField(this, "linkPopup", null);
|
|
@@ -46396,7 +46443,7 @@ ${codeText}
|
|
|
46396
46443
|
return {};
|
|
46397
46444
|
}
|
|
46398
46445
|
}
|
|
46399
|
-
const index$
|
|
46446
|
+
const index$c = "";
|
|
46400
46447
|
const BlockPaddingShortcuts = {
|
|
46401
46448
|
"Tab": handleTab$3,
|
|
46402
46449
|
"Shift+Tab": handleShiftTab$3,
|
|
@@ -55505,12 +55552,13 @@ $$${mathData.mathjaxText}$$
|
|
|
55505
55552
|
}
|
|
55506
55553
|
}
|
|
55507
55554
|
}
|
|
55508
|
-
class OnesEditorTooltip {
|
|
55509
|
-
constructor(editor) {
|
|
55555
|
+
class OnesEditorTooltip extends EventCallbacks {
|
|
55556
|
+
constructor(editor, options) {
|
|
55557
|
+
super();
|
|
55510
55558
|
__publicField(this, "instance");
|
|
55511
55559
|
__publicField(this, "mousedown", false);
|
|
55512
55560
|
__publicField(this, "currentInstance", null);
|
|
55513
|
-
__publicField(this, "
|
|
55561
|
+
__publicField(this, "attributeNames", []);
|
|
55514
55562
|
__publicField(this, "attributeDesc", "");
|
|
55515
55563
|
__publicField(this, "_lastClickButtonId", "");
|
|
55516
55564
|
__publicField(this, "observer", null);
|
|
@@ -55518,9 +55566,9 @@ $$${mathData.mathjaxText}$$
|
|
|
55518
55566
|
__publicField(this, "createContent", (reference) => {
|
|
55519
55567
|
let name = "";
|
|
55520
55568
|
let times = 0;
|
|
55521
|
-
while (times < this.
|
|
55522
|
-
if (reference.hasAttribute(this.
|
|
55523
|
-
name = reference.getAttribute(this.
|
|
55569
|
+
while (times < this.attributeNames.length && !name) {
|
|
55570
|
+
if (reference.hasAttribute(this.attributeNames[times])) {
|
|
55571
|
+
name = reference.getAttribute(this.attributeNames[times]) || "";
|
|
55524
55572
|
}
|
|
55525
55573
|
times++;
|
|
55526
55574
|
}
|
|
@@ -55576,7 +55624,7 @@ $$${mathData.mathjaxText}$$
|
|
|
55576
55624
|
this._lastClickButtonId = "";
|
|
55577
55625
|
return false;
|
|
55578
55626
|
}
|
|
55579
|
-
if (this.
|
|
55627
|
+
if (this.attributeNames.every((attribute) => !reference.hasAttribute(attribute))) {
|
|
55580
55628
|
return false;
|
|
55581
55629
|
}
|
|
55582
55630
|
if (instance.reference) {
|
|
@@ -55608,24 +55656,36 @@ $$${mathData.mathjaxText}$$
|
|
|
55608
55656
|
instance.setContent(newContent || "");
|
|
55609
55657
|
}
|
|
55610
55658
|
}
|
|
55659
|
+
this.callbacks.forEach((c) => {
|
|
55660
|
+
var _a2;
|
|
55661
|
+
return (_a2 = c.onBeforeShow) == null ? void 0 : _a2.call(c, instance);
|
|
55662
|
+
});
|
|
55611
55663
|
return true;
|
|
55612
55664
|
});
|
|
55613
55665
|
this.editor = editor;
|
|
55666
|
+
const { onBeforeTooltipInitialize } = options != null ? options : {};
|
|
55614
55667
|
const clientId = editor.clientId;
|
|
55615
|
-
this.attributeName = [`data-editor-tooltip-${clientId}`, `data-editor-tooltip-${clientId}-dynamic`, "data-editor-tooltip-common"];
|
|
55616
55668
|
this.attributeDesc = `data-editor-tooltip-desc-${clientId}`;
|
|
55617
|
-
|
|
55669
|
+
const defaultProps = {
|
|
55618
55670
|
theme: "editor-tooltip",
|
|
55619
55671
|
maxWidth: 400,
|
|
55620
55672
|
delay: 200,
|
|
55621
|
-
|
|
55673
|
+
hideOnClick: false,
|
|
55674
|
+
attributeNames: [`data-editor-tooltip-${clientId}`, `data-editor-tooltip-${clientId}-dynamic`, "data-editor-tooltip-common"]
|
|
55675
|
+
};
|
|
55676
|
+
const finalProps = onBeforeTooltipInitialize ? onBeforeTooltipInitialize(defaultProps) : defaultProps;
|
|
55677
|
+
const { attributeNames } = finalProps;
|
|
55678
|
+
const target = attributeNames.map((name) => `[${name}]`).join(",");
|
|
55679
|
+
this.instance = tippy$1.delegate(document.body, {
|
|
55680
|
+
...finalProps,
|
|
55681
|
+
target,
|
|
55622
55682
|
content: this.createContent,
|
|
55623
55683
|
onShow: this.handleShow,
|
|
55624
55684
|
onShown: this.handleShown,
|
|
55625
|
-
onHide: this.handleHidden
|
|
55626
|
-
hideOnClick: false
|
|
55685
|
+
onHide: this.handleHidden
|
|
55627
55686
|
});
|
|
55628
55687
|
editor.domEvents.addEventListener(document, "mousedown", this.handleDocumentMouseDown);
|
|
55688
|
+
this.attributeNames = attributeNames;
|
|
55629
55689
|
}
|
|
55630
55690
|
set lastClickButtonId(value) {
|
|
55631
55691
|
this._lastClickButtonId = value;
|
|
@@ -55894,7 +55954,7 @@ $$${mathData.mathjaxText}$$
|
|
|
55894
55954
|
"en-US": enUS$s,
|
|
55895
55955
|
"ja-JP": jaJP$s
|
|
55896
55956
|
});
|
|
55897
|
-
const index$
|
|
55957
|
+
const index$b = "";
|
|
55898
55958
|
function createTextButton(parent, ...args) {
|
|
55899
55959
|
const button2 = createButton$1(...args);
|
|
55900
55960
|
button2.classList.remove("editor-button");
|
|
@@ -56314,7 +56374,7 @@ $$${mathData.mathjaxText}$$
|
|
|
56314
56374
|
assert(logger$1E, this.tableBlock, "no table block");
|
|
56315
56375
|
logger$1E.debug("create table border bar");
|
|
56316
56376
|
updateTableBorderBar(this.editor, this.tableBlock);
|
|
56317
|
-
this.resizeObserver = new index$
|
|
56377
|
+
this.resizeObserver = new index$h(this.handleTableResize);
|
|
56318
56378
|
this.resizeObserver.observe(getBlockTable(this.tableBlock));
|
|
56319
56379
|
const options = editor.getComponentOptions("table");
|
|
56320
56380
|
if (!(options == null ? void 0 : options.hideToolbar)) {
|
|
@@ -61130,7 +61190,7 @@ ${codeText}
|
|
|
61130
61190
|
const handleChildContainerResize = () => {
|
|
61131
61191
|
this.handleEditorResize(parentContainer);
|
|
61132
61192
|
};
|
|
61133
|
-
this.parentContainerResizerObserver = new index$
|
|
61193
|
+
this.parentContainerResizerObserver = new index$h(handleChildContainerResize);
|
|
61134
61194
|
this.parentContainerResizerObserver.observe(parentContainer);
|
|
61135
61195
|
}
|
|
61136
61196
|
const isEmptyImage2 = () => {
|
|
@@ -65065,7 +65125,7 @@ ${codeText}
|
|
|
65065
65125
|
return `<span class="${CLASS_NAME}">${token.formula}</span>`;
|
|
65066
65126
|
}
|
|
65067
65127
|
});
|
|
65068
|
-
var index$
|
|
65128
|
+
var index$a = (options = {}) => {
|
|
65069
65129
|
if (options.lazy && options.env !== "test") {
|
|
65070
65130
|
new IntersectionObserver((entries, self2) => {
|
|
65071
65131
|
for (const entry of entries) {
|
|
@@ -65581,7 +65641,7 @@ ${codeText}
|
|
|
65581
65641
|
const latexOptions = {
|
|
65582
65642
|
render: (formula, displayMode) => ""
|
|
65583
65643
|
};
|
|
65584
|
-
marked.marked.use(index$
|
|
65644
|
+
marked.marked.use(index$a(latexOptions));
|
|
65585
65645
|
marked.marked.use({
|
|
65586
65646
|
mangle: false
|
|
65587
65647
|
});
|
|
@@ -69732,7 +69792,7 @@ ${content}
|
|
|
69732
69792
|
}
|
|
69733
69793
|
}
|
|
69734
69794
|
}
|
|
69735
|
-
const index$
|
|
69795
|
+
const index$9 = "";
|
|
69736
69796
|
getLogger("comment-editor");
|
|
69737
69797
|
const { t: t$5 } = i18n$1;
|
|
69738
69798
|
const EDITOR_READONLY_CLS = "comment-editor-readonly";
|
|
@@ -70255,7 +70315,7 @@ ${content}
|
|
|
70255
70315
|
}
|
|
70256
70316
|
const switchUpIcon = '<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.00218 11.0005L8.00341 4.99923L14.0046 11.0005" stroke="currentColor" fill="transparent" stroke-width="1.5" stroke-linejoin="bevel"/>\n</svg>';
|
|
70257
70317
|
const switchDownIcon = '<svg width="17" height="16" viewBox="0 0 17 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0029 4.99933L8.00172 11.0006L2.00049 4.99933" stroke="currentColor" fill="transparent" stroke-width="1.5" stroke-linejoin="bevel"/>\n</svg>';
|
|
70258
|
-
const index$
|
|
70318
|
+
const index$8 = "";
|
|
70259
70319
|
const REPLY_EDITOR_EDITING_CLS = "reply-editor-editing";
|
|
70260
70320
|
const { t: t$3 } = i18n$1;
|
|
70261
70321
|
class CommentQuickReply {
|
|
@@ -70425,7 +70485,7 @@ ${content}
|
|
|
70425
70485
|
this.childrenList = this.createChildrenList();
|
|
70426
70486
|
this.quickReply = this.createQuickReply();
|
|
70427
70487
|
this.editor.on("readonlyChanged", this.handleReadonlyChanged);
|
|
70428
|
-
this.resizeObserver = new index$
|
|
70488
|
+
this.resizeObserver = new index$h(this.handleResize);
|
|
70429
70489
|
this.resizeObserver.observe(this.root);
|
|
70430
70490
|
this.updateLastCommentItem();
|
|
70431
70491
|
}
|
|
@@ -73008,7 +73068,7 @@ ${content}
|
|
|
73008
73068
|
const AutoLinkShortcuts = {
|
|
73009
73069
|
"Space": autoLink
|
|
73010
73070
|
};
|
|
73011
|
-
const index$
|
|
73071
|
+
const index$7 = "";
|
|
73012
73072
|
const zhCN$c = {
|
|
73013
73073
|
version: {
|
|
73014
73074
|
latest: "\u6700\u65B0\u7248\u672C",
|
|
@@ -73040,7 +73100,7 @@ ${content}
|
|
|
73040
73100
|
},
|
|
73041
73101
|
tooltip: {
|
|
73042
73102
|
help: "1. \u56DE\u6EDA\u7248\u672C\u4E0D\u652F\u6301\u4E0E\u56DE\u6EDA\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\uFF1B\n2. \u82E5\u4E24\u4E2A\u7248\u672C\u4E4B\u95F4\u5B58\u5728\u56DE\u6EDA\u7248\u672C\uFF0C\u5219\u4E0D\u652F\u6301\u5BF9\u6BD4\u3002",
|
|
73043
|
-
user: "\u7248\u672C\
|
|
73103
|
+
user: "\u7248\u672C\u7F16\u8F91\u8005\uFF1A{name}",
|
|
73044
73104
|
auth: "\u6682\u65E0\u9875\u9762\u7F16\u8F91\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"
|
|
73045
73105
|
},
|
|
73046
73106
|
dropdownHeader: "\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C",
|
|
@@ -73153,7 +73213,8 @@ ${content}
|
|
|
73153
73213
|
})(HistoryClass || {});
|
|
73154
73214
|
const OpColor = "--op-color";
|
|
73155
73215
|
const OpSelectedColor = "--op-selected-color";
|
|
73156
|
-
const
|
|
73216
|
+
const HISTORY_TOOLTIP_IDENTIFIER = "data-history-editor-tooltip";
|
|
73217
|
+
const index$6 = "";
|
|
73157
73218
|
class Dialog$1 {
|
|
73158
73219
|
constructor(content) {
|
|
73159
73220
|
__publicField(this, "root");
|
|
@@ -73773,10 +73834,12 @@ ${content}
|
|
|
73773
73834
|
const attributes = ops.length === 1 ? ops[0].attributes : ops[1].attributes;
|
|
73774
73835
|
const insertedRichText = [{
|
|
73775
73836
|
insert: insertedPlainText,
|
|
73776
|
-
attributes
|
|
73837
|
+
attributes: {
|
|
73838
|
+
...attributes,
|
|
73839
|
+
insertedBy: user
|
|
73840
|
+
}
|
|
73777
73841
|
}];
|
|
73778
|
-
const
|
|
73779
|
-
const newText = insertText(text2, offset, newRichText, null);
|
|
73842
|
+
const newText = insertText(text2, offset, insertedRichText, null);
|
|
73780
73843
|
return newText;
|
|
73781
73844
|
}
|
|
73782
73845
|
function applyActionsToText(text2, ops, user) {
|
|
@@ -73967,7 +74030,7 @@ ${content}
|
|
|
73967
74030
|
};
|
|
73968
74031
|
}
|
|
73969
74032
|
getRemoteUsers() {
|
|
73970
|
-
const colors = ["#
|
|
74033
|
+
const colors = ["#B21B5733", "#00879633", "#7241CC33", "#CC4C0833", "#5D8F0033", "#BD2C1C33", "#D17D0033"];
|
|
73971
74034
|
return new RemoteUsers(colors);
|
|
73972
74035
|
}
|
|
73973
74036
|
destroy() {
|
|
@@ -74080,7 +74143,8 @@ ${content}
|
|
|
74080
74143
|
class OnesEditorHistoryRender {
|
|
74081
74144
|
renderBox(editor, path, attributes) {
|
|
74082
74145
|
if (attributes.deletedBy) {
|
|
74083
|
-
const
|
|
74146
|
+
const user = attributes.deletedBy;
|
|
74147
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74084
74148
|
return {
|
|
74085
74149
|
classes: ["history-deleted-box"],
|
|
74086
74150
|
styles: {
|
|
@@ -74089,6 +74153,20 @@ ${content}
|
|
|
74089
74153
|
}
|
|
74090
74154
|
};
|
|
74091
74155
|
}
|
|
74156
|
+
if (attributes.insertedBy) {
|
|
74157
|
+
const user = attributes.insertedBy;
|
|
74158
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74159
|
+
return {
|
|
74160
|
+
classes: ["history-inserted-box"],
|
|
74161
|
+
attributes: {
|
|
74162
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74163
|
+
},
|
|
74164
|
+
styles: {
|
|
74165
|
+
[OpColor]: flag,
|
|
74166
|
+
[OpSelectedColor]: selection
|
|
74167
|
+
}
|
|
74168
|
+
};
|
|
74169
|
+
}
|
|
74092
74170
|
return {};
|
|
74093
74171
|
}
|
|
74094
74172
|
renderText(editor, path, attributes) {
|
|
@@ -74098,8 +74176,7 @@ ${content}
|
|
|
74098
74176
|
return {
|
|
74099
74177
|
classes: ["history-inserted-text"],
|
|
74100
74178
|
attributes: {
|
|
74101
|
-
|
|
74102
|
-
"data-op-description": getOpDescription(user, "insert")
|
|
74179
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74103
74180
|
},
|
|
74104
74181
|
styles: {
|
|
74105
74182
|
[OpColor]: flag,
|
|
@@ -74113,11 +74190,18 @@ ${content}
|
|
|
74113
74190
|
if (blockData.deletedBy) {
|
|
74114
74191
|
const user = blockData.deletedBy;
|
|
74115
74192
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74193
|
+
const blockType = blockData.type;
|
|
74194
|
+
let classes = ["history-deleted-block"];
|
|
74195
|
+
if (isTextKindBlockType(editor, blockType)) {
|
|
74196
|
+
const blockText = blockData.text;
|
|
74197
|
+
if (blockText.length === 0) {
|
|
74198
|
+
classes = ["history-deleted-empty-text-block"];
|
|
74199
|
+
}
|
|
74200
|
+
}
|
|
74116
74201
|
return {
|
|
74117
|
-
classes
|
|
74202
|
+
classes,
|
|
74118
74203
|
attributes: {
|
|
74119
|
-
|
|
74120
|
-
"data-op-description": getOpDescription(user, "delete")
|
|
74204
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
|
|
74121
74205
|
},
|
|
74122
74206
|
styles: {
|
|
74123
74207
|
[OpColor]: flag,
|
|
@@ -74131,8 +74215,8 @@ ${content}
|
|
|
74131
74215
|
return {
|
|
74132
74216
|
classes: ["history-inserted-block"],
|
|
74133
74217
|
attributes: {
|
|
74134
|
-
"
|
|
74135
|
-
|
|
74218
|
+
"data-op-description": getOpDescription(user, "insert"),
|
|
74219
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74136
74220
|
},
|
|
74137
74221
|
styles: {
|
|
74138
74222
|
[OpColor]: flag,
|
|
@@ -74148,8 +74232,7 @@ ${content}
|
|
|
74148
74232
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74149
74233
|
addClass(blockElement, "history-deleted-block");
|
|
74150
74234
|
setAttributes(blockElement, {
|
|
74151
|
-
|
|
74152
|
-
"data-op-description": getOpDescription(user, "delete")
|
|
74235
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
|
|
74153
74236
|
});
|
|
74154
74237
|
setStyles(blockElement, {
|
|
74155
74238
|
[OpColor]: flag,
|
|
@@ -74162,8 +74245,7 @@ ${content}
|
|
|
74162
74245
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74163
74246
|
addClass(blockElement, "history-inserted-block");
|
|
74164
74247
|
setAttributes(blockElement, {
|
|
74165
|
-
|
|
74166
|
-
"data-op-description": getOpDescription(user, "insert")
|
|
74248
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74167
74249
|
});
|
|
74168
74250
|
setStyles(blockElement, {
|
|
74169
74251
|
[OpColor]: flag,
|
|
@@ -74181,7 +74263,7 @@ ${content}
|
|
|
74181
74263
|
const user = data2.user;
|
|
74182
74264
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74183
74265
|
span.setAttribute("history-deleted-by", user.displayName);
|
|
74184
|
-
span.setAttribute(
|
|
74266
|
+
span.setAttribute(HISTORY_TOOLTIP_IDENTIFIER, getOpDescription(user, "delete"));
|
|
74185
74267
|
span.style.setProperty(OpColor, flag);
|
|
74186
74268
|
span.style.setProperty(OpSelectedColor, selection);
|
|
74187
74269
|
}
|
|
@@ -74463,6 +74545,88 @@ ${content}
|
|
|
74463
74545
|
this.dropdown.setCurrentVersion(ver, compareWithVersion);
|
|
74464
74546
|
}
|
|
74465
74547
|
}
|
|
74548
|
+
const index$5 = "";
|
|
74549
|
+
function removeHexColorOpacity(color) {
|
|
74550
|
+
return color.slice(0, -2);
|
|
74551
|
+
}
|
|
74552
|
+
class OnesEditorHistoryTooltip {
|
|
74553
|
+
constructor() {
|
|
74554
|
+
__publicField(this, "createContent", (reference) => {
|
|
74555
|
+
var _a;
|
|
74556
|
+
const style2 = getComputedStyle(reference);
|
|
74557
|
+
const color = style2.getPropertyValue(OpColor);
|
|
74558
|
+
const selectedColor = style2.getPropertyValue(OpSelectedColor);
|
|
74559
|
+
const text2 = (_a = reference.getAttribute(HISTORY_TOOLTIP_IDENTIFIER)) != null ? _a : "";
|
|
74560
|
+
const contentEl = createElement("div", ["editor-history-tooltip-content"], null);
|
|
74561
|
+
contentEl.textContent = text2;
|
|
74562
|
+
contentEl.style.setProperty(OpColor, removeHexColorOpacity(color));
|
|
74563
|
+
contentEl.style.setProperty(OpSelectedColor, removeHexColorOpacity(selectedColor));
|
|
74564
|
+
return contentEl;
|
|
74565
|
+
});
|
|
74566
|
+
__publicField(this, "getPropsFromDifferentBlock", (reference) => {
|
|
74567
|
+
if (isBlock$1(reference)) {
|
|
74568
|
+
const blockElement = reference;
|
|
74569
|
+
const blockType = getBlockType(blockElement);
|
|
74570
|
+
if (blockType === "table") {
|
|
74571
|
+
return {
|
|
74572
|
+
offset: [-4, 6]
|
|
74573
|
+
};
|
|
74574
|
+
}
|
|
74575
|
+
if (blockType === "layout") {
|
|
74576
|
+
return {
|
|
74577
|
+
offset: [-4, 8]
|
|
74578
|
+
};
|
|
74579
|
+
}
|
|
74580
|
+
}
|
|
74581
|
+
return {};
|
|
74582
|
+
});
|
|
74583
|
+
__publicField(this, "onBeforeShow", (instance) => {
|
|
74584
|
+
const reference = instance.reference;
|
|
74585
|
+
if (reference.hasAttribute(HISTORY_TOOLTIP_IDENTIFIER)) {
|
|
74586
|
+
const props = this.getPropsFromDifferentBlock(reference);
|
|
74587
|
+
const getReferenceClientRect2 = () => this.getReferenceClientRect(reference);
|
|
74588
|
+
instance.setProps({
|
|
74589
|
+
...props,
|
|
74590
|
+
getReferenceClientRect: getReferenceClientRect2,
|
|
74591
|
+
content: this.createContent(reference)
|
|
74592
|
+
});
|
|
74593
|
+
}
|
|
74594
|
+
});
|
|
74595
|
+
}
|
|
74596
|
+
static register(editor) {
|
|
74597
|
+
editor.addCustom("editor-tooltip", () => {
|
|
74598
|
+
const editorTooltip = new OnesEditorTooltip(editor, {
|
|
74599
|
+
onBeforeTooltipInitialize(props) {
|
|
74600
|
+
const { attributeNames = [] } = props;
|
|
74601
|
+
return {
|
|
74602
|
+
...props,
|
|
74603
|
+
attributeNames: attributeNames.concat(HISTORY_TOOLTIP_IDENTIFIER),
|
|
74604
|
+
theme: "editor-history-tooltip",
|
|
74605
|
+
arrow: false,
|
|
74606
|
+
delay: 50,
|
|
74607
|
+
placement: "top-start",
|
|
74608
|
+
offset: [0, 2]
|
|
74609
|
+
};
|
|
74610
|
+
}
|
|
74611
|
+
});
|
|
74612
|
+
editorTooltip.registerCallback(new OnesEditorHistoryTooltip());
|
|
74613
|
+
return editorTooltip;
|
|
74614
|
+
});
|
|
74615
|
+
}
|
|
74616
|
+
getReferenceClientRect(reference) {
|
|
74617
|
+
if (isBlock$1(reference)) {
|
|
74618
|
+
const blockElement = reference;
|
|
74619
|
+
const blockType = getBlockType(blockElement);
|
|
74620
|
+
if (blockType === "table") {
|
|
74621
|
+
const table = blockElement.querySelector("table");
|
|
74622
|
+
return table.getBoundingClientRect();
|
|
74623
|
+
}
|
|
74624
|
+
}
|
|
74625
|
+
const referenceClientRects = reference.getClientRects();
|
|
74626
|
+
const [targetClientRect] = Array.from(referenceClientRects);
|
|
74627
|
+
return targetClientRect;
|
|
74628
|
+
}
|
|
74629
|
+
}
|
|
74466
74630
|
const logger$r = getLogger("version-dialog");
|
|
74467
74631
|
class OnesEditorVersionsDialog {
|
|
74468
74632
|
constructor(server, provider) {
|
|
@@ -74473,6 +74637,10 @@ ${content}
|
|
|
74473
74637
|
__publicField(this, "provider");
|
|
74474
74638
|
__publicField(this, "versions", []);
|
|
74475
74639
|
__publicField(this, "components");
|
|
74640
|
+
__publicField(this, "handleBeforeShowTooltip", (instance) => {
|
|
74641
|
+
console.log(instance);
|
|
74642
|
+
return false;
|
|
74643
|
+
});
|
|
74476
74644
|
__publicField(this, "handleRevert", async (ver) => {
|
|
74477
74645
|
var _a, _b, _c;
|
|
74478
74646
|
assert(logger$r, this.versionList, "The versionList did not render");
|
|
@@ -74533,6 +74701,7 @@ ${content}
|
|
|
74533
74701
|
viewer.editorBlockRenders.registerRender(new OnesEditorHistoryRender());
|
|
74534
74702
|
viewer.editorBoxes.registerBoxClass(HistoryDeletedTextBox);
|
|
74535
74703
|
(_c = (_b = this.versionOptions) == null ? void 0 : _b.textRenders) == null ? void 0 : _c.forEach((render) => viewer.editorBlockRenders.registerRender(render));
|
|
74704
|
+
OnesEditorHistoryTooltip.register(viewer);
|
|
74536
74705
|
addClass(viewer.rootElement, HistoryClass.HISTORY);
|
|
74537
74706
|
try {
|
|
74538
74707
|
await playHistoryData(historyDoc, this.versionHelper, historyData);
|
|
@@ -81288,7 +81457,6 @@ ${data2.flowchartText}
|
|
|
81288
81457
|
});
|
|
81289
81458
|
editor.readonly = true;
|
|
81290
81459
|
editor.addCustom("heading-collapse", () => new HeadingBlockCollapseButton(editor));
|
|
81291
|
-
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
81292
81460
|
editor.addListener("clickLink", (editor2, event, link2) => {
|
|
81293
81461
|
var _a2;
|
|
81294
81462
|
if ((_a2 = options == null ? void 0 : options.events) == null ? void 0 : _a2.onClickLink) {
|
|
@@ -83104,7 +83272,7 @@ ${data2.flowchartText}
|
|
|
83104
83272
|
}
|
|
83105
83273
|
}
|
|
83106
83274
|
});
|
|
83107
|
-
editor.version = "2.1.
|
|
83275
|
+
editor.version = "2.1.8-beta.1";
|
|
83108
83276
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
83109
83277
|
window.setReauthFail = (fail) => {
|
|
83110
83278
|
window.isReauthError = fail;
|
|
@@ -83199,7 +83367,7 @@ ${data2.flowchartText}
|
|
|
83199
83367
|
if (!clientType.isMobile) {
|
|
83200
83368
|
OnesEditorToolbar.register(editor);
|
|
83201
83369
|
}
|
|
83202
|
-
editor.version = "2.1.
|
|
83370
|
+
editor.version = "2.1.8-beta.1";
|
|
83203
83371
|
return editor;
|
|
83204
83372
|
}
|
|
83205
83373
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -128988,7 +129156,7 @@ ${data2.flowchartText}
|
|
|
128988
129156
|
exports2.OnesEditorCustomDataWrapper = OnesEditorCustomDataWrapper;
|
|
128989
129157
|
exports2.OnesEditorExclusiveBlock = OnesEditorExclusiveBlock;
|
|
128990
129158
|
exports2.OnesEditorHoveringBlock = OnesEditorHoveringBlock;
|
|
128991
|
-
exports2.OnesEditorIcons = index$
|
|
129159
|
+
exports2.OnesEditorIcons = index$g;
|
|
128992
129160
|
exports2.OnesEditorQuickMenu = OnesEditorQuickMenu;
|
|
128993
129161
|
exports2.OnesEditorToc = OnesEditorToc;
|
|
128994
129162
|
exports2.OnesEditorTocProvider = OnesEditorTocProvider;
|