@ones-editor/editor 2.1.7 → 2.1.8-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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: #cdcdcd40;
40
+ --background-code: #F8F8F8;
41
41
  }
42
42
  div.editor-root {
43
43
  color: #2d2d2e;
@@ -4795,7 +4795,373 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
4795
4795
  --editor-version-button-border: black;
4796
4796
  --editor-bg-color: #ffffff;
4797
4797
  --editor-version-list-bg-color: white;
4798
- --editor-version-select-bg-color: #F0F6FF;
4798
+ --editor-version-select-bg-color: #f0f6ff;
4799
+ }
4800
+ .editor-root.history .root-container .editor-block .text-element .inline-plugin.editor-box-loading {
4801
+ display: none;
4802
+ }
4803
+ .editor-root.history .editor-content {
4804
+ padding: 30px 75px;
4805
+ }
4806
+ .editor-root.history .table-block.history-inserted-block table, .editor-root.history .table-block.history-updated-block table {
4807
+ position: relative;
4808
+ }
4809
+ .editor-root.history .table-block.history-inserted-block table::before, .editor-root.history .table-block.history-updated-block table::before {
4810
+ content: "";
4811
+ position: absolute;
4812
+ top: -5px;
4813
+ bottom: -5px;
4814
+ left: -5px;
4815
+ right: -5px;
4816
+ background-color: var(--op-selected-color);
4817
+ border-radius: 3px;
4818
+ pointer-events: none;
4819
+ }
4820
+ .editor-root.history .table-block.history-inserted-block table .child, .editor-root.history .table-block.history-updated-block table .child {
4821
+ pointer-events: none;
4822
+ }
4823
+ .editor-root.history .table-block.history-deleted-block table {
4824
+ position: relative;
4825
+ }
4826
+ .editor-root.history .table-block.history-deleted-block table::after {
4827
+ content: "";
4828
+ position: absolute;
4829
+ top: -5px;
4830
+ bottom: -5px;
4831
+ left: -5px;
4832
+ right: -5px;
4833
+ background-color: var(--op-selected-color);
4834
+ border-radius: 3px;
4835
+ pointer-events: none;
4836
+ background-repeat: no-repeat;
4837
+ background-position: center;
4838
+ background-size: auto clamp(20px, 10%, 60px);
4839
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
4840
+ }
4841
+ .editor-root.history .table-block.history-deleted-block table .child {
4842
+ pointer-events: none;
4843
+ }
4844
+ .editor-root.history .table-block .history-inserted-container {
4845
+ position: relative;
4846
+ }
4847
+ .editor-root.history .table-block .history-inserted-container::before {
4848
+ content: "";
4849
+ position: absolute;
4850
+ top: 8px;
4851
+ bottom: 8px;
4852
+ left: 8px;
4853
+ right: 8px;
4854
+ background-color: var(--op-selected-color);
4855
+ border-radius: 0px;
4856
+ pointer-events: none;
4857
+ }
4858
+ .editor-root.history .table-block div[data-type=block-content] {
4859
+ overflow-x: revert;
4860
+ }
4861
+ .editor-root.history .layout-block.history-inserted-block {
4862
+ position: relative;
4863
+ }
4864
+ .editor-root.history .layout-block.history-inserted-block::before {
4865
+ content: "";
4866
+ position: absolute;
4867
+ top: -5px;
4868
+ bottom: -5px;
4869
+ left: -5px;
4870
+ right: -5px;
4871
+ background-color: var(--op-selected-color);
4872
+ border-radius: 3px;
4873
+ pointer-events: none;
4874
+ }
4875
+ .editor-root.history .layout-block.history-deleted-block {
4876
+ position: relative;
4877
+ }
4878
+ .editor-root.history .layout-block.history-deleted-block::after {
4879
+ content: "";
4880
+ position: absolute;
4881
+ top: -5px;
4882
+ bottom: -5px;
4883
+ left: -5px;
4884
+ right: -5px;
4885
+ background-color: var(--op-selected-color);
4886
+ border-radius: 3px;
4887
+ pointer-events: none;
4888
+ background-repeat: no-repeat;
4889
+ background-position: center;
4890
+ background-size: auto clamp(20px, 10%, 60px);
4891
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
4892
+ }
4893
+ .editor-root.history .layout-block.history-updated-block {
4894
+ position: relative;
4895
+ }
4896
+ .editor-root.history .layout-block.history-updated-block::before {
4897
+ content: "";
4898
+ position: absolute;
4899
+ top: -5px;
4900
+ bottom: -5px;
4901
+ left: -5px;
4902
+ right: -5px;
4903
+ background-color: var(--op-selected-color);
4904
+ border-radius: 3px;
4905
+ pointer-events: none;
4906
+ }
4907
+ .editor-root.history .layout-block .history-inserted-container {
4908
+ position: relative;
4909
+ }
4910
+ .editor-root.history .layout-block .history-inserted-container::before {
4911
+ content: "";
4912
+ position: absolute;
4913
+ top: 0;
4914
+ bottom: 0;
4915
+ left: 0;
4916
+ right: 0;
4917
+ background-color: var(--op-selected-color);
4918
+ border-radius: 0px;
4919
+ pointer-events: none;
4920
+ }
4921
+ .editor-root.history .list-block.history-inserted-block {
4922
+ position: relative;
4923
+ }
4924
+ .editor-root.history .list-block.history-inserted-block::before {
4925
+ content: "";
4926
+ position: absolute;
4927
+ top: 2px;
4928
+ bottom: 2px;
4929
+ left: 0px;
4930
+ right: 0px;
4931
+ background-color: var(--op-selected-color);
4932
+ border-radius: 0px;
4933
+ pointer-events: none;
4934
+ }
4935
+ .editor-root.history .list-block.history-deleted-block {
4936
+ position: relative;
4937
+ }
4938
+ .editor-root.history .list-block.history-deleted-block::after {
4939
+ content: "";
4940
+ position: absolute;
4941
+ top: 2px;
4942
+ bottom: 2px;
4943
+ left: 0;
4944
+ right: 0;
4945
+ background-color: var(--op-selected-color);
4946
+ border-radius: 0px;
4947
+ pointer-events: none;
4948
+ background-repeat: no-repeat;
4949
+ background-position: center;
4950
+ background-size: auto clamp(20px, 10%, 60px);
4951
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
4952
+ }
4953
+ .editor-root.history .text-block.history-inserted-block,
4954
+ .editor-root.history [data-style-quoted=true].history-inserted-block {
4955
+ position: relative;
4956
+ }
4957
+ .editor-root.history .text-block.history-inserted-block::before,
4958
+ .editor-root.history [data-style-quoted=true].history-inserted-block::before {
4959
+ content: "";
4960
+ position: absolute;
4961
+ top: 0px;
4962
+ bottom: 0px;
4963
+ left: 0px;
4964
+ right: 0px;
4965
+ background-color: var(--op-selected-color);
4966
+ border-radius: 0px;
4967
+ pointer-events: none;
4968
+ }
4969
+ .editor-root.history .text-block.history-deleted-block,
4970
+ .editor-root.history [data-style-quoted=true].history-deleted-block {
4971
+ position: relative;
4972
+ }
4973
+ .editor-root.history .text-block.history-deleted-block::after,
4974
+ .editor-root.history [data-style-quoted=true].history-deleted-block::after {
4975
+ content: "";
4976
+ position: absolute;
4977
+ top: 0px;
4978
+ bottom: 0px;
4979
+ left: 0px;
4980
+ right: 0px;
4981
+ background-color: var(--op-selected-color);
4982
+ border-radius: 0px;
4983
+ pointer-events: none;
4984
+ background-repeat: no-repeat;
4985
+ background-position: center;
4986
+ background-size: auto clamp(20px, 10%, 60px);
4987
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
4988
+ }
4989
+ .editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-inserted-block {
4990
+ position: relative;
4991
+ }
4992
+ .editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-inserted-block::before {
4993
+ content: "";
4994
+ position: absolute;
4995
+ top: -5px;
4996
+ bottom: -5px;
4997
+ left: -5px;
4998
+ right: -5px;
4999
+ background-color: var(--op-selected-color);
5000
+ border-radius: 3px;
5001
+ pointer-events: none;
5002
+ }
5003
+ .editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-deleted-block {
5004
+ position: relative;
5005
+ }
5006
+ .editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-deleted-block::after {
5007
+ content: "";
5008
+ position: absolute;
5009
+ top: -5px;
5010
+ bottom: -5px;
5011
+ left: -5px;
5012
+ right: -5px;
5013
+ background-color: var(--op-selected-color);
5014
+ border-radius: 3px;
5015
+ pointer-events: none;
5016
+ background-repeat: no-repeat;
5017
+ background-position: center;
5018
+ background-size: auto clamp(20px, 10%, 60px);
5019
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
5020
+ }
5021
+ .editor-root.history .status-box.history-inserted-box {
5022
+ background-color: unset;
5023
+ }
5024
+ .editor-root.history .status-box.history-inserted-box [data-type=box-content] {
5025
+ position: relative;
5026
+ }
5027
+ .editor-root.history .status-box.history-inserted-box [data-type=box-content]::before {
5028
+ content: "";
5029
+ position: absolute;
5030
+ top: 0px;
5031
+ bottom: 0px;
5032
+ left: 2.5px;
5033
+ right: 2.5px;
5034
+ background-color: var(--op-selected-color);
5035
+ border-radius: 0px;
5036
+ pointer-events: none;
5037
+ }
5038
+ .editor-root.history .file-box.history-deleted-box {
5039
+ text-decoration: line-through;
5040
+ color: var(--primary-color);
5041
+ }
5042
+ .editor-root.history .math-box.history-inserted-box {
5043
+ background-color: unset;
5044
+ }
5045
+ .editor-root.history .math-box.history-inserted-box [data-type=box-content] {
5046
+ position: relative;
5047
+ }
5048
+ .editor-root.history .math-box.history-inserted-box [data-type=box-content]::before {
5049
+ content: "";
5050
+ position: absolute;
5051
+ top: 0px;
5052
+ bottom: 0px;
5053
+ left: 0px;
5054
+ right: 0px;
5055
+ background-color: var(--op-selected-color);
5056
+ border-radius: 0px;
5057
+ pointer-events: none;
5058
+ }
5059
+ .editor-root.history .math-box.history-deleted-box {
5060
+ text-decoration: none;
5061
+ }
5062
+ .editor-root.history .math-box.history-deleted-box [data-type=box-content] {
5063
+ position: relative;
5064
+ }
5065
+ .editor-root.history .math-box.history-deleted-box [data-type=box-content]::before {
5066
+ content: "";
5067
+ position: absolute;
5068
+ top: 0px;
5069
+ bottom: 0px;
5070
+ left: 0px;
5071
+ right: 0px;
5072
+ background-color: var(--op-selected-color);
5073
+ border-radius: 0px;
5074
+ pointer-events: none;
5075
+ }
5076
+ .editor-root.history .history-inserted-text, .editor-root.history .history-inserted-box {
5077
+ line-height: revert !important;
5078
+ background-color: var(--op-selected-color);
5079
+ }
5080
+ .editor-root.history .history-deleted-box {
5081
+ text-decoration: line-through;
5082
+ }
5083
+ .editor-root.history .history-deleted-box[class=history-deleted-box] {
5084
+ color: var(--op-color);
5085
+ }
5086
+ .editor-root.history [data-box-type=history-deleted-box] > span[data-type=box-content] {
5087
+ border: none !important;
5088
+ margin: 0 !important;
5089
+ }
5090
+ .editor-root.history .history-inserted-container .history-inserted-container,
5091
+ .editor-root.history .history-inserted-container .history-inserted-text,
5092
+ .editor-root.history .history-inserted-container .history-inserted-box,
5093
+ .editor-root.history .history-inserted-container .history-deleted-box,
5094
+ .editor-root.history .history-inserted-container .history-deleted-block,
5095
+ .editor-root.history .history-inserted-container .history-inserted-block,
5096
+ .editor-root.history .history-deleted-block .history-inserted-container,
5097
+ .editor-root.history .history-deleted-block .history-inserted-text,
5098
+ .editor-root.history .history-deleted-block .history-inserted-box,
5099
+ .editor-root.history .history-deleted-block .history-deleted-box,
5100
+ .editor-root.history .history-deleted-block .history-deleted-block,
5101
+ .editor-root.history .history-deleted-block .history-inserted-block,
5102
+ .editor-root.history .history-inserted-block .history-inserted-container,
5103
+ .editor-root.history .history-inserted-block .history-inserted-text,
5104
+ .editor-root.history .history-inserted-block .history-inserted-box,
5105
+ .editor-root.history .history-inserted-block .history-deleted-box,
5106
+ .editor-root.history .history-inserted-block .history-deleted-block,
5107
+ .editor-root.history .history-inserted-block .history-inserted-block,
5108
+ .editor-root.history .history-updated-block .history-inserted-container,
5109
+ .editor-root.history .history-updated-block .history-inserted-text,
5110
+ .editor-root.history .history-updated-block .history-inserted-box,
5111
+ .editor-root.history .history-updated-block .history-deleted-box,
5112
+ .editor-root.history .history-updated-block .history-deleted-block,
5113
+ .editor-root.history .history-updated-block .history-inserted-block {
5114
+ background-color: unset;
5115
+ pointer-events: none;
5116
+ }
5117
+ .editor-root.history .history-inserted-container .history-inserted-container::before, .editor-root.history .history-inserted-container .history-inserted-container::after,
5118
+ .editor-root.history .history-inserted-container .history-inserted-text::before,
5119
+ .editor-root.history .history-inserted-container .history-inserted-text::after,
5120
+ .editor-root.history .history-inserted-container .history-inserted-box::before,
5121
+ .editor-root.history .history-inserted-container .history-inserted-box::after,
5122
+ .editor-root.history .history-inserted-container .history-deleted-box::before,
5123
+ .editor-root.history .history-inserted-container .history-deleted-box::after,
5124
+ .editor-root.history .history-inserted-container .history-deleted-block::before,
5125
+ .editor-root.history .history-inserted-container .history-deleted-block::after,
5126
+ .editor-root.history .history-inserted-container .history-inserted-block::before,
5127
+ .editor-root.history .history-inserted-container .history-inserted-block::after,
5128
+ .editor-root.history .history-deleted-block .history-inserted-container::before,
5129
+ .editor-root.history .history-deleted-block .history-inserted-container::after,
5130
+ .editor-root.history .history-deleted-block .history-inserted-text::before,
5131
+ .editor-root.history .history-deleted-block .history-inserted-text::after,
5132
+ .editor-root.history .history-deleted-block .history-inserted-box::before,
5133
+ .editor-root.history .history-deleted-block .history-inserted-box::after,
5134
+ .editor-root.history .history-deleted-block .history-deleted-box::before,
5135
+ .editor-root.history .history-deleted-block .history-deleted-box::after,
5136
+ .editor-root.history .history-deleted-block .history-deleted-block::before,
5137
+ .editor-root.history .history-deleted-block .history-deleted-block::after,
5138
+ .editor-root.history .history-deleted-block .history-inserted-block::before,
5139
+ .editor-root.history .history-deleted-block .history-inserted-block::after,
5140
+ .editor-root.history .history-inserted-block .history-inserted-container::before,
5141
+ .editor-root.history .history-inserted-block .history-inserted-container::after,
5142
+ .editor-root.history .history-inserted-block .history-inserted-text::before,
5143
+ .editor-root.history .history-inserted-block .history-inserted-text::after,
5144
+ .editor-root.history .history-inserted-block .history-inserted-box::before,
5145
+ .editor-root.history .history-inserted-block .history-inserted-box::after,
5146
+ .editor-root.history .history-inserted-block .history-deleted-box::before,
5147
+ .editor-root.history .history-inserted-block .history-deleted-box::after,
5148
+ .editor-root.history .history-inserted-block .history-deleted-block::before,
5149
+ .editor-root.history .history-inserted-block .history-deleted-block::after,
5150
+ .editor-root.history .history-inserted-block .history-inserted-block::before,
5151
+ .editor-root.history .history-inserted-block .history-inserted-block::after,
5152
+ .editor-root.history .history-updated-block .history-inserted-container::before,
5153
+ .editor-root.history .history-updated-block .history-inserted-container::after,
5154
+ .editor-root.history .history-updated-block .history-inserted-text::before,
5155
+ .editor-root.history .history-updated-block .history-inserted-text::after,
5156
+ .editor-root.history .history-updated-block .history-inserted-box::before,
5157
+ .editor-root.history .history-updated-block .history-inserted-box::after,
5158
+ .editor-root.history .history-updated-block .history-deleted-box::before,
5159
+ .editor-root.history .history-updated-block .history-deleted-box::after,
5160
+ .editor-root.history .history-updated-block .history-deleted-block::before,
5161
+ .editor-root.history .history-updated-block .history-deleted-block::after,
5162
+ .editor-root.history .history-updated-block .history-inserted-block::before,
5163
+ .editor-root.history .history-updated-block .history-inserted-block::after {
5164
+ display: none;
4799
5165
  }
