@crystallize/design-system 1.4.3 → 1.6.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/CHANGELOG.md +22 -0
- package/dist/index.css +85 -142
- package/dist/index.d.ts +25 -2
- package/dist/index.js +2438 -4457
- package/dist/index.mjs +2246 -4283
- package/package.json +19 -19
- package/src/iconography/app.tsx +38 -0
- package/src/iconography/billing-payments.tsx +62 -0
- package/src/iconography/cloud-with-key-hole.tsx +32 -0
- package/src/iconography/cloud.tsx +24 -0
- package/src/iconography/document.tsx +19 -0
- package/src/iconography/folder.tsx +30 -0
- package/src/iconography/frontends.tsx +49 -0
- package/src/iconography/index.ts +43 -2
- package/src/iconography/info.tsx +2 -2
- package/src/iconography/lock-closed.tsx +46 -0
- package/src/iconography/multilingual.tsx +38 -0
- package/src/iconography/people.tsx +62 -0
- package/src/iconography/plans-and-pricing.tsx +55 -0
- package/src/iconography/product.tsx +42 -0
- package/src/iconography/rocket.tsx +38 -0
- package/src/iconography/stock-location.tsx +77 -0
- package/src/iconography/subscription-contracts.tsx +52 -0
- package/src/iconography/subscription-plans.tsx +57 -0
- package/src/iconography/target.tsx +62 -0
- package/src/iconography/usage-meter.tsx +41 -0
- package/src/iconography/user-card.tsx +22 -0
- package/src/rich-text-editor/model/crystallize-to-lexical.ts +1 -1
- package/src/rich-text-editor/model/lexical-to-crystallize.ts +2 -2
- package/src/rich-text-editor/model/to-text.test.ts +97 -0
- package/src/rich-text-editor/model/to-text.ts +47 -0
- package/src/rich-text-editor/nodes/BaseNodes.ts +0 -3
- package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +1 -1
- package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx +1 -1
- package/src/rich-text-editor/plugins/ComponentPickerPlugin/index.tsx +5 -5
- package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.tsx +29 -50
- package/src/rich-text-editor/plugins/MaxLengthPlugin/index.tsx +34 -23
- package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +8 -8
- package/src/rich-text-editor/rich-text-editor.css +3 -3
- package/src/rich-text-editor/rich-text-editor.stories.tsx +9 -1
- package/src/rich-text-editor/rich-text-editor.tsx +30 -24
- package/src/rich-text-editor/tests/rich-text-editor-basic-rendering.test.tsx +1 -1
- package/src/rich-text-editor/tests/rich-text-editor-model-basics.test.tsx +1 -1
- package/src/rich-text-editor/tests/rich-text-editor-model-conversions.test.tsx +1 -1
- package/src/rich-text-editor/tests/rich-text-editor-text-formats.test.tsx +1 -1
- package/src/rich-text-editor/themes/{PlaygroundEditorTheme.css → CrystallizeRTEditorTheme.css} +81 -85
- package/src/rich-text-editor/themes/CrystallizeRTEditorTheme.ts +113 -0
- package/dist/draggable-block-menu-KKHDNKJA.svg +0 -1
- package/src/rich-text-editor/appSettings.ts +0 -28
- package/src/rich-text-editor/context/SettingsContext.tsx +0 -71
- package/src/rich-text-editor/context/SharedAutocompleteContext.tsx +0 -60
- package/src/rich-text-editor/nodes/AutocompleteNode.tsx +0 -96
- package/src/rich-text-editor/plugins/AutocompletePlugin/index.tsx +0 -2536
- package/src/rich-text-editor/themes/PlaygroundEditorTheme.ts +0 -113
- /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/code.ts +0 -0
- /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/headings.ts +0 -0
- /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/index.ts +0 -0
- /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/link.ts +0 -0
- /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/table.ts +0 -0
- /package/src/rich-text-editor/{types.ts → types/types.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactNode, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import type { EditorState } from 'lexical';
|
|
3
3
|
import { AutoFocusPlugin } from '@lexical/react/LexicalAutoFocusPlugin';
|
|
4
|
-
import { CharacterLimitPlugin } from '@lexical/react/LexicalCharacterLimitPlugin';
|
|
5
4
|
import { ClearEditorPlugin } from '@lexical/react/LexicalClearEditorPlugin';
|
|
6
5
|
import { LexicalComposer } from '@lexical/react/LexicalComposer';
|
|
7
6
|
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
|
@@ -14,20 +13,18 @@ import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin
|
|
|
14
13
|
import { TablePlugin } from '@lexical/react/LexicalTablePlugin';
|
|
15
14
|
|
|
16
15
|
import './rich-text-editor.css';
|
|
17
|
-
import {
|
|
16
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
17
|
+
|
|
18
18
|
import { SharedHistoryContext, useSharedHistoryContext } from './context/SharedHistoryContext';
|
|
19
|
-
import type { CrystallizeRichText } from './model/crystallize-rich-text-types';
|
|
20
19
|
import { composeInitialState } from './model/crystallize-to-lexical';
|
|
21
20
|
import { lexicalToCrystallizeRichText } from './model/lexical-to-crystallize';
|
|
22
21
|
import { BaseNodes } from './nodes/BaseNodes';
|
|
23
22
|
import { BaseNodes as TableCellNodes } from './nodes/TableCellNodes';
|
|
24
23
|
import AutoLinkPlugin from './plugins/AutoLinkPlugin';
|
|
25
|
-
import AutocompletePlugin from './plugins/AutocompletePlugin';
|
|
26
24
|
import CodeActionMenuPlugin from './plugins/CodeActionMenuPlugin';
|
|
27
25
|
import CodeHighlightPlugin from './plugins/CodeHighlightPlugin';
|
|
28
26
|
import ComponentPickerPlugin from './plugins/ComponentPickerPlugin';
|
|
29
27
|
import DragDropPaste from './plugins/DragDropPastePlugin';
|
|
30
|
-
import DraggableBlockPlugin from './plugins/DraggableBlockPlugin';
|
|
31
28
|
import FloatingLinkEditorPlugin from './plugins/FloatingLinkEditorPlugin';
|
|
32
29
|
import FloatingTextFormatToolbarPlugin from './plugins/FloatingTextFormatToolbarPlugin';
|
|
33
30
|
import LinkPlugin from './plugins/LinkPlugin';
|
|
@@ -40,13 +37,21 @@ import TableCellActionMenuPlugin from './plugins/TableActionMenuPlugin';
|
|
|
40
37
|
import TableCellResizer from './plugins/TableCellResizer';
|
|
41
38
|
import { TableContext, TablePlugin as NewTablePlugin } from './plugins/TablePlugin';
|
|
42
39
|
import ToolbarPlugin from './plugins/ToolbarPlugin';
|
|
43
|
-
import
|
|
44
|
-
import type {
|
|
40
|
+
import CrystallizeRTEditorTheme from './themes/CrystallizeRTEditorTheme';
|
|
41
|
+
import type { CrystallizeRichText } from './types/crystallize-rich-text-types';
|
|
42
|
+
import type { CrystallizeRichTextActionMenuItem } from './types/types';
|
|
45
43
|
import ContentEditable from './ui/ContentEditable';
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Currently disabling this as there is a conflict with someting within
|
|
47
|
+
* the app. @hk have done 15minutes of debugging without finding out what
|
|
48
|
+
* causes the conflict. We can re-visit this at some later time.
|
|
49
|
+
*/
|
|
50
|
+
// import DraggableBlockPlugin from './plugins/DraggableBlockPlugin';
|
|
51
|
+
|
|
52
|
+
// Export types
|
|
53
|
+
export type { CrystallizeRichText } from './types/crystallize-rich-text-types';
|
|
54
|
+
export * from './types/types';
|
|
50
55
|
|
|
51
56
|
type TRichTextBase = {
|
|
52
57
|
placeholder?: string;
|
|
@@ -56,6 +61,8 @@ type TRichTextBase = {
|
|
|
56
61
|
actionsMenuPrepend?: CrystallizeRichTextActionMenuItem[];
|
|
57
62
|
actionsMenuAppend?: CrystallizeRichTextActionMenuItem[];
|
|
58
63
|
slotPreContent?: ReactNode;
|
|
64
|
+
maxLength?: number;
|
|
65
|
+
editable?: boolean;
|
|
59
66
|
};
|
|
60
67
|
|
|
61
68
|
export function RichTextEditor({
|
|
@@ -64,7 +71,6 @@ export function RichTextEditor({
|
|
|
64
71
|
...rest
|
|
65
72
|
}: TRichTextBase & {
|
|
66
73
|
initialData?: CrystallizeRichText;
|
|
67
|
-
editable?: boolean;
|
|
68
74
|
}) {
|
|
69
75
|
return (
|
|
70
76
|
<LexicalComposer
|
|
@@ -75,7 +81,7 @@ export function RichTextEditor({
|
|
|
75
81
|
onError: (error: Error) => {
|
|
76
82
|
throw error;
|
|
77
83
|
},
|
|
78
|
-
theme:
|
|
84
|
+
theme: CrystallizeRTEditorTheme,
|
|
79
85
|
editorState: initialData
|
|
80
86
|
? composeInitialState({
|
|
81
87
|
richText: initialData,
|
|
@@ -86,7 +92,7 @@ export function RichTextEditor({
|
|
|
86
92
|
<SharedHistoryContext>
|
|
87
93
|
<TableContext>
|
|
88
94
|
<div className="c-rich-text-editor">
|
|
89
|
-
<RichTextEditorWithoutContext {...rest} />
|
|
95
|
+
<RichTextEditorWithoutContext {...rest} editable={editable} />
|
|
90
96
|
</div>
|
|
91
97
|
</TableContext>
|
|
92
98
|
</SharedHistoryContext>
|
|
@@ -102,17 +108,17 @@ function RichTextEditorWithoutContext({
|
|
|
102
108
|
actionsMenuPrepend,
|
|
103
109
|
actionsMenuAppend,
|
|
104
110
|
slotPreContent,
|
|
111
|
+
maxLength,
|
|
112
|
+
editable,
|
|
105
113
|
}: TRichTextBase): JSX.Element {
|
|
106
114
|
const { historyState } = useSharedHistoryContext();
|
|
107
|
-
const {
|
|
108
|
-
settings: { isAutocomplete, isMaxLength, isCharLimit, isCharLimitUtf8 },
|
|
109
|
-
} = useSettings();
|
|
110
115
|
const placeholder = (
|
|
111
116
|
<div className="text-[14px] font-normal text-gray-300-600 italic absolute overflow-hidden text-ellipsis top-0 left-6 right-10 select-none whitespace-nowrap inline-block pointer-events-none ">
|
|
112
117
|
{placeholderText ?? ''}
|
|
113
118
|
</div>
|
|
114
119
|
);
|
|
115
120
|
|
|
121
|
+
const [editor] = useLexicalComposerContext();
|
|
116
122
|
const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null);
|
|
117
123
|
const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false);
|
|
118
124
|
const firstOnChangeTriggeredRef = useRef(!autoFocus);
|
|
@@ -123,6 +129,11 @@ function RichTextEditorWithoutContext({
|
|
|
123
129
|
}
|
|
124
130
|
};
|
|
125
131
|
|
|
132
|
+
// Listen for editable change
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
editor.setEditable(editable || false);
|
|
135
|
+
}, [editable, editor]);
|
|
136
|
+
|
|
126
137
|
// Deal with different window sizes
|
|
127
138
|
useEffect(() => {
|
|
128
139
|
const updateViewPortWidth = () => {
|
|
@@ -156,7 +167,7 @@ function RichTextEditorWithoutContext({
|
|
|
156
167
|
<ToolbarPlugin actionsMenuPrepend={actionsMenuPrepend} actionsMenuAppend={actionsMenuAppend} />
|
|
157
168
|
{slotPreContent}
|
|
158
169
|
<div className="editor-container">
|
|
159
|
-
{
|
|
170
|
+
{maxLength != null ? <MaxLengthPlugin maxLength={maxLength} /> : null}
|
|
160
171
|
<DragDropPaste />
|
|
161
172
|
{!autoFocus ? null : <AutoFocusPlugin />}
|
|
162
173
|
<ClearEditorPlugin />
|
|
@@ -190,7 +201,7 @@ function RichTextEditorWithoutContext({
|
|
|
190
201
|
onError: (error: Error) => {
|
|
191
202
|
throw error;
|
|
192
203
|
},
|
|
193
|
-
theme:
|
|
204
|
+
theme: CrystallizeRTEditorTheme,
|
|
194
205
|
}}
|
|
195
206
|
>
|
|
196
207
|
{!autoFocus ? <></> : <AutoFocusPlugin />}
|
|
@@ -210,18 +221,13 @@ function RichTextEditorWithoutContext({
|
|
|
210
221
|
<TabIndentationPlugin />
|
|
211
222
|
{floatingAnchorElem && !isSmallWidthViewport && (
|
|
212
223
|
<>
|
|
213
|
-
<DraggableBlockPlugin anchorElem={floatingAnchorElem} />
|
|
224
|
+
{/* <DraggableBlockPlugin anchorElem={floatingAnchorElem} /> */}
|
|
214
225
|
<CodeActionMenuPlugin anchorElem={floatingAnchorElem} />
|
|
215
226
|
<FloatingLinkEditorPlugin anchorElem={floatingAnchorElem} />
|
|
216
227
|
<TableCellActionMenuPlugin anchorElem={floatingAnchorElem} />
|
|
217
228
|
<FloatingTextFormatToolbarPlugin anchorElem={floatingAnchorElem} />
|
|
218
229
|
</>
|
|
219
230
|
)}
|
|
220
|
-
|
|
221
|
-
{(isCharLimit || isCharLimitUtf8) && (
|
|
222
|
-
<CharacterLimitPlugin charset={isCharLimit ? 'UTF-16' : 'UTF-8'} maxLength={5} />
|
|
223
|
-
)}
|
|
224
|
-
{isAutocomplete && <AutocompletePlugin />}
|
|
225
231
|
</div>
|
|
226
232
|
</>
|
|
227
233
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
|
|
4
|
-
import type { CrystallizeRichText } from '../model/crystallize-rich-text-types';
|
|
5
4
|
import { RichTextEditor } from '../rich-text-editor';
|
|
5
|
+
import type { CrystallizeRichText } from '../types/crystallize-rich-text-types';
|
|
6
6
|
import { sleep } from './utils';
|
|
7
7
|
|
|
8
8
|
const emptyParagraph: CrystallizeRichText = [{ kind: 'block', type: 'paragraph', textContent: 'rabbit' }];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render } from '@testing-library/react';
|
|
2
2
|
|
|
3
|
-
import type { CrystallizeRichText } from '../model/crystallize-rich-text-types';
|
|
4
3
|
import { RichTextEditor } from '../rich-text-editor';
|
|
4
|
+
import type { CrystallizeRichText } from '../types/crystallize-rich-text-types';
|
|
5
5
|
import { sleep } from './utils';
|
|
6
6
|
|
|
7
7
|
describe('RichTextEditor model basics', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render } from '@testing-library/react';
|
|
2
2
|
|
|
3
|
-
import type { CrystallizeRichText, CrystallizeRichTextNode } from '../model/crystallize-rich-text-types';
|
|
4
3
|
import { RichTextEditor } from '../rich-text-editor';
|
|
4
|
+
import type { CrystallizeRichText, CrystallizeRichTextNode } from '../types/crystallize-rich-text-types';
|
|
5
5
|
import { sleep } from './utils';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import userEvent from '@testing-library/user-event';
|
|
4
4
|
|
|
5
|
-
import type { CrystallizeRichText } from '../model/crystallize-rich-text-types';
|
|
6
5
|
import { RichTextEditor } from '../rich-text-editor';
|
|
6
|
+
import type { CrystallizeRichText } from '../types/crystallize-rich-text-types';
|
|
7
7
|
import { selectTextInElement } from './utils';
|
|
8
8
|
|
|
9
9
|
describe('RichTextEditor text formats', () => {
|
package/src/rich-text-editor/themes/{PlaygroundEditorTheme.css → CrystallizeRTEditorTheme.css}
RENAMED
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
.
|
|
9
|
+
.CrystallizeRTEditorTheme__ltr {
|
|
10
10
|
@apply text-left;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.CrystallizeRTEditorTheme__rtl {
|
|
13
13
|
@apply text-right;
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.CrystallizeRTEditorTheme__paragraph {
|
|
16
16
|
font-size: 15px;
|
|
17
17
|
@apply relative m-0 mt-2 leading-6 text-gray-600-300;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.CrystallizeRTEditorTheme__paragraph + .CrystallizeRTEditorTheme__paragraph {
|
|
20
20
|
@apply relative m-0 mt-4;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.CrystallizeRTEditorTheme__quote {
|
|
23
23
|
font-size: 15px;
|
|
24
24
|
border-left-width: 4px;
|
|
25
25
|
border-left-style: solid;
|
|
@@ -28,59 +28,59 @@
|
|
|
28
28
|
@apply my-6 border-l-purple-700-200 font-normal text-gray-800-100;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.CrystallizeRTEditorTheme__h1 {
|
|
32
32
|
font-size: 20px;
|
|
33
33
|
|
|
34
34
|
@apply m-0 mb-1 mt-2 font-medium leading-6
|
|
35
35
|
text-gray-800-100;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.CrystallizeRTEditorTheme__h2 {
|
|
38
38
|
font-size: 19px;
|
|
39
39
|
@apply m-0 mb-1 mt-2 text-lg font-medium leading-6 text-gray-800-100;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.CrystallizeRTEditorTheme__h3 {
|
|
42
42
|
font-size: 18px;
|
|
43
43
|
@apply m-0 mb-1 mt-2 font-medium leading-6 text-gray-800-100;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.CrystallizeRTEditorTheme__h4 {
|
|
46
46
|
font-size: 17px;
|
|
47
47
|
@apply m-0 mb-1 mt-2 font-medium leading-6 text-gray-800-100;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.CrystallizeRTEditorTheme__h5 {
|
|
50
50
|
font-size: 16px;
|
|
51
51
|
@apply m-0 mb-1 mt-2 font-medium leading-6 text-gray-800-100;
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.CrystallizeRTEditorTheme__h6 {
|
|
54
54
|
font-size: 16px;
|
|
55
55
|
@apply m-0 mb-1 mt-2 font-medium leading-6 text-gray-800-100;
|
|
56
56
|
}
|
|
57
|
-
.
|
|
57
|
+
.CrystallizeRTEditorTheme__indent {
|
|
58
58
|
--lexical-indent-base-value: 20px;
|
|
59
59
|
}
|
|
60
|
-
.
|
|
60
|
+
.CrystallizeRTEditorTheme__textBold {
|
|
61
61
|
@apply font-bold;
|
|
62
62
|
}
|
|
63
|
-
.
|
|
63
|
+
.CrystallizeRTEditorTheme__textItalic {
|
|
64
64
|
@apply italic;
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
.CrystallizeRTEditorTheme__textUnderline {
|
|
67
67
|
@apply underline;
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
.CrystallizeRTEditorTheme__textStrikethrough {
|
|
70
70
|
@apply line-through;
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.CrystallizeRTEditorTheme__textUnderlineStrikethrough {
|
|
73
73
|
text-decoration: underline line-through;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.CrystallizeRTEditorTheme__textSubscript {
|
|
76
76
|
font-size: 0.8em;
|
|
77
77
|
vertical-align: sub !important;
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
.CrystallizeRTEditorTheme__textSuperscript {
|
|
80
80
|
font-size: 0.8em;
|
|
81
81
|
vertical-align: super;
|
|
82
82
|
}
|
|
83
|
-
.
|
|
83
|
+
.CrystallizeRTEditorTheme__textCode {
|
|
84
84
|
padding: 2px 0.5rem;
|
|
85
85
|
font-family: Menlo, Consolas, Monaco, monospace;
|
|
86
86
|
font-size: 13px;
|
|
@@ -88,31 +88,27 @@
|
|
|
88
88
|
border-style: solid;
|
|
89
89
|
@apply rounded-md border-gray-100-800 bg-purple-50-900;
|
|
90
90
|
}
|
|
91
|
-
.
|
|
92
|
-
background-color: rgba(88, 144, 255, 0.15);
|
|
93
|
-
border-bottom: 1px solid rgba(88, 144, 255, 0.3);
|
|
94
|
-
}
|
|
95
|
-
.PlaygroundEditorTheme__link {
|
|
91
|
+
.CrystallizeRTEditorTheme__link {
|
|
96
92
|
text-decoration: none;
|
|
97
93
|
box-shadow: #5d96fd 0 -2px inset;
|
|
98
94
|
@apply !text-gray-600-300;
|
|
99
95
|
}
|
|
100
|
-
.
|
|
96
|
+
.CrystallizeRTEditorTheme__link:hover {
|
|
101
97
|
cursor: pointer;
|
|
102
98
|
}
|
|
103
|
-
.
|
|
99
|
+
.CrystallizeRTEditorTheme__code {
|
|
104
100
|
@apply relative my-2 mx-0 block overflow-x-auto rounded-md border border-solid border-gray-100-800 bg-purple-50-900 p-2 pl-14 text-sm leading-5;
|
|
105
101
|
font-family: Menlo, Consolas, Monaco, monospace;
|
|
106
102
|
font-size: 12px;
|
|
107
103
|
tab-size: 2;
|
|
108
104
|
}
|
|
109
|
-
.
|
|
105
|
+
.CrystallizeRTEditorTheme__code:before {
|
|
110
106
|
@apply absolute top-0 left-0 border-0 border-r-[1px] border-solid border-gray-100-800 bg-purple-100-800 p-2 text-right text-gray-400-500;
|
|
111
107
|
content: attr(data-gutter);
|
|
112
108
|
white-space: pre-wrap;
|
|
113
109
|
min-width: 25px;
|
|
114
110
|
}
|
|
115
|
-
.
|
|
111
|
+
.CrystallizeRTEditorTheme__table {
|
|
116
112
|
/* border-collapse: collapse; */
|
|
117
113
|
border-spacing: 0;
|
|
118
114
|
max-width: 100%;
|
|
@@ -126,19 +122,19 @@
|
|
|
126
122
|
@apply rounded-md border-gray-100-800;
|
|
127
123
|
}
|
|
128
124
|
|
|
129
|
-
.
|
|
125
|
+
.CrystallizeRTEditorTheme__tableSelected {
|
|
130
126
|
@apply outline-2 outline-purple-200-700;
|
|
131
127
|
}
|
|
132
|
-
.
|
|
128
|
+
.CrystallizeRTEditorTheme__tableCell {
|
|
133
129
|
@apply relative cursor-default border border-solid border-gray-100-800 px-2 py-0 text-start align-top outline-none;
|
|
134
130
|
min-width: 75px;
|
|
135
131
|
border-width: 0 0 1px 1px;
|
|
136
132
|
}
|
|
137
133
|
|
|
138
|
-
.
|
|
134
|
+
.CrystallizeRTEditorTheme__tableCell .CrystallizeRTEditorTheme__paragraph {
|
|
139
135
|
@apply my-2 text-sm;
|
|
140
136
|
}
|
|
141
|
-
.
|
|
137
|
+
.CrystallizeRTEditorTheme__tableCellSortedIndicator {
|
|
142
138
|
display: block;
|
|
143
139
|
opacity: 0.5;
|
|
144
140
|
position: absolute;
|
|
@@ -148,7 +144,7 @@
|
|
|
148
144
|
height: 4px;
|
|
149
145
|
background-color: #999;
|
|
150
146
|
}
|
|
151
|
-
.
|
|
147
|
+
.CrystallizeRTEditorTheme__tableCellResizer {
|
|
152
148
|
position: absolute;
|
|
153
149
|
right: -4px;
|
|
154
150
|
height: 100%;
|
|
@@ -157,14 +153,14 @@
|
|
|
157
153
|
z-index: 10;
|
|
158
154
|
top: 0;
|
|
159
155
|
}
|
|
160
|
-
.
|
|
156
|
+
.CrystallizeRTEditorTheme__tableCellHeader {
|
|
161
157
|
@apply bg-purple-50-900;
|
|
162
158
|
text-align: start;
|
|
163
159
|
}
|
|
164
|
-
.
|
|
160
|
+
.CrystallizeRTEditorTheme__tableCellSelected {
|
|
165
161
|
background-color: #c9dbf0;
|
|
166
162
|
}
|
|
167
|
-
.
|
|
163
|
+
.CrystallizeRTEditorTheme__tableCellPrimarySelected {
|
|
168
164
|
@apply border-2 border-solid border-purple-200-700;
|
|
169
165
|
|
|
170
166
|
display: block;
|
|
@@ -175,11 +171,11 @@
|
|
|
175
171
|
top: -1px;
|
|
176
172
|
z-index: 2;
|
|
177
173
|
}
|
|
178
|
-
.
|
|
174
|
+
.CrystallizeRTEditorTheme__tableCellEditing {
|
|
179
175
|
@apply shadow-md;
|
|
180
176
|
border-radius: 3px;
|
|
181
177
|
}
|
|
182
|
-
.
|
|
178
|
+
.CrystallizeRTEditorTheme__tableAddColumns {
|
|
183
179
|
position: absolute;
|
|
184
180
|
top: 0;
|
|
185
181
|
width: 20px;
|
|
@@ -191,7 +187,7 @@
|
|
|
191
187
|
border: 1px solid transparent;
|
|
192
188
|
@apply bg-purple-50-900;
|
|
193
189
|
}
|
|
194
|
-
.
|
|
190
|
+
.CrystallizeRTEditorTheme__tableAddColumns:after {
|
|
195
191
|
background-image: url(../images/icons/plus.svg);
|
|
196
192
|
background-size: contain;
|
|
197
193
|
background-position: center;
|
|
@@ -205,10 +201,10 @@
|
|
|
205
201
|
height: 100%;
|
|
206
202
|
opacity: 1;
|
|
207
203
|
}
|
|
208
|
-
.
|
|
204
|
+
.CrystallizeRTEditorTheme__tableAddColumns:hover {
|
|
209
205
|
@apply rounded-sm border-purple-200-700;
|
|
210
206
|
}
|
|
211
|
-
.
|
|
207
|
+
.CrystallizeRTEditorTheme__tableAddRows {
|
|
212
208
|
position: absolute;
|
|
213
209
|
bottom: -25px;
|
|
214
210
|
width: calc(100% - 25px);
|
|
@@ -221,7 +217,7 @@
|
|
|
221
217
|
|
|
222
218
|
@apply bg-purple-50-900;
|
|
223
219
|
}
|
|
224
|
-
.
|
|
220
|
+
.CrystallizeRTEditorTheme__tableAddRows:after {
|
|
225
221
|
background-image: url(../images/icons/plus.svg);
|
|
226
222
|
background-size: contain;
|
|
227
223
|
background-position: center;
|
|
@@ -235,7 +231,7 @@
|
|
|
235
231
|
height: 100%;
|
|
236
232
|
opacity: 1;
|
|
237
233
|
}
|
|
238
|
-
.
|
|
234
|
+
.CrystallizeRTEditorTheme__tableAddRows:hover {
|
|
239
235
|
@apply rounded-sm border-purple-200-700;
|
|
240
236
|
}
|
|
241
237
|
@keyframes table-controls {
|
|
@@ -246,7 +242,7 @@
|
|
|
246
242
|
opacity: 1;
|
|
247
243
|
}
|
|
248
244
|
}
|
|
249
|
-
.
|
|
245
|
+
.CrystallizeRTEditorTheme__tableCellResizeRuler {
|
|
250
246
|
display: block;
|
|
251
247
|
position: absolute;
|
|
252
248
|
width: 1px;
|
|
@@ -254,7 +250,7 @@
|
|
|
254
250
|
height: 100%;
|
|
255
251
|
top: 0;
|
|
256
252
|
}
|
|
257
|
-
.
|
|
253
|
+
.CrystallizeRTEditorTheme__tableCellActionButtonContainer {
|
|
258
254
|
display: block;
|
|
259
255
|
right: 5px;
|
|
260
256
|
top: 6px;
|
|
@@ -263,7 +259,7 @@
|
|
|
263
259
|
width: 20px;
|
|
264
260
|
height: 20px;
|
|
265
261
|
}
|
|
266
|
-
.
|
|
262
|
+
.CrystallizeRTEditorTheme__tableCellActionButton {
|
|
267
263
|
background-color: #eee;
|
|
268
264
|
display: block;
|
|
269
265
|
border: 0;
|
|
@@ -273,52 +269,52 @@
|
|
|
273
269
|
color: #222;
|
|
274
270
|
cursor: pointer;
|
|
275
271
|
}
|
|
276
|
-
.
|
|
272
|
+
.CrystallizeRTEditorTheme__tableCellActionButton:hover {
|
|
277
273
|
background-color: #ddd;
|
|
278
274
|
}
|
|
279
|
-
.
|
|
275
|
+
.CrystallizeRTEditorTheme__characterLimit {
|
|
280
276
|
display: inline;
|
|
281
277
|
background-color: #ffbbbb !important;
|
|
282
278
|
}
|
|
283
|
-
.
|
|
279
|
+
.CrystallizeRTEditorTheme__ol1 {
|
|
284
280
|
padding: 0;
|
|
285
281
|
margin: 0;
|
|
286
282
|
list-style-position: inside;
|
|
287
283
|
}
|
|
288
|
-
.
|
|
284
|
+
.CrystallizeRTEditorTheme__ol2 {
|
|
289
285
|
padding: 0;
|
|
290
286
|
margin: 0;
|
|
291
287
|
list-style-type: upper-alpha;
|
|
292
288
|
list-style-position: inside;
|
|
293
289
|
}
|
|
294
|
-
.
|
|
290
|
+
.CrystallizeRTEditorTheme__ol3 {
|
|
295
291
|
padding: 0;
|
|
296
292
|
margin: 0;
|
|
297
293
|
list-style-type: lower-alpha;
|
|
298
294
|
list-style-position: inside;
|
|
299
295
|
}
|
|
300
|
-
.
|
|
296
|
+
.CrystallizeRTEditorTheme__ol4 {
|
|
301
297
|
padding: 0;
|
|
302
298
|
margin: 0;
|
|
303
299
|
list-style-type: upper-roman;
|
|
304
300
|
list-style-position: inside;
|
|
305
301
|
}
|
|
306
|
-
.
|
|
302
|
+
.CrystallizeRTEditorTheme__ol5 {
|
|
307
303
|
padding: 0;
|
|
308
304
|
margin: 0;
|
|
309
305
|
list-style-type: lower-roman;
|
|
310
306
|
list-style-position: inside;
|
|
311
307
|
}
|
|
312
|
-
.
|
|
308
|
+
.CrystallizeRTEditorTheme__ul {
|
|
313
309
|
padding: 0;
|
|
314
310
|
margin: 0;
|
|
315
311
|
list-style-position: inside;
|
|
316
312
|
}
|
|
317
|
-
.
|
|
313
|
+
.CrystallizeRTEditorTheme__listItem {
|
|
318
314
|
@apply my-0 mx-5 leading-6 text-gray-600-300;
|
|
319
315
|
}
|
|
320
|
-
.
|
|
321
|
-
.
|
|
316
|
+
.CrystallizeRTEditorTheme__listItemChecked,
|
|
317
|
+
.CrystallizeRTEditorTheme__listItemUnchecked {
|
|
322
318
|
position: relative;
|
|
323
319
|
margin-left: 8px;
|
|
324
320
|
margin-right: 8px;
|
|
@@ -327,11 +323,11 @@
|
|
|
327
323
|
list-style-type: none;
|
|
328
324
|
outline: none;
|
|
329
325
|
}
|
|
330
|
-
.
|
|
326
|
+
.CrystallizeRTEditorTheme__listItemChecked {
|
|
331
327
|
text-decoration: line-through;
|
|
332
328
|
}
|
|
333
|
-
.
|
|
334
|
-
.
|
|
329
|
+
.CrystallizeRTEditorTheme__listItemUnchecked:before,
|
|
330
|
+
.CrystallizeRTEditorTheme__listItemChecked:before {
|
|
335
331
|
content: '';
|
|
336
332
|
width: 16px;
|
|
337
333
|
height: 16px;
|
|
@@ -342,27 +338,27 @@
|
|
|
342
338
|
background-size: cover;
|
|
343
339
|
position: absolute;
|
|
344
340
|
}
|
|
345
|
-
.
|
|
346
|
-
.
|
|
341
|
+
.CrystallizeRTEditorTheme__listItemUnchecked[dir='rtl']:before,
|
|
342
|
+
.CrystallizeRTEditorTheme__listItemChecked[dir='rtl']:before {
|
|
347
343
|
left: auto;
|
|
348
344
|
right: 0;
|
|
349
345
|
}
|
|
350
|
-
.
|
|
351
|
-
.
|
|
346
|
+
.CrystallizeRTEditorTheme__listItemUnchecked:focus:before,
|
|
347
|
+
.CrystallizeRTEditorTheme__listItemChecked:focus:before {
|
|
352
348
|
box-shadow: 0 0 0 2px #a6cdfe;
|
|
353
349
|
border-radius: 2px;
|
|
354
350
|
}
|
|
355
|
-
.
|
|
351
|
+
.CrystallizeRTEditorTheme__listItemUnchecked:before {
|
|
356
352
|
border: 1px solid #999;
|
|
357
353
|
border-radius: 2px;
|
|
358
354
|
}
|
|
359
|
-
.
|
|
355
|
+
.CrystallizeRTEditorTheme__listItemChecked:before {
|
|
360
356
|
border: 1px solid rgb(61, 135, 245);
|
|
361
357
|
border-radius: 2px;
|
|
362
358
|
background-color: #3d87f5;
|
|
363
359
|
background-repeat: no-repeat;
|
|
364
360
|
}
|
|
365
|
-
.
|
|
361
|
+
.CrystallizeRTEditorTheme__listItemChecked:after {
|
|
366
362
|
content: '';
|
|
367
363
|
cursor: pointer;
|
|
368
364
|
border-color: #fff;
|
|
@@ -377,57 +373,57 @@
|
|
|
377
373
|
transform: rotate(45deg);
|
|
378
374
|
border-width: 0 2px 2px 0;
|
|
379
375
|
}
|
|
380
|
-
.
|
|
376
|
+
.CrystallizeRTEditorTheme__nestedListItem {
|
|
381
377
|
list-style-type: none;
|
|
382
378
|
}
|
|
383
|
-
.
|
|
384
|
-
.
|
|
379
|
+
.CrystallizeRTEditorTheme__nestedListItem:before,
|
|
380
|
+
.CrystallizeRTEditorTheme__nestedListItem:after {
|
|
385
381
|
display: none;
|
|
386
382
|
}
|
|
387
|
-
.
|
|
383
|
+
.CrystallizeRTEditorTheme__tokenComment {
|
|
388
384
|
color: slategray;
|
|
389
385
|
}
|
|
390
|
-
.
|
|
386
|
+
.CrystallizeRTEditorTheme__tokenPunctuation {
|
|
391
387
|
color: #999;
|
|
392
388
|
}
|
|
393
|
-
.
|
|
389
|
+
.CrystallizeRTEditorTheme__tokenProperty {
|
|
394
390
|
color: #905;
|
|
395
391
|
}
|
|
396
|
-
.
|
|
392
|
+
.CrystallizeRTEditorTheme__tokenSelector {
|
|
397
393
|
color: #690;
|
|
398
394
|
}
|
|
399
|
-
.
|
|
395
|
+
.CrystallizeRTEditorTheme__tokenOperator {
|
|
400
396
|
color: #9a6e3a;
|
|
401
397
|
}
|
|
402
|
-
.
|
|
398
|
+
.CrystallizeRTEditorTheme__tokenAttr {
|
|
403
399
|
color: #07a;
|
|
404
400
|
}
|
|
405
|
-
.
|
|
401
|
+
.CrystallizeRTEditorTheme__tokenVariable {
|
|
406
402
|
color: #e90;
|
|
407
403
|
}
|
|
408
|
-
.
|
|
404
|
+
.CrystallizeRTEditorTheme__tokenFunction {
|
|
409
405
|
color: #dd4a68;
|
|
410
406
|
}
|
|
411
|
-
.
|
|
407
|
+
.CrystallizeRTEditorTheme__mark {
|
|
412
408
|
background: rgba(255, 212, 0, 0.14);
|
|
413
409
|
border-bottom: 2px solid rgba(255, 212, 0, 0.3);
|
|
414
410
|
padding-bottom: 2px;
|
|
415
411
|
}
|
|
416
|
-
.
|
|
412
|
+
.CrystallizeRTEditorTheme__markOverlap {
|
|
417
413
|
background: rgba(255, 212, 0, 0.3);
|
|
418
414
|
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
419
415
|
}
|
|
420
|
-
.
|
|
416
|
+
.CrystallizeRTEditorTheme__mark.selected {
|
|
421
417
|
background: rgba(255, 212, 0, 0.5);
|
|
422
418
|
border-bottom: 2px solid rgba(255, 212, 0, 1);
|
|
423
419
|
}
|
|
424
|
-
.
|
|
420
|
+
.CrystallizeRTEditorTheme__markOverlap.selected {
|
|
425
421
|
background: rgba(255, 212, 0, 0.7);
|
|
426
422
|
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
427
423
|
}
|
|
428
|
-
.
|
|
424
|
+
.CrystallizeRTEditorTheme__embedBlock {
|
|
429
425
|
user-select: none;
|
|
430
426
|
}
|
|
431
|
-
.
|
|
427
|
+
.CrystallizeRTEditorTheme__embedBlockFocus {
|
|
432
428
|
outline: 2px solid rgb(60, 132, 244);
|
|
433
429
|
}
|