texditor 2.0.1 → 2.0.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/LICENSE.md +9 -9
- package/README.md +10 -7
- package/dist/entities/blocks/files/actions/index.d.ts +7 -0
- package/dist/entities/blocks/files/actions/index.d.ts.map +1 -0
- package/dist/entities/blocks/files/actions.d.ts +2 -0
- package/dist/entities/blocks/files/actions.mjs +6 -0
- package/dist/styles/theme.css +42 -42
- package/dist/texditor.mjs +3 -2
- package/package.json +14 -2
- package/dist/styles/animations.css +0 -1
- package/dist/styles/core/ui/selection.css +0 -1
- package/dist/styles/core/ui/slider.css +0 -1
- package/dist/styles/entities/blocks/code.css +0 -1
- package/dist/styles/entities/blocks/files.css +0 -1
- package/dist/styles/entities/blocks/gallery.css +0 -1
- package/dist/styles/entities/blocks/list.css +0 -1
- package/dist/styles/entities/blocks/paragraph.css +0 -1
- package/dist/styles/entities/tools/inline-code.css +0 -1
- package/dist/styles/entities/tools/link.css +0 -1
- package/dist/styles/texditor.css +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Eduard Yakhin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Eduard Yakhin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -45,7 +45,6 @@ Include the styles and initialize the editor:
|
|
|
45
45
|
|
|
46
46
|
```javascript
|
|
47
47
|
import 'texditor/styles/theme.css'; // Theme variables
|
|
48
|
-
import 'texditor/styles/texditor.css'; // Core styles
|
|
49
48
|
import Texditor from 'texditor';
|
|
50
49
|
|
|
51
50
|
const editor = new Texditor({
|
|
@@ -65,12 +64,16 @@ Configure blocks, tools, extensions, and localization:
|
|
|
65
64
|
|
|
66
65
|
```javascript
|
|
67
66
|
import Texditor from 'texditor';
|
|
68
|
-
import { Paragraph, H1, H2, H3, H4, H5, H6, List, OrderedList, Code, Gallery, Files } from 'texditor/blocks';
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
import { Paragraph, H1, H2, H3, H4, H5, H6, List, OrderedList, Code, Gallery, Files } from 'texditor/entities/blocks';
|
|
68
|
+
import {
|
|
69
|
+
BoldTool,
|
|
70
|
+
ItalicTool,
|
|
71
|
+
LinkTool,
|
|
72
|
+
ClearFormattingTool,
|
|
73
|
+
SubscriptTool,
|
|
74
|
+
SuperscriptTool,
|
|
75
|
+
} from 'texditor/entities/tools';
|
|
76
|
+
import { Undo, Redo } from 'texditor/entities/extensions';
|
|
74
77
|
import { EnLocale, RuLocale } from 'texditor/locales';
|
|
75
78
|
|
|
76
79
|
const editor = new Texditor({
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as MoveRightFileAction } from './MoveRightFileAction';
|
|
2
|
+
import { default as MoveLeftFileAction } from './MoveLeftFileAction';
|
|
3
|
+
import { default as EditFileAction } from './EditFileAction';
|
|
4
|
+
import { default as DownloadFileAction } from './DownloadFileAction';
|
|
5
|
+
import { default as DeleteFileAction } from './DeleteFileAction';
|
|
6
|
+
export { MoveRightFileAction, MoveLeftFileAction, DownloadFileAction, DeleteFileAction, EditFileAction };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/blocks/files/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import e from "../../../src/entities/blocks/files/actions/MoveRightFileAction.mjs";
|
|
2
|
+
import t from "../../../src/entities/blocks/files/actions/MoveLeftFileAction.mjs";
|
|
3
|
+
import n from "../../../src/entities/blocks/files/actions/DeleteFileAction.mjs";
|
|
4
|
+
import r from "../../../src/entities/blocks/files/actions/EditFileAction.mjs";
|
|
5
|
+
import i from "../../../src/entities/blocks/files/actions/DownloadFileAction.mjs";
|
|
6
|
+
export { n as DeleteFileAction, i as DownloadFileAction, r as EditFileAction, t as MoveLeftFileAction, e as MoveRightFileAction };
|
package/dist/styles/theme.css
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--tex-max-width: 650px;
|
|
3
|
-
--tex-vs-ui-bg: rgba(59, 130, 246, 0.15);
|
|
4
|
-
--tex-vs-ui-border: 2px dashed #3b82f6;
|
|
5
|
-
--tex-vs-ui-radius: 4px;
|
|
6
|
-
--tex-vs-ui-selected-bg: rgba(59, 130, 246, 0.1);
|
|
7
|
-
--tex-vs-ui-selected-border-color: #3b82f6;
|
|
8
|
-
--tex-fill: rgba(100, 100, 100, 0.7);
|
|
9
|
-
--tex-background: #fff;
|
|
10
|
-
--tex-color: #222;
|
|
11
|
-
--tex-input-background: #f5f5f5;
|
|
12
|
-
--tex-input-border: rgba(179, 179, 179, 0.2);
|
|
13
|
-
--tex-input-color: #333;
|
|
14
|
-
--tex-color-secondary: #42d392;
|
|
15
|
-
--tex-color-light: rgba(55, 55, 55, 0.5);
|
|
16
|
-
--tex-background-lite: rgba(204, 255, 204, 0.3);
|
|
17
|
-
--tex-background-secondary: rgba(150, 150, 150, 0.07);
|
|
18
|
-
--tex-progress-background: #34785a;
|
|
19
|
-
--tex-background-overlay: rgba(150, 150, 150, 0.7);
|
|
20
|
-
--tex-progress-color: #70c29e;
|
|
21
|
-
--tex-shadow-color: rgb(33, 33, 33, 0.4);
|
|
22
|
-
--tex-border-color: rgba(179, 179, 179, 0.2);
|
|
23
|
-
--tex-error: #e6004c;
|
|
24
|
-
--tex-success: #1e764e;
|
|
25
|
-
--tex-message-font-size: 12px;
|
|
26
|
-
--tex-small-font-size: 10px;
|
|
27
|
-
--tex-button-bg: #42d392;
|
|
28
|
-
--tex-button-border-color: #42d392;
|
|
29
|
-
--tex-button-text-color: #fff;
|
|
30
|
-
--tex-button-secondary-bg: rgba(225, 225, 225, 0.3);
|
|
31
|
-
--tex-button-secondary-border-color: rgba(225, 225, 225, 0.5);
|
|
32
|
-
--tex-button-secondary-text-color: #888;
|
|
33
|
-
--tex-extensions-fixed-bg: rgba(255, 255, 255, 0.7);
|
|
34
|
-
--tex-extensions-fixed-blur: 8px;
|
|
35
|
-
--tex-selected-outline: #1e764e;
|
|
36
|
-
--tex-selected-background: rgba(30, 118, 78, 0.1);
|
|
37
|
-
--tex-font-size-small: 12px;
|
|
38
|
-
--tex-actions-top: 0;
|
|
39
|
-
--tex-actions-top-mobile: -28px;
|
|
40
|
-
--tex-actions-left: -24px;
|
|
41
|
-
--tex-actions-left-mobile: 0;
|
|
42
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--tex-max-width: 650px;
|
|
3
|
+
--tex-vs-ui-bg: rgba(59, 130, 246, 0.15);
|
|
4
|
+
--tex-vs-ui-border: 2px dashed #3b82f6;
|
|
5
|
+
--tex-vs-ui-radius: 4px;
|
|
6
|
+
--tex-vs-ui-selected-bg: rgba(59, 130, 246, 0.1);
|
|
7
|
+
--tex-vs-ui-selected-border-color: #3b82f6;
|
|
8
|
+
--tex-fill: rgba(100, 100, 100, 0.7);
|
|
9
|
+
--tex-background: #fff;
|
|
10
|
+
--tex-color: #222;
|
|
11
|
+
--tex-input-background: #f5f5f5;
|
|
12
|
+
--tex-input-border: rgba(179, 179, 179, 0.2);
|
|
13
|
+
--tex-input-color: #333;
|
|
14
|
+
--tex-color-secondary: #42d392;
|
|
15
|
+
--tex-color-light: rgba(55, 55, 55, 0.5);
|
|
16
|
+
--tex-background-lite: rgba(204, 255, 204, 0.3);
|
|
17
|
+
--tex-background-secondary: rgba(150, 150, 150, 0.07);
|
|
18
|
+
--tex-progress-background: #34785a;
|
|
19
|
+
--tex-background-overlay: rgba(150, 150, 150, 0.7);
|
|
20
|
+
--tex-progress-color: #70c29e;
|
|
21
|
+
--tex-shadow-color: rgb(33, 33, 33, 0.4);
|
|
22
|
+
--tex-border-color: rgba(179, 179, 179, 0.2);
|
|
23
|
+
--tex-error: #e6004c;
|
|
24
|
+
--tex-success: #1e764e;
|
|
25
|
+
--tex-message-font-size: 12px;
|
|
26
|
+
--tex-small-font-size: 10px;
|
|
27
|
+
--tex-button-bg: #42d392;
|
|
28
|
+
--tex-button-border-color: #42d392;
|
|
29
|
+
--tex-button-text-color: #fff;
|
|
30
|
+
--tex-button-secondary-bg: rgba(225, 225, 225, 0.3);
|
|
31
|
+
--tex-button-secondary-border-color: rgba(225, 225, 225, 0.5);
|
|
32
|
+
--tex-button-secondary-text-color: #888;
|
|
33
|
+
--tex-extensions-fixed-bg: rgba(255, 255, 255, 0.7);
|
|
34
|
+
--tex-extensions-fixed-blur: 8px;
|
|
35
|
+
--tex-selected-outline: #1e764e;
|
|
36
|
+
--tex-selected-background: rgba(30, 118, 78, 0.1);
|
|
37
|
+
--tex-font-size-small: 12px;
|
|
38
|
+
--tex-actions-top: 0;
|
|
39
|
+
--tex-actions-top-mobile: -28px;
|
|
40
|
+
--tex-actions-left: -24px;
|
|
41
|
+
--tex-actions-left-mobile: 0;
|
|
42
|
+
}
|
package/dist/texditor.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.tex-animate-fadeIn{animation-name:fadeIn;animation-duration:.5s;animation-fill-mode:both}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.tex-ui-vs-selected{transition:background .1s;background:var(--tex-vs-ui-selected-bg)!important;border-color:var(--tex-vs-ui-selected-border-color)!important}.tex-ui-vs-rect{border:var(--tex-vs-ui-border);background:var(--tex-vs-ui-bg);pointer-events:none;z-index:10000;border-radius:var(--tex-vs-ui-radius);will-change:left, top, width, height;display:none;position:fixed}.tex-slider{width:100%;display:block;position:relative;overflow:hidden}.tex-slider-container{transition:transform .3s ease-in-out;display:flex}.tex-slide{background:var(--tex-background-secondary);box-sizing:border-box;border:1px solid #ddd;justify-content:center;align-items:center;min-height:120px;max-height:500px;font-size:24px;display:flex}.tex-slider-btn{background:var(--tex-background);cursor:pointer;z-index:10;opacity:.6;width:32px;height:32px;color:var(--tex-fill);border:none;border-radius:50%;justify-content:center;align-items:center;font-size:20px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.tex-slider-btn:hover{opacity:.4;transform:translateY(-50%)scale(1.1)}.tex-slider-btn.tex-slider-prev{left:10px}.tex-slider-btn.tex-slider-next{right:10px}.tex-slider-dots{z-index:10;gap:8px;display:flex;position:absolute;bottom:15px;left:50%;transform:translate(-50%)}.tex-slider-dot{background:var(--tex-background);cursor:pointer;opacity:.7;border:none;border-radius:50%;width:10px;height:10px;padding:0;transition:all .2s}.tex-slider-dot:hover{opacity:.4}.tex-slider-dot.active{background:var(--tex-button-bg);opacity:1;transform:scale(1.2)}.tex-code{position:relative}.tex-code pre{background-color:var(--tex-background-secondary);white-space:pre-wrap;border:0;border-radius:6px}.tex-block.tex-code .tex-block-content{padding-top:32px}.tex-code .tex-block-content{min-height:60px;padding:4px 8px;transition:all .3s}.tex-code-lang{z-index:10;position:absolute;top:4px;left:8px}.tex-code-lang-link{color:var(--tex-color);cursor:pointer;align-items:center;gap:8px;font-weight:600;transition:opacity .3s;display:flex}.tex-code-menu{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:8px;width:200px;max-height:200px;margin-top:6px;display:none;position:absolute;left:0;overflow:hidden auto}.tex-code-menu-item{border-bottom:1px solid var(--tex-border-color);cursor:pointer;padding:4px 12px;transition:all .5s}.tex-code-menu-item:last-child{border-bottom:0}.tex-code-menu-search{border-bottom:1px solid var(--tex-border-color);padding:8px}.tex-code-menu-search input{width:100%}.tex-code.tex-block-active .tex-code-line-break-info{display:flex}.tex-code-line-break-info{color:var(--tex-color-light);-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-size:12px;display:none;position:absolute;top:4px;right:8px}@media (hover:hover){.tex-code-lang-link:hover{opacity:.6}.tex-code-menu-item:hover{opacity:.6;color:var(--tex-color-secondary)}}@media screen and (width<=768px){.tex-code-line-break-info{display:none!important}}.tex-files{border:1px solid var(--tex-border-color);border-radius:6px;grid-template-columns:1fr;gap:16px;padding:12px;display:grid}.tex-files-form{align-items:center;gap:12px;display:flex}.tex-files-form-uploader{background-color:var(--tex-background-secondary);z-index:1;border-radius:6px;position:relative;overflow:hidden}.tex-files-form-uploader input:disabled+label,.tex-files-form-uploader input:disabled~label{opacity:.5;cursor:not-allowed}.tex-files-form-progress{background-color:var(--tex-background-secondary);z-index:3;width:100%;height:100%;position:absolute;top:0;left:0}.tex-files-counter{font-size:var(--tex-small-font-size);color:var(--tex-color-light);white-space:nowrap;align-items:center;gap:8px;margin-top:-9px;padding-left:12px;display:flex;position:absolute;top:50%;right:10px}.tex-files-form-progress-percent{color:var(--tex-progress-color);z-index:5;width:100%;height:100%;font-weight:600;font-size:var(--tex-message-font-size);justify-content:center;align-items:center;display:flex;position:absolute;top:0;left:0}.tex-files-form-progress-line{background-color:var(--tex-progress-background);z-index:4;width:1%;height:100%;font-weight:600;transition:all 1s;position:absolute;top:0;left:0}.tex-files-form-uploader label{padding:6px}.tex-files-form-uploader,.tex-files-form-uploader label{cursor:pointer;width:100%;height:100%;transition:opacity 1s;display:grid}.tex-files-form-label-container{justify-content:center;align-items:center;gap:8px;width:100%;height:100%;font-weight:500;display:flex;position:relative}.tex-files-form-label{z-index:2;position:relative}.tex-files-form-label-message{text-align:center;color:var(--tex-color-light);font-size:12px}.tex-files-content{grid-template-columns:1fr;gap:12px;display:grid}.tex-files-content:has(>.tex-file:only-child){padding-top:unset}.tex-file-default{grid-template-columns:1fr;gap:12px;display:grid;position:relative}.tex-files-actions{z-index:1;width:100%;height:100%;display:none;position:absolute;top:0;left:0}.tex-files-actions-buttons{z-index:10;background-color:var(--tex-background);border-radius:4px;align-items:center;gap:8px;display:flex;position:absolute;top:12px;right:12px}.tex-files-actions-btn{color:var(--tex-fill);cursor:pointer;justify-content:center;align-items:center;width:22px;height:22px;transition:all .2s;display:flex}.tex-files-actions-wrap{background:var(--tex-background-overlay);justify-content:center;align-items:center;gap:12px;width:100%;height:100%;display:flex}.tex-files-actions-list{background:var(--tex-background);border-radius:6px;display:flex}.tex-file-action{cursor:pointer;color:var(--tex-color);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;transition:all 1s;display:flex}.tex-file-action .tex-model-title{font-size:var(--tex-font-size-small)}.tex-file-action-delete{color:var(--tex-error)}.tex-file-layout-wrap{background:var(--tex-background-secondary);color:var(--tex-fill);gap:12px;padding:16px 12px;display:flex}.tex-file-layout-left{flex-grow:1;gap:12px;display:flex}.tex-file-fileName{color:var(--tex-color);font-weight:600}.tex-file-caption{font-weight:500}.tex-file-desc,.tex-file-layout-size{font-size:var(--tex-font-size-small,12px)}.tex-file-layout-icon-wrap{background-color:var(--tex-background-secondary);border:1px solid var(--tex-border-color);border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;display:flex;position:relative;overflow:hidden}.tex-file-layout-img{object-fit:cover;width:100%;height:100%;position:absolute;top:0;left:0}.tex-file-layout-content{grid-template-columns:1fr;gap:4px;display:grid}.tex-files-edit-form-field .tex-input{width:100%;padding:12px}.tex-file-wrapper{border-radius:6px;overflow:hidden}.tex-files-edit-popup{z-index:10;width:100%;height:100%;position:absolute;top:0;left:0}.tex-files-edit-popup-overlay{background:var(--tex-background-overlay);justify-content:center;align-items:flex-start;width:100%;height:100%;padding:16px;display:flex}.tex-files-edit-popup-content{background:var(--tex-background);width:100%;max-height:80vh;box-shadow:0 6px 16px var(--tex-shadow-color);border-radius:8px;grid-template-columns:1fr;gap:24px;padding:24px;display:grid;position:relative}.tex-files-edit-form{grid-template-columns:1fr;gap:16px;display:grid}.tex-files-edit-form-header{font-size:18px;font-weight:700}.tex-files-edit-form-body{grid-template-columns:1fr;gap:16px;display:grid}.tex-files-edit-form-footer{border-top:1px solid var(--tex-border-color);gap:16px;margin:0 -24px;padding:24px 24px 0;display:flex}.tex-file-moveRight.not-active,.tex-file-moveLeft.not-active,.tex-file-desc:empty,.tex-file-caption:empty{display:none}@media (hover:hover){.tex-files-actions-btn:hover{opacity:.4;transform:scale(1.1)}.tex-files-form-uploader:hover{opacity:.5}.tex-files-action:hover{opacity:.6;background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-files-list{grid-template-columns:1fr}.tex-files-counter{margin-top:0;padding-left:12px;position:static}}.tex-gallery .tex-block-content{grid-template-columns:1fr;gap:16px;display:grid}.tex-gallery[data-options-style~=grid] .tex-block-content{grid-template-columns:1fr 1fr}.tex-gallery[data-options-style~=grid] .tex-file-wrapper{padding-top:100%}.tex-gallery[data-options-style~=single] .tex-block-content{grid-template-columns:1fr;gap:12px}.tex-gallery[data-options-style~=slider] .tex-block-content{gap:0;display:flex}.tex-gallery .tex-file{cursor:pointer;grid-template-columns:1fr;gap:12px;display:grid;position:relative}.tex-gallery[data-options-style~=slider] .tex-file-wrapper{padding-top:56.6667%}.tex-gallery .tex-item-body{-webkit-user-select:none;user-select:none;background:var(--tex-background-secondary);border-radius:6px;overflow:hidden}.tex-gallery .tex-item-body img,.tex-gallery .tex-item-body video{object-fit:cover;width:100%;display:block}.tex-gallery[data-options-style~=grid] .tex-item-body img,.tex-gallery[data-options-style~=slider] .tex-item-body img,.tex-gallery[data-options-style~=grid] .tex-item-body video,.tex-gallery[data-options-style~=slider] .tex-item-body video{width:100%;height:100%;position:absolute;top:0}.tex-gallery[data-options-style~=grid] .tex-item-body,.tex-gallery[data-options-style~=slider] .tex-item-body{width:100%;height:100%;position:relative;top:0;left:0}.tex-gallery .tex-item-body>*{width:100%}.tex-gallery[data-options-style~=grid] .tex-file-layout,.tex-gallery[data-options-style~=slider] .tex-file-layout{flex-direction:column;justify-content:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.tex-gallery[data-options-style~=slider] .tex-item-drag-zone{display:none}.tex-gallery .tex-file-layout{position:relative}.tex-gallery-item-play{color:var(--tex-background);opacity:.8;position:absolute;top:12px;left:12px}.tex-gallery-styles{color:var(--tex-fill)}.tex-gallery-style-list{align-items:center;display:flex}.tex-gallery-right{justify-content:flex-end}.tex-gallery-left{justify-content:flex-start}.tex-gallery-style-item{cursor:pointer;padding:6px;transition:all 1s}.tex-gallery-style-item.tex-active{color:var(--tex-color-secondary)}@media (hover:hover){.tex-gallery-style-item:hover{opacity:.6;background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-gallery .tex-block-content{grid-template-columns:1fr}}.tex-list .tex-block-content{grid-template-columns:1fr;gap:6px;margin:0;padding:0 0 0 18px;display:grid;position:relative}.tex-list-item-body{padding-right:24px}.tex-list-item-body:focus{background-color:var(--tex-background-lite);outline:none}.tex-paragraph{margin:0;position:relative}.tex-block code{background-color:var(--tex-background-secondary);border-radius:4px;padding:2px 4px}.tex-link-form{border-radius:4px;align-items:center;gap:8px;padding:6px 12px;display:flex}.tex-link-form-btn{cursor:pointer;background-color:var(--tex-background-secondary);border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;padding:2px;transition:all .7s;display:flex}.tex-link-form-del-btn{color:var(--tex-error)}.tex-link-form-target-btn svg{fill:var(--tex-color)}.tex-link-form-target-btn.tex-active{background-color:var(--tex-background-lite)}.tex-link-form-target-btn.tex-active svg{fill:var(--tex-color-secondary)}.tex-link-input{background:var(--tex-background);border:0;outline:none;max-width:130px}@media (hover:hover){.tex-link-form-btn:hover{opacity:.6}}*,:after,:before{box-sizing:border-box}.tex{width:100%;max-width:var(--tex-max-width);color:var(--tex-color);margin:0 auto}.tex [contenteditable=true]{-webkit-user-select:text;user-select:text}.tex,.tex-wrap{position:relative}.tex-blocks{outline:none;grid-template-columns:1fr;gap:12px;padding-bottom:180px;display:grid}.tex-blocks h1,.tex-blocks h2,.tex-blocks h3,.tex-blocks h4,.tex-blocks h5,.tex-blocks h6{margin:0;padding:8px 0;line-height:3rem}.tex-blocks h1{line-height:36px}.tex-blocks h2{line-height:28px}.tex-blocks h3{line-height:24px}.tex-blocks h4{line-height:20px}.tex-blocks h5{line-height:18px}.tex-blocks h6{line-height:16px}.tex-block{word-break:break-all;transition:all 1s;position:relative}.tex-block,.tex-block-content{outline:none;margin:0}.tex-block-content[data-empty=true]:before{content:attr(data-placeholder);opacity:.5;justify-content:center;align-items:center;display:flex;position:absolute}.tex-block-content:focus,.tex-block-active{background-color:var(--tex-background-lite)}.tex-actions{top:var(--tex-actions-top);left:var(--tex-actions-left);z-index:999;transition:top .3s;display:none;position:absolute}.tex-block-active .tex-actions{display:block}.tex-actions-btn{cursor:pointer;color:var(--tex-color);-webkit-user-select:none;user-select:none;padding:4px;transition:opacity 1s;display:inline-flex}.tex-actions-content{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:8px;margin-top:4px;margin-bottom:16px;margin-left:6px;display:none;overflow:hidden}.tex-actions-content-body,.tex-actions-content-dropdown{display:grid}.tex-actions-content-dropdown{display:none}.tex-actions-content-dropdown.tex-active{display:grid}.tex-actions-content-dropdown h4{border-bottom:1px solid var(--tex-border-color);margin:0;padding:12px}.tex-action .tex-model-title{flex-grow:1}.tex-action,.tex-actions-content-dropdown-item{-webkit-user-select:none;user-select:none;cursor:pointer;align-items:center;gap:8px;padding:12px;transition:opacity 1s;display:flex}.tex-actions-content-dropdown-item{padding:6px 12px}.tex-action-confirm{background:var(--tex-background-secondary)}.tex-action-deleteAction{color:var(--tex-error);border-top:1px solid var(--tex-border-color)}.tex-action-deleteAction-confirm{background:var(--tex-error);color:#fff}.tex-icon{display:block}.tex-fill{fill:var(--tex-fill)}.tex-tools{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);z-index:10;border-radius:6px;display:none}.tex-tools-fixed{z-index:1000;grid-template-columns:1fr;gap:12px;display:grid;position:fixed;top:0;left:0}.tex-tools-list{flex-wrap:wrap;display:flex}.tex-tools-content{display:none}.tex-tool{cursor:pointer;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:12px;display:flex}.tex-tool.active{color:var(--tex-color-secondary)}.tex-tool svg{display:block}.tex-tool .tex-model-title{font-size:var(--tex-small-font-size)}.tex-input{color:var(--tex-input-color);background:var(--tex-input-background);border:1px solid var(--tex-input-border);outline:none;padding:6px}.tex-hidden{display:none}.tex-message{font-weight:500;font-size:var(--tex-message-font-size)}.tex-message-error{color:var(--tex-error)}.tex-message-success{color:var(--tex-success)}.tex-btn{justify-content:center;align-items:center;font-weight:600;transition:all .7s;display:flex}.tex-btn-primary{background-color:var(--tex-button-bg);border:1px solid var(--tex-button-border-color);color:var(--tex-button-text-color)}.tex-btn-secondary{background-color:var(--tex-button-secondary-bg);border:1px solid var(--tex-button-secondary-border-color);color:var(--tex-button-secondary-text-color)}.tex-btn-radius{border-radius:4px}.tex-btn-padding{padding:8px 12px}.tex-extensions{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;display:flex}.tex-extensions-group{flex-wrap:wrap;gap:16px;padding-right:8px;display:flex}.tex-extensions-group:last-child{padding-right:0}.tex-extension{color:var(--tex-color);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;transition:all 1s;display:flex}.tex-extensions-fixed{z-index:1000;background:var(--tex-extensions-fixed-bg);box-shadow:0 2px 5px var(--tex-shadow-color);z-index:999;border-radius:6px;margin-top:12px;padding:10px 12px;position:sticky;top:16px;left:50%}.tex-extension-not-active{opacity:.4}.tex-block-non-editable{opacity:.7;cursor:pointer!important;-webkit-user-select:none!important;user-select:none!important}.tex-block-non-editable *{pointer-events:none!important}.tex-block-selected{border-radius:4px;outline:2px solid var(--tex-selected-outline)!important;background-color:var(--tex-selected-background)!important}.tex-extension-active{color:var(--tex-color-secondary);opacity:1}.tex-extension-deleteSelected{color:var(--tex-error);opacity:1}.tex-selectable{cursor:default!important;-webkit-user-select:none!important;user-select:none!important}.tex-no-select{-webkit-user-select:none;user-select:none}.tex-sortable-item{outline:3px dashed var(--tex-vs-ui-selected-border-color);box-shadow:0 5px 15px #0003}.tex-sortable-invalid{outline:5px dashed var(--tex-error)}.tex-sortable-ghost{outline:3px dashed var(--tex-vs-ui-selected-border-color);box-shadow:0 5px 15px #0003}.tex-item{position:relative}.tex-item-drag-zone-default{cursor:move;margin-top:-9px;padding:4px;display:none;position:absolute;top:8px;right:0}.tex-block-active .tex-item-active .tex-item-drag-zone{display:block}.tex-block-active .tex-item:only-child .tex-item-drag-zone{display:none}.tex-toasts{grid-template-columns:1fr;gap:8px;display:grid}@media (hover:hover){.tex-action:hover,.tex-actions-content-dropdown-item:hover{opacity:.6;background-color:var(--tex-background-lite)}.tex-actions-btn:hover,.tex-extension:hover,.tex-btn:hover{opacity:.6}.tex-action-deleteAction-confirm:hover{background:var(--tex-error);color:#fff;opacity:.6}.tex-tool:hover{background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-actions{top:var(--tex-actions-top-mobile);left:var(--tex-actions-left-mobile)}.tex-actions-btn{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;margin-top:-36px}.tex-actions-btn svg{margin-top:3px}.tex-actions-content{margin-left:0}.tex-wrap{padding-top:28px}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
1
2
|
import { detectMobileOS as e, executeMethodIfExists as t, getCaretPosition as n, getSelectionRect as r } from "./src/utils/common.mjs";
|
|
2
3
|
import { C as i, S as a, j as o, n as s, oe as c, se as l, w as u } from "./node_modules/snappykit/dist/snappykit.mjs";
|
|
3
4
|
import d from "./src/core/events.mjs";
|
|
@@ -14,8 +15,8 @@ import x from "./src/core/commands.mjs";
|
|
|
14
15
|
import S from "./src/core/history-manager.mjs";
|
|
15
16
|
import C from "./src/core/extensions.mjs";
|
|
16
17
|
import w from "./src/views/main.mjs";
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
|
|
19
20
|
//#region src/texditor.ts
|
|
20
21
|
var T = class {
|
|
21
22
|
constructor(e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "texditor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Texditor is a modern, block-based text editor written in TypeScript. It has a clean architecture and an extensible design that allows users to customize the content blocks",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Eduard Y",
|
|
7
|
+
"homepage": "https://texditor.priveted.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/texditor/editor"
|
|
11
|
+
},
|
|
5
12
|
"type": "module",
|
|
6
13
|
"main": "./dist/texditor.mjs",
|
|
7
14
|
"module": "./dist/texditor.mjs",
|
|
@@ -27,6 +34,10 @@
|
|
|
27
34
|
"import": "./dist/entities/blocks.mjs",
|
|
28
35
|
"types": "./dist/entities/blocks.d.ts"
|
|
29
36
|
},
|
|
37
|
+
"./entities/blocks/files/actions": {
|
|
38
|
+
"import": "./dist/entities/blocks/files/actions.mjs",
|
|
39
|
+
"types": "./dist/entities/blocks/files/actions.d.ts"
|
|
40
|
+
},
|
|
30
41
|
"./entities/tools": {
|
|
31
42
|
"import": "./dist/entities/tools.mjs",
|
|
32
43
|
"types": "./dist/entities/tools.d.ts"
|
|
@@ -69,6 +80,7 @@
|
|
|
69
80
|
"typescript": "^6.0.3",
|
|
70
81
|
"typescript-eslint": "^8.60.0",
|
|
71
82
|
"vite": "^8.0.14",
|
|
83
|
+
"vite-plugin-css-injected-by-js": "^5.0.1",
|
|
72
84
|
"vite-plugin-dts": "^5.0.1"
|
|
73
85
|
},
|
|
74
86
|
"files": [
|
|
@@ -81,4 +93,4 @@
|
|
|
81
93
|
"snappykit": "^1.0.11",
|
|
82
94
|
"sortum": "^1.0.6"
|
|
83
95
|
}
|
|
84
|
-
}
|
|
96
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-animate-fadeIn{animation-name:fadeIn;animation-duration:.5s;animation-fill-mode:both}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-ui-vs-selected{transition:background .1s;background:var(--tex-vs-ui-selected-bg)!important;border-color:var(--tex-vs-ui-selected-border-color)!important}.tex-ui-vs-rect{border:var(--tex-vs-ui-border);background:var(--tex-vs-ui-bg);pointer-events:none;z-index:10000;border-radius:var(--tex-vs-ui-radius);will-change:left, top, width, height;display:none;position:fixed}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-slider{width:100%;display:block;position:relative;overflow:hidden}.tex-slider-container{transition:transform .3s ease-in-out;display:flex}.tex-slide{background:var(--tex-background-secondary);box-sizing:border-box;border:1px solid #ddd;justify-content:center;align-items:center;min-height:120px;max-height:500px;font-size:24px;display:flex}.tex-slider-btn{background:var(--tex-background);cursor:pointer;z-index:10;opacity:.6;width:32px;height:32px;color:var(--tex-fill);border:none;border-radius:50%;justify-content:center;align-items:center;font-size:20px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.tex-slider-btn:hover{opacity:.4;transform:translateY(-50%)scale(1.1)}.tex-slider-btn.tex-slider-prev{left:10px}.tex-slider-btn.tex-slider-next{right:10px}.tex-slider-dots{z-index:10;gap:8px;display:flex;position:absolute;bottom:15px;left:50%;transform:translate(-50%)}.tex-slider-dot{background:var(--tex-background);cursor:pointer;opacity:.7;border:none;border-radius:50%;width:10px;height:10px;padding:0;transition:all .2s}.tex-slider-dot:hover{opacity:.4}.tex-slider-dot.active{background:var(--tex-button-bg);opacity:1;transform:scale(1.2)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-code{position:relative}.tex-code pre{background-color:var(--tex-background-secondary);white-space:pre-wrap;border:0;border-radius:6px}.tex-block.tex-code .tex-block-content{padding-top:32px}.tex-code .tex-block-content{min-height:60px;padding:4px 8px;transition:all .3s}.tex-code-lang{z-index:10;position:absolute;top:4px;left:8px}.tex-code-lang-link{color:var(--tex-color);cursor:pointer;align-items:center;gap:8px;font-weight:600;transition:opacity .3s;display:flex}.tex-code-menu{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:8px;width:200px;max-height:200px;margin-top:6px;display:none;position:absolute;left:0;overflow:hidden auto}.tex-code-menu-item{border-bottom:1px solid var(--tex-border-color);cursor:pointer;padding:4px 12px;transition:all .5s}.tex-code-menu-item:last-child{border-bottom:0}.tex-code-menu-search{border-bottom:1px solid var(--tex-border-color);padding:8px}.tex-code-menu-search input{width:100%}.tex-code.tex-block-active .tex-code-line-break-info{display:flex}.tex-code-line-break-info{color:var(--tex-color-light);-webkit-user-select:none;user-select:none;align-items:center;gap:4px;font-size:12px;display:none;position:absolute;top:4px;right:8px}@media (hover:hover){.tex-code-lang-link:hover{opacity:.6}.tex-code-menu-item:hover{opacity:.6;color:var(--tex-color-secondary)}}@media screen and (width<=768px){.tex-code-line-break-info{display:none!important}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-files{border:1px solid var(--tex-border-color);border-radius:6px;grid-template-columns:1fr;gap:16px;padding:12px;display:grid}.tex-files-form{align-items:center;gap:12px;display:flex}.tex-files-form-uploader{background-color:var(--tex-background-secondary);z-index:1;border-radius:6px;position:relative;overflow:hidden}.tex-files-form-uploader input:disabled+label,.tex-files-form-uploader input:disabled~label{opacity:.5;cursor:not-allowed}.tex-files-form-progress{background-color:var(--tex-background-secondary);z-index:3;width:100%;height:100%;position:absolute;top:0;left:0}.tex-files-counter{font-size:var(--tex-small-font-size);color:var(--tex-color-light);white-space:nowrap;align-items:center;gap:8px;margin-top:-9px;padding-left:12px;display:flex;position:absolute;top:50%;right:10px}.tex-files-form-progress-percent{color:var(--tex-progress-color);z-index:5;width:100%;height:100%;font-weight:600;font-size:var(--tex-message-font-size);justify-content:center;align-items:center;display:flex;position:absolute;top:0;left:0}.tex-files-form-progress-line{background-color:var(--tex-progress-background);z-index:4;width:1%;height:100%;font-weight:600;transition:all 1s;position:absolute;top:0;left:0}.tex-files-form-uploader label{padding:6px}.tex-files-form-uploader,.tex-files-form-uploader label{cursor:pointer;width:100%;height:100%;transition:opacity 1s;display:grid}.tex-files-form-label-container{justify-content:center;align-items:center;gap:8px;width:100%;height:100%;font-weight:500;display:flex;position:relative}.tex-files-form-label{z-index:2;position:relative}.tex-files-form-label-message{text-align:center;color:var(--tex-color-light);font-size:12px}.tex-files-content{grid-template-columns:1fr;gap:12px;display:grid}.tex-files-content:has(>.tex-file:only-child){padding-top:unset}.tex-file-default{grid-template-columns:1fr;gap:12px;display:grid;position:relative}.tex-files-actions{z-index:1;width:100%;height:100%;display:none;position:absolute;top:0;left:0}.tex-files-actions-buttons{z-index:10;background-color:var(--tex-background);border-radius:4px;align-items:center;gap:8px;display:flex;position:absolute;top:12px;right:12px}.tex-files-actions-btn{color:var(--tex-fill);cursor:pointer;justify-content:center;align-items:center;width:22px;height:22px;transition:all .2s;display:flex}.tex-files-actions-wrap{background:var(--tex-background-overlay);justify-content:center;align-items:center;gap:12px;width:100%;height:100%;display:flex}.tex-files-actions-list{background:var(--tex-background);border-radius:6px;display:flex}.tex-file-action{cursor:pointer;color:var(--tex-color);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px;transition:all 1s;display:flex}.tex-file-action .tex-model-title{font-size:var(--tex-font-size-small)}.tex-file-action-delete{color:var(--tex-error)}.tex-file-layout-wrap{background:var(--tex-background-secondary);color:var(--tex-fill);gap:12px;padding:16px 12px;display:flex}.tex-file-layout-left{flex-grow:1;gap:12px;display:flex}.tex-file-fileName{color:var(--tex-color);font-weight:600}.tex-file-caption{font-weight:500}.tex-file-desc,.tex-file-layout-size{font-size:var(--tex-font-size-small,12px)}.tex-file-layout-icon-wrap{background-color:var(--tex-background-secondary);border:1px solid var(--tex-border-color);border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;display:flex;position:relative;overflow:hidden}.tex-file-layout-img{object-fit:cover;width:100%;height:100%;position:absolute;top:0;left:0}.tex-file-layout-content{grid-template-columns:1fr;gap:4px;display:grid}.tex-files-edit-form-field .tex-input{width:100%;padding:12px}.tex-file-wrapper{border-radius:6px;overflow:hidden}.tex-files-edit-popup{z-index:10;width:100%;height:100%;position:absolute;top:0;left:0}.tex-files-edit-popup-overlay{background:var(--tex-background-overlay);justify-content:center;align-items:flex-start;width:100%;height:100%;padding:16px;display:flex}.tex-files-edit-popup-content{background:var(--tex-background);width:100%;max-height:80vh;box-shadow:0 6px 16px var(--tex-shadow-color);border-radius:8px;grid-template-columns:1fr;gap:24px;padding:24px;display:grid;position:relative}.tex-files-edit-form{grid-template-columns:1fr;gap:16px;display:grid}.tex-files-edit-form-header{font-size:18px;font-weight:700}.tex-files-edit-form-body{grid-template-columns:1fr;gap:16px;display:grid}.tex-files-edit-form-footer{border-top:1px solid var(--tex-border-color);gap:16px;margin:0 -24px;padding:24px 24px 0;display:flex}.tex-file-moveRight.not-active,.tex-file-moveLeft.not-active,.tex-file-desc:empty,.tex-file-caption:empty{display:none}@media (hover:hover){.tex-files-actions-btn:hover{opacity:.4;transform:scale(1.1)}.tex-files-form-uploader:hover{opacity:.5}.tex-files-action:hover{opacity:.6;background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-files-list{grid-template-columns:1fr}.tex-files-counter{margin-top:0;padding-left:12px;position:static}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-gallery .tex-block-content{grid-template-columns:1fr;gap:16px;display:grid}.tex-gallery[data-options-style~=grid] .tex-block-content{grid-template-columns:1fr 1fr}.tex-gallery[data-options-style~=grid] .tex-file-wrapper{padding-top:100%}.tex-gallery[data-options-style~=single] .tex-block-content{grid-template-columns:1fr;gap:12px}.tex-gallery[data-options-style~=slider] .tex-block-content{gap:0;display:flex}.tex-gallery .tex-file{cursor:pointer;grid-template-columns:1fr;gap:12px;display:grid;position:relative}.tex-gallery[data-options-style~=slider] .tex-file-wrapper{padding-top:56.6667%}.tex-gallery .tex-item-body{-webkit-user-select:none;user-select:none;background:var(--tex-background-secondary);border-radius:6px;overflow:hidden}.tex-gallery .tex-item-body img,.tex-gallery .tex-item-body video{object-fit:cover;width:100%;display:block}.tex-gallery[data-options-style~=grid] .tex-item-body img,.tex-gallery[data-options-style~=slider] .tex-item-body img,.tex-gallery[data-options-style~=grid] .tex-item-body video,.tex-gallery[data-options-style~=slider] .tex-item-body video{width:100%;height:100%;position:absolute;top:0}.tex-gallery[data-options-style~=grid] .tex-item-body,.tex-gallery[data-options-style~=slider] .tex-item-body{width:100%;height:100%;position:relative;top:0;left:0}.tex-gallery .tex-item-body>*{width:100%}.tex-gallery[data-options-style~=grid] .tex-file-layout,.tex-gallery[data-options-style~=slider] .tex-file-layout{flex-direction:column;justify-content:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.tex-gallery[data-options-style~=slider] .tex-item-drag-zone{display:none}.tex-gallery .tex-file-layout{position:relative}.tex-gallery-item-play{color:var(--tex-background);opacity:.8;position:absolute;top:12px;left:12px}.tex-gallery-styles{color:var(--tex-fill)}.tex-gallery-style-list{align-items:center;display:flex}.tex-gallery-right{justify-content:flex-end}.tex-gallery-left{justify-content:flex-start}.tex-gallery-style-item{cursor:pointer;padding:6px;transition:all 1s}.tex-gallery-style-item.tex-active{color:var(--tex-color-secondary)}@media (hover:hover){.tex-gallery-style-item:hover{opacity:.6;background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-gallery .tex-block-content{grid-template-columns:1fr}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-list .tex-block-content{grid-template-columns:1fr;gap:6px;margin:0;padding:0 0 0 18px;display:grid;position:relative}.tex-list-item-body{padding-right:24px}.tex-list-item-body:focus{background-color:var(--tex-background-lite);outline:none}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-paragraph{margin:0;position:relative}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-block code{background-color:var(--tex-background-secondary);border-radius:4px;padding:2px 4px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tex-link-form{border-radius:4px;align-items:center;gap:8px;padding:6px 12px;display:flex}.tex-link-form-btn{cursor:pointer;background-color:var(--tex-background-secondary);border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;padding:2px;transition:all .7s;display:flex}.tex-link-form-del-btn{color:var(--tex-error)}.tex-link-form-target-btn svg{fill:var(--tex-color)}.tex-link-form-target-btn.tex-active{background-color:var(--tex-background-lite)}.tex-link-form-target-btn.tex-active svg{fill:var(--tex-color-secondary)}.tex-link-input{background:var(--tex-background);border:0;outline:none;max-width:130px}@media (hover:hover){.tex-link-form-btn:hover{opacity:.6}}
|
package/dist/styles/texditor.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:after,:before{box-sizing:border-box}.tex{width:100%;max-width:var(--tex-max-width);color:var(--tex-color);margin:0 auto}.tex [contenteditable=true]{-webkit-user-select:text;user-select:text}.tex,.tex-wrap{position:relative}.tex-blocks{outline:none;grid-template-columns:1fr;gap:12px;padding-bottom:180px;display:grid}.tex-blocks h1,.tex-blocks h2,.tex-blocks h3,.tex-blocks h4,.tex-blocks h5,.tex-blocks h6{margin:0;padding:8px 0;line-height:3rem}.tex-blocks h1{line-height:36px}.tex-blocks h2{line-height:28px}.tex-blocks h3{line-height:24px}.tex-blocks h4{line-height:20px}.tex-blocks h5{line-height:18px}.tex-blocks h6{line-height:16px}.tex-block{word-break:break-all;transition:all 1s;position:relative}.tex-block,.tex-block-content{outline:none;margin:0}.tex-block-content[data-empty=true]:before{content:attr(data-placeholder);opacity:.5;justify-content:center;align-items:center;display:flex;position:absolute}.tex-block-content:focus,.tex-block-active{background-color:var(--tex-background-lite)}.tex-actions{top:var(--tex-actions-top);left:var(--tex-actions-left);z-index:999;transition:top .3s;display:none;position:absolute}.tex-block-active .tex-actions{display:block}.tex-actions-btn{cursor:pointer;color:var(--tex-color);-webkit-user-select:none;user-select:none;padding:4px;transition:opacity 1s;display:inline-flex}.tex-actions-content{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:8px;margin-top:4px;margin-bottom:16px;margin-left:6px;display:none;overflow:hidden}.tex-actions-content-body,.tex-actions-content-dropdown{display:grid}.tex-actions-content-dropdown{display:none}.tex-actions-content-dropdown.tex-active{display:grid}.tex-actions-content-dropdown h4{border-bottom:1px solid var(--tex-border-color);margin:0;padding:12px}.tex-action .tex-model-title{flex-grow:1}.tex-action,.tex-actions-content-dropdown-item{-webkit-user-select:none;user-select:none;cursor:pointer;align-items:center;gap:8px;padding:12px;transition:opacity 1s;display:flex}.tex-actions-content-dropdown-item{padding:6px 12px}.tex-action-confirm{background:var(--tex-background-secondary)}.tex-action-deleteAction{color:var(--tex-error);border-top:1px solid var(--tex-border-color)}.tex-action-deleteAction-confirm{background:var(--tex-error);color:#fff}.tex-icon{display:block}.tex-fill{fill:var(--tex-fill)}.tex-tools{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);z-index:10;border-radius:6px;display:none}.tex-tools-fixed{z-index:1000;grid-template-columns:1fr;gap:12px;display:grid;position:fixed;top:0;left:0}.tex-tools-list{flex-wrap:wrap;display:flex}.tex-tools-content{display:none}.tex-tool{cursor:pointer;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:12px;display:flex}.tex-tool.active{color:var(--tex-color-secondary)}.tex-tool svg{display:block}.tex-tool .tex-model-title{font-size:var(--tex-small-font-size)}.tex-input{color:var(--tex-input-color);background:var(--tex-input-background);border:1px solid var(--tex-input-border);outline:none;padding:6px}.tex-hidden{display:none}.tex-message{font-weight:500;font-size:var(--tex-message-font-size)}.tex-message-error{color:var(--tex-error)}.tex-message-success{color:var(--tex-success)}.tex-btn{justify-content:center;align-items:center;font-weight:600;transition:all .7s;display:flex}.tex-btn-primary{background-color:var(--tex-button-bg);border:1px solid var(--tex-button-border-color);color:var(--tex-button-text-color)}.tex-btn-secondary{background-color:var(--tex-button-secondary-bg);border:1px solid var(--tex-button-secondary-border-color);color:var(--tex-button-secondary-text-color)}.tex-btn-radius{border-radius:4px}.tex-btn-padding{padding:8px 12px}.tex-extensions{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;display:flex}.tex-extensions-group{flex-wrap:wrap;gap:16px;padding-right:8px;display:flex}.tex-extensions-group:last-child{padding-right:0}.tex-extension{color:var(--tex-color);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;transition:all 1s;display:flex}.tex-extensions-fixed{z-index:1000;background:var(--tex-extensions-fixed-bg);box-shadow:0 2px 5px var(--tex-shadow-color);z-index:999;border-radius:6px;margin-top:12px;padding:10px 12px;position:sticky;top:16px;left:50%}.tex-extension-not-active{opacity:.4}.tex-block-non-editable{opacity:.7;cursor:pointer!important;-webkit-user-select:none!important;user-select:none!important}.tex-block-non-editable *{pointer-events:none!important}.tex-block-selected{border-radius:4px;outline:2px solid var(--tex-selected-outline)!important;background-color:var(--tex-selected-background)!important}.tex-extension-active{color:var(--tex-color-secondary);opacity:1}.tex-extension-deleteSelected{color:var(--tex-error);opacity:1}.tex-selectable{cursor:default!important;-webkit-user-select:none!important;user-select:none!important}.tex-no-select{-webkit-user-select:none;user-select:none}.tex-sortable-item{outline:3px dashed var(--tex-vs-ui-selected-border-color);box-shadow:0 5px 15px #0003}.tex-sortable-invalid{outline:5px dashed var(--tex-error)}.tex-sortable-ghost{outline:3px dashed var(--tex-vs-ui-selected-border-color);box-shadow:0 5px 15px #0003}.tex-item{position:relative}.tex-item-drag-zone-default{cursor:move;margin-top:-9px;padding:4px;display:none;position:absolute;top:8px;right:0}.tex-block-active .tex-item-active .tex-item-drag-zone{display:block}.tex-block-active .tex-item:only-child .tex-item-drag-zone{display:none}.tex-toasts{grid-template-columns:1fr;gap:8px;display:grid}@media (hover:hover){.tex-action:hover,.tex-actions-content-dropdown-item:hover{opacity:.6;background-color:var(--tex-background-lite)}.tex-actions-btn:hover,.tex-extension:hover,.tex-btn:hover{opacity:.6}.tex-action-deleteAction-confirm:hover{background:var(--tex-error);color:#fff;opacity:.6}.tex-tool:hover{background-color:var(--tex-background-lite)}}@media screen and (width<=768px){.tex-actions{top:var(--tex-actions-top-mobile);left:var(--tex-actions-left-mobile)}.tex-actions-btn{background-color:var(--tex-background);box-shadow:0 0 8px 0 var(--tex-shadow-color);border:1px solid var(--tex-border-color);border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;margin-top:-36px}.tex-actions-btn svg{margin-top:3px}.tex-actions-content{margin-left:0}.tex-wrap{padding-top:28px}}
|