4800
5166
  .version-dialog {
4801
5167
  display: flex;
@@ -4908,183 +5274,6 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
4908
5274
  }
4909
5275
  .version-dialog .version-viewer .dialog-text-button .dialog-button-icon svg {
4910
5276
  fill: currentColor;
4911
- }
4912
- .editor-root.history .root-container .editor-block .text-element .inline-plugin.editor-box-loading {
4913
- display: none;
4914
- }
4915
- .editor-root.history .editor-content {
4916
- padding: 30px 75px;
4917
- }
4918
- .editor-root.history .history-inserted-block[data-type=editor-block] [data-type=block-content] {
4919
- border: 4px solid var(--op-selected-color);
4920
- }
4921
- .editor-root.history .history-inserted-block[data-type=editor-block] {
4922
- position: relative;
4923
- }
4924
- .editor-root.history .history-inserted-block[data-type=editor-block]:hover::after {
4925
- content: attr(data-op-description);
4926
- position: absolute;
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;
4941
- }
4942
- .editor-root.history .history-inserted-block[data-type=editor-block].table-block table {
4943
- border: 4px solid var(--op-selected-color);
4944
- }
4945
- .editor-root.history .history-inserted-block[data-type=editor-block].table-block table .child {
4946
- pointer-events: none;
4947
- }
4948
- .editor-root.history .history-inserted-block[data-type=editor-block].table-block {
4949
- position: relative;
4950
- }
4951
- .editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
4952
- content: attr(data-op-description);
4953
- position: absolute;
4954
- top: -26px;
4955
- /* left: var(--op-offset); */
4956
- left: 0;
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;
4968
- }
4969
- .editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
4970
- top: 0;
4971
- }
4972
- .editor-root.history .history-deleted-block [data-type=block-content] {
4973
- border: 4px solid var(--op-selected-color);
4974
- }
4975
- .editor-root.history .history-deleted-block [data-type=block-content] {
4976
- position: relative;
4977
- }
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: " ";
4980
- position: absolute;
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;
4988
- 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
- }
5001
- .editor-root.history .history-deleted-block [data-type=block-content]::before {
5002
- transform: rotate(135deg);
5003
- }
5004
- .editor-root.history .history-deleted-block {
5005
- position: relative;
5006
- }
5007
- .editor-root.history .history-deleted-block:hover::after {
5008
- content: attr(data-op-description);
5009
- position: absolute;
5010
- top: -26px;
5011
- /* left: var(--op-offset); */
5012
- left: 0;
5013
- line-height: 24px;
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;
5023
- border-radius: 3px;
5024
- }
5025
- .editor-root.history .history-deleted-block.history-deleted-box {
5026
- background-color: unset !important;
5027
- text-decoration: unset !important;
5028
- }
5029
- .editor-root.history .history-deleted-block.history-deleted-box:hover::after {
5030
- opacity: 0;
5031
- }
5032
- .editor-root.history .history-inserted-text {
5033
- line-height: revert !important;
5034
- background-color: var(--op-selected-color);
5035
- }
5036
- .editor-root.history .history-inserted-text {
5037
- position: relative;
5038
- }
5039
- .editor-root.history .history-inserted-text:hover::after {
5040
- content: attr(data-op-description);
5041
- position: absolute;
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;
5056
- }
5057
- .editor-root.history .history-deleted-box {
5058
- background-color: var(--op-selected-color);
5059
- text-decoration: line-through;
5060
- }
5061
- .editor-root.history .history-deleted-box {
5062
- position: relative;
5063
- }
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;
5081
- }
5082
- .editor-root.history [data-box-type=history-deleted-box] > span[data-type=box-content] {
5083
- border: none !important;
5084
- margin: 0 !important;
5085
- }
5086
- .editor-root.history [data-type=editor-block].table-block div[data-type=block-content] {
5087
- overflow-x: revert;
5088
5277
  }.editor-dialog-root {
5089
5278
  position: absolute;
5090
5279
  left: 0;
@@ -5437,6 +5626,21 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
5437
5626
  }
