@ones-editor/editor 2.1.8-beta.1 → 2.1.9
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 +9 -21
- package/@ones-editor/versions/src/constant/index.d.ts +0 -1
- package/@ones-editor/versions/src/history-render/index.d.ts +1 -1
- package/@ones-editor/versions/src/version-dialog/index.d.ts +0 -1
- package/dist/index.js +179 -340
- package/package.json +1 -1
- package/@ones-editor/versions/src/history-tooltip/index.d.ts +0 -10
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: #cdcdcd40;
|
|
41
41
|
}
|
|
42
42
|
div.editor-root {
|
|
43
43
|
color: #2d2d2e;
|
|
@@ -4915,134 +4915,112 @@ 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
|
-
|
|
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;
|
|
4918
|
+
.editor-root.history .history-inserted-block[data-type=editor-block] [data-type=block-content] {
|
|
4919
|
+
border: 4px solid var(--op-selected-color);
|
|
4931
4920
|
}
|
|
4932
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]
|
|
4921
|
+
.editor-root.history .history-inserted-block[data-type=editor-block] {
|
|
4933
4922
|
position: relative;
|
|
4934
4923
|
}
|
|
4935
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]:
|
|
4936
|
-
content:
|
|
4924
|
+
.editor-root.history .history-inserted-block[data-type=editor-block]:hover::after {
|
|
4925
|
+
content: attr(data-op-description);
|
|
4937
4926
|
position: absolute;
|
|
4938
|
-
top:
|
|
4939
|
-
|
|
4940
|
-
left:
|
|
4941
|
-
|
|
4942
|
-
background-color: var(--op-
|
|
4943
|
-
|
|
4944
|
-
|
|
4927
|
+
top: -26px;
|
|
4928
|
+
/* left: var(--op-offset); */
|
|
4929
|
+
left: 0;
|
|
4930
|
+
line-height: 24px;
|
|
4931
|
+
background-color: var(--op-color);
|
|
4932
|
+
min-width: 20px;
|
|
4933
|
+
opacity: 1;
|
|
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;
|
|
4945
4941
|
}
|
|
4946
4942
|
.editor-root.history .history-inserted-block[data-type=editor-block].table-block table {
|
|
4947
|
-
|
|
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;
|
|
4943
|
+
border: 4px solid var(--op-selected-color);
|
|
4959
4944
|
}
|
|
4960
4945
|
.editor-root.history .history-inserted-block[data-type=editor-block].table-block table .child {
|
|
4961
4946
|
pointer-events: none;
|
|
4962
4947
|
}
|
|
4963
|
-
.editor-root.history .history-inserted-block[data-type=editor-block].table-block
|
|
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) {
|
|
4948
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].table-block {
|
|
4967
4949
|
position: relative;
|
|
4968
4950
|
}
|
|
4969
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]
|
|
4970
|
-
content:
|
|
4971
|
-
position: absolute;
|
|
4972
|
-
top: -5px;
|
|
4973
|
-
bottom: -5px;
|
|
4974
|
-
left: -5px;
|
|
4975
|
-
right: -5px;
|
|
4976
|
-
background-color: var(--op-selected-color);
|
|
4977
|
-
border-radius: 3px;
|
|
4978
|
-
pointer-events: none;
|
|
4979
|
-
}
|
|
4980
|
-
.editor-root.history .history-deleted-block[data-type=editor-block].list-block {
|
|
4981
|
-
position: relative;
|
|
4982
|
-
}
|
|
4983
|
-
.editor-root.history .history-deleted-block[data-type=editor-block].list-block::before {
|
|
4984
|
-
content: "";
|
|
4951
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
|
|
4952
|
+
content: attr(data-op-description);
|
|
4985
4953
|
position: absolute;
|
|
4986
|
-
top:
|
|
4987
|
-
|
|
4954
|
+
top: -26px;
|
|
4955
|
+
/* left: var(--op-offset); */
|
|
4988
4956
|
left: 0;
|
|
4989
|
-
|
|
4990
|
-
background-color: var(--op-
|
|
4991
|
-
|
|
4992
|
-
|
|
4957
|
+
line-height: 24px;
|
|
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;
|
|
4967
|
+
border-radius: 3px;
|
|
4993
4968
|
}
|
|
4994
|
-
.editor-root.history .history-
|
|
4995
|
-
|
|
4969
|
+
.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
|
|
4970
|
+
top: 0;
|
|
4996
4971
|
}
|
|
4997
|
-
.editor-root.history .history-deleted-block[data-type=
|
|
4998
|
-
|
|
4999
|
-
position: absolute;
|
|
5000
|
-
top: 0px;
|
|
5001
|
-
bottom: 0px;
|
|
5002
|
-
left: 0px;
|
|
5003
|
-
right: 0px;
|
|
5004
|
-
background-color: var(--op-selected-color);
|
|
5005
|
-
border-radius: 0px;
|
|
5006
|
-
pointer-events: none;
|
|
4972
|
+
.editor-root.history .history-deleted-block [data-type=block-content] {
|
|
4973
|
+
border: 4px solid var(--op-selected-color);
|
|
5007
4974
|
}
|
|
5008
|
-
.editor-root.history .history-deleted-block[data-type=
|
|
4975
|
+
.editor-root.history .history-deleted-block [data-type=block-content] {
|
|
5009
4976
|
position: relative;
|
|
5010
4977
|
}
|
|
5011
|
-
.editor-root.history .history-deleted-block[data-type=
|
|
5012
|
-
content: "";
|
|
4978
|
+
.editor-root.history .history-deleted-block [data-type=block-content]::after, .editor-root.history .history-deleted-block [data-type=block-content]::before {
|
|
4979
|
+
content: " ";
|
|
5013
4980
|
position: absolute;
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
4981
|
+
display: flex;
|
|
4982
|
+
z-index: 2000;
|
|
4983
|
+
color: var(--op-color);
|
|
4984
|
+
justify-items: center;
|
|
4985
|
+
align-items: center;
|
|
4986
|
+
justify-content: center;
|
|
4987
|
+
align-content: center;
|
|
5020
4988
|
pointer-events: none;
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
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;
|
|
5025
5000
|
}
|
|
5026
|
-
.editor-root.history .history-deleted-block[data-type=
|
|
5027
|
-
|
|
5001
|
+
.editor-root.history .history-deleted-block [data-type=block-content]::before {
|
|
5002
|
+
transform: rotate(135deg);
|
|
5028
5003
|
}
|
|
5029
|
-
.editor-root.history .history-deleted-block
|
|
5004
|
+
.editor-root.history .history-deleted-block {
|
|
5030
5005
|
position: relative;
|
|
5031
5006
|
}
|
|
5032
|
-
.editor-root.history .history-deleted-block
|
|
5033
|
-
content:
|
|
5007
|
+
.editor-root.history .history-deleted-block:hover::after {
|
|
5008
|
+
content: attr(data-op-description);
|
|
5034
5009
|
position: absolute;
|
|
5035
|
-
top: -
|
|
5036
|
-
|
|
5037
|
-
left:
|
|
5038
|
-
|
|
5010
|
+
top: -26px;
|
|
5011
|
+
/* left: var(--op-offset); */
|
|
5012
|
+
left: 0;
|
|
5013
|
+
line-height: 24px;
|
|
5039
5014
|
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;
|
|
5040
5023
|
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=);
|
|
5046
5024
|
}
|
|
5047
5025
|
.editor-root.history .history-deleted-block.history-deleted-box {
|
|
5048
5026
|
background-color: unset !important;
|
|
@@ -5051,65 +5029,55 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5051
5029
|
.editor-root.history .history-deleted-block.history-deleted-box:hover::after {
|
|
5052
5030
|
opacity: 0;
|
|
5053
5031
|
}
|
|
5054
|
-
.editor-root.history .history-
|
|
5055
|
-
|
|
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;
|
|
5032
|
+
.editor-root.history .history-inserted-text {
|
|
5033
|
+
line-height: revert !important;
|
|
5064
5034
|
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=);
|
|
5071
5035
|
}
|
|
5072
|
-
.editor-root.history .history-
|
|
5036
|
+
.editor-root.history .history-inserted-text {
|
|
5073
5037
|
position: relative;
|
|
5074
5038
|
}
|
|
5075
|
-
.editor-root.history .history-
|
|
5076
|
-
content:
|
|
5039
|
+
.editor-root.history .history-inserted-text:hover::after {
|
|
5040
|
+
content: attr(data-op-description);
|
|
5077
5041
|
position: absolute;
|
|
5078
|
-
top:
|
|
5079
|
-
|
|
5080
|
-
left:
|
|
5081
|
-
|
|
5082
|
-
background-color: var(--op-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
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;
|
|
5099
|
-
background-color: var(--op-selected-color);
|
|
5042
|
+
top: -26px;
|
|
5043
|
+
/* left: var(--op-offset); */
|
|
5044
|
+
left: 0;
|
|
5045
|
+
line-height: 24px;
|
|
5046
|
+
background-color: var(--op-color);
|
|
5047
|
+
min-width: 20px;
|
|
5048
|
+
opacity: 1;
|
|
5049
|
+
color: white;
|
|
5050
|
+
padding: 0 8px;
|
|
5051
|
+
z-index: 10;
|
|
5052
|
+
font-size: 14px;
|
|
5053
|
+
font-weight: normal;
|
|
5054
|
+
white-space: nowrap;
|
|
5055
|
+
border-radius: 3px;
|
|
5100
5056
|
}
|
|
5101
5057
|
.editor-root.history .history-deleted-box {
|
|
5058
|
+
background-color: var(--op-selected-color);
|
|
5102
5059
|
text-decoration: line-through;
|
|
5103
5060
|
}
|
|
5104
|
-
.editor-root.history .history-deleted-box
|
|
5105
|
-
|
|
5106
|
-
}
|
|
5107
|
-
.editor-root.history .history-deleted-box.math-box {
|
|
5108
|
-
text-decoration: none;
|
|
5109
|
-
background-color: var(--op-selected-color);
|
|
5061
|
+
.editor-root.history .history-deleted-box {
|
|
5062
|
+
position: relative;
|
|
5110
5063
|
}
|
|
5111
|
-
.editor-root.history .history-deleted-box
|
|
5112
|
-
|
|
5064
|
+
.editor-root.history .history-deleted-box:hover::after {
|
|
5065
|
+
content: attr(data-op-description);
|
|
5066
|
+
position: absolute;
|
|
5067
|
+
top: -26px;
|
|
5068
|
+
/* left: var(--op-offset); */
|
|
5069
|
+
left: 0;
|
|
5070
|
+
line-height: 24px;
|
|
5071
|
+
background-color: var(--op-color);
|
|
5072
|
+
min-width: 20px;
|
|
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;
|
|
5113
5081
|
}
|
|
5114
5082
|
.editor-root.history [data-box-type=history-deleted-box] > span[data-type=box-content] {
|
|
5115
5083
|
border: none !important;
|
|
@@ -5469,21 +5437,6 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5469
5437
|
}
|
|
5470
5438
|
[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 {
|
|
5471
5439
|
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;
|
|
5487
5440
|
}.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 {
|
|
5488
5441
|
display: flex;
|
|
5489
5442
|
}
|
|
@@ -7918,7 +7871,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7918
7871
|
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
7919
7872
|
};
|
|
7920
7873
|
});
|
|
7921
|
-
var index$
|
|
7874
|
+
var index$g = function() {
|
|
7922
7875
|
if (typeof global$1.ResizeObserver !== "undefined") {
|
|
7923
7876
|
return global$1.ResizeObserver;
|
|
7924
7877
|
}
|
|
@@ -11096,7 +11049,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11096
11049
|
this.editor = editor;
|
|
11097
11050
|
this.rootContainer = rootContainer;
|
|
11098
11051
|
this.editor = editor;
|
|
11099
|
-
this.resizeObserver = new index$
|
|
11052
|
+
this.resizeObserver = new index$g(this.handleResize);
|
|
11100
11053
|
this.bindEvents(rootContainer);
|
|
11101
11054
|
}
|
|
11102
11055
|
bindEvents(rootContainer) {
|
|
@@ -38016,7 +37969,7 @@ ${codeText}
|
|
|
38016
37969
|
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';
|
|
38017
37970
|
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';
|
|
38018
37971
|
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';
|
|
38019
|
-
const index$
|
|
37972
|
+
const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
38020
37973
|
__proto__: null,
|
|
38021
37974
|
DownloadIcon: DownloadIcon$1,
|
|
38022
37975
|
AddEmojiIcon,
|
|
@@ -40179,6 +40132,13 @@ ${codeText}
|
|
|
40179
40132
|
this.menu.close();
|
|
40180
40133
|
return true;
|
|
40181
40134
|
}
|
|
40135
|
+
if (isEnterOnly(event)) {
|
|
40136
|
+
const item = this.menu.menu.getSelectedItem();
|
|
40137
|
+
if (!item) {
|
|
40138
|
+
this.menu.close();
|
|
40139
|
+
return true;
|
|
40140
|
+
}
|
|
40141
|
+
}
|
|
40182
40142
|
return this.menu.handleKeydown(event);
|
|
40183
40143
|
}
|
|
40184
40144
|
popup(block, offset, leftText, trigger) {
|
|
@@ -40371,7 +40331,7 @@ ${codeText}
|
|
|
40371
40331
|
var _a;
|
|
40372
40332
|
return (_a = item.subText) != null ? _a : "";
|
|
40373
40333
|
}
|
|
40374
|
-
const index$
|
|
40334
|
+
const index$e = "";
|
|
40375
40335
|
class EmojiSearch {
|
|
40376
40336
|
constructor(parent, options) {
|
|
40377
40337
|
__publicField(this, "input");
|
|
@@ -40720,7 +40680,7 @@ ${codeText}
|
|
|
40720
40680
|
(_a = this.observer) == null ? void 0 : _a.disconnect();
|
|
40721
40681
|
}
|
|
40722
40682
|
}
|
|
40723
|
-
const index$
|
|
40683
|
+
const index$d = "";
|
|
40724
40684
|
class EmojiPalette extends tinyTypedEmitter.TypedEmitter {
|
|
40725
40685
|
constructor() {
|
|
40726
40686
|
super();
|
|
@@ -43765,7 +43725,7 @@ ${codeText}
|
|
|
43765
43725
|
});
|
|
43766
43726
|
this.scrollCore = scrollCore;
|
|
43767
43727
|
this.callback = callback;
|
|
43768
|
-
this.resizeObserver = new index$
|
|
43728
|
+
this.resizeObserver = new index$g(this.handleContentResize);
|
|
43769
43729
|
}
|
|
43770
43730
|
get containers() {
|
|
43771
43731
|
return this.scrollCore.containers;
|
|
@@ -43900,7 +43860,7 @@ ${codeText}
|
|
|
43900
43860
|
calcScrollbarPos(this.scrollCore, scrollContainer);
|
|
43901
43861
|
});
|
|
43902
43862
|
this.scrollCore = scrollCore;
|
|
43903
|
-
this.resizeObserver = new index$
|
|
43863
|
+
this.resizeObserver = new index$g(this.handleScrollWrapResize);
|
|
43904
43864
|
}
|
|
43905
43865
|
get containers() {
|
|
43906
43866
|
return this.scrollCore.containers;
|
|
@@ -43939,7 +43899,7 @@ ${codeText}
|
|
|
43939
43899
|
});
|
|
43940
43900
|
this.scrollCore = scrollCore;
|
|
43941
43901
|
this.callback = callback;
|
|
43942
|
-
this.resizeObserver = new index$
|
|
43902
|
+
this.resizeObserver = new index$g(this.handleResize);
|
|
43943
43903
|
}
|
|
43944
43904
|
bind(scrollContainer) {
|
|
43945
43905
|
var _a, _b;
|
|
@@ -44860,7 +44820,7 @@ ${codeText}
|
|
|
44860
44820
|
function getToolbar(editor) {
|
|
44861
44821
|
return editor.findCustom("toolbar-handler");
|
|
44862
44822
|
}
|
|
44863
|
-
const index$
|
|
44823
|
+
const index$c = "";
|
|
44864
44824
|
class LinkEditor {
|
|
44865
44825
|
constructor() {
|
|
44866
44826
|
__publicField(this, "linkPopup", null);
|
|
@@ -46443,7 +46403,7 @@ ${codeText}
|
|
|
46443
46403
|
return {};
|
|
46444
46404
|
}
|
|
46445
46405
|
}
|
|
46446
|
-
const index$
|
|
46406
|
+
const index$b = "";
|
|
46447
46407
|
const BlockPaddingShortcuts = {
|
|
46448
46408
|
"Tab": handleTab$3,
|
|
46449
46409
|
"Shift+Tab": handleShiftTab$3,
|
|
@@ -55552,13 +55512,12 @@ $$${mathData.mathjaxText}$$
|
|
|
55552
55512
|
}
|
|
55553
55513
|
}
|
|
55554
55514
|
}
|
|
55555
|
-
class OnesEditorTooltip
|
|
55556
|
-
constructor(editor
|
|
55557
|
-
super();
|
|
55515
|
+
class OnesEditorTooltip {
|
|
55516
|
+
constructor(editor) {
|
|
55558
55517
|
__publicField(this, "instance");
|
|
55559
55518
|
__publicField(this, "mousedown", false);
|
|
55560
55519
|
__publicField(this, "currentInstance", null);
|
|
55561
|
-
__publicField(this, "
|
|
55520
|
+
__publicField(this, "attributeName", []);
|
|
55562
55521
|
__publicField(this, "attributeDesc", "");
|
|
55563
55522
|
__publicField(this, "_lastClickButtonId", "");
|
|
55564
55523
|
__publicField(this, "observer", null);
|
|
@@ -55566,9 +55525,9 @@ $$${mathData.mathjaxText}$$
|
|
|
55566
55525
|
__publicField(this, "createContent", (reference) => {
|
|
55567
55526
|
let name = "";
|
|
55568
55527
|
let times = 0;
|
|
55569
|
-
while (times < this.
|
|
55570
|
-
if (reference.hasAttribute(this.
|
|
55571
|
-
name = reference.getAttribute(this.
|
|
55528
|
+
while (times < this.attributeName.length && !name) {
|
|
55529
|
+
if (reference.hasAttribute(this.attributeName[times])) {
|
|
55530
|
+
name = reference.getAttribute(this.attributeName[times]) || "";
|
|
55572
55531
|
}
|
|
55573
55532
|
times++;
|
|
55574
55533
|
}
|
|
@@ -55624,7 +55583,7 @@ $$${mathData.mathjaxText}$$
|
|
|
55624
55583
|
this._lastClickButtonId = "";
|
|
55625
55584
|
return false;
|
|
55626
55585
|
}
|
|
55627
|
-
if (this.
|
|
55586
|
+
if (this.attributeName.every((attribute) => !reference.hasAttribute(attribute))) {
|
|
55628
55587
|
return false;
|
|
55629
55588
|
}
|
|
55630
55589
|
if (instance.reference) {
|
|
@@ -55656,36 +55615,24 @@ $$${mathData.mathjaxText}$$
|
|
|
55656
55615
|
instance.setContent(newContent || "");
|
|
55657
55616
|
}
|
|
55658
55617
|
}
|
|
55659
|
-
this.callbacks.forEach((c) => {
|
|
55660
|
-
var _a2;
|
|
55661
|
-
return (_a2 = c.onBeforeShow) == null ? void 0 : _a2.call(c, instance);
|
|
55662
|
-
});
|
|
55663
55618
|
return true;
|
|
55664
55619
|
});
|
|
55665
55620
|
this.editor = editor;
|
|
55666
|
-
const { onBeforeTooltipInitialize } = options != null ? options : {};
|
|
55667
55621
|
const clientId = editor.clientId;
|
|
55622
|
+
this.attributeName = [`data-editor-tooltip-${clientId}`, `data-editor-tooltip-${clientId}-dynamic`, "data-editor-tooltip-common"];
|
|
55668
55623
|
this.attributeDesc = `data-editor-tooltip-desc-${clientId}`;
|
|
55669
|
-
|
|
55624
|
+
this.instance = tippy$1.delegate(document.body, {
|
|
55670
55625
|
theme: "editor-tooltip",
|
|
55671
55626
|
maxWidth: 400,
|
|
55672
55627
|
delay: 200,
|
|
55673
|
-
|
|
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,
|
|
55628
|
+
target: this.attributeName.map((attribute) => `[${attribute}]`).join(","),
|
|
55682
55629
|
content: this.createContent,
|
|
55683
55630
|
onShow: this.handleShow,
|
|
55684
55631
|
onShown: this.handleShown,
|
|
55685
|
-
onHide: this.handleHidden
|
|
55632
|
+
onHide: this.handleHidden,
|
|
55633
|
+
hideOnClick: false
|
|
55686
55634
|
});
|
|
55687
55635
|
editor.domEvents.addEventListener(document, "mousedown", this.handleDocumentMouseDown);
|
|
55688
|
-
this.attributeNames = attributeNames;
|
|
55689
55636
|
}
|
|
55690
55637
|
set lastClickButtonId(value) {
|
|
55691
55638
|
this._lastClickButtonId = value;
|
|
@@ -55954,7 +55901,7 @@ $$${mathData.mathjaxText}$$
|
|
|
55954
55901
|
"en-US": enUS$s,
|
|
55955
55902
|
"ja-JP": jaJP$s
|
|
55956
55903
|
});
|
|
55957
|
-
const index$
|
|
55904
|
+
const index$a = "";
|
|
55958
55905
|
function createTextButton(parent, ...args) {
|
|
55959
55906
|
const button2 = createButton$1(...args);
|
|
55960
55907
|
button2.classList.remove("editor-button");
|
|
@@ -56374,7 +56321,7 @@ $$${mathData.mathjaxText}$$
|
|
|
56374
56321
|
assert(logger$1E, this.tableBlock, "no table block");
|
|
56375
56322
|
logger$1E.debug("create table border bar");
|
|
56376
56323
|
updateTableBorderBar(this.editor, this.tableBlock);
|
|
56377
|
-
this.resizeObserver = new index$
|
|
56324
|
+
this.resizeObserver = new index$g(this.handleTableResize);
|
|
56378
56325
|
this.resizeObserver.observe(getBlockTable(this.tableBlock));
|
|
56379
56326
|
const options = editor.getComponentOptions("table");
|
|
56380
56327
|
if (!(options == null ? void 0 : options.hideToolbar)) {
|
|
@@ -61190,7 +61137,7 @@ ${codeText}
|
|
|
61190
61137
|
const handleChildContainerResize = () => {
|
|
61191
61138
|
this.handleEditorResize(parentContainer);
|
|
61192
61139
|
};
|
|
61193
|
-
this.parentContainerResizerObserver = new index$
|
|
61140
|
+
this.parentContainerResizerObserver = new index$g(handleChildContainerResize);
|
|
61194
61141
|
this.parentContainerResizerObserver.observe(parentContainer);
|
|
61195
61142
|
}
|
|
61196
61143
|
const isEmptyImage2 = () => {
|
|
@@ -65125,7 +65072,7 @@ ${codeText}
|
|
|
65125
65072
|
return `<span class="${CLASS_NAME}">${token.formula}</span>`;
|
|
65126
65073
|
}
|
|
65127
65074
|
});
|
|
65128
|
-
var index$
|
|
65075
|
+
var index$9 = (options = {}) => {
|
|
65129
65076
|
if (options.lazy && options.env !== "test") {
|
|
65130
65077
|
new IntersectionObserver((entries, self2) => {
|
|
65131
65078
|
for (const entry of entries) {
|
|
@@ -65641,7 +65588,7 @@ ${codeText}
|
|
|
65641
65588
|
const latexOptions = {
|
|
65642
65589
|
render: (formula, displayMode) => ""
|
|
65643
65590
|
};
|
|
65644
|
-
marked.marked.use(index$
|
|
65591
|
+
marked.marked.use(index$9(latexOptions));
|
|
65645
65592
|
marked.marked.use({
|
|
65646
65593
|
mangle: false
|
|
65647
65594
|
});
|
|
@@ -69792,7 +69739,7 @@ ${content}
|
|
|
69792
69739
|
}
|
|
69793
69740
|
}
|
|
69794
69741
|
}
|
|
69795
|
-
const index$
|
|
69742
|
+
const index$8 = "";
|
|
69796
69743
|
getLogger("comment-editor");
|
|
69797
69744
|
const { t: t$5 } = i18n$1;
|
|
69798
69745
|
const EDITOR_READONLY_CLS = "comment-editor-readonly";
|
|
@@ -70315,7 +70262,7 @@ ${content}
|
|
|
70315
70262
|
}
|
|
70316
70263
|
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>';
|
|
70317
70264
|
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>';
|
|
70318
|
-
const index$
|
|
70265
|
+
const index$7 = "";
|
|
70319
70266
|
const REPLY_EDITOR_EDITING_CLS = "reply-editor-editing";
|
|
70320
70267
|
const { t: t$3 } = i18n$1;
|
|
70321
70268
|
class CommentQuickReply {
|
|
@@ -70485,7 +70432,7 @@ ${content}
|
|
|
70485
70432
|
this.childrenList = this.createChildrenList();
|
|
70486
70433
|
this.quickReply = this.createQuickReply();
|
|
70487
70434
|
this.editor.on("readonlyChanged", this.handleReadonlyChanged);
|
|
70488
|
-
this.resizeObserver = new index$
|
|
70435
|
+
this.resizeObserver = new index$g(this.handleResize);
|
|
70489
70436
|
this.resizeObserver.observe(this.root);
|
|
70490
70437
|
this.updateLastCommentItem();
|
|
70491
70438
|
}
|
|
@@ -73068,7 +73015,7 @@ ${content}
|
|
|
73068
73015
|
const AutoLinkShortcuts = {
|
|
73069
73016
|
"Space": autoLink
|
|
73070
73017
|
};
|
|
73071
|
-
const index$
|
|
73018
|
+
const index$6 = "";
|
|
73072
73019
|
const zhCN$c = {
|
|
73073
73020
|
version: {
|
|
73074
73021
|
latest: "\u6700\u65B0\u7248\u672C",
|
|
@@ -73100,7 +73047,7 @@ ${content}
|
|
|
73100
73047
|
},
|
|
73101
73048
|
tooltip: {
|
|
73102
73049
|
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",
|
|
73103
|
-
user: "\u7248\u672C\
|
|
73050
|
+
user: "\u7248\u672C\u53D1\u5E03\u8005\uFF1A{name}",
|
|
73104
73051
|
auth: "\u6682\u65E0\u9875\u9762\u7F16\u8F91\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"
|
|
73105
73052
|
},
|
|
73106
73053
|
dropdownHeader: "\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C",
|
|
@@ -73213,8 +73160,7 @@ ${content}
|
|
|
73213
73160
|
})(HistoryClass || {});
|
|
73214
73161
|
const OpColor = "--op-color";
|
|
73215
73162
|
const OpSelectedColor = "--op-selected-color";
|
|
73216
|
-
const
|
|
73217
|
-
const index$6 = "";
|
|
73163
|
+
const index$5 = "";
|
|
73218
73164
|
class Dialog$1 {
|
|
73219
73165
|
constructor(content) {
|
|
73220
73166
|
__publicField(this, "root");
|
|
@@ -73834,12 +73780,10 @@ ${content}
|
|
|
73834
73780
|
const attributes = ops.length === 1 ? ops[0].attributes : ops[1].attributes;
|
|
73835
73781
|
const insertedRichText = [{
|
|
73836
73782
|
insert: insertedPlainText,
|
|
73837
|
-
attributes
|
|
73838
|
-
...attributes,
|
|
73839
|
-
insertedBy: user
|
|
73840
|
-
}
|
|
73783
|
+
attributes
|
|
73841
73784
|
}];
|
|
73842
|
-
const
|
|
73785
|
+
const newRichText = addAttribute(insertedRichText, "insertedBy", user);
|
|
73786
|
+
const newText = insertText(text2, offset, newRichText, null);
|
|
73843
73787
|
return newText;
|
|
73844
73788
|
}
|
|
73845
73789
|
function applyActionsToText(text2, ops, user) {
|
|
@@ -74030,7 +73974,7 @@ ${content}
|
|
|
74030
73974
|
};
|
|
74031
73975
|
}
|
|
74032
73976
|
getRemoteUsers() {
|
|
74033
|
-
const colors = ["#
|
|
73977
|
+
const colors = ["#0064FF4D", "#00A8654D", "#F593004D", "#EB37234D", "#8851ED4D", "#009CAD4D", "#F25A0A4D", "#70A3104D"];
|
|
74034
73978
|
return new RemoteUsers(colors);
|
|
74035
73979
|
}
|
|
74036
73980
|
destroy() {
|
|
@@ -74143,8 +74087,7 @@ ${content}
|
|
|
74143
74087
|
class OnesEditorHistoryRender {
|
|
74144
74088
|
renderBox(editor, path, attributes) {
|
|
74145
74089
|
if (attributes.deletedBy) {
|
|
74146
|
-
const
|
|
74147
|
-
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74090
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), attributes.deletedBy);
|
|
74148
74091
|
return {
|
|
74149
74092
|
classes: ["history-deleted-box"],
|
|
74150
74093
|
styles: {
|
|
@@ -74153,20 +74096,6 @@ ${content}
|
|
|
74153
74096
|
}
|
|
74154
74097
|
};
|
|
74155
74098
|
}
|
|
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
|
-
}
|
|
74170
74099
|
return {};
|
|
74171
74100
|
}
|
|
74172
74101
|
renderText(editor, path, attributes) {
|
|
@@ -74176,7 +74105,8 @@ ${content}
|
|
|
74176
74105
|
return {
|
|
74177
74106
|
classes: ["history-inserted-text"],
|
|
74178
74107
|
attributes: {
|
|
74179
|
-
|
|
74108
|
+
"history-inserted-by": user.displayName,
|
|
74109
|
+
"data-op-description": getOpDescription(user, "insert")
|
|
74180
74110
|
},
|
|
74181
74111
|
styles: {
|
|
74182
74112
|
[OpColor]: flag,
|
|
@@ -74190,18 +74120,11 @@ ${content}
|
|
|
74190
74120
|
if (blockData.deletedBy) {
|
|
74191
74121
|
const user = blockData.deletedBy;
|
|
74192
74122
|
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
|
-
}
|
|
74201
74123
|
return {
|
|
74202
|
-
classes,
|
|
74124
|
+
classes: ["history-deleted-block"],
|
|
74203
74125
|
attributes: {
|
|
74204
|
-
|
|
74126
|
+
"history-deleted-by": user.displayName,
|
|
74127
|
+
"data-op-description": getOpDescription(user, "delete")
|
|
74205
74128
|
},
|
|
74206
74129
|
styles: {
|
|
74207
74130
|
[OpColor]: flag,
|
|
@@ -74215,8 +74138,8 @@ ${content}
|
|
|
74215
74138
|
return {
|
|
74216
74139
|
classes: ["history-inserted-block"],
|
|
74217
74140
|
attributes: {
|
|
74218
|
-
"
|
|
74219
|
-
|
|
74141
|
+
"history-inserted-by": user.displayName,
|
|
74142
|
+
"data-op-description": getOpDescription(user, "insert")
|
|
74220
74143
|
},
|
|
74221
74144
|
styles: {
|
|
74222
74145
|
[OpColor]: flag,
|
|
@@ -74232,7 +74155,8 @@ ${content}
|
|
|
74232
74155
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74233
74156
|
addClass(blockElement, "history-deleted-block");
|
|
74234
74157
|
setAttributes(blockElement, {
|
|
74235
|
-
|
|
74158
|
+
"history-inserted-by": user.displayName,
|
|
74159
|
+
"data-op-description": getOpDescription(user, "delete")
|
|
74236
74160
|
});
|
|
74237
74161
|
setStyles(blockElement, {
|
|
74238
74162
|
[OpColor]: flag,
|
|
@@ -74245,7 +74169,8 @@ ${content}
|
|
|
74245
74169
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74246
74170
|
addClass(blockElement, "history-inserted-block");
|
|
74247
74171
|
setAttributes(blockElement, {
|
|
74248
|
-
|
|
74172
|
+
"history-inserted-by": user.displayName,
|
|
74173
|
+
"data-op-description": getOpDescription(user, "insert")
|
|
74249
74174
|
});
|
|
74250
74175
|
setStyles(blockElement, {
|
|
74251
74176
|
[OpColor]: flag,
|
|
@@ -74263,7 +74188,7 @@ ${content}
|
|
|
74263
74188
|
const user = data2.user;
|
|
74264
74189
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74265
74190
|
span.setAttribute("history-deleted-by", user.displayName);
|
|
74266
|
-
span.setAttribute(
|
|
74191
|
+
span.setAttribute("data-op-description", getOpDescription(user, "delete"));
|
|
74267
74192
|
span.style.setProperty(OpColor, flag);
|
|
74268
74193
|
span.style.setProperty(OpSelectedColor, selection);
|
|
74269
74194
|
}
|
|
@@ -74545,88 +74470,6 @@ ${content}
|
|
|
74545
74470
|
this.dropdown.setCurrentVersion(ver, compareWithVersion);
|
|
74546
74471
|
}
|
|
74547
74472
|
}
|
|
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
|
-
}
|
|
74630
74473
|
const logger$r = getLogger("version-dialog");
|
|
74631
74474
|
class OnesEditorVersionsDialog {
|
|
74632
74475
|
constructor(server, provider) {
|
|
@@ -74637,10 +74480,6 @@ ${content}
|
|
|
74637
74480
|
__publicField(this, "provider");
|
|
74638
74481
|
__publicField(this, "versions", []);
|
|
74639
74482
|
__publicField(this, "components");
|
|
74640
|
-
__publicField(this, "handleBeforeShowTooltip", (instance) => {
|
|
74641
|
-
console.log(instance);
|
|
74642
|
-
return false;
|
|
74643
|
-
});
|
|
74644
74483
|
__publicField(this, "handleRevert", async (ver) => {
|
|
74645
74484
|
var _a, _b, _c;
|
|
74646
74485
|
assert(logger$r, this.versionList, "The versionList did not render");
|
|
@@ -74701,7 +74540,6 @@ ${content}
|
|
|
74701
74540
|
viewer.editorBlockRenders.registerRender(new OnesEditorHistoryRender());
|
|
74702
74541
|
viewer.editorBoxes.registerBoxClass(HistoryDeletedTextBox);
|
|
74703
74542
|
(_c = (_b = this.versionOptions) == null ? void 0 : _b.textRenders) == null ? void 0 : _c.forEach((render) => viewer.editorBlockRenders.registerRender(render));
|
|
74704
|
-
OnesEditorHistoryTooltip.register(viewer);
|
|
74705
74543
|
addClass(viewer.rootElement, HistoryClass.HISTORY);
|
|
74706
74544
|
try {
|
|
74707
74545
|
await playHistoryData(historyDoc, this.versionHelper, historyData);
|
|
@@ -81457,6 +81295,7 @@ ${data2.flowchartText}
|
|
|
81457
81295
|
});
|
|
81458
81296
|
editor.readonly = true;
|
|
81459
81297
|
editor.addCustom("heading-collapse", () => new HeadingBlockCollapseButton(editor));
|
|
81298
|
+
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
81460
81299
|
editor.addListener("clickLink", (editor2, event, link2) => {
|
|
81461
81300
|
var _a2;
|
|
81462
81301
|
if ((_a2 = options == null ? void 0 : options.events) == null ? void 0 : _a2.onClickLink) {
|
|
@@ -83272,7 +83111,7 @@ ${data2.flowchartText}
|
|
|
83272
83111
|
}
|
|
83273
83112
|
}
|
|
83274
83113
|
});
|
|
83275
|
-
editor.version = "2.1.
|
|
83114
|
+
editor.version = "2.1.9";
|
|
83276
83115
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
83277
83116
|
window.setReauthFail = (fail) => {
|
|
83278
83117
|
window.isReauthError = fail;
|
|
@@ -83367,7 +83206,7 @@ ${data2.flowchartText}
|
|
|
83367
83206
|
if (!clientType.isMobile) {
|
|
83368
83207
|
OnesEditorToolbar.register(editor);
|
|
83369
83208
|
}
|
|
83370
|
-
editor.version = "2.1.
|
|
83209
|
+
editor.version = "2.1.9";
|
|
83371
83210
|
return editor;
|
|
83372
83211
|
}
|
|
83373
83212
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -129156,7 +128995,7 @@ ${data2.flowchartText}
|
|
|
129156
128995
|
exports2.OnesEditorCustomDataWrapper = OnesEditorCustomDataWrapper;
|
|
129157
128996
|
exports2.OnesEditorExclusiveBlock = OnesEditorExclusiveBlock;
|
|
129158
128997
|
exports2.OnesEditorHoveringBlock = OnesEditorHoveringBlock;
|
|
129159
|
-
exports2.OnesEditorIcons = index$
|
|
128998
|
+
exports2.OnesEditorIcons = index$f;
|
|
129160
128999
|
exports2.OnesEditorQuickMenu = OnesEditorQuickMenu;
|
|
129161
129000
|
exports2.OnesEditorToc = OnesEditorToc;
|
|
129162
129001
|
exports2.OnesEditorTocProvider = OnesEditorTocProvider;
|