@seafile/seafile-editor 0.3.76

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.
Files changed (156) hide show
  1. package/README.md +119 -0
  2. package/TODO.md +55 -0
  3. package/dist/components/add-formula-dialog.js +135 -0
  4. package/dist/components/add-image-dialog.js +78 -0
  5. package/dist/components/add-link-dialog.js +148 -0
  6. package/dist/components/comment-dialog.js +107 -0
  7. package/dist/components/comment-panel.js +452 -0
  8. package/dist/components/context-menu.js +112 -0
  9. package/dist/components/detail-list-view.js +119 -0
  10. package/dist/components/generate-share-link.js +412 -0
  11. package/dist/components/internal-link-dialog.js +96 -0
  12. package/dist/components/loading.js +32 -0
  13. package/dist/components/markdown-lint.js +87 -0
  14. package/dist/components/modal-portal.js +46 -0
  15. package/dist/components/outline.js +130 -0
  16. package/dist/components/participants-list.js +126 -0
  17. package/dist/components/related-files-list.js +75 -0
  18. package/dist/components/shortcut-dialog.js +167 -0
  19. package/dist/components/side-panel.js +175 -0
  20. package/dist/components/toast/alert.js +150 -0
  21. package/dist/components/toast/index.js +3 -0
  22. package/dist/components/toast/toast.js +179 -0
  23. package/dist/components/toast/toastManager.js +158 -0
  24. package/dist/components/toast/toaster.js +76 -0
  25. package/dist/components/toolbar.js +235 -0
  26. package/dist/components/topbar-component/button-group.js +31 -0
  27. package/dist/components/topbar-component/editor-toolbar.js +545 -0
  28. package/dist/components/topbar-component/file-info.js +65 -0
  29. package/dist/components/topbar-component/header-list.js +128 -0
  30. package/dist/components/topbar-component/icon-button.js +99 -0
  31. package/dist/components/topbar-component/insert-file.js +67 -0
  32. package/dist/components/topbar-component/table-toolbar.js +175 -0
  33. package/dist/components/topbar-component/upload-img.js +122 -0
  34. package/dist/components/user-help.js +205 -0
  35. package/dist/css/diff-viewer.css +105 -0
  36. package/dist/css/history-viewer.css +104 -0
  37. package/dist/css/keyboard-shortcuts.css +59 -0
  38. package/dist/css/layout.css +110 -0
  39. package/dist/css/markdown-viewer-slate/file-tags-list.css +76 -0
  40. package/dist/css/markdown-viewer.css +69 -0
  41. package/dist/css/plaineditor/markdown-editor.css +12 -0
  42. package/dist/css/react-mentions-default-style.js +72 -0
  43. package/dist/css/related-files-list.css +56 -0
  44. package/dist/css/richeditor/comments-list.css +184 -0
  45. package/dist/css/richeditor/detail-list-view.css +114 -0
  46. package/dist/css/richeditor/document-info.css +57 -0
  47. package/dist/css/richeditor/formula.css +19 -0
  48. package/dist/css/richeditor/image.css +141 -0
  49. package/dist/css/richeditor/link.css +7 -0
  50. package/dist/css/richeditor/navbar-imgbutton.css +79 -0
  51. package/dist/css/richeditor/participants-list.css +22 -0
  52. package/dist/css/richeditor/rich-editor-main.css +42 -0
  53. package/dist/css/richeditor/right-panel.css +84 -0
  54. package/dist/css/richeditor/side-panel.css +190 -0
  55. package/dist/css/richeditor/table.css +57 -0
  56. package/dist/css/richeditor/textlink-hovermenu.css +47 -0
  57. package/dist/css/richeditor/tree-view.css +67 -0
  58. package/dist/css/topbar.css +400 -0
  59. package/dist/editor/code-highlight-package.js +27 -0
  60. package/dist/editor/controller/block-element-controller.js +376 -0
  61. package/dist/editor/controller/inline-element-controller.js +129 -0
  62. package/dist/editor/controller/normalize-controller.js +107 -0
  63. package/dist/editor/controller/shortcut-controller.js +394 -0
  64. package/dist/editor/controller/void-element-controller.js +12 -0
  65. package/dist/editor/custom/custom.js +17 -0
  66. package/dist/editor/custom/get-event-transfer.js +34 -0
  67. package/dist/editor/custom/getNodesByTypeAtRange.js +69 -0
  68. package/dist/editor/custom/insertNodes.js +140 -0
  69. package/dist/editor/custom/is-empty-paragraph.js +13 -0
  70. package/dist/editor/custom/set-event-transfer.js +31 -0
  71. package/dist/editor/custom/split-nodes-at-point.js +162 -0
  72. package/dist/editor/custom/unwrap-node-by-type-at-range.js +81 -0
  73. package/dist/editor/editor-component/check-list-item.js +64 -0
  74. package/dist/editor/editor-component/code-block.js +150 -0
  75. package/dist/editor/editor-component/formula.js +79 -0
  76. package/dist/editor/editor-component/image.js +215 -0
  77. package/dist/editor/editor-component/link.js +11 -0
  78. package/dist/editor/editor-component/table.js +172 -0
  79. package/dist/editor/editor-component/textlink-hovermenu.js +136 -0
  80. package/dist/editor/editor-plugin.js +249 -0
  81. package/dist/editor/editor-utils/block-element-utils/blockquote-utils.js +96 -0
  82. package/dist/editor/editor-utils/block-element-utils/code-utils.js +162 -0
  83. package/dist/editor/editor-utils/block-element-utils/formula-utils.js +58 -0
  84. package/dist/editor/editor-utils/block-element-utils/index.js +38 -0
  85. package/dist/editor/editor-utils/block-element-utils/list-utils.js +398 -0
  86. package/dist/editor/editor-utils/block-element-utils/table-utils.js +418 -0
  87. package/dist/editor/editor-utils/common-editor-utils.js +587 -0
  88. package/dist/editor/editor-utils/inline-element-utils/index.js +95 -0
  89. package/dist/editor/editor-utils/mark-utils.js +25 -0
  90. package/dist/editor/editor-utils/range-utils.js +9 -0
  91. package/dist/editor/editor-utils/selection-utils.js +33 -0
  92. package/dist/editor/editor-utils/text-utils.js +130 -0
  93. package/dist/editor/editor.js +66 -0
  94. package/dist/editor/element-model/blockquote.js +16 -0
  95. package/dist/editor/element-model/image.js +19 -0
  96. package/dist/editor/element-model/link.js +19 -0
  97. package/dist/editor/element-model/table.js +50 -0
  98. package/dist/editor/element-model/text.js +13 -0
  99. package/dist/editor/load-script.js +83 -0
  100. package/dist/editor/plain-markdown-editor.js +324 -0
  101. package/dist/editor/rich-markdown-editor.js +580 -0
  102. package/dist/editor/seafile-editor.js +326 -0
  103. package/dist/editor/simple-editor.js +245 -0
  104. package/dist/editor-api.js +261 -0
  105. package/dist/index.css +97 -0
  106. package/dist/lib/slate-hyperscript/creators.js +263 -0
  107. package/dist/lib/slate-hyperscript/hyperscript.js +92 -0
  108. package/dist/lib/slate-hyperscript/index.js +3 -0
  109. package/dist/lib/slate-hyperscript/tokens.js +102 -0
  110. package/dist/lib/unified/index.js +470 -0
  111. package/dist/lib/vfile/core.js +172 -0
  112. package/dist/lib/vfile/index.js +48 -0
  113. package/dist/seafile-editor-chooser.js +45 -0
  114. package/dist/seafile-markdown-editor.js +301 -0
  115. package/dist/seafile-markdown-viewer.js +79 -0
  116. package/dist/seafile-simple-editor.js +56 -0
  117. package/dist/utils/copy-to-clipboard.js +47 -0
  118. package/dist/utils/deserialize-html.js +282 -0
  119. package/dist/utils/diff/compare-strings.js +46 -0
  120. package/dist/utils/diff/diff.js +855 -0
  121. package/dist/utils/diff/index.js +2 -0
  122. package/dist/utils/render-slate.js +219 -0
  123. package/dist/utils/seafile-markdown2html.js +62 -0
  124. package/dist/utils/slate2markdown/deserialize.js +689 -0
  125. package/dist/utils/slate2markdown/index.js +3 -0
  126. package/dist/utils/slate2markdown/serialize.js +407 -0
  127. package/dist/utils/utils.js +28 -0
  128. package/dist/viewer/diff-viewer.js +98 -0
  129. package/dist/viewer/markdown-viewer.js +139 -0
  130. package/dist/viewer/slate-viewer.js +73 -0
  131. package/dist/viewer/viewer-formula.js +67 -0
  132. package/dist/viewer/viewer-image.js +93 -0
  133. package/dist/viewer/viewer-outline.js +118 -0
  134. package/package.json +215 -0
  135. package/public/favicon.ico +0 -0
  136. package/public/index.html +45 -0
  137. package/public/locales/cs/seafile-editor.json +169 -0
  138. package/public/locales/de/seafile-editor.json +169 -0
  139. package/public/locales/en/seafile-editor.json +222 -0
  140. package/public/locales/es/seafile-editor.json +169 -0
  141. package/public/locales/es-AR/seafile-editor.json +169 -0
  142. package/public/locales/es-MX/seafile-editor.json +169 -0
  143. package/public/locales/fr/seafile-editor.json +169 -0
  144. package/public/locales/it/seafile-editor.json +169 -0
  145. package/public/locales/ru/seafile-editor.json +169 -0
  146. package/public/locales/zh-CN/seafile-editor.json +219 -0
  147. package/public/manifest.json +15 -0
  148. package/public/media/scripts/mathjax/tex-svg.js +1 -0
  149. package/public/media/seafile-editor-font/iconfont.eot +0 -0
  150. package/public/media/seafile-editor-font/iconfont.svg +164 -0
  151. package/public/media/seafile-editor-font/iconfont.ttf +0 -0
  152. package/public/media/seafile-editor-font/iconfont.woff +0 -0
  153. package/public/media/seafile-editor-font/iconfont.woff2 +0 -0
  154. package/public/media/seafile-editor-font.css +201 -0
  155. package/public/media/seafile-logo.png +0 -0
  156. package/public/media/seafile-ui.css +11169 -0