5438
5627
  [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
5628
  border-color: #0064ff;
5629
+ }:root div.tippy-box[data-theme=editor-history-tooltip] {
5630
+ background-color: unset;
5631
+ }
5632
+ :root div.tippy-box[data-theme=editor-history-tooltip] > .tippy-content {
5633
+ color: unset;
5634
+ line-height: initial;
5635
+ padding: 0;
5636
+ }
5637
+ :root div.tippy-box[data-theme=editor-history-tooltip] > .tippy-content .editor-history-tooltip-content {
5638
+ line-height: 30px;
5639
+ font-size: 14px;
5640
+ padding: 0 5px;
5641
+ border-radius: 3px;
5642
+ background-color: var(--op-selected-color);
5643
+ color: white;
5440
5644
  }.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
5645
  display: flex;
5442
5646
  }
@@ -7871,7 +8075,7 @@ var __publicField = (obj, key, value) => {
7871
8075
  return (_a = observers.get(this))[method].apply(_a, arguments);
7872
8076
  };
7873
8077
  });
7874
- var index$g = function() {
8078
+ var index$h = function() {
7875
8079
  if (typeof global$1.ResizeObserver !== "undefined") {
7876
8080
  return global$1.ResizeObserver;
7877
8081
  }
@@ -9973,6 +10177,34 @@ var __publicField = (obj, key, value) => {
9973
10177
  (_a = render.updateBlock) == null ? void 0 : _a.call(render, editor, path, blockElement, blockData);
9974
10178
  });
9975
10179
  }
