@webiny/lexical-editor 0.0.0-unstable.085ff6572f
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 +21 -0
- package/README.md +17 -0
- package/commands/webiny-list.d.ts +7 -0
- package/commands/webiny-list.js +13 -0
- package/commands/webiny-list.js.map +1 -0
- package/commands/webiny-quote.d.ts +5 -0
- package/commands/webiny-quote.js +9 -0
- package/commands/webiny-quote.js.map +1 -0
- package/components/AddRichTextEditorNodeType.d.ts +6 -0
- package/components/AddRichTextEditorNodeType.js +28 -0
- package/components/AddRichTextEditorNodeType.js.map +1 -0
- package/components/AddRichTextEditorPlugin.d.ts +12 -0
- package/components/AddRichTextEditorPlugin.js +33 -0
- package/components/AddRichTextEditorPlugin.js.map +1 -0
- package/components/AddToolbarAction.d.ts +7 -0
- package/components/AddToolbarAction.js +33 -0
- package/components/AddToolbarAction.js.map +1 -0
- package/components/Editor/HeadingEditor.d.ts +7 -0
- package/components/Editor/HeadingEditor.js +29 -0
- package/components/Editor/HeadingEditor.js.map +1 -0
- package/components/Editor/ParagraphEditor.d.ts +7 -0
- package/components/Editor/ParagraphEditor.js +30 -0
- package/components/Editor/ParagraphEditor.js.map +1 -0
- package/components/Editor/RichTextEditor.d.ts +26 -0
- package/components/Editor/RichTextEditor.js +138 -0
- package/components/Editor/RichTextEditor.js.map +1 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +11 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.js +19 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -0
- package/components/LexicalHtmlRenderer.d.ts +16 -0
- package/components/LexicalHtmlRenderer.js +67 -0
- package/components/LexicalHtmlRenderer.js.map +1 -0
- package/components/Toolbar/HeadingToolbar.d.ts +12 -0
- package/components/Toolbar/HeadingToolbar.js +23 -0
- package/components/Toolbar/HeadingToolbar.js.map +1 -0
- package/components/Toolbar/ParagraphToolbar.d.ts +12 -0
- package/components/Toolbar/ParagraphToolbar.js +23 -0
- package/components/Toolbar/ParagraphToolbar.js.map +1 -0
- package/components/Toolbar/Toolbar.css +435 -0
- package/components/Toolbar/Toolbar.d.ts +13 -0
- package/components/Toolbar/Toolbar.js +215 -0
- package/components/Toolbar/Toolbar.js.map +1 -0
- package/components/ToolbarActions/BoldAction.d.ts +2 -0
- package/components/ToolbarActions/BoldAction.js +43 -0
- package/components/ToolbarActions/BoldAction.js.map +1 -0
- package/components/ToolbarActions/BulletListAction.d.ts +2 -0
- package/components/ToolbarActions/BulletListAction.js +56 -0
- package/components/ToolbarActions/BulletListAction.js.map +1 -0
- package/components/ToolbarActions/CodeHighlightAction.d.ts +2 -0
- package/components/ToolbarActions/CodeHighlightAction.js +43 -0
- package/components/ToolbarActions/CodeHighlightAction.js.map +1 -0
- package/components/ToolbarActions/FontColorAction.d.ts +11 -0
- package/components/ToolbarActions/FontColorAction.js +83 -0
- package/components/ToolbarActions/FontColorAction.js.map +1 -0
- package/components/ToolbarActions/FontSizeAction.d.ts +2 -0
- package/components/ToolbarActions/FontSizeAction.js +101 -0
- package/components/ToolbarActions/FontSizeAction.js.map +1 -0
- package/components/ToolbarActions/ItalicAction.d.ts +2 -0
- package/components/ToolbarActions/ItalicAction.js +43 -0
- package/components/ToolbarActions/ItalicAction.js.map +1 -0
- package/components/ToolbarActions/LinkAction.d.ts +2 -0
- package/components/ToolbarActions/LinkAction.js +64 -0
- package/components/ToolbarActions/LinkAction.js.map +1 -0
- package/components/ToolbarActions/NumberedListAction.d.ts +2 -0
- package/components/ToolbarActions/NumberedListAction.js +58 -0
- package/components/ToolbarActions/NumberedListAction.js.map +1 -0
- package/components/ToolbarActions/QuoteAction.d.ts +2 -0
- package/components/ToolbarActions/QuoteAction.js +52 -0
- package/components/ToolbarActions/QuoteAction.js.map +1 -0
- package/components/ToolbarActions/TextAlignmentAction.d.ts +11 -0
- package/components/ToolbarActions/TextAlignmentAction.js +70 -0
- package/components/ToolbarActions/TextAlignmentAction.js.map +1 -0
- package/components/ToolbarActions/TypographyAction.d.ts +11 -0
- package/components/ToolbarActions/TypographyAction.js +145 -0
- package/components/ToolbarActions/TypographyAction.js.map +1 -0
- package/components/ToolbarActions/UnderlineAction.d.ts +2 -0
- package/components/ToolbarActions/UnderlineAction.js +43 -0
- package/components/ToolbarActions/UnderlineAction.js.map +1 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.d.ts +2 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.js +56 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.js.map +1 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.d.ts +2 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.js +71 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.js.map +1 -0
- package/context/FontColorActionContext.d.ts +6 -0
- package/context/FontColorActionContext.js +10 -0
- package/context/FontColorActionContext.js.map +1 -0
- package/context/RichTextEditorContext.d.ts +26 -0
- package/context/RichTextEditorContext.js +68 -0
- package/context/RichTextEditorContext.js.map +1 -0
- package/context/SharedHistoryContext.d.ts +11 -0
- package/context/SharedHistoryContext.js +26 -0
- package/context/SharedHistoryContext.js.map +1 -0
- package/context/TextAlignmentActionContextProps.d.ts +9 -0
- package/context/TextAlignmentActionContextProps.js +10 -0
- package/context/TextAlignmentActionContextProps.js.map +1 -0
- package/context/TypographyActionContext.d.ts +7 -0
- package/context/TypographyActionContext.js +10 -0
- package/context/TypographyActionContext.js.map +1 -0
- package/hooks/useFontColorPicker.d.ts +2 -0
- package/hooks/useFontColorPicker.js +15 -0
- package/hooks/useFontColorPicker.js.map +1 -0
- package/hooks/useList.d.ts +2 -0
- package/hooks/useList.js +39 -0
- package/hooks/useList.js.map +1 -0
- package/hooks/useQuote.d.ts +2 -0
- package/hooks/useQuote.js +20 -0
- package/hooks/useQuote.js.map +1 -0
- package/hooks/useRichTextEditor.d.ts +2 -0
- package/hooks/useRichTextEditor.js +15 -0
- package/hooks/useRichTextEditor.js.map +1 -0
- package/hooks/useTextAlignmentAction.d.ts +1 -0
- package/hooks/useTextAlignmentAction.js +15 -0
- package/hooks/useTextAlignmentAction.js.map +1 -0
- package/hooks/useTypographyAction.d.ts +1 -0
- package/hooks/useTypographyAction.js +15 -0
- package/hooks/useTypographyAction.js.map +1 -0
- package/images/icons/LICENSE.md +5 -0
- package/images/icons/chat-square-quote.svg +1 -0
- package/images/icons/chevron-down.svg +1 -0
- package/images/icons/code.svg +1 -0
- package/images/icons/font-color.svg +1 -0
- package/images/icons/indent.svg +3 -0
- package/images/icons/justify.svg +3 -0
- package/images/icons/link.svg +1 -0
- package/images/icons/list-ol.svg +1 -0
- package/images/icons/list-ul.svg +1 -0
- package/images/icons/outdent.svg +3 -0
- package/images/icons/pencil-fill.svg +1 -0
- package/images/icons/text-center.svg +1 -0
- package/images/icons/text-left.svg +1 -0
- package/images/icons/text-paragraph.svg +1 -0
- package/images/icons/text-right.svg +1 -0
- package/images/icons/type-bold.svg +1 -0
- package/images/icons/type-h1.svg +1 -0
- package/images/icons/type-h2.svg +1 -0
- package/images/icons/type-h3.svg +1 -0
- package/images/icons/type-h4.svg +1 -0
- package/images/icons/type-h5.svg +1 -0
- package/images/icons/type-h6.svg +1 -0
- package/images/icons/type-italic.svg +1 -0
- package/images/icons/type-strikethrough.svg +1 -0
- package/images/icons/type-underline.svg +1 -0
- package/images/icons/unlink_icon.svg +1 -0
- package/index.d.ts +42 -0
- package/index.js +295 -0
- package/index.js.map +1 -0
- package/nodes/FontColorNode.d.ts +43 -0
- package/nodes/FontColorNode.js +127 -0
- package/nodes/FontColorNode.js.map +1 -0
- package/nodes/HeadingNode.d.ts +34 -0
- package/nodes/HeadingNode.js +192 -0
- package/nodes/HeadingNode.js.map +1 -0
- package/nodes/ListItemNode.d.ts +46 -0
- package/nodes/ListItemNode.js +441 -0
- package/nodes/ListItemNode.js.map +1 -0
- package/nodes/ListNode/formatList.d.ts +12 -0
- package/nodes/ListNode/formatList.js +424 -0
- package/nodes/ListNode/formatList.js.map +1 -0
- package/nodes/ListNode.d.ts +42 -0
- package/nodes/ListNode.js +294 -0
- package/nodes/ListNode.js.map +1 -0
- package/nodes/ParagraphNode.d.ts +32 -0
- package/nodes/ParagraphNode.js +218 -0
- package/nodes/ParagraphNode.js.map +1 -0
- package/nodes/QuoteNode.d.ts +34 -0
- package/nodes/QuoteNode.js +225 -0
- package/nodes/QuoteNode.js.map +1 -0
- package/nodes/TypographyElementNode.d.ts +42 -0
- package/nodes/TypographyElementNode.js +155 -0
- package/nodes/TypographyElementNode.js.map +1 -0
- package/nodes/types.d.ts +15 -0
- package/nodes/types.js +5 -0
- package/nodes/types.js.map +1 -0
- package/nodes/webinyNodes.d.ts +7 -0
- package/nodes/webinyNodes.js +45 -0
- package/nodes/webinyNodes.js.map +1 -0
- package/package.json +41 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.d.ts +11 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.js +46 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.js.map +1 -0
- package/plugins/AutoLinkPlugin/index.d.ts +1 -0
- package/plugins/AutoLinkPlugin/index.js +16 -0
- package/plugins/AutoLinkPlugin/index.js.map +1 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +7 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.js +28 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.d.ts +17 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js +88 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js.map +1 -0
- package/plugins/ClickableLinkPlugin/index.d.ts +1 -0
- package/plugins/ClickableLinkPlugin/index.js +16 -0
- package/plugins/ClickableLinkPlugin/index.js.map +1 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.d.ts +1 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +20 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -0
- package/plugins/CodeHighlightPlugin/index.d.ts +1 -0
- package/plugins/CodeHighlightPlugin/index.js +16 -0
- package/plugins/CodeHighlightPlugin/index.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +118 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +7 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +222 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
- package/plugins/FloatingLinkEditorPlugin/index.js +16 -0
- package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
- package/plugins/FontColorPlugin/FontColorPlugin.d.ts +2 -0
- package/plugins/FontColorPlugin/FontColorPlugin.js +39 -0
- package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.d.ts +8 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js +34 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js.map +1 -0
- package/plugins/LexicalUpdateStatePlugin/index.d.ts +1 -0
- package/plugins/LexicalUpdateStatePlugin/index.js +16 -0
- package/plugins/LexicalUpdateStatePlugin/index.js.map +1 -0
- package/plugins/TypographyPlugin/TypographyPlugin.d.ts +2 -0
- package/plugins/TypographyPlugin/TypographyPlugin.js +35 -0
- package/plugins/TypographyPlugin/TypographyPlugin.js.map +1 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.d.ts +1 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.js +25 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.js.map +1 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.d.ts +1 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js +24 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js.map +1 -0
- package/themes/webinyLexicalTheme.css +429 -0
- package/themes/webinyLexicalTheme.d.ts +9 -0
- package/themes/webinyLexicalTheme.js +87 -0
- package/themes/webinyLexicalTheme.js.map +1 -0
- package/types.d.ts +63 -0
- package/types.js +25 -0
- package/types.js.map +1 -0
- package/ui/Divider.d.ts +2 -0
- package/ui/Divider.js +13 -0
- package/ui/Divider.js.map +1 -0
- package/ui/DropDown.d.ts +26 -0
- package/ui/DropDown.js +206 -0
- package/ui/DropDown.js.map +1 -0
- package/ui/Input.css +32 -0
- package/ui/LinkPreview.css +69 -0
- package/ui/LinkPreview.d.ts +12 -0
- package/ui/LinkPreview.js +101 -0
- package/ui/LinkPreview.js.map +1 -0
- package/ui/Placeholder.css +23 -0
- package/ui/Placeholder.d.ts +13 -0
- package/ui/Placeholder.js +24 -0
- package/ui/Placeholder.js.map +1 -0
- package/ui/TextInput.d.ts +18 -0
- package/ui/TextInput.js +39 -0
- package/ui/TextInput.js.map +1 -0
- package/ui/ToolbarActionDialog.d.ts +12 -0
- package/ui/ToolbarActionDialog.js +106 -0
- package/ui/ToolbarActionDialog.js.map +1 -0
- package/utils/findTypographyStyleByHtmlTag.d.ts +8 -0
- package/utils/findTypographyStyleByHtmlTag.js +16 -0
- package/utils/findTypographyStyleByHtmlTag.js.map +1 -0
- package/utils/generateInitialLexicalValue.d.ts +5 -0
- package/utils/generateInitialLexicalValue.js +30 -0
- package/utils/generateInitialLexicalValue.js.map +1 -0
- package/utils/getDOMRangeRect.d.ts +10 -0
- package/utils/getDOMRangeRect.js +27 -0
- package/utils/getDOMRangeRect.js.map +1 -0
- package/utils/getLexicalTextSelectionState.d.ts +5 -0
- package/utils/getLexicalTextSelectionState.js +163 -0
- package/utils/getLexicalTextSelectionState.js.map +1 -0
- package/utils/getSelectedNode.d.ts +2 -0
- package/utils/getSelectedNode.js +30 -0
- package/utils/getSelectedNode.js.map +1 -0
- package/utils/isValidJSON.d.ts +1 -0
- package/utils/isValidJSON.js +18 -0
- package/utils/isValidJSON.js.map +1 -0
- package/utils/isValidLexicalData.d.ts +2 -0
- package/utils/isValidLexicalData.js +24 -0
- package/utils/isValidLexicalData.js.map +1 -0
- package/utils/nodes/clearNodeFormating.d.ts +2 -0
- package/utils/nodes/clearNodeFormating.js +28 -0
- package/utils/nodes/clearNodeFormating.js.map +1 -0
- package/utils/nodes/formatToHeading.d.ts +3 -0
- package/utils/nodes/formatToHeading.js +25 -0
- package/utils/nodes/formatToHeading.js.map +1 -0
- package/utils/nodes/formatToParagraph.d.ts +2 -0
- package/utils/nodes/formatToParagraph.js +20 -0
- package/utils/nodes/formatToParagraph.js.map +1 -0
- package/utils/nodes/formatToQuote.d.ts +2 -0
- package/utils/nodes/formatToQuote.js +25 -0
- package/utils/nodes/formatToQuote.js.map +1 -0
- package/utils/nodes/listNode.d.ts +11 -0
- package/utils/nodes/listNode.js +107 -0
- package/utils/nodes/listNode.js.map +1 -0
- package/utils/point.d.ts +21 -0
- package/utils/point.js +77 -0
- package/utils/point.js.map +1 -0
- package/utils/rect.d.ts +47 -0
- package/utils/rect.js +169 -0
- package/utils/rect.js.map +1 -0
- package/utils/sanitizeUrl.d.ts +8 -0
- package/utils/sanitizeUrl.js +27 -0
- package/utils/sanitizeUrl.js.map +1 -0
- package/utils/setFloatingElemPosition.d.ts +3 -0
- package/utils/setFloatingElemPosition.js +40 -0
- package/utils/setFloatingElemPosition.js.map +1 -0
- package/utils/styleObjectToString.d.ts +2 -0
- package/utils/styleObjectToString.js +22 -0
- package/utils/styleObjectToString.js.map +1 -0
- package/utils/toTypographyEmotionMap.d.ts +3 -0
- package/utils/toTypographyEmotionMap.js +36 -0
- package/utils/toTypographyEmotionMap.js.map +1 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This are fallback styles for Webiny.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
.ContentEditable__root{
|
|
13
|
+
font-size: inherit;
|
|
14
|
+
line-height: 1.25;
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
.WebinyLexical__ltr {
|
|
18
|
+
text-align: inherit;
|
|
19
|
+
}
|
|
20
|
+
.WebinyLexical__rtl {
|
|
21
|
+
text-align: inherit;
|
|
22
|
+
}
|
|
23
|
+
.WebinyLexical__paragraph {
|
|
24
|
+
margin: 0;
|
|
25
|
+
position: relative;
|
|
26
|
+
text-align: inherit;
|
|
27
|
+
font-size: inherit;
|
|
28
|
+
}
|
|
29
|
+
.WebinyLexical__quote {
|
|
30
|
+
margin: 0;
|
|
31
|
+
margin-left: 20px;
|
|
32
|
+
margin-bottom: 10px;
|
|
33
|
+
font-size: 15px;
|
|
34
|
+
color: rgb(101, 103, 107);
|
|
35
|
+
border-left-color: rgb(206, 208, 212);
|
|
36
|
+
border-left-width: 4px;
|
|
37
|
+
border-left-style: solid;
|
|
38
|
+
padding-left: 16px;
|
|
39
|
+
}
|
|
40
|
+
.WebinyLexical__h1 {
|
|
41
|
+
font-size: 24px;
|
|
42
|
+
font-weight: inherit;
|
|
43
|
+
margin: inherit;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.WebinyLexical__h2 {
|
|
47
|
+
font-size: 15px;
|
|
48
|
+
font-weight: inherit;
|
|
49
|
+
margin: inherit;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.WebinyLexical__h3 {
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
font-weight: inherit;
|
|
55
|
+
margin: inherit;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.WebinyLexical__textBold {
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.WebinyLexical__textItalic {
|
|
63
|
+
font-style: italic;
|
|
64
|
+
}
|
|
65
|
+
.WebinyLexical__textUnderline {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
.WebinyLexical__textStrikethrough {
|
|
69
|
+
text-decoration: line-through;
|
|
70
|
+
}
|
|
71
|
+
.WebinyLexical__textUnderlineStrikethrough {
|
|
72
|
+
text-decoration: underline line-through;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.WebinyLexical__textSubscript {
|
|
76
|
+
font-size: 0.8em;
|
|
77
|
+
vertical-align: sub !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.WebinyLexical__textSuperscript {
|
|
81
|
+
font-size: 0.8em;
|
|
82
|
+
vertical-align: super;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.WebinyLexical__textCode {
|
|
86
|
+
background-color: rgb(240, 242, 245);
|
|
87
|
+
padding: 1px 0.25rem;
|
|
88
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
89
|
+
font-size: 94%;
|
|
90
|
+
}
|
|
91
|
+
.WebinyLexical__hashtag {
|
|
92
|
+
background-color: rgba(88, 144, 255, 0.15);
|
|
93
|
+
border-bottom: 1px solid rgba(88, 144, 255, 0.3);
|
|
94
|
+
}
|
|
95
|
+
.WebinyLexical__link {
|
|
96
|
+
color: rgb(33, 111, 219);
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
.WebinyLexical__link:hover {
|
|
100
|
+
text-decoration: underline;
|
|
101
|
+
}
|
|
102
|
+
.WebinyLexical__code {
|
|
103
|
+
background-color: rgb(240, 242, 245);
|
|
104
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
105
|
+
display: block;
|
|
106
|
+
padding: 8px 8px 8px 52px;
|
|
107
|
+
line-height: 1.53;
|
|
108
|
+
font-size: 13px;
|
|
109
|
+
margin: 0;
|
|
110
|
+
margin-top: 8px;
|
|
111
|
+
margin-bottom: 8px;
|
|
112
|
+
tab-size: 2;
|
|
113
|
+
/* white-space: pre; */
|
|
114
|
+
overflow-x: auto;
|
|
115
|
+
position: relative;
|
|
116
|
+
}
|
|
117
|
+
.WebinyLexical__code:before {
|
|
118
|
+
content: attr(data-gutter);
|
|
119
|
+
position: absolute;
|
|
120
|
+
background-color: #eee;
|
|
121
|
+
left: 0;
|
|
122
|
+
top: 0;
|
|
123
|
+
border-right: 1px solid #ccc;
|
|
124
|
+
padding: 8px;
|
|
125
|
+
color: #777;
|
|
126
|
+
white-space: pre-wrap;
|
|
127
|
+
text-align: right;
|
|
128
|
+
min-width: 25px;
|
|
129
|
+
}
|
|
130
|
+
.WebinyLexical__table {
|
|
131
|
+
border-collapse: collapse;
|
|
132
|
+
border-spacing: 0;
|
|
133
|
+
max-width: 100%;
|
|
134
|
+
overflow-y: scroll;
|
|
135
|
+
table-layout: fixed;
|
|
136
|
+
width: calc(100% - 25px);
|
|
137
|
+
margin: 30px 0;
|
|
138
|
+
}
|
|
139
|
+
.WebinyLexical__tableSelected {
|
|
140
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
141
|
+
}
|
|
142
|
+
.WebinyLexical__tableCell {
|
|
143
|
+
border: 1px solid #bbb;
|
|
144
|
+
min-width: 75px;
|
|
145
|
+
vertical-align: top;
|
|
146
|
+
text-align: start;
|
|
147
|
+
padding: 6px 8px;
|
|
148
|
+
position: relative;
|
|
149
|
+
cursor: default;
|
|
150
|
+
outline: none;
|
|
151
|
+
}
|
|
152
|
+
.WebinyLexical__tableCellSortedIndicator {
|
|
153
|
+
display: block;
|
|
154
|
+
opacity: 0.5;
|
|
155
|
+
position: absolute;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
left: 0;
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 4px;
|
|
160
|
+
background-color: #999;
|
|
161
|
+
}
|
|
162
|
+
.WebinyLexical__tableCellResizer {
|
|
163
|
+
position: absolute;
|
|
164
|
+
right: -4px;
|
|
165
|
+
height: 100%;
|
|
166
|
+
width: 8px;
|
|
167
|
+
cursor: ew-resize;
|
|
168
|
+
z-index: 10;
|
|
169
|
+
top: 0;
|
|
170
|
+
}
|
|
171
|
+
.WebinyLexical__tableCellHeader {
|
|
172
|
+
background-color: #f2f3f5;
|
|
173
|
+
text-align: start;
|
|
174
|
+
}
|
|
175
|
+
.WebinyLexical__tableCellSelected {
|
|
176
|
+
background-color: #c9dbf0;
|
|
177
|
+
}
|
|
178
|
+
.WebinyLexical__tableCellPrimarySelected {
|
|
179
|
+
border: 2px solid rgb(60, 132, 244);
|
|
180
|
+
display: block;
|
|
181
|
+
height: calc(100% - 2px);
|
|
182
|
+
position: absolute;
|
|
183
|
+
width: calc(100% - 2px);
|
|
184
|
+
left: -1px;
|
|
185
|
+
top: -1px;
|
|
186
|
+
z-index: 2;
|
|
187
|
+
}
|
|
188
|
+
.WebinyLexical__tableCellEditing {
|
|
189
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
|
|
190
|
+
border-radius: 3px;
|
|
191
|
+
}
|
|
192
|
+
.WebinyLexical__tableAddColumns {
|
|
193
|
+
position: absolute;
|
|
194
|
+
top: 0;
|
|
195
|
+
width: 20px;
|
|
196
|
+
background-color: #eee;
|
|
197
|
+
height: 100%;
|
|
198
|
+
right: 0;
|
|
199
|
+
animation: table-controls 0.2s ease;
|
|
200
|
+
border: 0;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.WebinyLexical__tableAddColumns:hover {
|
|
205
|
+
background-color: #c9dbf0;
|
|
206
|
+
}
|
|
207
|
+
.WebinyLexical__tableAddRows {
|
|
208
|
+
position: absolute;
|
|
209
|
+
bottom: -25px;
|
|
210
|
+
width: calc(100% - 25px);
|
|
211
|
+
background-color: #eee;
|
|
212
|
+
height: 20px;
|
|
213
|
+
left: 0;
|
|
214
|
+
animation: table-controls 0.2s ease;
|
|
215
|
+
border: 0;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
.WebinyLexical__tableAddRows:hover {
|
|
219
|
+
background-color: #c9dbf0;
|
|
220
|
+
}
|
|
221
|
+
@keyframes table-controls {
|
|
222
|
+
0% {
|
|
223
|
+
opacity: 0;
|
|
224
|
+
}
|
|
225
|
+
100% {
|
|
226
|
+
opacity: 1;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
.WebinyLexical__tableCellResizeRuler {
|
|
230
|
+
display: block;
|
|
231
|
+
position: absolute;
|
|
232
|
+
width: 1px;
|
|
233
|
+
background-color: rgb(60, 132, 244);
|
|
234
|
+
height: 100%;
|
|
235
|
+
top: 0;
|
|
236
|
+
}
|
|
237
|
+
.WebinyLexical__tableCellActionButtonContainer {
|
|
238
|
+
display: block;
|
|
239
|
+
right: 5px;
|
|
240
|
+
top: 6px;
|
|
241
|
+
position: absolute;
|
|
242
|
+
z-index: 4;
|
|
243
|
+
width: 20px;
|
|
244
|
+
height: 20px;
|
|
245
|
+
}
|
|
246
|
+
.WebinyLexical__tableCellActionButton {
|
|
247
|
+
background-color: #eee;
|
|
248
|
+
display: block;
|
|
249
|
+
border: 0;
|
|
250
|
+
border-radius: 20px;
|
|
251
|
+
width: 20px;
|
|
252
|
+
height: 20px;
|
|
253
|
+
color: #222;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
}
|
|
256
|
+
.WebinyLexical__tableCellActionButton:hover {
|
|
257
|
+
background-color: #ddd;
|
|
258
|
+
}
|
|
259
|
+
.WebinyLexical__characterLimit {
|
|
260
|
+
display: inline;
|
|
261
|
+
background-color: #ffbbbb !important;
|
|
262
|
+
}
|
|
263
|
+
.WebinyLexical__ol1 {
|
|
264
|
+
list-style: auto;
|
|
265
|
+
padding: 0;
|
|
266
|
+
margin: 0;
|
|
267
|
+
margin-left: 16px;
|
|
268
|
+
list-style-position: inside;
|
|
269
|
+
}
|
|
270
|
+
.WebinyLexical__ol2 {
|
|
271
|
+
list-style: initial;
|
|
272
|
+
padding: 0;
|
|
273
|
+
margin: 0;
|
|
274
|
+
margin-left: 16px;
|
|
275
|
+
list-style-type: upper-alpha;
|
|
276
|
+
list-style-position: inside;
|
|
277
|
+
}
|
|
278
|
+
.WebinyLexical__ol3 {
|
|
279
|
+
list-style: initial;
|
|
280
|
+
list-style: auto;
|
|
281
|
+
padding: 0;
|
|
282
|
+
margin: 0;
|
|
283
|
+
margin-left: 16px;
|
|
284
|
+
list-style-type: lower-alpha;
|
|
285
|
+
list-style-position: inside;
|
|
286
|
+
}
|
|
287
|
+
.WebinyLexical__ol4 {
|
|
288
|
+
list-style: initial;
|
|
289
|
+
padding: 0;
|
|
290
|
+
margin: 0;
|
|
291
|
+
margin-left: 16px;
|
|
292
|
+
list-style-type: upper-roman;
|
|
293
|
+
list-style-position: inside;
|
|
294
|
+
}
|
|
295
|
+
.WebinyLexical__ol5 {
|
|
296
|
+
list-style: initial;
|
|
297
|
+
padding: 0;
|
|
298
|
+
margin: 0;
|
|
299
|
+
margin-left: 16px;
|
|
300
|
+
list-style-type: lower-roman;
|
|
301
|
+
list-style-position: inside;
|
|
302
|
+
}
|
|
303
|
+
.WebinyLexical__ul {
|
|
304
|
+
list-style: initial;
|
|
305
|
+
padding: 0;
|
|
306
|
+
margin: 0;
|
|
307
|
+
margin-left: 16px;
|
|
308
|
+
list-style-position: inside;
|
|
309
|
+
}
|
|
310
|
+
.WebinyLexical__listItem {
|
|
311
|
+
margin: 0 32px;
|
|
312
|
+
}
|
|
313
|
+
.WebinyLexical__listItemChecked,
|
|
314
|
+
.WebinyLexical__listItemUnchecked {
|
|
315
|
+
position: relative;
|
|
316
|
+
margin-left: 8px;
|
|
317
|
+
margin-right: 8px;
|
|
318
|
+
padding-left: 24px;
|
|
319
|
+
padding-right: 24px;
|
|
320
|
+
list-style-type: none;
|
|
321
|
+
outline: none;
|
|
322
|
+
}
|
|
323
|
+
.WebinyLexical__listItemChecked {
|
|
324
|
+
text-decoration: line-through;
|
|
325
|
+
}
|
|
326
|
+
.WebinyLexical__listItemUnchecked:before,
|
|
327
|
+
.WebinyLexical__listItemChecked:before {
|
|
328
|
+
content: '';
|
|
329
|
+
width: 16px;
|
|
330
|
+
height: 16px;
|
|
331
|
+
top: 2px;
|
|
332
|
+
left: 0;
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
display: block;
|
|
335
|
+
background-size: cover;
|
|
336
|
+
position: absolute;
|
|
337
|
+
}
|
|
338
|
+
.WebinyLexical__listItemUnchecked[dir='rtl']:before,
|
|
339
|
+
.WebinyLexical__listItemChecked[dir='rtl']:before {
|
|
340
|
+
left: auto;
|
|
341
|
+
right: 0;
|
|
342
|
+
}
|
|
343
|
+
.WebinyLexical__listItemUnchecked:focus:before,
|
|
344
|
+
.WebinyLexical__listItemChecked:focus:before {
|
|
345
|
+
box-shadow: 0 0 0 2px #a6cdfe;
|
|
346
|
+
border-radius: 2px;
|
|
347
|
+
}
|
|
348
|
+
.WebinyLexical__listItemUnchecked:before {
|
|
349
|
+
border: 1px solid #999;
|
|
350
|
+
border-radius: 2px;
|
|
351
|
+
}
|
|
352
|
+
.WebinyLexical__listItemChecked:before {
|
|
353
|
+
border: 1px solid rgb(61, 135, 245);
|
|
354
|
+
border-radius: 2px;
|
|
355
|
+
background-color: #3d87f5;
|
|
356
|
+
background-repeat: no-repeat;
|
|
357
|
+
}
|
|
358
|
+
.WebinyLexical__listItemChecked:after {
|
|
359
|
+
content: '';
|
|
360
|
+
cursor: pointer;
|
|
361
|
+
border-color: #fff;
|
|
362
|
+
border-style: solid;
|
|
363
|
+
position: absolute;
|
|
364
|
+
display: block;
|
|
365
|
+
top: 6px;
|
|
366
|
+
width: 3px;
|
|
367
|
+
left: 7px;
|
|
368
|
+
height: 6px;
|
|
369
|
+
transform: rotate(45deg);
|
|
370
|
+
border-width: 0 2px 2px 0;
|
|
371
|
+
}
|
|
372
|
+
.WebinyLexical__nestedListItem {
|
|
373
|
+
list-style-type: none;
|
|
374
|
+
}
|
|
375
|
+
.WebinyLexical__nestedListItem:before,
|
|
376
|
+
.WebinyLexical__nestedListItem:after {
|
|
377
|
+
display: none;
|
|
378
|
+
}
|
|
379
|
+
.WebinyLexical__tokenComment {
|
|
380
|
+
color: slategray;
|
|
381
|
+
}
|
|
382
|
+
.WebinyLexical__tokenPunctuation {
|
|
383
|
+
color: #999;
|
|
384
|
+
}
|
|
385
|
+
.WebinyLexical__tokenProperty {
|
|
386
|
+
color: #905;
|
|
387
|
+
}
|
|
388
|
+
.WebinyLexical__tokenSelector {
|
|
389
|
+
color: #690;
|
|
390
|
+
}
|
|
391
|
+
.WebinyLexical__tokenOperator {
|
|
392
|
+
color: #9a6e3a;
|
|
393
|
+
}
|
|
394
|
+
.WebinyLexical__tokenAttr {
|
|
395
|
+
color: #07a;
|
|
396
|
+
}
|
|
397
|
+
.WebinyLexical__tokenVariable {
|
|
398
|
+
color: #e90;
|
|
399
|
+
}
|
|
400
|
+
.WebinyLexical__tokenFunction {
|
|
401
|
+
color: #dd4a68;
|
|
402
|
+
}
|
|
403
|
+
.WebinyLexical__mark {
|
|
404
|
+
background: rgba(255, 212, 0, 0.14);
|
|
405
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.3);
|
|
406
|
+
padding-bottom: 2px;
|
|
407
|
+
}
|
|
408
|
+
.WebinyLexical__markOverlap {
|
|
409
|
+
background: rgba(255, 212, 0, 0.3);
|
|
410
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
411
|
+
}
|
|
412
|
+
.WebinyLexical__mark.selected {
|
|
413
|
+
background: rgba(255, 212, 0, 0.5);
|
|
414
|
+
border-bottom: 2px solid rgba(255, 212, 0, 1);
|
|
415
|
+
}
|
|
416
|
+
.WebinyLexical__markOverlap.selected {
|
|
417
|
+
background: rgba(255, 212, 0, 0.7);
|
|
418
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
419
|
+
}
|
|
420
|
+
.WebinyLexical__embedBlock {
|
|
421
|
+
user-select: none;
|
|
422
|
+
}
|
|
423
|
+
.WebinyLexical__embedBlockFocus {
|
|
424
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.WebinyLexical__placeholder {
|
|
428
|
+
text-align: left;
|
|
429
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EditorThemeClasses } from "lexical";
|
|
2
|
+
import "./webinyLexicalTheme.css";
|
|
3
|
+
import { ThemeEmotionMap } from "../types";
|
|
4
|
+
export declare type WebinyTheme = {
|
|
5
|
+
styles?: Record<string, any>;
|
|
6
|
+
emotionMap?: ThemeEmotionMap;
|
|
7
|
+
};
|
|
8
|
+
export declare type WebinyEditorTheme = WebinyTheme & EditorThemeClasses;
|
|
9
|
+
export declare const webinyEditorTheme: WebinyEditorTheme;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.webinyEditorTheme = void 0;
|
|
7
|
+
require("./webinyLexicalTheme.css");
|
|
8
|
+
var webinyEditorTheme = {
|
|
9
|
+
styles: undefined,
|
|
10
|
+
emotionMap: undefined,
|
|
11
|
+
characterLimit: "WebinyLexical__characterLimit",
|
|
12
|
+
code: "WebinyLexical__code",
|
|
13
|
+
codeHighlight: {
|
|
14
|
+
atrule: "WebinyLexical__tokenAttr",
|
|
15
|
+
attr: "WebinyLexical__tokenAttr",
|
|
16
|
+
boolean: "WebinyLexical__tokenProperty",
|
|
17
|
+
builtin: "WebinyLexical__tokenSelector",
|
|
18
|
+
cdata: "WebinyLexical__tokenComment",
|
|
19
|
+
char: "WebinyLexical__tokenSelector",
|
|
20
|
+
class: "WebinyLexical__tokenFunction",
|
|
21
|
+
"class-name": "WebinyLexical__tokenFunction",
|
|
22
|
+
comment: "WebinyLexical__tokenComment",
|
|
23
|
+
constant: "WebinyLexical__tokenProperty",
|
|
24
|
+
deleted: "WebinyLexical__tokenProperty",
|
|
25
|
+
doctype: "WebinyLexical__tokenComment",
|
|
26
|
+
entity: "WebinyLexical__tokenOperator",
|
|
27
|
+
function: "WebinyLexical__tokenFunction",
|
|
28
|
+
important: "WebinyLexical__tokenVariable",
|
|
29
|
+
inserted: "WebinyLexical__tokenSelector",
|
|
30
|
+
keyword: "WebinyLexical__tokenAttr",
|
|
31
|
+
namespace: "WebinyLexical__tokenVariable",
|
|
32
|
+
number: "WebinyLexical__tokenProperty",
|
|
33
|
+
operator: "WebinyLexical__tokenOperator",
|
|
34
|
+
prolog: "WebinyLexical__tokenComment",
|
|
35
|
+
property: "WebinyLexical__tokenProperty",
|
|
36
|
+
punctuation: "WebinyLexical__tokenPunctuation",
|
|
37
|
+
regex: "WebinyLexical__tokenVariable",
|
|
38
|
+
selector: "WebinyLexical__tokenSelector",
|
|
39
|
+
string: "WebinyLexical__tokenSelector",
|
|
40
|
+
symbol: "WebinyLexical__tokenProperty",
|
|
41
|
+
tag: "WebinyLexical__tokenProperty",
|
|
42
|
+
url: "WebinyLexical__tokenOperator",
|
|
43
|
+
variable: "WebinyLexical__tokenVariable"
|
|
44
|
+
},
|
|
45
|
+
embedBlock: {
|
|
46
|
+
base: "WebinyLexical__embedBlock",
|
|
47
|
+
focus: "WebinyLexical__embedBlockFocus"
|
|
48
|
+
},
|
|
49
|
+
hashtag: "WebinyLexical__hashtag",
|
|
50
|
+
heading: {
|
|
51
|
+
h1: "WebinyLexical__h1",
|
|
52
|
+
h2: "WebinyLexical__h2",
|
|
53
|
+
h3: "WebinyLexical__h3",
|
|
54
|
+
h4: "WebinyLexical__h4",
|
|
55
|
+
h5: "WebinyLexical__h5",
|
|
56
|
+
h6: "WebinyLexical__h6"
|
|
57
|
+
},
|
|
58
|
+
link: "WebinyLexical__link",
|
|
59
|
+
list: {
|
|
60
|
+
listitem: "WebinyLexical__listItem",
|
|
61
|
+
listitemChecked: "WebinyLexical__listItemChecked",
|
|
62
|
+
listitemUnchecked: "WebinyLexical__listItemUnchecked",
|
|
63
|
+
nested: {
|
|
64
|
+
listitem: "WebinyLexical__nestedListItem"
|
|
65
|
+
},
|
|
66
|
+
olDepth: ["WebinyLexical__ol1", "WebinyLexical__ol2", "WebinyLexical__ol3", "WebinyLexical__ol4", "WebinyLexical__ol5"],
|
|
67
|
+
ul: "WebinyLexical__ul"
|
|
68
|
+
},
|
|
69
|
+
ltr: "WebinyLexical__ltr",
|
|
70
|
+
mark: "WebinyLexical__mark",
|
|
71
|
+
markOverlap: "WebinyLexical__markOverlap",
|
|
72
|
+
paragraph: "WebinyLexical__paragraph",
|
|
73
|
+
quote: "WebinyLexical__quote",
|
|
74
|
+
rtl: "WebinyLexical__rtl",
|
|
75
|
+
text: {
|
|
76
|
+
bold: "WebinyLexical__textBold",
|
|
77
|
+
code: "WebinyLexical__textCode",
|
|
78
|
+
italic: "WebinyLexical__textItalic",
|
|
79
|
+
strikethrough: "WebinyLexical__textStrikethrough",
|
|
80
|
+
subscript: "WebinyLexical__textSubscript",
|
|
81
|
+
superscript: "WebinyLexical__textSuperscript",
|
|
82
|
+
underline: "WebinyLexical__textUnderline",
|
|
83
|
+
underlineStrikethrough: "WebinyLexical__textUnderlineStrikethrough"
|
|
84
|
+
},
|
|
85
|
+
fontColorText: "WebinyLexical__fontColorText"
|
|
86
|
+
};
|
|
87
|
+
exports.webinyEditorTheme = webinyEditorTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["webinyEditorTheme","styles","undefined","emotionMap","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","link","list","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","rtl","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","fontColorText"],"sources":["webinyLexicalTheme.ts"],"sourcesContent":["import type { EditorThemeClasses } from \"lexical\";\n\nimport \"./webinyLexicalTheme.css\";\nimport { ThemeEmotionMap } from \"~/types\";\n\nexport type WebinyTheme = {\n styles?: Record<string, any>;\n emotionMap?: ThemeEmotionMap;\n};\n\nexport type WebinyEditorTheme = WebinyTheme & EditorThemeClasses;\n\nexport const webinyEditorTheme: WebinyEditorTheme = {\n styles: undefined,\n emotionMap: undefined,\n characterLimit: \"WebinyLexical__characterLimit\",\n code: \"WebinyLexical__code\",\n codeHighlight: {\n atrule: \"WebinyLexical__tokenAttr\",\n attr: \"WebinyLexical__tokenAttr\",\n boolean: \"WebinyLexical__tokenProperty\",\n builtin: \"WebinyLexical__tokenSelector\",\n cdata: \"WebinyLexical__tokenComment\",\n char: \"WebinyLexical__tokenSelector\",\n class: \"WebinyLexical__tokenFunction\",\n \"class-name\": \"WebinyLexical__tokenFunction\",\n comment: \"WebinyLexical__tokenComment\",\n constant: \"WebinyLexical__tokenProperty\",\n deleted: \"WebinyLexical__tokenProperty\",\n doctype: \"WebinyLexical__tokenComment\",\n entity: \"WebinyLexical__tokenOperator\",\n function: \"WebinyLexical__tokenFunction\",\n important: \"WebinyLexical__tokenVariable\",\n inserted: \"WebinyLexical__tokenSelector\",\n keyword: \"WebinyLexical__tokenAttr\",\n namespace: \"WebinyLexical__tokenVariable\",\n number: \"WebinyLexical__tokenProperty\",\n operator: \"WebinyLexical__tokenOperator\",\n prolog: \"WebinyLexical__tokenComment\",\n property: \"WebinyLexical__tokenProperty\",\n punctuation: \"WebinyLexical__tokenPunctuation\",\n regex: \"WebinyLexical__tokenVariable\",\n selector: \"WebinyLexical__tokenSelector\",\n string: \"WebinyLexical__tokenSelector\",\n symbol: \"WebinyLexical__tokenProperty\",\n tag: \"WebinyLexical__tokenProperty\",\n url: \"WebinyLexical__tokenOperator\",\n variable: \"WebinyLexical__tokenVariable\"\n },\n embedBlock: {\n base: \"WebinyLexical__embedBlock\",\n focus: \"WebinyLexical__embedBlockFocus\"\n },\n hashtag: \"WebinyLexical__hashtag\",\n heading: {\n h1: \"WebinyLexical__h1\",\n h2: \"WebinyLexical__h2\",\n h3: \"WebinyLexical__h3\",\n h4: \"WebinyLexical__h4\",\n h5: \"WebinyLexical__h5\",\n h6: \"WebinyLexical__h6\"\n },\n link: \"WebinyLexical__link\",\n list: {\n listitem: \"WebinyLexical__listItem\",\n listitemChecked: \"WebinyLexical__listItemChecked\",\n listitemUnchecked: \"WebinyLexical__listItemUnchecked\",\n nested: {\n listitem: \"WebinyLexical__nestedListItem\"\n },\n olDepth: [\n \"WebinyLexical__ol1\",\n \"WebinyLexical__ol2\",\n \"WebinyLexical__ol3\",\n \"WebinyLexical__ol4\",\n \"WebinyLexical__ol5\"\n ],\n ul: \"WebinyLexical__ul\"\n },\n ltr: \"WebinyLexical__ltr\",\n mark: \"WebinyLexical__mark\",\n markOverlap: \"WebinyLexical__markOverlap\",\n paragraph: \"WebinyLexical__paragraph\",\n quote: \"WebinyLexical__quote\",\n rtl: \"WebinyLexical__rtl\",\n text: {\n bold: \"WebinyLexical__textBold\",\n code: \"WebinyLexical__textCode\",\n italic: \"WebinyLexical__textItalic\",\n strikethrough: \"WebinyLexical__textStrikethrough\",\n subscript: \"WebinyLexical__textSubscript\",\n superscript: \"WebinyLexical__textSuperscript\",\n underline: \"WebinyLexical__textUnderline\",\n underlineStrikethrough: \"WebinyLexical__textUnderlineStrikethrough\"\n },\n fontColorText: \"WebinyLexical__fontColorText\"\n};\n"],"mappings":";;;;;;AAEA;AAUO,IAAMA,iBAAoC,GAAG;EAChDC,MAAM,EAAEC,SAAS;EACjBC,UAAU,EAAED,SAAS;EACrBE,cAAc,EAAE,+BAA+B;EAC/CC,IAAI,EAAE,qBAAqB;EAC3BC,aAAa,EAAE;IACXC,MAAM,EAAE,0BAA0B;IAClCC,IAAI,EAAE,0BAA0B;IAChCC,OAAO,EAAE,8BAA8B;IACvCC,OAAO,EAAE,8BAA8B;IACvCC,KAAK,EAAE,6BAA6B;IACpCC,IAAI,EAAE,8BAA8B;IACpCC,KAAK,EAAE,8BAA8B;IACrC,YAAY,EAAE,8BAA8B;IAC5CC,OAAO,EAAE,6BAA6B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,OAAO,EAAE,8BAA8B;IACvCC,OAAO,EAAE,6BAA6B;IACtCC,MAAM,EAAE,8BAA8B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,SAAS,EAAE,8BAA8B;IACzCC,QAAQ,EAAE,8BAA8B;IACxCC,OAAO,EAAE,0BAA0B;IACnCC,SAAS,EAAE,8BAA8B;IACzCC,MAAM,EAAE,8BAA8B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,MAAM,EAAE,6BAA6B;IACrCC,QAAQ,EAAE,8BAA8B;IACxCC,WAAW,EAAE,iCAAiC;IAC9CC,KAAK,EAAE,8BAA8B;IACrCC,QAAQ,EAAE,8BAA8B;IACxCC,MAAM,EAAE,8BAA8B;IACtCC,MAAM,EAAE,8BAA8B;IACtCC,GAAG,EAAE,8BAA8B;IACnCC,GAAG,EAAE,8BAA8B;IACnCC,QAAQ,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACRC,IAAI,EAAE,2BAA2B;IACjCC,KAAK,EAAE;EACX,CAAC;EACDC,OAAO,EAAE,wBAAwB;EACjCC,OAAO,EAAE;IACLC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE;EACR,CAAC;EACDC,IAAI,EAAE,qBAAqB;EAC3BC,IAAI,EAAE;IACFC,QAAQ,EAAE,yBAAyB;IACnCC,eAAe,EAAE,gCAAgC;IACjDC,iBAAiB,EAAE,kCAAkC;IACrDC,MAAM,EAAE;MACJH,QAAQ,EAAE;IACd,CAAC;IACDI,OAAO,EAAE,CACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,CACvB;IACDC,EAAE,EAAE;EACR,CAAC;EACDC,GAAG,EAAE,oBAAoB;EACzBC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,4BAA4B;EACzCC,SAAS,EAAE,0BAA0B;EACrCC,KAAK,EAAE,sBAAsB;EAC7BC,GAAG,EAAE,oBAAoB;EACzBC,IAAI,EAAE;IACFC,IAAI,EAAE,yBAAyB;IAC/BzD,IAAI,EAAE,yBAAyB;IAC/B0D,MAAM,EAAE,2BAA2B;IACnCC,aAAa,EAAE,kCAAkC;IACjDC,SAAS,EAAE,8BAA8B;IACzCC,WAAW,EAAE,gCAAgC;IAC7CC,SAAS,EAAE,8BAA8B;IACzCC,sBAAsB,EAAE;EAC5B,CAAC;EACDC,aAAa,EAAE;AACnB,CAAC;AAAC"}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ElementNode, LexicalNode, NodeSelection, RangeSelection, TextNode } from "lexical";
|
|
2
|
+
import { ListType } from "@lexical/list";
|
|
3
|
+
import { CSSObject } from "@emotion/react";
|
|
4
|
+
export declare type ToolbarType = "heading" | "paragraph" | string;
|
|
5
|
+
export declare type LexicalValue = string;
|
|
6
|
+
export { FontColorPicker } from "./components/ToolbarActions/FontColorAction";
|
|
7
|
+
export declare type LexicalTextType = ListType | "paragraph" | "heading" | "quoteblock" | "bullet" | "number" | "link" | undefined;
|
|
8
|
+
export declare type TextFormatting = {
|
|
9
|
+
bold: boolean;
|
|
10
|
+
underline: boolean;
|
|
11
|
+
italic: boolean;
|
|
12
|
+
code: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare type NodeState = {
|
|
15
|
+
isSelected: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare type ToolbarState = {
|
|
18
|
+
bold: boolean;
|
|
19
|
+
underline: boolean;
|
|
20
|
+
italic: boolean;
|
|
21
|
+
code: boolean;
|
|
22
|
+
isRTL: boolean;
|
|
23
|
+
link: NodeState;
|
|
24
|
+
typography: NodeState;
|
|
25
|
+
fontColor: NodeState;
|
|
26
|
+
list: NodeState;
|
|
27
|
+
quote: NodeState;
|
|
28
|
+
textType: LexicalTextType;
|
|
29
|
+
paragraph: NodeState;
|
|
30
|
+
heading: NodeState;
|
|
31
|
+
};
|
|
32
|
+
export declare type TextBlockSelection = {
|
|
33
|
+
elementKey?: string;
|
|
34
|
+
selection: RangeSelection | NodeSelection | null;
|
|
35
|
+
element: LexicalNode;
|
|
36
|
+
parent: ElementNode | null;
|
|
37
|
+
node: ElementNode | TextNode;
|
|
38
|
+
anchorNode: ElementNode | TextNode;
|
|
39
|
+
isElementDom: boolean;
|
|
40
|
+
selectedText: string;
|
|
41
|
+
state: ToolbarState | undefined;
|
|
42
|
+
};
|
|
43
|
+
export declare type ListHtmlTag = "ol" | "ul";
|
|
44
|
+
export declare type HeadingHtmlTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
45
|
+
export declare type ParagraphHtmlTag = "p";
|
|
46
|
+
export declare type QuoteBlockHtmlTag = "quoteblock";
|
|
47
|
+
export declare type TypographyHTMLTag = HeadingHtmlTag | ParagraphHtmlTag | ListHtmlTag | QuoteBlockHtmlTag;
|
|
48
|
+
export declare type TypographyValue = {
|
|
49
|
+
css: CSSObject;
|
|
50
|
+
id: string;
|
|
51
|
+
tag: TypographyHTMLTag;
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
export declare type ThemeEmotionMap = {
|
|
55
|
+
[styleId: string]: {
|
|
56
|
+
id: string;
|
|
57
|
+
tag: TypographyHTMLTag;
|
|
58
|
+
name: string;
|
|
59
|
+
styles: Record<string, any>;
|
|
60
|
+
className: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export { Klass, LexicalNode } from "lexical";
|
package/types.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "FontColorPicker", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _FontColorAction.FontColorPicker;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Klass", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _lexical.Klass;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "LexicalNode", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _lexical.LexicalNode;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _FontColorAction = require("./components/ToolbarActions/FontColorAction");
|
|
25
|
+
var _lexical = require("lexical");
|
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { ElementNode, LexicalNode, NodeSelection, RangeSelection, TextNode } from \"lexical\";\nimport { ListType } from \"@lexical/list\";\nimport { CSSObject } from \"@emotion/react\";\nexport type ToolbarType = \"heading\" | \"paragraph\" | string;\nexport type LexicalValue = string;\nexport { FontColorPicker } from \"~/components/ToolbarActions/FontColorAction\";\n\nexport type LexicalTextType =\n | ListType\n | \"paragraph\"\n | \"heading\"\n | \"quoteblock\"\n | \"bullet\"\n | \"number\"\n | \"link\"\n | undefined;\n\nexport type TextFormatting = {\n bold: boolean;\n underline: boolean;\n italic: boolean;\n // highlight: boolean #TODO implement with highlight action\n code: boolean;\n};\n\nexport type NodeState = {\n isSelected: boolean;\n};\n\nexport type ToolbarState = {\n // text format\n bold: boolean;\n underline: boolean;\n italic: boolean;\n code: boolean;\n // is direction of the text right-to-left\n isRTL: boolean;\n // nodes selection state\n link: NodeState;\n typography: NodeState;\n fontColor: NodeState;\n list: NodeState;\n quote: NodeState;\n textType: LexicalTextType;\n paragraph: NodeState;\n heading: NodeState;\n};\n\n/*\n * Represent set of data from the current selection of the text and nodes selected by the user.\n * You can access this object through the @see useRichTextEditor context.\n */\nexport type TextBlockSelection = {\n elementKey?: string;\n selection: RangeSelection | NodeSelection | null;\n element: LexicalNode;\n parent: ElementNode | null;\n node: ElementNode | TextNode;\n anchorNode: ElementNode | TextNode;\n isElementDom: boolean;\n selectedText: string;\n state: ToolbarState | undefined;\n};\n\n// Supported HTML tags by webiny lexical implementation\nexport type ListHtmlTag = \"ol\" | \"ul\";\nexport type HeadingHtmlTag = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\nexport type ParagraphHtmlTag = \"p\";\nexport type QuoteBlockHtmlTag = \"quoteblock\";\n\n// Typography\nexport type TypographyHTMLTag = HeadingHtmlTag | ParagraphHtmlTag | ListHtmlTag | QuoteBlockHtmlTag;\n\nexport type TypographyValue = {\n // CSSObject type\n css: CSSObject;\n id: string;\n tag: TypographyHTMLTag;\n // Display name\n name: string;\n};\n\n/* Nodes */\n\n/*\n * Contains IDs of the styles and Emotion generated classes.\n */\nexport type ThemeEmotionMap = {\n [styleId: string]: {\n id: string;\n tag: TypographyHTMLTag;\n name: string;\n styles: Record<string, any>;\n // emotion generated class\n className: string;\n };\n};\n\n// lexical types\nexport { Klass, LexicalNode } from \"lexical\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA;AA8FA"}
|
package/ui/Divider.d.ts
ADDED
package/ui/Divider.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Divider = Divider;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
function Divider() {
|
|
10
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
11
|
+
className: "divider"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Divider"],"sources":["Divider.tsx"],"sourcesContent":["import React from \"react\";\n\nexport function Divider(): JSX.Element {\n return <div className=\"divider\"></div>;\n}\n"],"mappings":";;;;;;;AAAA;AAEO,SAASA,OAAO,GAAgB;EACnC,oBAAO;IAAK,SAAS,EAAC;EAAS,EAAO;AAC1C"}
|
package/ui/DropDown.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
/// <reference types="web" />
|
|
9
|
+
import { ReactNode } from "react";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
export declare function DropDownItem({ children, className, onClick, title }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className: string;
|
|
14
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
15
|
+
title?: string;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
export declare function DropDown({ disabled, buttonLabel, buttonAriaLabel, buttonClassName, buttonIconClassName, children, stopCloseOnClickSelf, showScroll }: {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
buttonAriaLabel?: string;
|
|
20
|
+
buttonClassName: string;
|
|
21
|
+
buttonIconClassName?: string;
|
|
22
|
+
buttonLabel?: string;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
stopCloseOnClickSelf?: boolean;
|
|
25
|
+
showScroll?: boolean;
|
|
26
|
+
}): JSX.Element;
|