@@ -0,0 +1,400 @@
1
+ .seafile-btn-view-review {
2
+ display: flex;
3
+ align-items: center;
4
+ }
5
+
6
+ .seafile-btn-view-review .tag:hover {
7
+ cursor: pointer;
8
+ }
9
+
10
+ .topbar-btn-container {
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+
15
+ .seafile-btn-add-review {
16
+ margin-right: 10px;
17
+ }
18
+
19
+ .btn-new-draft {
20
+ margin-right: 10px;
21
+ }
22
+
23
+ .collab-users-dropdown.dropdown {
24
+ margin-right: 6px;
25
+ }
26
+
27
+ .seafile-btn-group div button {
28
+ border: none;
29
+ }
30
+
31
+ .seafile-btn-group div button:not(.dropdown-item) {
32
+ border-top: 1px solid #e5e5e5;
33
+ border-bottom: 1px solid #e5e5e5;
34
+ border-right: 1px solid #e5e5e5;
35
+ border-radius: 0;
36
+ }
37
+
38
+ .seafile-btn-group div:first-child button {
39
+ border-radius: 3px 0 0 3px;
40
+ border-left: 1px solid #e5e5e5;
41
+ }
42
+
43
+ .seafile-btn-group div:last-child button {
44
+ border-radius: 0 3px 3px 0;
45
+ border-right: 1px solid #e5e5e5;
46
+ }
47
+
48
+ .seafile-btn-group div button:disabled {
49
+ border-color: #e5e5e5;
50
+ }
51
+
52
+ /*topbar style*/
53
+ .menu > * {
54
+ display: inline-block;
55
+ }
56
+
57
+ .menu > * + * {
58
+ margin-left: 10px;
59
+ }
60
+
61
+ .btn-active {
62
+ color: #0c0c0c;
63
+ cursor: pointer;
64
+ }
65
+
66
+ .rich-icon-btn[data-active='true'] {
67
+ color: #eb8205;
68
+ }
69
+
70
+ .btn-active[data-active='true'] {
71
+ color: #eb8205;
72
+ }
73
+ .tableToolBar {
74
+ font-size: 12px;
75
+ display: inline-flex;
76
+ }
77
+
78
+ .tableToolBar div .symbol {
79
+ font-size: 14px;
80
+ }
81
+
82
+ .tableToolBar .btn {
83
+ color: #555555;
84
+ }
85
+
86
+ .tableToolBar:after {
87
+ content: '';
88
+ display: block;
89
+ clear: both;
90
+ }
91
+
92
+ .table-toolbar-group {
93
+ height: 100%;
94
+ display: flex;
95
+ align-items: center;
96
+ border-right: 1px solid #e5e5e5;
97
+ padding-right: 10px;
98
+ }
99
+
100
+ .tableToolBar div:not(first):not(.drop-list) {
101
+ /*display: inline-block;*/
102
+ margin-left:10px;
103
+ }
104
+
105
+ /*topbar style*/
106
+
107
+ .menu {
108
+ margin-right: 20px;
109
+ }
110
+
111
+ .rich-menu {
112
+ flex: 1;
113
+ display: flex;
114
+ justify-content: center;
115
+ height: 39px;
116
+ align-items: center;
117
+ padding: 0 10px;
118
+ background-color: #fcfcfc;
119
+ }
120
+
121
+ .topbar-head {
122
+ width: 100%;
123
+ height: 56px;
124
+ display: flex;
125
+ justify-content: space-between;
126
+ border-bottom: 1px solid #e5e5e5;
127
+ padding: 4px 10px;
128
+ }
129
+
130
+ .editor-info {
131
+ display: flex;
132
+ align-items: center;
133
+ }
134
+
135
+ .button-container {
136
+ height: 100%;
137
+ display: flex;
138
+ align-items: center;
139
+ }
140
+
141
+ .button-container .btn {
142
+ background-color: #fcfcfc;
143
+ }
144
+
145
+ .button-container .rich-icon-btn {
146
+ background-color: #fcfcfc;
147
+ }
148
+
149
+ .button-container .dropdown-menu-right .iconfont {
150
+ display: inline-block;
151
+ transform: scale(0.8);
152
+ font-size: 0.875rem;
153
+ font-weight: 900;
154
+ }
155
+
156
+ .seafile-rich-editor-topbar .editor-btn-group {
157
+ height: 100%;
158
+ padding: 5px 0 5px 5px;
159
+ font-size: 0.75rem;
160
+ border-right: 1px solid #e5e5e5;
161
+ color: #555555;
162
+ }
163
+
164
+ .header-list-container {
165
+ height: 39px;
166
+ border-right: 1px solid #e5e5e5;
167
+ width: 140px;
168
+ padding: 5px 5px;
169
+ box-sizing: border-box;
170
+ border-left: 1px solid #e5e5e5;
171
+ }
172
+
173
+ .header-list-container .header-list {
174
+ position: relative;
175
+ width: 100%;
176
+ height: 100%;
177
+ }
178
+
179
+ .header-list-container .header-list-body-highlight {
180
+ background-color: #e5e5e5;
181
+ }
182
+
183
+ .header-list-container .header-list-body-hover:hover {
184
+ background-color: #e5e5e5;
185
+ }
186
+
187
+ .header-list-container .list-body {
188
+ width: 100%;
189
+ height: 100%;
190
+ display: flex;
191
+ line-height: 100%;
192
+ vertical-align: middle;
193
+ justify-content: space-between;
194
+ border-radius: 2px;
195
+ padding: 0 3px;
196
+ }
197
+
198
+
199
+ .list-body div {
200
+ display: inline-block;
201
+ line-height: 30px;
202
+ }
203
+ .header-list-container .list-dropdown {
204
+ position: absolute;
205
+ left: 0;
206
+ top: 32px;
207
+ border: 1px solid #e5e5e5;
208
+ border-radius: 2px;
209
+ padding: 8px 0;
210
+ box-shadow: 0 0 10px #ccc;
211
+ background-color: #ffffff;
212
+ min-width: max-content;
213
+ box-sizing: border-box;
214
+ }
215
+
216
+ .header-list-container .header-list .list-dropdown-item {
217
+ cursor: pointer;
218
+ height: 30px;
219
+ width: 100%;
220
+ padding: 4px 24px;
221
+ }
222
+
223
+ .header-list-container .header-list .list-dropdown-item:hover {
224
+ background-color: rgb(245, 245, 245);
225
+ }
226
+
227
+ .rich-icon-btn {
228
+ border: 1px solid transparent;
229
+ height: 100%;
230
+ width: 30px;
231
+ line-height: 30px;
232
+ margin-right: 10px;
233
+ color: #555555;
234
+ }
235
+
236
+ .rich-icon-btn-disabled {
237
+ color: #999999;
238
+ }
239
+
240
+ .rich-icon-btn-hover:hover {
241
+ background-color: #e5e5e5;
242
+ border-radius: 2px;
243
+ }
244
+
245
+ .rich-dropdown {
246
+ border: none;
247
+ margin-left: 10px;
248
+ color: #555555;
249
+ }
250
+
251
+ .tableToolBar .table-toolbar-btn {
252
+ line-height: 28px;
253
+ padding: 0 15px;
254
+ height: 30px;
255
+ }
256
+
257
+ .file-go-back {
258
+ display: inline-block;
259
+ font-size: 28px;
260
+ color: #c0c0c0;
261
+ margin-right: 8px;
262
+ }
263
+ .file-go-back:hover {
264
+ cursor: pointer;
265
+ }
266
+ .file-go-back i {
267
+ vertical-align: 5px;
268
+ }
269
+
270
+ .topbar-file-info {
271
+ display: inline-block;
272
+ margin-left: 8px;
273
+ /*
274
+ only select file info text
275
+ */
276
+ user-select: text;
277
+ }
278
+ .topbar-file-info .file-title {
279
+ font-size: 1.2rem;
280
+ font-weight: bold;
281
+ }
282
+
283
+ .topbar-file-info .file-title .iconfont {
284
+ font-size: 0.875rem;
285
+ }
286
+
287
+ .file-title .file-star,
288
+ .file-title .file-internal-link {
289
+ font-size: 0.875rem;
290
+ cursor: pointer;
291
+ margin-left: 0.5rem;
292
+ vertical-align: text-bottom;
293
+ color: #999;
294
+ }
295
+
296
+ .file-title .file-star .star {
297
+ color: #999;
298
+ }
299
+
300
+ .topbar-file-info .file-state .file-modifier-name {
301
+ margin-right: 0.5rem;
302
+ }
303
+
304
+ .topbar-file-info .file-state .file-modifier-savedraft {
305
+ margin-left: 0.5rem;
306
+ color: #888;
307
+ }
308
+
309
+ .topbar-file-info .file-state {
310
+ font-size: 0.8125rem;
311
+ }
312
+
313
+ .file-internal-link:hover {
314
+ color: #333;
315
+ }
316
+
317
+ p.tip {
318
+ color: #bbb;
319
+ }
320
+
321
+ .tag a {
322
+ color: #fff;
323
+ text-decoration: underline !important;
324
+ }
325
+
326
+ .tag a:hover {
327
+ color: #eb8205 !important;
328
+ }
329
+
330
+ .custom-dropdown-list {
331
+ position: relative;
332
+ margin-right: 10px;
333
+ }
334
+
335
+ .custom-dropdown-list .dropdown-list-toggle {
336
+ width: 30px;
337
+ height: 28px;
338
+ text-align: center;
339
+ line-height: 28px;
340
+ font-size: 0.75rem;
341
+ }
342
+
343
+ .custom-dropdown-list .dropdown-list-toggle:hover {
344
+ background-color: #e5e5e5;
345
+ border-radius: 3px;
346
+ }
347
+ .custom-dropdown-list .custom-dropdown-menu {
348
+ position: absolute;
349
+ left: 0;
350
+ font-size: 0.85rem;
351
+ top: 28px;
352
+ display: block;
353
+ background-color: #ffffff;
354
+ }
355
+
356
+ @media (max-width: 991.8px) {
357
+ .seafile-md-viewer-main-panel {
358
+ margin: 0 2%;
359
+ }
360
+ .topbar-file-info .file-title {
361
+ min-width: 150px;
362
+ }
363
+ .rich-menu {
364
+ overflow-x: auto;
365
+ }
366
+ .rich-menu::-webkit-scrollbar{
367
+ display: none;
368
+ }
369
+ .rich-menu .button-container {
370
+ width: stretch;
371
+ }
372
+ .list-body div {
373
+ margin-left: 10px;
374
+ }
375
+ }
376
+
377
+ .sf-editor-rich-menu {
378
+ height: 39px;
379
+ background-color: #fcfcfc;
380
+ }
381
+
382
+ .seafile-simple-editor {
383
+ height: 100%;
384
+ min-width: 768px;
385
+ display: flex;
386
+ flex-direction: column;
387
+ overflow: hidden;
388
+ border: 1px solid #e5e5e5;
389
+ }
390
+
391
+ .seafile-simple-editor .editor {
392
+ margin: 0;
393
+ padding: 10px;
394
+ height: 100%;
395
+ border: none;
396
+ }
397
+
398
+ .seafile-simple-editor .header-list-container {
399
+ border-left: 0;
400
+ }
@@ -0,0 +1,27 @@
1
+ require('prismjs/components/prism-c.min');
2
+
3
+ require('prismjs/components/prism-cpp.min');
4
+
5
+ require('prismjs/components/prism-csharp.min');
6
+
7
+ require('prismjs/components/prism-java.min');
8
+
9
+ require('prismjs/components/prism-python.min');
10
+
11
+ require('prismjs/components/prism-sql.min');
12
+
13
+ require('prismjs/components/prism-swift.min');
14
+
15
+ require('prismjs/components/prism-json.min');
16
+
17
+ require('prismjs/themes/prism.css');
18
+
19
+ require('prismjs/plugins/toolbar/prism-toolbar.css');
20
+
21
+ require('prismjs/plugins/line-numbers/prism-line-numbers.css');
22
+
23
+ require('prismjs/plugins/toolbar/prism-toolbar.min');
24
+
25
+ require('prismjs/plugins/show-language/prism-show-language.min');
26
+
27
+ require('prismjs/plugins/line-numbers/prism-line-numbers.min');