10180
+ renderChildContainer(editor, path, containerId) {
10181
+ const result = {
10182
+ classes: [],
10183
+ attributes: {},
10184
+ styles: {}
10185
+ };
10186
+ this.renders.forEach((render) => {
10187
+ if (render.renderChildContainer) {
10188
+ const ret = render.renderChildContainer(editor, path, containerId);
10189
+ if (ret.classes) {
10190
+ result.classes.push(...ret.classes);
10191
+ }
10192
+ if (ret.attributes) {
10193
+ result.attributes = {
10194
+ ...result.attributes,
10195
+ ...ret.attributes
10196
+ };
10197
+ }
10198
+ if (ret.styles) {
10199
+ result.styles = {
10200
+ ...result.styles,
10201
+ ...ret.styles
10202
+ };
10203
+ }
10204
+ }
10205
+ });
10206
+ return result;
10207
+ }
9976
10208
  }
9977
10209
  const logger$4l = getLogger("block-class");
9978
10210
  function getBlockClass(editor, block) {
@@ -11049,7 +11281,7 @@ var __publicField = (obj, key, value) => {
11049
11281
  this.editor = editor;
11050
11282
  this.rootContainer = rootContainer;
11051
11283
  this.editor = editor;
11052
- this.resizeObserver = new index$g(this.handleResize);
11284
+ this.resizeObserver = new index$h(this.handleResize);
11053
11285
  this.bindEvents(rootContainer);
11054
11286
  }
11055
11287
  bindEvents(rootContainer) {
@@ -11102,6 +11334,20 @@ var __publicField = (obj, key, value) => {
11102
11334
  return exists;
11103
11335
  }
11104
11336
  const container = createContainerElement(parent, "child", containerId);
11337
+ const ret = editor.editorBlockRenders.renderChildContainer(editor, path, containerId);
11338
+ if (ret.classes) {
11339
+ addClass(container, ...ret.classes);
11340
+ }
11341
+ if (ret.attributes) {
11342
+ Object.entries(ret.attributes).forEach(([key, value]) => {
11343
+ container.setAttribute(key, value);
11344
+ });
11345
+ }
11346
+ if (ret.styles) {
11347
+ Object.entries(ret.styles).forEach(([key, value]) => {
11348
+ container.style.setProperty(key, value);
11349
+ });
11350
+ }
11105
11351
  loadBlocks(editor, container, path);
11106
11352
  return container;
11107
11353
  }
@@ -37454,10 +37700,19 @@ ${codeText}
37454
37700
  throw err;
37455
37701
  }
37456
37702
  }
37457
- async getVersions() {
37703
+ async getVersions(showPublished) {
37458
37704
  const server = this.apiServer();
37459
- const api = `${server}/versions?withExtra=true`;
37460
- const ret = await this.request(api);
37705
+ const api = `${server}/versions`;
37706
+ const params = {
37707
+ withExtra: true,
37708
+ published: void 0
37709
+ };
37710
+ if (showPublished) {
37711
+ params.published = true;
37712
+ }
37713
+ const ret = await this.request(api, {
37714
+ params
37715
+ });
37461
37716
  const versions = ret.data.versions;
37462
37717
  versions.forEach((v) => {
37463
37718
  if (v.extra) {
@@ -37587,8 +37842,8 @@ ${codeText}
37587
37842
  getVersionHelper() {
37588
37843
  return this;
37589
37844
  }
37590
- getVersions() {
37591
- return this.client.getVersions();
37845
+ getVersions(showPublished = false) {
37846
+ return this.client.getVersions(showPublished);
37592
37847
  }
37593
37848
  async getVersion(ver) {
37594
37849
  const data2 = await this.client.getVersion(ver);
@@ -37969,7 +38224,7 @@ ${codeText}
37969
38224
  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
38225
  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
38226
  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$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38227
+ const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
37973
38228
  __proto__: null,
37974
38229
  DownloadIcon: DownloadIcon$1,
37975
38230
  AddEmojiIcon,
@@ -40324,7 +40579,7 @@ ${codeText}
40324
40579
  var _a;
40325
40580
  return (_a = item.subText) != null ? _a : "";
40326
40581
  }
40327
- const index$e = "";
40582
+ const index$f = "";
40328
40583
  class EmojiSearch {
40329
40584
  constructor(parent, options) {
40330
40585
  __publicField(this, "input");
@@ -40673,7 +40928,7 @@ ${codeText}
40673
40928
  (_a = this.observer) == null ? void 0 : _a.disconnect();
40674
40929
  }
40675
40930
  }
40676
- const index$d = "";
40931
+ const index$e = "";
40677
40932
  class EmojiPalette extends tinyTypedEmitter.TypedEmitter {
40678
40933
  constructor() {
40679
40934
  super();
@@ -43718,7 +43973,7 @@ ${codeText}
43718
43973
  });
43719
43974
  this.scrollCore = scrollCore;
43720
43975
  this.callback = callback;
43721
- this.resizeObserver = new index$g(this.handleContentResize);
43976
+ this.resizeObserver = new index$h(this.handleContentResize);
43722
43977
  }
43723
43978
  get containers() {
43724
43979
  return this.scrollCore.containers;
@@ -43853,7 +44108,7 @@ ${codeText}
43853
44108
  calcScrollbarPos(this.scrollCore, scrollContainer);
43854
44109
  });
43855
44110
  this.scrollCore = scrollCore;
43856
- this.resizeObserver = new index$g(this.handleScrollWrapResize);
44111
+ this.resizeObserver = new index$h(this.handleScrollWrapResize);
43857
44112
  }
43858
44113
  get containers() {
43859
44114
  return this.scrollCore.containers;
@@ -43892,7 +44147,7 @@ ${codeText}
43892
44147
  });
43893
44148
  this.scrollCore = scrollCore;
43894
44149
  this.callback = callback;
43895
- this.resizeObserver = new index$g(this.handleResize);
44150
+ this.resizeObserver = new index$h(this.handleResize);
43896
44151
  }
43897
44152
  bind(scrollContainer) {
43898
44153
  var _a, _b;
@@ -44813,7 +45068,7 @@ ${codeText}
44813
45068
  function getToolbar(editor) {
44814
45069
  return editor.findCustom("toolbar-handler");
44815
45070
  }
44816
- const index$c = "";
45071
+ const index$d = "";
44817
45072
  class LinkEditor {
44818
45073
  constructor() {
44819
45074
  __publicField(this, "linkPopup", null);
@@ -46396,7 +46651,7 @@ ${codeText}
46396
46651
  return {};
46397
46652
  }
46398
46653
  }
46399
- const index$b = "";
46654
+ const index$c = "";
46400
46655
  const BlockPaddingShortcuts = {
46401
46656
  "Tab": handleTab$3,
46402
46657
  "Shift+Tab": handleShiftTab$3,
@@ -55505,12 +55760,13 @@ $$${mathData.mathjaxText}$$
55505
55760
  }
55506
55761
  }
55507
55762
  }
