@cyberyozh/text-editor 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -0
- package/dist/editor.css +2069 -0
- package/dist/editor.css.map +1 -0
- package/dist/editor.d.mts +45 -0
- package/dist/editor.d.ts +45 -0
- package/dist/editor.js +6155 -0
- package/dist/editor.js.map +1 -0
- package/dist/editor.mjs +6118 -0
- package/dist/editor.mjs.map +1 -0
- package/dist/render/client.d.mts +24 -0
- package/dist/render/client.d.ts +24 -0
- package/dist/render/client.js +98 -0
- package/dist/render/client.js.map +1 -0
- package/dist/render/client.mjs +74 -0
- package/dist/render/client.mjs.map +1 -0
- package/dist/render.d.mts +58 -0
- package/dist/render.d.ts +58 -0
- package/dist/render.js +2521 -0
- package/dist/render.js.map +1 -0
- package/dist/render.mjs +2484 -0
- package/dist/render.mjs.map +1 -0
- package/dist/styles/index.css +2068 -0
- package/package.json +92 -0
- package/src/editor/commands/items.ts +374 -0
- package/src/editor/commands/suggestion.tsx +146 -0
- package/src/editor/components/button/button.css +56 -0
- package/src/editor/components/button/button.tsx +35 -0
- package/src/editor/components/button/index.ts +1 -0
- package/src/editor/components/common-modal/common-modal.css +85 -0
- package/src/editor/components/common-modal/common-modal.tsx +58 -0
- package/src/editor/components/common-modal/index.ts +1 -0
- package/src/editor/components/index.ts +3 -0
- package/src/editor/components/input/index.ts +1 -0
- package/src/editor/components/input/input.css +43 -0
- package/src/editor/components/input/input.tsx +22 -0
- package/src/editor/context/dialog-command.tsx +47 -0
- package/src/editor/context/index.ts +2 -0
- package/src/editor/context/translations-context.tsx +28 -0
- package/src/editor/controls/bubble-menu-content.tsx +394 -0
- package/src/editor/controls/callout-menu.tsx +169 -0
- package/src/editor/controls/character-count.tsx +36 -0
- package/src/editor/controls/commands-list.tsx +117 -0
- package/src/editor/controls/drag-handle.tsx +98 -0
- package/src/editor/controls/emoji-picker.tsx +62 -0
- package/src/editor/controls/index.ts +5 -0
- package/src/editor/controls/table-menu.tsx +322 -0
- package/src/editor/dialogs/add-katex-dialog/add-katex-dialog.css +115 -0
- package/src/editor/dialogs/add-katex-dialog/add-katex-dialog.tsx +116 -0
- package/src/editor/dialogs/add-katex-dialog/index.ts +1 -0
- package/src/editor/dialogs/add-link-dialog/add-link-dialog.css +105 -0
- package/src/editor/dialogs/add-link-dialog/add-link-dialog.tsx +177 -0
- package/src/editor/dialogs/add-link-dialog/index.ts +1 -0
- package/src/editor/dialogs/add-video-dialog/add-video-dialog.css +146 -0
- package/src/editor/dialogs/add-video-dialog/add-video-dialog.tsx +157 -0
- package/src/editor/dialogs/add-video-dialog/index.ts +1 -0
- package/src/editor/dialogs/image-dialog/image-dialog.css +101 -0
- package/src/editor/dialogs/image-dialog/image-dialog.tsx +276 -0
- package/src/editor/dialogs/image-dialog/index.ts +1 -0
- package/src/editor/dialogs/index.ts +4 -0
- package/src/editor/editor.tsx +247 -0
- package/src/editor/handlers/create-image-upload-handler.ts +24 -0
- package/src/editor/handlers/dialog-handlers.ts +143 -0
- package/src/editor/handlers/index.ts +8 -0
- package/src/editor/index.ts +3 -0
- package/src/extensions/base/callout.ts +138 -0
- package/src/extensions/base/code-block.ts +24 -0
- package/src/extensions/base/compatibility.ts +493 -0
- package/src/extensions/base/copyable-text.ts +56 -0
- package/src/extensions/base/custom-quote.ts +174 -0
- package/src/extensions/base/figure.ts +141 -0
- package/src/extensions/base/index.ts +19 -0
- package/src/extensions/base/link.ts +18 -0
- package/src/extensions/base/myth-reality.ts +45 -0
- package/src/extensions/base/prompt.ts +109 -0
- package/src/extensions/base/video.ts +29 -0
- package/src/extensions/editor/callout.ts +43 -0
- package/src/extensions/editor/code-block.ts +9 -0
- package/src/extensions/editor/commands.ts +43 -0
- package/src/extensions/editor/copyable-text.ts +16 -0
- package/src/extensions/editor/custom-quote.ts +54 -0
- package/src/extensions/editor/figure.ts +20 -0
- package/src/extensions/editor/get-editor-extensions.ts +113 -0
- package/src/extensions/editor/index.ts +25 -0
- package/src/extensions/editor/prompt.ts +43 -0
- package/src/extensions/editor/video.ts +23 -0
- package/src/extensions/render/get-render-extensions.ts +74 -0
- package/src/extensions/render/index.ts +6 -0
- package/src/extensions/views/components/callout.tsx +70 -0
- package/src/extensions/views/components/code-block.tsx +73 -0
- package/src/extensions/views/components/copy-button.tsx +52 -0
- package/src/extensions/views/components/copyable-text.tsx +11 -0
- package/src/extensions/views/components/custom-quote.tsx +64 -0
- package/src/extensions/views/components/figure.tsx +63 -0
- package/src/extensions/views/components/index.ts +7 -0
- package/src/extensions/views/components/prompt.tsx +43 -0
- package/src/extensions/views/components/video.tsx +40 -0
- package/src/extensions/views/node-views/callout.tsx +51 -0
- package/src/extensions/views/node-views/code-block.tsx +30 -0
- package/src/extensions/views/node-views/copyable-text.tsx +10 -0
- package/src/extensions/views/node-views/custom-quote.tsx +66 -0
- package/src/extensions/views/node-views/figure.tsx +38 -0
- package/src/extensions/views/node-views/index.ts +7 -0
- package/src/extensions/views/node-views/prompt.tsx +35 -0
- package/src/extensions/views/node-views/video.tsx +19 -0
- package/src/icons/Check.tsx +12 -0
- package/src/icons/Copy.tsx +15 -0
- package/src/icons/DragIcon.tsx +10 -0
- package/src/icons/Edit.tsx +12 -0
- package/src/icons/Quote.tsx +10 -0
- package/src/icons/X.tsx +13 -0
- package/src/icons/color/TiptapCalloutError.tsx +25 -0
- package/src/icons/color/TiptapCalloutInfo.tsx +18 -0
- package/src/icons/color/TiptapCalloutSuccess.tsx +49 -0
- package/src/icons/color/TiptapCalloutWarning.tsx +28 -0
- package/src/icons/color/index.ts +4 -0
- package/src/icons/index.ts +60 -0
- package/src/icons/menu/AddImage.tsx +10 -0
- package/src/icons/menu/AlignCenter.tsx +10 -0
- package/src/icons/menu/AlignLeft.tsx +10 -0
- package/src/icons/menu/AlignRight.tsx +10 -0
- package/src/icons/menu/ArrowDown.tsx +13 -0
- package/src/icons/menu/ArrowLeft.tsx +13 -0
- package/src/icons/menu/ArrowRight.tsx +13 -0
- package/src/icons/menu/ArrowUp.tsx +13 -0
- package/src/icons/menu/Blockquote.tsx +7 -0
- package/src/icons/menu/Bold.tsx +10 -0
- package/src/icons/menu/BulletList.tsx +10 -0
- package/src/icons/menu/CalloutError.tsx +10 -0
- package/src/icons/menu/CalloutInfo.tsx +12 -0
- package/src/icons/menu/CalloutSuccess.tsx +10 -0
- package/src/icons/menu/CalloutWarning.tsx +12 -0
- package/src/icons/menu/ClearFormatting.tsx +10 -0
- package/src/icons/menu/Code.tsx +10 -0
- package/src/icons/menu/CodeBlock.tsx +10 -0
- package/src/icons/menu/Copyable.tsx +10 -0
- package/src/icons/menu/CustomQuote.tsx +17 -0
- package/src/icons/menu/DeleteColumn.tsx +17 -0
- package/src/icons/menu/DeleteRow.tsx +17 -0
- package/src/icons/menu/Details.tsx +10 -0
- package/src/icons/menu/H2.tsx +10 -0
- package/src/icons/menu/H3.tsx +10 -0
- package/src/icons/menu/H4.tsx +10 -0
- package/src/icons/menu/H5.tsx +10 -0
- package/src/icons/menu/H6.tsx +10 -0
- package/src/icons/menu/Highlight.tsx +13 -0
- package/src/icons/menu/HorizontalRule.tsx +7 -0
- package/src/icons/menu/Italic.tsx +10 -0
- package/src/icons/menu/Link.tsx +10 -0
- package/src/icons/menu/LinkOff.tsx +10 -0
- package/src/icons/menu/Math.tsx +10 -0
- package/src/icons/menu/MergeCells.tsx +10 -0
- package/src/icons/menu/MythReality.tsx +10 -0
- package/src/icons/menu/OrderedList.tsx +10 -0
- package/src/icons/menu/Prompt.tsx +18 -0
- package/src/icons/menu/Redo.tsx +14 -0
- package/src/icons/menu/SplitCells.tsx +7 -0
- package/src/icons/menu/Strikethrough.tsx +10 -0
- package/src/icons/menu/Subscript.tsx +10 -0
- package/src/icons/menu/Superscript.tsx +10 -0
- package/src/icons/menu/Table.tsx +14 -0
- package/src/icons/menu/TableColumnHeading.tsx +7 -0
- package/src/icons/menu/TableRowHeading.tsx +10 -0
- package/src/icons/menu/TextColor.tsx +13 -0
- package/src/icons/menu/Underline.tsx +10 -0
- package/src/icons/menu/Undo.tsx +14 -0
- package/src/icons/menu/Video.tsx +14 -0
- package/src/icons/menu/index.ts +49 -0
- package/src/render/index.ts +22 -0
- package/src/render/static-renderer-config.tsx +206 -0
- package/src/render/tiptap-interactivity-provider.tsx +78 -0
- package/src/render/tiptap-render.tsx +102 -0
- package/src/styles/components.css +10 -0
- package/src/styles/editor/base.css +39 -0
- package/src/styles/editor/callout-menu.css +81 -0
- package/src/styles/editor/controls.css +57 -0
- package/src/styles/editor/emoji-picker.css +113 -0
- package/src/styles/editor/index.css +9 -0
- package/src/styles/editor/menus.css +16 -0
- package/src/styles/editor/states.css +43 -0
- package/src/styles/editor/typography.css +165 -0
- package/src/styles/editor/utilities.css +71 -0
- package/src/styles/editor/variables.css +70 -0
- package/src/styles/extensions/callout.css +155 -0
- package/src/styles/extensions/code-block.css +109 -0
- package/src/styles/extensions/commands-list.css +83 -0
- package/src/styles/extensions/custom-quote.css +103 -0
- package/src/styles/extensions/details.css +87 -0
- package/src/styles/extensions/figure.css +66 -0
- package/src/styles/extensions/index.css +11 -0
- package/src/styles/extensions/math.css +32 -0
- package/src/styles/extensions/myth-reality.css +59 -0
- package/src/styles/extensions/prompt.css +75 -0
- package/src/styles/extensions/table.css +253 -0
- package/src/styles/extensions/video.css +53 -0
- package/src/styles/styles.css +3 -0
- package/src/translations/en.json +158 -0
- package/src/translations/ru.json +158 -0
- package/src/types/image-handler.ts +33 -0
- package/src/types/index.ts +1 -0
- package/src/utils/copy-to-clipboard.ts +23 -0
- package/src/utils/custom-emoji.ts +174 -0
- package/src/utils/detect-video-hosting.ts +106 -0
- package/src/utils/get-shared-extensions.ts +45 -0
- package/src/utils/get-translations.ts +25 -0
- package/src/utils/handle-exit-node.ts +61 -0
- package/src/utils/image-src-resolver.ts +74 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/migrate-legacy-callouts.ts +59 -0
- package/src/utils/pluralize.ts +38 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.tiptap__emoji-picker-wrapper .EmojiPickerReact {
|
|
2
|
+
border: 1px solid var(--tiptap-color-primary-light);
|
|
3
|
+
box-shadow: 0 2px 8px #00000026;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tiptap__emoji-picker-wrapper {
|
|
7
|
+
z-index: 1000;
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 100%;
|
|
11
|
+
margin-left: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tiptap__emoji-picker-wrapper .EmojiPickerReact {
|
|
15
|
+
--epr-emoji-size: 24px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tiptap__emoji-picker-wrapper .epr-category-nav {
|
|
19
|
+
padding-top: 0;
|
|
20
|
+
padding-bottom: 6px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.tiptap__emoji-picker-wrapper .epr-category-label {
|
|
24
|
+
padding: 4px 8px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
text-transform: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tiptap__emoji-picker-wrapper .epr_346qu6 {
|
|
31
|
+
padding: 0 0 8px 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tiptap__emoji-picker-wrapper .epr-search-container input {
|
|
35
|
+
border: none;
|
|
36
|
+
border-bottom: 1px solid var(--tiptap-color-primary-light);
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
background: var(--tiptap-bg-surface-menu);
|
|
39
|
+
color: var(--ui-text-primary);
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
line-height: 130%;
|
|
43
|
+
letter-spacing: -0.14px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tiptap__emoji-picker-wrapper .epr-search-container input::placeholder {
|
|
47
|
+
color: var(--ui-text-secondary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tiptap__emoji-picker-wrapper .epr-search-container input:focus {
|
|
51
|
+
border-color: var(--tiptap-color-primary-light);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.tiptap__emoji-picker-wrapper .epr-icn-search {
|
|
55
|
+
left: 4px;
|
|
56
|
+
width: 24px;
|
|
57
|
+
height: 24px;
|
|
58
|
+
background-size: 24px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tiptap__emoji-picker-wrapper .epr-emoji-category-label {
|
|
62
|
+
height: auto;
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 4px 10px;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
line-height: 120%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tiptap__emoji-picker-wrapper .epr-emoji-list {
|
|
71
|
+
padding: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tiptap__emoji-picker-wrapper .epr-btn {
|
|
75
|
+
border: none;
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tiptap__emoji-picker-wrapper .epr-btn:focus::before {
|
|
80
|
+
border: none;
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.callout-icon-wrapper {
|
|
85
|
+
display: flex;
|
|
86
|
+
position: relative;
|
|
87
|
+
align-items: flex-start;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.callout-icon-button {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
padding: 0;
|
|
95
|
+
border: none;
|
|
96
|
+
background: none;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.callout-icon-button:disabled {
|
|
101
|
+
cursor: default;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.callout-icon-button:not(:disabled):hover .callout-icon {
|
|
105
|
+
opacity: 0.8;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.callout-icon img {
|
|
109
|
+
display: block;
|
|
110
|
+
width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
object-fit: contain;
|
|
113
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.bubble-menu {
|
|
2
|
+
display: flex;
|
|
3
|
+
z-index: 10000;
|
|
4
|
+
position: relative;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 8px;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
border: 1px solid var(--tiptap-color-primary-light);
|
|
9
|
+
border-radius: var(--tiptap-radius);
|
|
10
|
+
background-color: var(--tiptap-bg-surface-menu);
|
|
11
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tiptap-content-wrapper:has(.hide-text-selection) ::selection {
|
|
15
|
+
background: #d5d4d450;
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.tiptap [data-prompt].is-empty::before,
|
|
2
|
+
.tiptap [data-myth-reality].is-empty::before,
|
|
3
|
+
.tiptap [data-myth-reality-block].is-empty::before,
|
|
4
|
+
.tiptap [data-type="detailsContent"].is-empty::before,
|
|
5
|
+
.tiptap [data-type="details"].is-empty::before,
|
|
6
|
+
.tiptap .react-renderer.is-empty::before,
|
|
7
|
+
.tiptap blockquote.is-empty::before,
|
|
8
|
+
.tiptap .tableWrapper.is-empty::before,
|
|
9
|
+
.tiptap table p.is-empty::before,
|
|
10
|
+
.tiptap td.is-empty::before,
|
|
11
|
+
.tiptap th.is-empty::before,
|
|
12
|
+
.tiptap tr.is-empty::before,
|
|
13
|
+
.tiptap li p.is-empty::before {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ProseMirror-selectednode:not(p.is-empty) {
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
outline: 5px solid var(--tiptap-color-primary-light);
|
|
20
|
+
background-color: var(--tiptap-color-primary-subtle);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.tiptap table .selectedCell {
|
|
24
|
+
background-color: var(--tiptap-color-primary-subtle);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tiptap .tiptap-mathematics-render.ProseMirror-selectednode,
|
|
28
|
+
.tiptap .node-promptHeader.ProseMirror-selectednode,
|
|
29
|
+
.tiptap .node-promptContent.ProseMirror-selectednode,
|
|
30
|
+
.tiptap .node-promptV2Header.ProseMirror-selectednode,
|
|
31
|
+
.tiptap .node-promptV2Content.ProseMirror-selectednode,
|
|
32
|
+
.tiptap .node-customQuoteText.ProseMirror-selectednode,
|
|
33
|
+
.tiptap .node-customQuoteSign.ProseMirror-selectednode,
|
|
34
|
+
.tiptap .node-customQuoteAuthor.ProseMirror-selectednode {
|
|
35
|
+
outline: none;
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tiptap[data-tiptap-render] .ProseMirror-selectednode,
|
|
40
|
+
.tiptap[contenteditable="false"] .ProseMirror-selectednode {
|
|
41
|
+
outline: none;
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
.tiptap p {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-weight: 400;
|
|
4
|
+
font-size: var(--tiptap-font-size);
|
|
5
|
+
line-height: 140%;
|
|
6
|
+
letter-spacing: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tiptap > * {
|
|
10
|
+
letter-spacing: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tiptap p:not(:last-child),
|
|
14
|
+
.tiptap ul:not(:last-child),
|
|
15
|
+
.tiptap ol:not(:last-child),
|
|
16
|
+
.tiptap blockquote:not(:last-child) {
|
|
17
|
+
margin-bottom: var(--tiptap-spacing);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tiptap h2 {
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
font-size: 36px;
|
|
23
|
+
line-height: 130%;
|
|
24
|
+
letter-spacing: -0.72px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tiptap h3 {
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
font-size: 28px;
|
|
30
|
+
line-height: 130%;
|
|
31
|
+
letter-spacing: -0.56px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tiptap h4 {
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
font-size: 24px;
|
|
37
|
+
line-height: 130%;
|
|
38
|
+
letter-spacing: -0.48px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tiptap h5 {
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
font-size: 20px;
|
|
44
|
+
line-height: 130%;
|
|
45
|
+
letter-spacing: -0.4px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tiptap h6 {
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
font-size: 18px;
|
|
51
|
+
line-height: 140%;
|
|
52
|
+
letter-spacing: -0.36px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tiptap h1,
|
|
56
|
+
.tiptap h2,
|
|
57
|
+
.tiptap h3,
|
|
58
|
+
.tiptap h4,
|
|
59
|
+
.tiptap h5,
|
|
60
|
+
.tiptap h6 {
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tiptap h1,
|
|
65
|
+
.tiptap h2,
|
|
66
|
+
.tiptap h3 {
|
|
67
|
+
margin-bottom: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tiptap h4,
|
|
71
|
+
.tiptap h5,
|
|
72
|
+
.tiptap h6 {
|
|
73
|
+
margin-bottom: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.tiptap ul,
|
|
77
|
+
.tiptap ol {
|
|
78
|
+
padding-left: 32px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tiptap ul:not(:last-child),
|
|
82
|
+
.tiptap ol:not(:last-child),
|
|
83
|
+
.tiptap blockquote:not(:last-child) {
|
|
84
|
+
margin: 16px 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tiptap strong {
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.tiptap li:not(:last-child) {
|
|
92
|
+
margin-bottom: 6px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.tiptap blockquote {
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 10px 0 10px 16px;
|
|
98
|
+
border-left: 1px solid var(--tiptap-color-primary-light);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.tiptap blockquote::before {
|
|
102
|
+
width: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tiptap hr {
|
|
106
|
+
margin: 24px 0;
|
|
107
|
+
border: none;
|
|
108
|
+
border-top: 1px solid var(--tiptap-color-divider);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.tiptap a {
|
|
112
|
+
color: var(--tiptap-color-link);
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.tiptap[data-tiptap-render] a:hover,
|
|
117
|
+
.tiptap[contenteditable="false"] a:hover {
|
|
118
|
+
text-decoration: underline;
|
|
119
|
+
text-underline-offset: 2px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tiptap mark {
|
|
123
|
+
padding: 0 4px;
|
|
124
|
+
border-radius: 4px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.tiptap .is-empty::before {
|
|
128
|
+
height: 0;
|
|
129
|
+
float: left;
|
|
130
|
+
content: attr(data-placeholder);
|
|
131
|
+
color: var(--tiptap-color-text-placeholder);
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.tiptap[contenteditable="true"] span.copyable {
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.tiptap span.copyable {
|
|
140
|
+
display: inline-flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
padding: 0 8px;
|
|
143
|
+
gap: 4px;
|
|
144
|
+
border: 1px solid var(--tiptap-copyable-border--light);
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
background: var(--tiptap-copyable-bg--light);
|
|
147
|
+
line-height: 24px;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
transition: all 150ms ease-in-out;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[data-theme="dark"] .tiptap span.copyable {
|
|
153
|
+
border-color: var(--tiptap-copyable-border--dark);
|
|
154
|
+
background-color: var(--tiptap-copyable-bg--dark);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.tiptap span.copyable:hover {
|
|
158
|
+
border-color: var(--tiptap-copyable-border-hover--light);
|
|
159
|
+
background: var(--tiptap-copyable-bg-hover--light);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-theme="dark"] .tiptap span.copyable:hover {
|
|
163
|
+
border-color: var(--tiptap-copyable-border-hover--dark);
|
|
164
|
+
background-color: var(--tiptap-copyable-bg-hover--dark);
|
|
165
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.tiptap .copy-button {
|
|
2
|
+
display: flex;
|
|
3
|
+
border: none;
|
|
4
|
+
outline: none;
|
|
5
|
+
background: transparent;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tiptap .copy-button.copy-icon-white {
|
|
10
|
+
color: white;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tiptap .copy-button.copy-icon-prompt {
|
|
14
|
+
color: var(--tiptap-prompt-action-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.copy-icon,
|
|
18
|
+
.copy-icon-success {
|
|
19
|
+
display: flex;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tiptap__drag-handle-button {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 24px;
|
|
28
|
+
transform: translateX(-8px);
|
|
29
|
+
border: 1px solid var(--tiptap-color-primary-light);
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
background-color: #fff;
|
|
32
|
+
color: var(--tiptap-color-primary);
|
|
33
|
+
cursor: grab;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tiptap__drag-handle-button svg {
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
width: 14px;
|
|
40
|
+
height: 14px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tiptap__drag-handle-button:active {
|
|
44
|
+
cursor: grabbing;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tiptap__character-count {
|
|
48
|
+
display: flex;
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: 16px;
|
|
51
|
+
bottom: -14px;
|
|
52
|
+
align-items: center;
|
|
53
|
+
padding: 4px 8px;
|
|
54
|
+
gap: 8px;
|
|
55
|
+
border: 1px solid var(--tiptap-color-border);
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
background-color: #fff;
|
|
58
|
+
color: var(--ui-text-secondary);
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
letter-spacing: 0.4px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tiptap-content-wrapper:has(.tiptap:focus) .tiptap__character-count {
|
|
65
|
+
border-color: var(--tiptap-color-primary-light);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tiptap-content-wrapper.has-error:has(.tiptap:focus) .tiptap__character-count,
|
|
69
|
+
.tiptap-content-wrapper.has-error .tiptap__character-count {
|
|
70
|
+
border-color: var(--tiptap-color-primary-error);
|
|
71
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* ═══ BASE / GLOBAL VARIABLES ═══ */
|
|
3
|
+
|
|
4
|
+
/* Colors */
|
|
5
|
+
--tiptap-color-primary: #6366f1;
|
|
6
|
+
--tiptap-color-primary-light: #6366f150;
|
|
7
|
+
--tiptap-color-primary-subtle: rgba(99, 102, 241, 0.08);
|
|
8
|
+
--tiptap-color-link: #0059df;
|
|
9
|
+
--tiptap-color-primary-error: #f04438;
|
|
10
|
+
--tiptap-color-border: #f2f4f7;
|
|
11
|
+
--tiptap-color-divider: #aaabb7;
|
|
12
|
+
--tiptap-color-text-disabled: #aaabb7;
|
|
13
|
+
--tiptap-color-text-placeholder: #aaabb7;
|
|
14
|
+
|
|
15
|
+
/* ═══ UI/DIALOG VARIABLES ═══ */
|
|
16
|
+
/* Primary Actions */
|
|
17
|
+
--ui-color-primary: #6366f1;
|
|
18
|
+
--ui-color-primary-dark: #4f46e5;
|
|
19
|
+
--ui-shadow-primary: 0 2px 4px rgba(99, 102, 241, 0.3);
|
|
20
|
+
|
|
21
|
+
/* Text */
|
|
22
|
+
--ui-text-primary: #333333;
|
|
23
|
+
--ui-text-secondary: #666666;
|
|
24
|
+
--ui-text-disabled: #999999;
|
|
25
|
+
--ui-text-white: #ffffff;
|
|
26
|
+
|
|
27
|
+
/* Secondary Actions (alternative buttons, backgrounds, borders) */
|
|
28
|
+
--ui-secondary-bg: #f0f0f0;
|
|
29
|
+
--ui-secondary-bg-hover: #e8e8e8;
|
|
30
|
+
--ui-secondary-bg-active: #dcdcdc;
|
|
31
|
+
|
|
32
|
+
/* Info State */
|
|
33
|
+
--ui-info-bg: #f5f7ff;
|
|
34
|
+
--ui-info-border: #e0e7ff;
|
|
35
|
+
|
|
36
|
+
/* Error State */
|
|
37
|
+
--ui-error-bg: #fee4e2;
|
|
38
|
+
--ui-error-border: #fcd5d0;
|
|
39
|
+
--ui-error-text: #7a271a;
|
|
40
|
+
|
|
41
|
+
/* Surfaces */
|
|
42
|
+
--tiptap-bg-surface: #fff;
|
|
43
|
+
--tiptap-bg-surface-menu: #fff;
|
|
44
|
+
|
|
45
|
+
/* States */
|
|
46
|
+
--tiptap-state-control-active-color: #fff;
|
|
47
|
+
--tiptap-state-control-disabled-color: #aaabb7;
|
|
48
|
+
|
|
49
|
+
/* Typography */
|
|
50
|
+
--tiptap-font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
51
|
+
sans-serif;
|
|
52
|
+
--tiptap-font-size: 18px;
|
|
53
|
+
|
|
54
|
+
/* Sizes & Spacing */
|
|
55
|
+
--tiptap-radius: 8px;
|
|
56
|
+
--tiptap-spacing: 16px;
|
|
57
|
+
|
|
58
|
+
/* Copyable Text Mark */
|
|
59
|
+
--tiptap-copyable-bg--light: #f5f5f5;
|
|
60
|
+
--tiptap-copyable-bg--dark: #1a1a1a;
|
|
61
|
+
|
|
62
|
+
--tiptap-copyable-border--light: #cbcbcb;
|
|
63
|
+
--tiptap-copyable-border--dark: #3a3a3a;
|
|
64
|
+
|
|
65
|
+
--tiptap-copyable-border-hover--light: #b0b5bd;
|
|
66
|
+
--tiptap-copyable-border-hover--dark: #4a5a6a;
|
|
67
|
+
|
|
68
|
+
--tiptap-copyable-bg-hover--light: #ececec;
|
|
69
|
+
--tiptap-copyable-bg-hover--dark: #252525;
|
|
70
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--tiptap-callout-success-bg--light: #f0fdf9;
|
|
3
|
+
--tiptap-callout-success-text--light: #08493f;
|
|
4
|
+
--tiptap-callout-success-bg--dark: #1bae7514;
|
|
5
|
+
--tiptap-callout-success-text--dark: #fff;
|
|
6
|
+
|
|
7
|
+
--tiptap-callout-info-bg--light: #ebefff;
|
|
8
|
+
--tiptap-callout-info-text--light: #00359e;
|
|
9
|
+
--tiptap-callout-info-bg--dark: #0d6efd15;
|
|
10
|
+
--tiptap-callout-info-text--dark: #fff;
|
|
11
|
+
|
|
12
|
+
--tiptap-callout-error-bg--light: #fee4e2;
|
|
13
|
+
--tiptap-callout-error-text--light: #7a271a;
|
|
14
|
+
--tiptap-callout-error-bg--dark: #ff000014;
|
|
15
|
+
--tiptap-callout-error-text--dark: #fff;
|
|
16
|
+
|
|
17
|
+
--tiptap-callout-warning-bg--light: #fffaeb;
|
|
18
|
+
--tiptap-callout-warning-text--light: #772917;
|
|
19
|
+
--tiptap-callout-warning-bg--dark: #ffbf0014;
|
|
20
|
+
--tiptap-callout-warning-text--dark: #fff;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.callout-node {
|
|
24
|
+
display: flex;
|
|
25
|
+
margin: 32px 0;
|
|
26
|
+
padding: 16px;
|
|
27
|
+
gap: 10px;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.callout-node:has(.callout-content h2),
|
|
32
|
+
.callout-node:has(.callout-content h3),
|
|
33
|
+
.callout-node:has(.callout-content h4),
|
|
34
|
+
.callout-node:has(.callout-content h5),
|
|
35
|
+
.callout-node:has(.callout-content h6) {
|
|
36
|
+
align-items: baseline;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.callout-node p {
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
line-height: 22px;
|
|
42
|
+
letter-spacing: -0.28px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Callout Variants */
|
|
46
|
+
.callout-node.callout-info {
|
|
47
|
+
background-color: var(--tiptap-callout-info-bg--light);
|
|
48
|
+
color: var(--tiptap-callout-info-text--light);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-theme="dark"] .callout-node.callout-info {
|
|
52
|
+
background-color: var(--tiptap-callout-info-bg--dark);
|
|
53
|
+
color: var(--tiptap-callout-success-text--dark);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.callout-node.callout-warning {
|
|
57
|
+
background-color: var(--tiptap-callout-warning-bg--light);
|
|
58
|
+
color: var(--tiptap-callout-warning-text--light);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-theme="dark"] .callout-node.callout-warning {
|
|
62
|
+
background-color: var(--tiptap-callout-warning-bg--dark);
|
|
63
|
+
color: var(--tiptap-callout-success-text--dark);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.callout-node.callout-success {
|
|
67
|
+
background-color: var(--tiptap-callout-success-bg--light);
|
|
68
|
+
color: var(--tiptap-callout-success-text--light);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-theme="dark"] .callout-node.callout-success {
|
|
72
|
+
background-color: var(--tiptap-callout-success-bg--dark);
|
|
73
|
+
color: var(--tiptap-callout-success-text--dark);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.callout-node.callout-error {
|
|
77
|
+
background-color: var(--tiptap-callout-error-bg--light);
|
|
78
|
+
color: var(--tiptap-callout-error-text--light);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[data-theme="dark"] .callout-node.callout-error {
|
|
82
|
+
background-color: var(--tiptap-callout-error-bg--dark);
|
|
83
|
+
color: var(--tiptap-callout-success-text--dark);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Callout Icon */
|
|
87
|
+
.callout-icon-button {
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.tiptap .callout-icon {
|
|
92
|
+
display: block;
|
|
93
|
+
margin-top: 2px;
|
|
94
|
+
font-size: 20px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.tiptap .callout-icon svg {
|
|
98
|
+
width: 20px;
|
|
99
|
+
height: 20px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Callout Content */
|
|
103
|
+
.callout-content-wrapper {
|
|
104
|
+
flex: 1;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.callout-content {
|
|
109
|
+
color: inherit;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.callout-content p {
|
|
113
|
+
margin: 8px 0;
|
|
114
|
+
color: inherit;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.callout-content p:first-child {
|
|
118
|
+
margin-top: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.callout-content p:last-child {
|
|
122
|
+
margin-bottom: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.callout-content ul,
|
|
126
|
+
.callout-content ol {
|
|
127
|
+
margin: 8px 0 8px 20px;
|
|
128
|
+
color: inherit;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.callout-content li {
|
|
132
|
+
margin: 4px 0;
|
|
133
|
+
color: inherit;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Callout Text Formatting */
|
|
137
|
+
.callout-content strong,
|
|
138
|
+
.callout-content b {
|
|
139
|
+
color: inherit;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.callout-content em,
|
|
143
|
+
.callout-content i {
|
|
144
|
+
color: inherit;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.callout-content a {
|
|
148
|
+
color: inherit;
|
|
149
|
+
text-decoration: underline;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.callout-content ul,
|
|
153
|
+
.callout-content ol {
|
|
154
|
+
padding-left: 0;
|
|
155
|
+
}
|