55508
- class OnesEditorTooltip {
55509
- constructor(editor) {
55763
+ class OnesEditorTooltip extends EventCallbacks {
55764
+ constructor(editor, options) {
55765
+ super();
55510
55766
  __publicField(this, "instance");
55511
55767
  __publicField(this, "mousedown", false);
55512
55768
  __publicField(this, "currentInstance", null);
55513
- __publicField(this, "attributeName", []);
55769
+ __publicField(this, "attributeNames", []);
55514
55770
  __publicField(this, "attributeDesc", "");
55515
55771
  __publicField(this, "_lastClickButtonId", "");
55516
55772
  __publicField(this, "observer", null);
@@ -55518,9 +55774,9 @@ $$${mathData.mathjaxText}$$
55518
55774
  __publicField(this, "createContent", (reference) => {
55519
55775
  let name = "";
55520
55776
  let times = 0;
55521
- while (times < this.attributeName.length && !name) {
55522
- if (reference.hasAttribute(this.attributeName[times])) {
55523
- name = reference.getAttribute(this.attributeName[times]) || "";
55777
+ while (times < this.attributeNames.length && !name) {
55778
+ if (reference.hasAttribute(this.attributeNames[times])) {
55779
+ name = reference.getAttribute(this.attributeNames[times]) || "";
55524
55780
  }
55525
55781
  times++;
55526
55782
  }
@@ -55576,7 +55832,7 @@ $$${mathData.mathjaxText}$$
55576
55832
  this._lastClickButtonId = "";
55577
55833
  return false;
55578
55834
  }
55579
- if (this.attributeName.every((attribute) => !reference.hasAttribute(attribute))) {
55835
+ if (this.attributeNames.every((attribute) => !reference.hasAttribute(attribute))) {
55580
55836
  return false;
55581
55837
  }
55582
55838
  if (instance.reference) {
@@ -55608,24 +55864,36 @@ $$${mathData.mathjaxText}$$
55608
55864
  instance.setContent(newContent || "");
55609
55865
  }
55610
55866
  }
55867
+ this.callbacks.forEach((c) => {
55868
+ var _a2;
55869
+ return (_a2 = c.onBeforeShow) == null ? void 0 : _a2.call(c, instance);
55870
+ });
55611
55871
  return true;
55612
55872
  });
55613
55873
  this.editor = editor;
55874
+ const { onBeforeTooltipInitialize } = options != null ? options : {};
55614
55875
  const clientId = editor.clientId;
55615
- this.attributeName = [`data-editor-tooltip-${clientId}`, `data-editor-tooltip-${clientId}-dynamic`, "data-editor-tooltip-common"];
55616
55876
  this.attributeDesc = `data-editor-tooltip-desc-${clientId}`;
55617
- this.instance = tippy$1.delegate(document.body, {
55877
+ const defaultProps = {
55618
55878
  theme: "editor-tooltip",
55619
55879
  maxWidth: 400,
55620
55880
  delay: 200,
55621
- target: this.attributeName.map((attribute) => `[${attribute}]`).join(","),
55881
+ hideOnClick: false,
55882
+ attributeNames: [`data-editor-tooltip-${clientId}`, `data-editor-tooltip-${clientId}-dynamic`, "data-editor-tooltip-common"]
55883
+ };
55884
+ const finalProps = onBeforeTooltipInitialize ? onBeforeTooltipInitialize(defaultProps) : defaultProps;
55885
+ const { attributeNames } = finalProps;
55886
+ const target = attributeNames.map((name) => `[${name}]`).join(",");
55887
+ this.instance = tippy$1.delegate(document.body, {
55888
+ ...finalProps,
55889
+ target,
55622
55890
  content: this.createContent,
55623
55891
  onShow: this.handleShow,
55624
55892
  onShown: this.handleShown,
55625
- onHide: this.handleHidden,
55626
- hideOnClick: false
55893
+ onHide: this.handleHidden
55627
55894
  });
55628
55895
  editor.domEvents.addEventListener(document, "mousedown", this.handleDocumentMouseDown);
55896
+ this.attributeNames = attributeNames;
55629
55897
  }
55630
55898
  set lastClickButtonId(value) {
55631
55899
  this._lastClickButtonId = value;
@@ -55894,7 +56162,7 @@ $$${mathData.mathjaxText}$$
55894
56162
  "en-US": enUS$s,
55895
56163
  "ja-JP": jaJP$s
55896
56164
  });
55897
- const index$a = "";
56165
+ const index$b = "";
55898
56166
  function createTextButton(parent, ...args) {
55899
56167
  const button2 = createButton$1(...args);
55900
56168
  button2.classList.remove("editor-button");
@@ -56314,7 +56582,7 @@ $$${mathData.mathjaxText}$$
56314
56582
  assert(logger$1E, this.tableBlock, "no table block");
56315
56583
  logger$1E.debug("create table border bar");
56316
56584
  updateTableBorderBar(this.editor, this.tableBlock);
56317
- this.resizeObserver = new index$g(this.handleTableResize);
56585
+ this.resizeObserver = new index$h(this.handleTableResize);
56318
56586
  this.resizeObserver.observe(getBlockTable(this.tableBlock));
56319
56587
  const options = editor.getComponentOptions("table");
56320
56588
  if (!(options == null ? void 0 : options.hideToolbar)) {
@@ -61130,7 +61398,7 @@ ${codeText}
61130
61398
  const handleChildContainerResize = () => {
61131
61399
  this.handleEditorResize(parentContainer);
61132
61400
  };
61133
- this.parentContainerResizerObserver = new index$g(handleChildContainerResize);
61401
+ this.parentContainerResizerObserver = new index$h(handleChildContainerResize);
61134
61402
  this.parentContainerResizerObserver.observe(parentContainer);
61135
61403
  }
61136
61404
  const isEmptyImage2 = () => {
@@ -65065,7 +65333,7 @@ ${codeText}
65065
65333
  return `<span class="${CLASS_NAME}">${token.formula}</span>`;
65066
65334
  }
65067
65335
  });
65068
- var index$9 = (options = {}) => {
65336
+ var index$a = (options = {}) => {
65069
65337
  if (options.lazy && options.env !== "test") {
65070
65338
  new IntersectionObserver((entries, self2) => {
65071
65339
  for (const entry of entries) {
@@ -65581,7 +65849,7 @@ ${codeText}
65581
65849
  const latexOptions = {
65582
65850
  render: (formula, displayMode) => ""
65583
65851
  };
65584
- marked.marked.use(index$9(latexOptions));
65852
+ marked.marked.use(index$a(latexOptions));
65585
65853
  marked.marked.use({
65586
65854
  mangle: false
65587
65855
  });
@@ -69732,7 +70000,7 @@ ${content}
69732
70000
  }
69733
70001
  }
69734
70002
  }
69735
- const index$8 = "";
70003
+ const index$9 = "";
69736
70004
  getLogger("comment-editor");
69737
70005
  const { t: t$5 } = i18n$1;
69738
70006
  const EDITOR_READONLY_CLS = "comment-editor-readonly";
@@ -70255,7 +70523,7 @@ ${content}
70255
70523
  }
70256
70524
  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
70525
  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$7 = "";
70526
+ const index$8 = "";
70259
70527
  const REPLY_EDITOR_EDITING_CLS = "reply-editor-editing";
70260
70528
  const { t: t$3 } = i18n$1;
70261
70529
  class CommentQuickReply {
@@ -70425,7 +70693,7 @@ ${content}
70425
70693
  this.childrenList = this.createChildrenList();
70426
70694
  this.quickReply = this.createQuickReply();
70427
70695
  this.editor.on("readonlyChanged", this.handleReadonlyChanged);
70428
- this.resizeObserver = new index$g(this.handleResize);
70696
+ this.resizeObserver = new index$h(this.handleResize);
70429
70697
  this.resizeObserver.observe(this.root);
70430
70698
  this.updateLastCommentItem();
70431
70699
  }
@@ -73008,7 +73276,7 @@ ${content}
73008
73276
  const AutoLinkShortcuts = {
73009
73277
  "Space": autoLink
73010
73278
  };
73011
- const index$6 = "";
73279
+ const index$7 = "";
73012
73280
  const zhCN$c = {
73013
73281
  version: {
73014
73282
  latest: "\u6700\u65B0\u7248\u672C",
@@ -73040,7 +73308,7 @@ ${content}
73040
73308
  },
73041
73309
  tooltip: {
73042
73310
  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\u53D1\u5E03\u8005\uFF1A{name}",
73311
+ user: "\u7248\u672C\u7F16\u8F91\u8005\uFF1A{name}",
73044
73312
  auth: "\u6682\u65E0\u9875\u9762\u7F16\u8F91\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"
73045
73313
  },
73046
73314
  dropdownHeader: "\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C",
@@ -73153,7 +73421,8 @@ ${content}
73153
73421
  })(HistoryClass || {});
73154
73422
  const OpColor = "--op-color";
73155
73423
  const OpSelectedColor = "--op-selected-color";
73156
- const index$5 = "";
73424
+ const HISTORY_TOOLTIP_IDENTIFIER = "data-history-editor-tooltip";
73425
+ const index$6 = "";
73157
73426
  class Dialog$1 {
73158
73427
  constructor(content) {
73159
73428
  __publicField(this, "root");
@@ -73300,14 +73569,15 @@ ${content}
73300
73569
  onSelectVersion(version);
73301
73570
  });
73302
73571
  __publicField(this, "handleEndEditItemMemo", (value, isCancel) => {
73303
- var _a, _b, _c;
73572
+ var _a, _b, _c, _d;
73304
73573
  const versionItem = (_a = this.memoInput) == null ? void 0 : _a.root.closest(".version-item");
73305
73574
  if (this.isVersionElement(versionItem)) {
73306
73575
  removeClass(versionItem, "editing");
73307
73576
  if (!isCancel) {
73308
73577
  const version = this.getVersionFromElement(versionItem);
73309
73578
  const filterValue2 = value.replace(/[\n\r]+/g, " ");
73310
- if (((_b = version.extra) == null ? void 0 : _b.memo) !== filterValue2) {
73579
+ const hasChanged = typeof ((_b = version.extra) == null ? void 0 : _b.memo) !== "undefined" && ((_c = version.extra) == null ? void 0 : _c.memo) !== filterValue2;
73580
+ if (hasChanged) {
73311
73581
  version.extra = { memo: filterValue2 };
73312
73582
  this.options.versionHelper.updateVersionExtra(version.version, version.tagId, version.extra).then(() => {
73313
73583
  var _a2, _b2;
@@ -73319,7 +73589,7 @@ ${content}
73319
73589
  }
73320
73590
  }
73321
73591
  }
73322
- (_c = this.memoInput) == null ? void 0 : _c.root.remove();
73592
+ (_d = this.memoInput) == null ? void 0 : _d.root.remove();
73323
73593
  });
73324
73594
  __publicField(this, "handleRevert", (version, versionItem) => {
73325
73595
  const { onRevert } = this.options;
@@ -73773,10 +74043,12 @@ ${content}
73773
74043
  const attributes = ops.length === 1 ? ops[0].attributes : ops[1].attributes;
73774
74044
  const insertedRichText = [{
73775
74045
  insert: insertedPlainText,
73776
- attributes
74046
+ attributes: {
74047
+ ...attributes,
74048
+ insertedBy: user
74049
+ }
73777
74050
  }];
73778
- const newRichText = addAttribute(insertedRichText, "insertedBy", user);
73779
- const newText = insertText(text2, offset, newRichText, null);
74051
+ const newText = insertText(text2, offset, insertedRichText, null);
73780
74052
  return newText;
73781
74053
  }
73782
74054
  function applyActionsToText(text2, ops, user) {
@@ -73967,7 +74239,7 @@ ${content}
73967
74239
  };
73968
74240
  }
73969
74241
  getRemoteUsers() {
73970
- const colors = ["#0064FF4D", "#00A8654D", "#F593004D", "#EB37234D", "#8851ED4D", "#009CAD4D", "#F25A0A4D", "#70A3104D"];
74242
+ const colors = ["#B21B5733", "#00879633", "#7241CC33", "#CC4C0833", "#5D8F0033", "#BD2C1C33", "#D17D0033"];
73971
74243
  return new RemoteUsers(colors);
73972
74244
  }
73973
74245
  destroy() {
@@ -74051,6 +74323,15 @@ ${content}
74051
74323
  }
74052
74324
  onCreateContainer(containerId, data2, user) {
74053
74325
  this.docObject.blocks[containerId] = cloneDeep__default.default(data2);
74326
+ const { meta } = this.docObject;
74327
+ if (typeof meta.containerId === "undefined") {
74328
+ meta[containerId] = {
74329
+ createBy: user
74330
+ };
74331
+ } else {
74332
+ const existHistoryDocMeta = meta[containerId];
74333
+ existHistoryDocMeta.createBy = user;
74334
+ }
74054
74335
  this.callbacks.forEach((cb) => {
74055
74336
  var _a;
74056
74337
  return (_a = cb.onInsertChildContainer) == null ? void 0 : _a.call(cb, containerId, data2, true);
@@ -74059,6 +74340,11 @@ ${content}
74059
74340
  }
74060
74341
  const { t } = i18n$1;
74061
74342
  function getOpDescription(user, type) {
74343
+ if (type === "update") {
74344
+ return t("version.update", {
74345
+ name: user.displayName
74346
+ });
74347
+ }
74062
74348
  if (type === "insert") {
74063
74349
  return t("version.insert", {
74064
74350
  name: user.displayName
@@ -74068,6 +74354,12 @@ ${content}
74068
74354
  name: user.displayName
74069
74355
  });
74070
74356
  }
74357
+ function removeOpacityFromHexColor(hexColor) {
74358
+ if (hexColor.length === 9) {
74359
+ return hexColor.slice(0, 7);
74360
+ }
74361
+ return hexColor;
74362
+ }
74071
74363
  function getUserColors(users, user) {
74072
74364
  const { userId } = user;
74073
74365
  const types2 = ["flag", "selection"];
@@ -74080,9 +74372,27 @@ ${content}
74080
74372
  class OnesEditorHistoryRender {
74081
74373
  renderBox(editor, path, attributes) {
74082
74374
  if (attributes.deletedBy) {
74083
- const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), attributes.deletedBy);
74375
+ const user = attributes.deletedBy;
74376
+ const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74084
74377
  return {
74085
74378
  classes: ["history-deleted-box"],
74379
+ attributes: {
74380
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
74381
+ },
74382
+ styles: {
74383
+ [OpColor]: removeOpacityFromHexColor(flag),
74384
+ [OpSelectedColor]: selection
74385
+ }
74386
+ };
74387
+ }
74388
+ if (attributes.insertedBy) {
74389
+ const user = attributes.insertedBy;
74390
+ const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74391
+ return {
74392
+ classes: ["history-inserted-box"],
74393
+ attributes: {
74394
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
74395
+ },
74086
74396
  styles: {
74087
74397
  [OpColor]: flag,
74088
74398
  [OpSelectedColor]: selection
@@ -74098,8 +74408,7 @@ ${content}
74098
74408
  return {
74099
74409
  classes: ["history-inserted-text"],
74100
74410
  attributes: {
74101
- "history-inserted-by": user.displayName,
74102
- "data-op-description": getOpDescription(user, "insert")
74411
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
74103
74412
  },
74104
74413
  styles: {
74105
74414
  [OpColor]: flag,
@@ -74116,8 +74425,7 @@ ${content}
74116
74425
  return {
74117
74426
  classes: ["history-deleted-block"],
74118
74427
  attributes: {
74119
- "history-deleted-by": user.displayName,
74120
- "data-op-description": getOpDescription(user, "delete")
74428
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
74121
74429
  },
74122
74430
  styles: {
74123
74431
  [OpColor]: flag,
@@ -74131,8 +74439,21 @@ ${content}
74131
74439
  return {
74132
74440
  classes: ["history-inserted-block"],
74133
74441
  attributes: {
74134
- "history-inserted-by": user.displayName,
74135
- "data-op-description": getOpDescription(user, "insert")
74442
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
74443
+ },
74444
+ styles: {
74445
+ [OpColor]: flag,
74446
+ [OpSelectedColor]: selection
74447
+ }
74448
+ };
74449
+ }
74450
+ if (blockData.updatedBy) {
74451
+ const user = blockData.updatedBy;
74452
+ const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74453
+ return {
74454
+ classes: ["history-updated-block"],
74455
+ attributes: {
74456
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "update")
74136
74457
  },
74137
74458
  styles: {
74138
74459
  [OpColor]: flag,
@@ -74148,8 +74469,7 @@ ${content}
74148
74469
  const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74149
74470
  addClass(blockElement, "history-deleted-block");
74150
74471
  setAttributes(blockElement, {
74151
- "history-inserted-by": user.displayName,
74152
- "data-op-description": getOpDescription(user, "delete")
74472
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
74153
74473
  });
74154
74474
  setStyles(blockElement, {
74155
74475
  [OpColor]: flag,
@@ -74162,14 +74482,48 @@ ${content}
74162
74482
  const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74163
74483
  addClass(blockElement, "history-inserted-block");
74164
74484
  setAttributes(blockElement, {
74165
- "history-inserted-by": user.displayName,
74166
- "data-op-description": getOpDescription(user, "insert")
74485
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
74167
74486
  });
74168
74487
  setStyles(blockElement, {
74169
74488
  [OpColor]: flag,
74170
74489
  [OpSelectedColor]: selection
74171
74490
  });
74491
+ return;
74492
+ }
74493
+ if (blockData.updatedBy) {
74494
+ const user = blockData.updatedBy;
74495
+ const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74496
+ addClass(blockElement, "history-updated-block");
74497
+ setAttributes(blockElement, {
74498
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "update")
74499
+ });
74500
+ setStyles(blockElement, {
74501
+ [OpColor]: flag,
74502
+ [OpSelectedColor]: selection
74503
+ });
74504
+ }
74505
+ }
74506
+ renderChildContainer(editor, path, containerId) {
74507
+ const meta = editor.doc.toJSON().meta;
74508
+ const historyDocMeta = meta[containerId];
74509
+ if (historyDocMeta) {
74510
+ const { createBy } = historyDocMeta;
74511
+ if (createBy) {
74512
+ const user = createBy;
74513
+ const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74514
+ return {
74515
+ classes: ["history-inserted-container"],
74516
+ attributes: {
74517
+ [HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
74518
+ },
74519
+ styles: {
74520
+ [OpColor]: flag,
74521
+ [OpSelectedColor]: selection
74522
+ }
74523
+ };
74524
+ }
74172
74525
  }
74526
+ return {};
74173
74527
  }
74174
74528
  }
74175
74529
  const logger$t = getLogger("history-deleted-box");
@@ -74181,8 +74535,8 @@ ${content}
74181
74535
  const user = data2.user;
74182
74536
  const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
74183
74537
  span.setAttribute("history-deleted-by", user.displayName);
74184
- span.setAttribute("data-op-description", getOpDescription(user, "delete"));
74185
- span.style.setProperty(OpColor, flag);
74538
+ span.setAttribute(HISTORY_TOOLTIP_IDENTIFIER, getOpDescription(user, "delete"));
74539
+ span.style.setProperty(OpColor, removeOpacityFromHexColor(flag));
74186
74540
  span.style.setProperty(OpSelectedColor, selection);
74187
74541
  }
74188
74542
  function convertTo$9(editor, boxData, doc2, type) {
@@ -74463,6 +74817,83 @@ ${content}
74463
74817
  this.dropdown.setCurrentVersion(ver, compareWithVersion);
74464
74818
  }
74465
74819
  }
74820
+ const index$5 = "";
74821
+ class OnesEditorHistoryTooltip {
74822
+ constructor() {
74823
+ __publicField(this, "createContent", (reference) => {
74824
+ var _a;
74825
+ const style2 = getComputedStyle(reference);
74826
+ const selectedColor = style2.getPropertyValue(OpSelectedColor);
74827
+ const text2 = (_a = reference.getAttribute(HISTORY_TOOLTIP_IDENTIFIER)) != null ? _a : "";
74828
+ const contentEl = createElement("div", ["editor-history-tooltip-content"], null);
74829
+ contentEl.textContent = text2;
74830
+ contentEl.style.setProperty(OpSelectedColor, removeOpacityFromHexColor(selectedColor));
74831
+ return contentEl;
74832
+ });
74833
+ __publicField(this, "getPropsFromDifferentBlock", (reference) => {
74834
+ if (isBlock$1(reference)) {
74835
+ const blockElement = reference;
74836
+ const blockType = getBlockType(blockElement);
74837
+ if (blockType === "table") {
74838
+ return {
74839
+ offset: [-4, 6]
74840
+ };
74841
+ }
74842
+ if (blockType === "layout") {
74843
+ return {
74844
+ offset: [-4, 8]
74845
+ };
74846
+ }
74847
+ }
74848
+ return {};
74849
+ });
74850
+ __publicField(this, "onBeforeShow", (instance) => {
74851
+ const reference = instance.reference;
74852
+ if (reference.hasAttribute(HISTORY_TOOLTIP_IDENTIFIER)) {
74853
+ const props = this.getPropsFromDifferentBlock(reference);
74854
+ const getReferenceClientRect2 = () => this.getReferenceClientRect(reference);
74855
+ instance.setProps({
74856
+ ...props,
74857
+ getReferenceClientRect: getReferenceClientRect2,
74858
+ content: this.createContent(reference)
74859
+ });
74860
+ }
74861
+ });
74862
+ }
74863
+ static register(editor) {
74864
+ editor.addCustom("editor-tooltip", () => {
74865
+ const editorTooltip = new OnesEditorTooltip(editor, {
74866
+ onBeforeTooltipInitialize(props) {
74867
+ const { attributeNames = [] } = props;
74868
+ return {
74869
+ ...props,
74870
+ attributeNames: attributeNames.concat(HISTORY_TOOLTIP_IDENTIFIER),
74871
+ theme: "editor-history-tooltip",
74872
+ arrow: false,
74873
+ delay: 50,
74874
+ placement: "top-start",
74875
+ offset: [0, 2]
74876
+ };
74877
+ }
74878
+ });
74879
+ editorTooltip.registerCallback(new OnesEditorHistoryTooltip());
74880
+ return editorTooltip;
74881
+ });
74882
+ }
74883
+ getReferenceClientRect(reference) {
74884
+ if (isBlock$1(reference)) {
74885
+ const blockElement = reference;
74886
+ const blockType = getBlockType(blockElement);
74887
+ if (blockType === "table") {
74888
+ const table = blockElement.querySelector("table");
74889
+ return table.getBoundingClientRect();
74890
+ }
74891
+ }
74892
+ const referenceClientRects = reference.getClientRects();
74893
+ const [targetClientRect] = Array.from(referenceClientRects);
74894
+ return targetClientRect;
74895
+ }
74896
+ }
74466
74897
  const logger$r = getLogger("version-dialog");
74467
74898
  class OnesEditorVersionsDialog {
74468
74899
  constructor(server, provider) {
@@ -74473,6 +74904,10 @@ ${content}
74473
74904
  __publicField(this, "provider");
74474
74905
  __publicField(this, "versions", []);
74475
74906
  __publicField(this, "components");
74907
+ __publicField(this, "handleBeforeShowTooltip", (instance) => {
74908
+ console.log(instance);
74909
+ return false;
74910
+ });
74476
74911
  __publicField(this, "handleRevert", async (ver) => {
74477
74912
  var _a, _b, _c;
74478
74913
  assert(logger$r, this.versionList, "The versionList did not render");
@@ -74533,6 +74968,7 @@ ${content}
74533
74968
  viewer.editorBlockRenders.registerRender(new OnesEditorHistoryRender());
74534
74969
  viewer.editorBoxes.registerBoxClass(HistoryDeletedTextBox);
74535
74970
  (_c = (_b = this.versionOptions) == null ? void 0 : _b.textRenders) == null ? void 0 : _c.forEach((render) => viewer.editorBlockRenders.registerRender(render));
74971
+ OnesEditorHistoryTooltip.register(viewer);
74536
74972
  addClass(viewer.rootElement, HistoryClass.HISTORY);
74537
74973
  try {
74538
74974
  await playHistoryData(historyDoc, this.versionHelper, historyData);
@@ -74647,7 +75083,7 @@ ${content}
74647
75083
  this.dialog = new Dialog$1(root2);
74648
75084
  }
74649
75085
  this.dialog.show(options.container);
74650
- this.versions = await this.versionHelper.getVersions();
75086
+ this.versions = await this.versionHelper.getVersions(options.showPublishedVersions);
74651
75087
  removeClass(this.components.root, "loading");
74652
75088
  if (this.versionOptions.onVersionsLoaded) {
74653
75089
  this.versionOptions.onVersionsLoaded(this, this.versions);
@@ -81288,7 +81724,6 @@ ${data2.flowchartText}
81288
81724
  });
81289
81725
  editor.readonly = true;
81290
81726
  editor.addCustom("heading-collapse", () => new HeadingBlockCollapseButton(editor));
81291
- editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
81292
81727
  editor.addListener("clickLink", (editor2, event, link2) => {
81293
81728
  var _a2;
81294
81729
  if ((_a2 = options == null ? void 0 : options.events) == null ? void 0 : _a2.onClickLink) {
@@ -83104,7 +83539,7 @@ ${data2.flowchartText}
83104
83539
  }
83105
83540
  }
83106
83541
  });
83107
- editor.version = "2.1.7";
83542
+ editor.version = "2.1.8-beta.2";
83108
83543
  if (Logger$2.level === LogLevel.DEBUG) {
83109
83544
  window.setReauthFail = (fail) => {
83110
83545
  window.isReauthError = fail;
@@ -83199,7 +83634,7 @@ ${data2.flowchartText}
83199
83634
  if (!clientType.isMobile) {
83200
83635
  OnesEditorToolbar.register(editor);
83201
83636
  }
83202
- editor.version = "2.1.7";
83637
+ editor.version = "2.1.8-beta.2";
83203
83638
  return editor;
83204
83639
  }
83205
83640
  async function showDocVersions(editor, options, serverUrl) {
@@ -128988,7 +129423,7 @@ ${data2.flowchartText}
128988
129423
  exports2.OnesEditorCustomDataWrapper = OnesEditorCustomDataWrapper;
128989
129424
  exports2.OnesEditorExclusiveBlock = OnesEditorExclusiveBlock;
128990
129425
  exports2.OnesEditorHoveringBlock = OnesEditorHoveringBlock;
128991
- exports2.OnesEditorIcons = index$f;
129426
+ exports2.OnesEditorIcons = index$g;
128992
129427
  exports2.OnesEditorQuickMenu = OnesEditorQuickMenu;
128993
129428
  exports2.OnesEditorToc = OnesEditorToc;
128994
129429
  exports2.OnesEditorTocProvider = OnesEditorTocProvider;