@toptal/picasso 19.2.0 → 19.3.0
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/Icon/Bold16.d.ts +10 -0
- package/Icon/Bold16.js +23 -0
- package/Icon/Bold16.js.map +1 -0
- package/Icon/Italic16.d.ts +10 -0
- package/Icon/Italic16.js +23 -0
- package/Icon/Italic16.js.map +1 -0
- package/Icon/ListOrdered16.d.ts +10 -0
- package/Icon/ListOrdered16.js +23 -0
- package/Icon/ListOrdered16.js.map +1 -0
- package/Icon/ListUnordered16.d.ts +10 -0
- package/Icon/ListUnordered16.js +23 -0
- package/Icon/ListUnordered16.js.map +1 -0
- package/Icon/index.d.ts +4 -0
- package/Icon/index.js +4 -0
- package/Icon/index.js.map +1 -1
- package/ListItem/styles.d.ts +1 -1
- package/QuillEditor/QuillEditor.d.ts +32 -0
- package/QuillEditor/QuillEditor.js +42 -0
- package/QuillEditor/QuillEditor.js.map +1 -0
- package/QuillEditor/constants.d.ts +1 -0
- package/QuillEditor/constants.js +2 -0
- package/QuillEditor/constants.js.map +1 -0
- package/QuillEditor/formats/bold.d.ts +8 -0
- package/QuillEditor/formats/bold.js +18 -0
- package/QuillEditor/formats/bold.js.map +1 -0
- package/QuillEditor/formats/header.d.ts +8 -0
- package/QuillEditor/formats/header.js +20 -0
- package/QuillEditor/formats/header.js.map +1 -0
- package/QuillEditor/formats/index.d.ts +3 -0
- package/QuillEditor/formats/index.js +4 -0
- package/QuillEditor/formats/index.js.map +1 -0
- package/QuillEditor/formats/use-typography-classes.d.ts +2 -0
- package/QuillEditor/formats/use-typography-classes.js +7 -0
- package/QuillEditor/formats/use-typography-classes.js.map +1 -0
- package/QuillEditor/hooks/index.d.ts +6 -0
- package/QuillEditor/hooks/index.js +7 -0
- package/QuillEditor/hooks/index.js.map +1 -0
- package/QuillEditor/hooks/useDefaultValue/index.d.ts +1 -0
- package/QuillEditor/hooks/useDefaultValue/index.js +2 -0
- package/QuillEditor/hooks/useDefaultValue/index.js.map +1 -0
- package/QuillEditor/hooks/useDefaultValue/useDefaultValue.d.ts +7 -0
- package/QuillEditor/hooks/useDefaultValue/useDefaultValue.js +15 -0
- package/QuillEditor/hooks/useDefaultValue/useDefaultValue.js.map +1 -0
- package/QuillEditor/hooks/useDisabledEditor/index.d.ts +1 -0
- package/QuillEditor/hooks/useDisabledEditor/index.js +2 -0
- package/QuillEditor/hooks/useDisabledEditor/index.js.map +1 -0
- package/QuillEditor/hooks/useDisabledEditor/useDisabledEditor.d.ts +6 -0
- package/QuillEditor/hooks/useDisabledEditor/useDisabledEditor.js +11 -0
- package/QuillEditor/hooks/useDisabledEditor/useDisabledEditor.js.map +1 -0
- package/QuillEditor/hooks/useFocus/index.d.ts +1 -0
- package/QuillEditor/hooks/useFocus/index.js +2 -0
- package/QuillEditor/hooks/useFocus/index.js.map +1 -0
- package/QuillEditor/hooks/useFocus/useFocus.d.ts +6 -0
- package/QuillEditor/hooks/useFocus/useFocus.js +13 -0
- package/QuillEditor/hooks/useFocus/useFocus.js.map +1 -0
- package/QuillEditor/hooks/useKeyBindings/index.d.ts +1 -0
- package/QuillEditor/hooks/useKeyBindings/index.js +2 -0
- package/QuillEditor/hooks/useKeyBindings/index.js.map +1 -0
- package/QuillEditor/hooks/useKeyBindings/useKeyBindings.d.ts +7 -0
- package/QuillEditor/hooks/useKeyBindings/useKeyBindings.js +32 -0
- package/QuillEditor/hooks/useKeyBindings/useKeyBindings.js.map +1 -0
- package/QuillEditor/hooks/useQuillInstance/index.d.ts +1 -0
- package/QuillEditor/hooks/useQuillInstance/index.js +2 -0
- package/QuillEditor/hooks/useQuillInstance/index.js.map +1 -0
- package/QuillEditor/hooks/useQuillInstance/useQuillInstance.d.ts +9 -0
- package/QuillEditor/hooks/useQuillInstance/useQuillInstance.js +68 -0
- package/QuillEditor/hooks/useQuillInstance/useQuillInstance.js.map +1 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/index.d.ts +1 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/index.js +2 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/index.js.map +1 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/useSubscribeToQuillEvents.d.ts +10 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/useSubscribeToQuillEvents.js +64 -0
- package/QuillEditor/hooks/useSubscribeToQuillEvents/useSubscribeToQuillEvents.js.map +1 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/index.d.ts +1 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/index.js +2 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/index.js.map +1 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/useSubscribeToTextEditorEvents.d.ts +6 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/useSubscribeToTextEditorEvents.js +23 -0
- package/QuillEditor/hooks/useSubscribeToTextEditorEvents/useSubscribeToTextEditorEvents.js.map +1 -0
- package/QuillEditor/index.d.ts +4 -0
- package/QuillEditor/index.js +4 -0
- package/QuillEditor/index.js.map +1 -0
- package/QuillEditor/styles.d.ts +3 -0
- package/QuillEditor/styles.js +100 -0
- package/QuillEditor/styles.js.map +1 -0
- package/QuillEditor/types.d.ts +27 -0
- package/QuillEditor/types.js +2 -0
- package/QuillEditor/types.js.map +1 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/getCleanupOnAllContentRemovalHandler.d.ts +3 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/getCleanupOnAllContentRemovalHandler.js +22 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/getCleanupOnAllContentRemovalHandler.js.map +1 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/index.d.ts +1 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/index.js +2 -0
- package/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/index.js.map +1 -0
- package/QuillEditor/utils/getEditorChangeHandler/getEditorChangeHandler.d.ts +7 -0
- package/QuillEditor/utils/getEditorChangeHandler/getEditorChangeHandler.js +41 -0
- package/QuillEditor/utils/getEditorChangeHandler/getEditorChangeHandler.js.map +1 -0
- package/QuillEditor/utils/getEditorChangeHandler/index.d.ts +1 -0
- package/QuillEditor/utils/getEditorChangeHandler/index.js +2 -0
- package/QuillEditor/utils/getEditorChangeHandler/index.js.map +1 -0
- package/QuillEditor/utils/getFormatChangeHandler/getFormatChangeHandler.d.ts +3 -0
- package/QuillEditor/utils/getFormatChangeHandler/getFormatChangeHandler.js +13 -0
- package/QuillEditor/utils/getFormatChangeHandler/getFormatChangeHandler.js.map +1 -0
- package/QuillEditor/utils/getFormatChangeHandler/index.d.ts +2 -0
- package/QuillEditor/utils/getFormatChangeHandler/index.js +3 -0
- package/QuillEditor/utils/getFormatChangeHandler/index.js.map +1 -0
- package/QuillEditor/utils/getSelectionChangeHandler/getSelectionChangeHandler.d.ts +4 -0
- package/QuillEditor/utils/getSelectionChangeHandler/getSelectionChangeHandler.js +19 -0
- package/QuillEditor/utils/getSelectionChangeHandler/getSelectionChangeHandler.js.map +1 -0
- package/QuillEditor/utils/getSelectionChangeHandler/index.d.ts +1 -0
- package/QuillEditor/utils/getSelectionChangeHandler/index.js +2 -0
- package/QuillEditor/utils/getSelectionChangeHandler/index.js.map +1 -0
- package/QuillEditor/utils/getTextChangeHandler/getTextChangeHandler.d.ts +3 -0
- package/QuillEditor/utils/getTextChangeHandler/getTextChangeHandler.js +22 -0
- package/QuillEditor/utils/getTextChangeHandler/getTextChangeHandler.js.map +1 -0
- package/QuillEditor/utils/getTextChangeHandler/index.d.ts +1 -0
- package/QuillEditor/utils/getTextChangeHandler/index.js +2 -0
- package/QuillEditor/utils/getTextChangeHandler/index.js.map +1 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/getTextLengthChangeHandler.d.ts +4 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/getTextLengthChangeHandler.js +9 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/getTextLengthChangeHandler.js.map +1 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/index.d.ts +1 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/index.js +2 -0
- package/QuillEditor/utils/getTextLengthChangeHandler/index.js.map +1 -0
- package/QuillEditor/utils/remove-classes/index.d.ts +1 -0
- package/QuillEditor/utils/remove-classes/index.js +2 -0
- package/QuillEditor/utils/remove-classes/index.js.map +1 -0
- package/QuillEditor/utils/remove-classes/remove-classes.d.ts +2 -0
- package/QuillEditor/utils/remove-classes/remove-classes.js +3 -0
- package/QuillEditor/utils/remove-classes/remove-classes.js.map +1 -0
- package/QuillEditor/utils/remove-cursor-span/index.d.ts +1 -0
- package/QuillEditor/utils/remove-cursor-span/index.js +2 -0
- package/QuillEditor/utils/remove-cursor-span/index.js.map +1 -0
- package/QuillEditor/utils/remove-cursor-span/remove-cursor-span.d.ts +2 -0
- package/QuillEditor/utils/remove-cursor-span/remove-cursor-span.js +5 -0
- package/QuillEditor/utils/remove-cursor-span/remove-cursor-span.js.map +1 -0
- package/RichTextEditor/RichTextEditor.d.ts +63 -0
- package/RichTextEditor/RichTextEditor.js +77 -0
- package/RichTextEditor/RichTextEditor.js.map +1 -0
- package/RichTextEditor/hooks/index.d.ts +6 -0
- package/RichTextEditor/hooks/index.js +7 -0
- package/RichTextEditor/hooks/index.js.map +1 -0
- package/RichTextEditor/hooks/useCounter/index.d.ts +1 -0
- package/RichTextEditor/hooks/useCounter/index.js +2 -0
- package/RichTextEditor/hooks/useCounter/index.js.map +1 -0
- package/RichTextEditor/hooks/useCounter/useCounter.d.ts +14 -0
- package/RichTextEditor/hooks/useCounter/useCounter.js +68 -0
- package/RichTextEditor/hooks/useCounter/useCounter.js.map +1 -0
- package/RichTextEditor/hooks/useOnFocus/index.d.ts +1 -0
- package/RichTextEditor/hooks/useOnFocus/index.js +2 -0
- package/RichTextEditor/hooks/useOnFocus/index.js.map +1 -0
- package/RichTextEditor/hooks/useOnFocus/useOnFocus.d.ts +16 -0
- package/RichTextEditor/hooks/useOnFocus/useOnFocus.js +44 -0
- package/RichTextEditor/hooks/useOnFocus/useOnFocus.js.map +1 -0
- package/RichTextEditor/hooks/useOnSelectionChange/index.d.ts +1 -0
- package/RichTextEditor/hooks/useOnSelectionChange/index.js +2 -0
- package/RichTextEditor/hooks/useOnSelectionChange/index.js.map +1 -0
- package/RichTextEditor/hooks/useOnSelectionChange/useOnSelectionChange.d.ts +10 -0
- package/RichTextEditor/hooks/useOnSelectionChange/useOnSelectionChange.js +15 -0
- package/RichTextEditor/hooks/useOnSelectionChange/useOnSelectionChange.js.map +1 -0
- package/RichTextEditor/hooks/useOnTextFormat/index.d.ts +1 -0
- package/RichTextEditor/hooks/useOnTextFormat/index.js +2 -0
- package/RichTextEditor/hooks/useOnTextFormat/index.js.map +1 -0
- package/RichTextEditor/hooks/useOnTextFormat/useOnTextFormat.d.ts +10 -0
- package/RichTextEditor/hooks/useOnTextFormat/useOnTextFormat.js +30 -0
- package/RichTextEditor/hooks/useOnTextFormat/useOnTextFormat.js.map +1 -0
- package/RichTextEditor/hooks/useTextEditorState/index.d.ts +1 -0
- package/RichTextEditor/hooks/useTextEditorState/index.js +2 -0
- package/RichTextEditor/hooks/useTextEditorState/index.js.map +1 -0
- package/RichTextEditor/hooks/useTextEditorState/useTextEditorState.d.ts +7 -0
- package/RichTextEditor/hooks/useTextEditorState/useTextEditorState.js +8 -0
- package/RichTextEditor/hooks/useTextEditorState/useTextEditorState.js.map +1 -0
- package/RichTextEditor/hooks/useToolbarHandlers/index.d.ts +1 -0
- package/RichTextEditor/hooks/useToolbarHandlers/index.js +2 -0
- package/RichTextEditor/hooks/useToolbarHandlers/index.js.map +1 -0
- package/RichTextEditor/hooks/useToolbarHandlers/useToolbarHandlers.d.ts +16 -0
- package/RichTextEditor/hooks/useToolbarHandlers/useToolbarHandlers.js +61 -0
- package/RichTextEditor/hooks/useToolbarHandlers/useToolbarHandlers.js.map +1 -0
- package/RichTextEditor/index.d.ts +7 -0
- package/RichTextEditor/index.js +3 -0
- package/RichTextEditor/index.js.map +1 -0
- package/RichTextEditor/store/index.d.ts +9 -0
- package/RichTextEditor/store/index.js +11 -0
- package/RichTextEditor/store/index.js.map +1 -0
- package/RichTextEditor/store/toolbar/actionTypes.d.ts +9 -0
- package/RichTextEditor/store/toolbar/actionTypes.js +10 -0
- package/RichTextEditor/store/toolbar/actionTypes.js.map +1 -0
- package/RichTextEditor/store/toolbar/actions.d.ts +11 -0
- package/RichTextEditor/store/toolbar/actions.js +17 -0
- package/RichTextEditor/store/toolbar/actions.js.map +1 -0
- package/RichTextEditor/store/toolbar/index.d.ts +6 -0
- package/RichTextEditor/store/toolbar/index.js +7 -0
- package/RichTextEditor/store/toolbar/index.js.map +1 -0
- package/RichTextEditor/store/toolbar/initialState.d.ts +3 -0
- package/RichTextEditor/store/toolbar/initialState.js +11 -0
- package/RichTextEditor/store/toolbar/initialState.js.map +1 -0
- package/RichTextEditor/store/toolbar/reducer.d.ts +3 -0
- package/RichTextEditor/store/toolbar/reducer.js +22 -0
- package/RichTextEditor/store/toolbar/reducer.js.map +1 -0
- package/RichTextEditor/store/toolbar/types.d.ts +40 -0
- package/RichTextEditor/store/toolbar/types.js +2 -0
- package/RichTextEditor/store/toolbar/types.js.map +1 -0
- package/RichTextEditor/store/types.d.ts +5 -0
- package/RichTextEditor/store/types.js +2 -0
- package/RichTextEditor/store/types.js.map +1 -0
- package/RichTextEditor/styles.d.ts +3 -0
- package/RichTextEditor/styles.js +23 -0
- package/RichTextEditor/styles.js.map +1 -0
- package/RichTextEditor/types.d.ts +2 -0
- package/RichTextEditor/types.js +2 -0
- package/RichTextEditor/types.js.map +1 -0
- package/RichTextEditor/utils/convertFormat.d.ts +8 -0
- package/RichTextEditor/utils/convertFormat.js +19 -0
- package/RichTextEditor/utils/convertFormat.js.map +1 -0
- package/RichTextEditorButton/RichTextEditorButton.d.ts +18 -0
- package/RichTextEditorButton/RichTextEditorButton.js +38 -0
- package/RichTextEditorButton/RichTextEditorButton.js.map +1 -0
- package/RichTextEditorButton/index.d.ts +1 -0
- package/RichTextEditorButton/index.js +2 -0
- package/RichTextEditorButton/index.js.map +1 -0
- package/RichTextEditorButton/styles.d.ts +3 -0
- package/RichTextEditorButton/styles.js +16 -0
- package/RichTextEditorButton/styles.js.map +1 -0
- package/RichTextEditorCounter/RichTextEditorCounter.d.ts +10 -0
- package/RichTextEditorCounter/RichTextEditorCounter.js +17 -0
- package/RichTextEditorCounter/RichTextEditorCounter.js.map +1 -0
- package/RichTextEditorCounter/index.d.ts +1 -0
- package/RichTextEditorCounter/index.js +2 -0
- package/RichTextEditorCounter/index.js.map +1 -0
- package/RichTextEditorCounter/styles.d.ts +3 -0
- package/RichTextEditorCounter/styles.js +27 -0
- package/RichTextEditorCounter/styles.js.map +1 -0
- package/RichTextEditorToolbar/RichTextEditorToolbar.d.ts +22 -0
- package/RichTextEditorToolbar/RichTextEditorToolbar.js +44 -0
- package/RichTextEditorToolbar/RichTextEditorToolbar.js.map +1 -0
- package/RichTextEditorToolbar/index.d.ts +2 -0
- package/RichTextEditorToolbar/index.js +3 -0
- package/RichTextEditorToolbar/index.js.map +1 -0
- package/RichTextEditorToolbar/styles.d.ts +5 -0
- package/RichTextEditorToolbar/styles.js +27 -0
- package/RichTextEditorToolbar/styles.js.map +1 -0
- package/RichTextEditorToolbar/types.d.ts +6 -0
- package/RichTextEditorToolbar/types.js +2 -0
- package/RichTextEditorToolbar/types.js.map +1 -0
- package/Typography/Typography.js +11 -13
- package/Typography/Typography.js.map +1 -1
- package/Typography/styles.d.ts +1 -1
- package/Typography/styles.js +121 -114
- package/Typography/styles.js.map +1 -1
- package/Typography/utils/get-typography-class-name/get-typography-class-name.d.ts +3 -0
- package/Typography/utils/get-typography-class-name/get-typography-class-name.js +15 -0
- package/Typography/utils/get-typography-class-name/get-typography-class-name.js.map +1 -0
- package/Typography/utils/get-typography-class-name/index.d.ts +1 -0
- package/Typography/utils/get-typography-class-name/index.js +2 -0
- package/Typography/utils/get-typography-class-name/index.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +6 -1
- package/Typography/utils/index.d.ts +0 -1
- package/Typography/utils/index.js +0 -2
- package/Typography/utils/index.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
const useFocus = ({ isFocused, quill }) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
if (!quill) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
if (isFocused) {
|
|
8
|
+
quill.focus();
|
|
9
|
+
}
|
|
10
|
+
}, [quill, isFocused]);
|
|
11
|
+
};
|
|
12
|
+
export default useFocus;
|
|
13
|
+
//# sourceMappingURL=useFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocus.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useFocus/useFocus.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,KAAK,EAIN,EAAE,EAAE;IACH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,EAAE;YACV,OAAM;SACP;QAED,IAAI,SAAS,EAAE;YACb,KAAK,CAAC,KAAK,EAAE,CAAA;SACd;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useKeyBindings';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useKeyBindings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
const useKeyBindings = ({ quill, onTextFormat }) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
if (!quill) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
quill.keyboard.addBinding({
|
|
8
|
+
key: 'B',
|
|
9
|
+
shortKey: true
|
|
10
|
+
}, function (range, context) {
|
|
11
|
+
const isBold = context.format.bold;
|
|
12
|
+
quill.format('bold', !isBold);
|
|
13
|
+
onTextFormat({
|
|
14
|
+
formatName: 'bold',
|
|
15
|
+
value: !isBold
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
quill.keyboard.addBinding({
|
|
19
|
+
key: 'I',
|
|
20
|
+
shortKey: true
|
|
21
|
+
}, function (range, context) {
|
|
22
|
+
const isItalic = context.format.italic;
|
|
23
|
+
quill.format('italic', !isItalic);
|
|
24
|
+
onTextFormat({
|
|
25
|
+
formatName: 'italic',
|
|
26
|
+
value: !isItalic
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}, [quill, onTextFormat]);
|
|
30
|
+
};
|
|
31
|
+
export default useKeyBindings;
|
|
32
|
+
//# sourceMappingURL=useKeyBindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyBindings.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useKeyBindings/useKeyBindings.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,YAAY,EAIb,EAAE,EAAE;IACH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,EAAE;YACV,OAAM;SACP;QAED,KAAK,CAAC,QAAQ,CAAC,UAAU,CACvB;YACE,GAAG,EAAE,GAAG;YACR,QAAQ,EAAE,IAAI;SACf,EACD,UAAU,KAAK,EAAE,OAAO;YACtB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA;YAElC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAA;YAC7B,YAAY,CAAC;gBACX,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,CAAC,MAAM;aACf,CAAC,CAAA;QACJ,CAAC,CACF,CAAA;QAED,KAAK,CAAC,QAAQ,CAAC,UAAU,CACvB;YACE,GAAG,EAAE,GAAG;YACR,QAAQ,EAAE,IAAI;SACf,EACD,UAAU,KAAK,EAAE,OAAO;YACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAA;YAEtC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAA;YACjC,YAAY,CAAC;gBACX,UAAU,EAAE,QAAQ;gBACpB,KAAK,EAAE,CAAC,QAAQ;aACjB,CAAC,CAAA;QACJ,CAAC,CACF,CAAA;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAA;AAC3B,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useQuillInstance';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useQuillInstance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Quill, { QuillOptionsStatic } from 'quill';
|
|
2
|
+
import 'quill-paste-smart';
|
|
3
|
+
export declare type EditorOptionsType = {
|
|
4
|
+
id: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const getModules: () => QuillOptionsStatic['modules'];
|
|
8
|
+
declare const useQuillInstance: ({ id, placeholder }: EditorOptionsType) => Quill | undefined;
|
|
9
|
+
export default useQuillInstance;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import Quill from 'quill';
|
|
3
|
+
import 'quill-paste-smart';
|
|
4
|
+
import { useTypographyClasses, makeHeaderFormat, makeBoldFormat } from '../../formats';
|
|
5
|
+
export const getModules = () => {
|
|
6
|
+
return {
|
|
7
|
+
clipboard: {
|
|
8
|
+
matchVisual: false,
|
|
9
|
+
allowed: {
|
|
10
|
+
// unsupported tags will be also removed on BE side, so before extending
|
|
11
|
+
// make sure, that our API supports new type
|
|
12
|
+
tags: ['b', 'strong', 'i', 'em', 'p', 'br', 'ul', 'ol', 'li', 'h3'],
|
|
13
|
+
attributes: []
|
|
14
|
+
},
|
|
15
|
+
keepSelection: true,
|
|
16
|
+
substituteBlockElements: true
|
|
17
|
+
},
|
|
18
|
+
keyboard: {
|
|
19
|
+
// we need to specify default bindings
|
|
20
|
+
// because Quill don't allow us to setup bindings via
|
|
21
|
+
// quill.keyboard.addBinding for default Quill
|
|
22
|
+
// key shortcuts otherwise
|
|
23
|
+
bindings: {
|
|
24
|
+
bold: {
|
|
25
|
+
key: 'B',
|
|
26
|
+
metaKey: true,
|
|
27
|
+
ctrlKey: true,
|
|
28
|
+
handler: function () { }
|
|
29
|
+
},
|
|
30
|
+
italic: {
|
|
31
|
+
key: 'I',
|
|
32
|
+
metaKey: true,
|
|
33
|
+
ctrlKey: true,
|
|
34
|
+
handler: function () { }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Formats we allow to paste into editor
|
|
42
|
+
*
|
|
43
|
+
* This is separate from adding a control in the Toolbar.
|
|
44
|
+
* For example, you can configure Quill to allow bolded
|
|
45
|
+
* content to be pasted into an editor that has no bold
|
|
46
|
+
* button in the toolbar. */
|
|
47
|
+
const formats = [
|
|
48
|
+
'bold',
|
|
49
|
+
'italic',
|
|
50
|
+
'header',
|
|
51
|
+
'list'
|
|
52
|
+
];
|
|
53
|
+
const useQuillInstance = ({ id, placeholder }) => {
|
|
54
|
+
const [quill, setQuill] = useState();
|
|
55
|
+
const typographyClasses = useTypographyClasses();
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
Quill.register(makeHeaderFormat(typographyClasses), true);
|
|
58
|
+
Quill.register(makeBoldFormat(typographyClasses), true);
|
|
59
|
+
setQuill(new Quill(`#${id}`, {
|
|
60
|
+
modules: getModules(),
|
|
61
|
+
formats,
|
|
62
|
+
placeholder
|
|
63
|
+
}));
|
|
64
|
+
}, [typographyClasses, id, placeholder]);
|
|
65
|
+
return quill;
|
|
66
|
+
};
|
|
67
|
+
export default useQuillInstance;
|
|
68
|
+
//# sourceMappingURL=useQuillInstance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQuillInstance.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useQuillInstance/useQuillInstance.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACf,MAAM,eAAe,CAAA;AAOtB,MAAM,CAAC,MAAM,UAAU,GAAG,GAAkC,EAAE;IAC5D,OAAO;QACL,SAAS,EAAE;YACT,WAAW,EAAE,KAAK;YAClB,OAAO,EAAE;gBACP,wEAAwE;gBACxE,4CAA4C;gBAC5C,IAAI,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;gBACnE,UAAU,EAAE,EAAE;aACf;YACD,aAAa,EAAE,IAAI;YACnB,uBAAuB,EAAE,IAAI;SAC9B;QACD,QAAQ,EAAE;YACR,sCAAsC;YACtC,qDAAqD;YACrD,8CAA8C;YAC9C,0BAA0B;YAC1B,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,GAAG,EAAE,GAAG;oBACR,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,cAAa,CAAC;iBACxB;gBACD,MAAM,EAAE;oBACN,GAAG,EAAE,GAAG;oBACR,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,cAAa,CAAC;iBACxB;aACF;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAED;;;;;;4BAM4B;AAC5B,MAAM,OAAO,GAAkC;IAC7C,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;CACP,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,EACxB,EAAE,EACF,WAAW,EACO,EAAqB,EAAE;IACzC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAS,CAAA;IAC3C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,CAAA;QACzD,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,CAAA;QAEvD,QAAQ,CACN,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YAClB,OAAO,EAAE,UAAU,EAAE;YACrB,OAAO;YACP,WAAW;SACZ,CAAC,CACH,CAAA;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC,CAAA;IAExC,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useSubscribeToQuillEvents';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useSubscribeToQuillEvents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Quill from 'quill';
|
|
2
|
+
import { SelectionHandler, ChangeHandler, TextLengthChangeHandler } from '../../types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
quill?: Quill;
|
|
5
|
+
onTextChange: ChangeHandler;
|
|
6
|
+
onSelectionChange: SelectionHandler;
|
|
7
|
+
onTextLengthChange: TextLengthChangeHandler;
|
|
8
|
+
};
|
|
9
|
+
declare const useSubscribeToQuillEvents: ({ quill, onTextChange, onSelectionChange, onTextLengthChange }: Props) => void;
|
|
10
|
+
export default useSubscribeToQuillEvents;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useMemo, useEffect } from 'react';
|
|
2
|
+
import getTextChangeHandler from '../../utils/getTextChangeHandler';
|
|
3
|
+
import getSelectionChangeHandler from '../../utils/getSelectionChangeHandler';
|
|
4
|
+
import getEditorChangeHandler from '../../utils/getEditorChangeHandler';
|
|
5
|
+
import getTextLengthChangeHandler from '../../utils/getTextLengthChangeHandler';
|
|
6
|
+
import getCleanupOnAllContentRemovalHandler from '../../utils/getCleanupOnAllContentRemovalHandler';
|
|
7
|
+
const useSubscribeToQuillEvents = ({ quill, onTextChange, onSelectionChange, onTextLengthChange }) => {
|
|
8
|
+
const textLengthChangeHandler = useMemo(() => {
|
|
9
|
+
if (!quill) {
|
|
10
|
+
return () => { };
|
|
11
|
+
}
|
|
12
|
+
return getTextLengthChangeHandler(quill, onTextLengthChange);
|
|
13
|
+
}, [quill, onTextLengthChange]);
|
|
14
|
+
const textChangeHandler = useMemo(() => {
|
|
15
|
+
if (!quill) {
|
|
16
|
+
return () => { };
|
|
17
|
+
}
|
|
18
|
+
return getTextChangeHandler(quill, onTextChange);
|
|
19
|
+
}, [quill, onTextChange]);
|
|
20
|
+
const selectionChangeHandler = useMemo(() => {
|
|
21
|
+
if (!quill) {
|
|
22
|
+
return () => { };
|
|
23
|
+
}
|
|
24
|
+
return getSelectionChangeHandler(quill, onSelectionChange);
|
|
25
|
+
}, [quill, onSelectionChange]);
|
|
26
|
+
const editorChangeHandler = useMemo(() => {
|
|
27
|
+
if (!quill) {
|
|
28
|
+
return () => { };
|
|
29
|
+
}
|
|
30
|
+
return getEditorChangeHandler(quill, onSelectionChange);
|
|
31
|
+
}, [quill, onSelectionChange]);
|
|
32
|
+
const cleanupOnAllContentRemovalHandler = useMemo(() => {
|
|
33
|
+
if (!quill) {
|
|
34
|
+
return () => { };
|
|
35
|
+
}
|
|
36
|
+
return getCleanupOnAllContentRemovalHandler(quill);
|
|
37
|
+
}, [quill]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!quill) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
quill.on('selection-change', selectionChangeHandler);
|
|
43
|
+
quill.on('text-change', textChangeHandler);
|
|
44
|
+
quill.on('text-change', textLengthChangeHandler);
|
|
45
|
+
quill.on('text-change', cleanupOnAllContentRemovalHandler);
|
|
46
|
+
quill.on('editor-change', editorChangeHandler);
|
|
47
|
+
return () => {
|
|
48
|
+
quill.off('selection-change', selectionChangeHandler);
|
|
49
|
+
quill.off('text-change', textChangeHandler);
|
|
50
|
+
quill.off('text-change', textLengthChangeHandler);
|
|
51
|
+
quill.off('text-change', cleanupOnAllContentRemovalHandler);
|
|
52
|
+
quill.off('editor-change', editorChangeHandler);
|
|
53
|
+
};
|
|
54
|
+
}, [
|
|
55
|
+
quill,
|
|
56
|
+
textChangeHandler,
|
|
57
|
+
selectionChangeHandler,
|
|
58
|
+
editorChangeHandler,
|
|
59
|
+
textLengthChangeHandler,
|
|
60
|
+
cleanupOnAllContentRemovalHandler
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
export default useSubscribeToQuillEvents;
|
|
64
|
+
//# sourceMappingURL=useSubscribeToQuillEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSubscribeToQuillEvents.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useSubscribeToQuillEvents/useSubscribeToQuillEvents.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './useSubscribeToTextEditorEvents';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useSubscribeToTextEditorEvents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
|
+
import { CUSTOM_QUILL_EDITOR_FORMAT_EVENT } from '../../constants';
|
|
3
|
+
import getFormatChangeHandler from '../../utils/getFormatChangeHandler';
|
|
4
|
+
const useSubscribeToTextEditorEvents = ({ editorRef, quill }) => {
|
|
5
|
+
const formatChangeHandler = useMemo(() => {
|
|
6
|
+
if (!quill) {
|
|
7
|
+
return () => { };
|
|
8
|
+
}
|
|
9
|
+
return getFormatChangeHandler(quill);
|
|
10
|
+
}, [quill]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const editor = editorRef.current;
|
|
13
|
+
if (!editor) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
editor.addEventListener(CUSTOM_QUILL_EDITOR_FORMAT_EVENT, formatChangeHandler, false);
|
|
17
|
+
return () => {
|
|
18
|
+
editor === null || editor === void 0 ? void 0 : editor.removeEventListener(CUSTOM_QUILL_EDITOR_FORMAT_EVENT, formatChangeHandler, false);
|
|
19
|
+
};
|
|
20
|
+
}, [editorRef, formatChangeHandler]);
|
|
21
|
+
};
|
|
22
|
+
export default useSubscribeToTextEditorEvents;
|
|
23
|
+
//# sourceMappingURL=useSubscribeToTextEditorEvents.js.map
|
package/QuillEditor/hooks/useSubscribeToTextEditorEvents/useSubscribeToTextEditorEvents.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSubscribeToTextEditorEvents.js","sourceRoot":"","sources":["../../../../src/QuillEditor/hooks/useSubscribeToTextEditorEvents/useSubscribeToTextEditorEvents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,sBAAsB,MAAM,oCAAoC,CAAA;AAEvE,MAAM,8BAA8B,GAAG,CAAC,EACtC,SAAS,EACT,KAAK,EAIN,EAAE,EAAE;IACH,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;SAChB;QAED,OAAO,sBAAsB,CAAC,KAAK,CAAkB,CAAA;IACvD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAA;QAEhC,IAAI,CAAC,MAAM,EAAE;YACX,OAAM;SACP;QAED,MAAM,CAAC,gBAAgB,CACrB,gCAAgC,EAChC,mBAAmB,EACnB,KAAK,CACN,CAAA;QAED,OAAO,GAAG,EAAE;YACV,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,mBAAmB,CACzB,gCAAgC,EAChC,mBAAmB,EACnB,KAAK,CACN,CAAA;QACH,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAA;AACtC,CAAC,CAAA;AAED,eAAe,8BAA8B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/QuillEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { createStyles } from '@material-ui/core/styles';
|
|
2
|
+
import { rem } from '@toptal/picasso-shared';
|
|
3
|
+
const margins = {
|
|
4
|
+
'& p': {
|
|
5
|
+
margin: '0.5rem 0'
|
|
6
|
+
},
|
|
7
|
+
'& h3': {
|
|
8
|
+
margin: '1rem 0 0.5rem'
|
|
9
|
+
},
|
|
10
|
+
'& p:first-child, & h3:first-child': {
|
|
11
|
+
margin: '0 0 0.5rem'
|
|
12
|
+
},
|
|
13
|
+
'& li:not(:last-child)': {
|
|
14
|
+
margin: '0 0 0.5rem'
|
|
15
|
+
},
|
|
16
|
+
'& ol, & ul': {
|
|
17
|
+
padding: 0,
|
|
18
|
+
margin: '0.5rem 0'
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const listStyles = {
|
|
22
|
+
'& li': {
|
|
23
|
+
listStyleType: 'none',
|
|
24
|
+
paddingLeft: '2rem',
|
|
25
|
+
position: 'relative',
|
|
26
|
+
'&:before': {
|
|
27
|
+
display: 'inline-block',
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
left: 0,
|
|
30
|
+
whiteSpace: 'nowrap',
|
|
31
|
+
width: '1rem'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
'& ol li': {
|
|
35
|
+
counterIncrement: 'list-0',
|
|
36
|
+
'&:before': {
|
|
37
|
+
content: 'counter(list-0, decimal) "."'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
'& *:not(li)': {
|
|
41
|
+
counterReset: 'list-0'
|
|
42
|
+
},
|
|
43
|
+
'& ul li': {
|
|
44
|
+
'&:before': {
|
|
45
|
+
content: '""',
|
|
46
|
+
backgroundImage: "url(\"data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpath d='M8 6c1.1046 0 2 .8954 2 2s-.8954 2-2 2-2-.8954-2-2 .8954-2 2-2Z' id='a'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cmask id='b' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3C/mask%3E%3Cuse fill='%23979797' fill-rule='nonzero' xlink:href='%23a'/%3E%3Cg mask='url(%23b)' fill='%23455065'%3E%3Cpath d='M0 0h16v16H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")",
|
|
47
|
+
backgroundRepeat: 'no-repeat',
|
|
48
|
+
backgroundPosition: 'center',
|
|
49
|
+
height: rem('22px'),
|
|
50
|
+
width: '1rem'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const horizontalPadding = '0.5em';
|
|
55
|
+
const placeholder = ({ palette }) => ({
|
|
56
|
+
'& .ql-blank:before': {
|
|
57
|
+
color: palette.grey.main2,
|
|
58
|
+
content: 'attr(data-placeholder)',
|
|
59
|
+
pointerEvents: 'none',
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
left: horizontalPadding,
|
|
62
|
+
right: horizontalPadding
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const hidden = {
|
|
66
|
+
'& .gl-hidden': {
|
|
67
|
+
display: 'none'
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const editor = {
|
|
71
|
+
'& .ql-editor': {
|
|
72
|
+
height: '100%',
|
|
73
|
+
outline: 'none',
|
|
74
|
+
overflowY: 'auto',
|
|
75
|
+
padding: `1em ${horizontalPadding}`,
|
|
76
|
+
tabSize: '4',
|
|
77
|
+
textAlign: 'left',
|
|
78
|
+
whiteSpace: 'pre-wrap',
|
|
79
|
+
wordWrap: 'break-word'
|
|
80
|
+
},
|
|
81
|
+
'& .ql-editor > *': {
|
|
82
|
+
cursor: 'text'
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const clipboard = {
|
|
86
|
+
'& .ql-clipboard': {
|
|
87
|
+
left: '-100000px',
|
|
88
|
+
height: '1px',
|
|
89
|
+
overflowY: 'hidden',
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: '50%'
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const quillSpecificStyles = (theme) => (Object.assign(Object.assign(Object.assign(Object.assign({}, placeholder(theme)), editor), hidden), clipboard));
|
|
95
|
+
export default (theme) => {
|
|
96
|
+
return createStyles({
|
|
97
|
+
root: Object.assign(Object.assign(Object.assign({ height: '12.5em', overflowY: 'hidden', resize: 'vertical', position: 'relative' }, listStyles), margins), quillSpecificStyles(theme))
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/QuillEditor/styles.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare type BoldValue = boolean | undefined;
|
|
2
|
+
export declare type ItalicValue = boolean | undefined;
|
|
3
|
+
export declare type ListValue = 'bullet' | 'ordered' | undefined;
|
|
4
|
+
export declare type HeaderValue = 3 | undefined;
|
|
5
|
+
export declare type FormatType = {
|
|
6
|
+
bold: BoldValue;
|
|
7
|
+
italic: ItalicValue;
|
|
8
|
+
list: ListValue;
|
|
9
|
+
header: HeaderValue;
|
|
10
|
+
};
|
|
11
|
+
export declare type TextFormatHandlerEvent = {
|
|
12
|
+
formatName: 'bold';
|
|
13
|
+
value: BoldValue;
|
|
14
|
+
} | {
|
|
15
|
+
formatName: 'italic';
|
|
16
|
+
value: ItalicValue;
|
|
17
|
+
} | {
|
|
18
|
+
formatName: 'list';
|
|
19
|
+
value: ListValue;
|
|
20
|
+
} | {
|
|
21
|
+
formatName: 'header';
|
|
22
|
+
value: HeaderValue;
|
|
23
|
+
};
|
|
24
|
+
export declare type TextFormatHandler = (e: TextFormatHandlerEvent) => void;
|
|
25
|
+
export declare type SelectionHandler = (format: FormatType) => void;
|
|
26
|
+
export declare type ChangeHandler = (html: string) => void;
|
|
27
|
+
export declare type TextLengthChangeHandler = (length: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/QuillEditor/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Delta from 'quill-delta';
|
|
2
|
+
const getCleanupOnAllContentRemovalHandler = (quill) => {
|
|
3
|
+
const handler = newDelta => {
|
|
4
|
+
const isDeleteOperation = 'delete' in newDelta.ops[0];
|
|
5
|
+
if (!isDeleteOperation) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const textLength = quill.getLength() - 1;
|
|
9
|
+
const isEditorEmpty = textLength === 0;
|
|
10
|
+
if (!isEditorEmpty) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const currentFormat = quill.getFormat();
|
|
14
|
+
const isFormatApplied = Object.keys(currentFormat).length > 0;
|
|
15
|
+
if (isFormatApplied) {
|
|
16
|
+
quill.setContents(new Delta(), 'api');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return handler;
|
|
20
|
+
};
|
|
21
|
+
export default getCleanupOnAllContentRemovalHandler;
|
|
22
|
+
//# sourceMappingURL=getCleanupOnAllContentRemovalHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCleanupOnAllContentRemovalHandler.js","sourceRoot":"","sources":["../../../../src/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/getCleanupOnAllContentRemovalHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,aAAa,CAAA;AAE/B,MAAM,oCAAoC,GAAG,CAAC,KAAY,EAAE,EAAE;IAC5D,MAAM,OAAO,GAAsB,QAAQ,CAAC,EAAE;QAC5C,MAAM,iBAAiB,GAAG,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAErD,IAAI,CAAC,iBAAiB,EAAE;YACtB,OAAM;SACP;QAED,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;QACxC,MAAM,aAAa,GAAG,UAAU,KAAK,CAAC,CAAA;QAEtC,IAAI,CAAC,aAAa,EAAE;YAClB,OAAM;SACP;QAED,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;QACvC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;QAE7D,IAAI,eAAe,EAAE;YACnB,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,EAAE,KAAK,CAAC,CAAA;SACtC;IACH,CAAC,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,eAAe,oCAAoC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './getCleanupOnAllContentRemovalHandler';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/utils/getCleanupOnAllContentRemovalHandler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Quill, { RangeStatic, Sources } from 'quill';
|
|
2
|
+
import Delta from 'quill-delta';
|
|
3
|
+
import { FormatType } from '../../types';
|
|
4
|
+
declare type SelectionChangeArgs = [RangeStatic, RangeStatic, Sources];
|
|
5
|
+
declare type TextChangeArgs = [Delta, Delta, Sources];
|
|
6
|
+
declare const getEditorChangeHandler: (quill: Quill, onSelectionChange: (format: FormatType) => void) => (name: 'text-change' | 'selection-change', ...args: SelectionChangeArgs | TextChangeArgs) => void;
|
|
7
|
+
export default getEditorChangeHandler;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When we write block format and enter new empty line, we have unformated text format.
|
|
3
|
+
* We need to send this information to the state
|
|
4
|
+
*/
|
|
5
|
+
const handleNewLineAfterBlock = ({ quill, onSelectionChange, latestDelta }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const latestAttributes = (_a = latestDelta.ops[latestDelta.ops.length - 1]) === null || _a === void 0 ? void 0 : _a.attributes;
|
|
8
|
+
const isHeaderFormatRemoved = (latestAttributes === null || latestAttributes === void 0 ? void 0 : latestAttributes.header) === null;
|
|
9
|
+
const isListFormatRemoved = (latestAttributes === null || latestAttributes === void 0 ? void 0 : latestAttributes.list) === null;
|
|
10
|
+
if (isHeaderFormatRemoved || isListFormatRemoved) {
|
|
11
|
+
const format = quill.getFormat();
|
|
12
|
+
onSelectionChange(Object.assign(Object.assign({}, format), { header: undefined, list: undefined }));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const isDeleteOperationOfSelection = (delta) => {
|
|
16
|
+
const delOperation = delta.ops[0].delete;
|
|
17
|
+
return delOperation && delOperation > 1;
|
|
18
|
+
};
|
|
19
|
+
const getEditorChangeHandler = (quill, onSelectionChange) => {
|
|
20
|
+
const handler = (name, ...args) => {
|
|
21
|
+
if (name === 'text-change') {
|
|
22
|
+
const [latestDelta, , source] = args;
|
|
23
|
+
const isFromApi = source === 'api';
|
|
24
|
+
const isFromUser = source === 'user';
|
|
25
|
+
if (isFromApi) {
|
|
26
|
+
// this event is triggered when format of block element is changed
|
|
27
|
+
// for example from p > h3 | h3 > ol
|
|
28
|
+
onSelectionChange(quill.getFormat());
|
|
29
|
+
}
|
|
30
|
+
else if (isFromUser) {
|
|
31
|
+
handleNewLineAfterBlock({ latestDelta, quill, onSelectionChange });
|
|
32
|
+
if (isDeleteOperationOfSelection(latestDelta)) {
|
|
33
|
+
onSelectionChange(quill.getFormat());
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return handler;
|
|
39
|
+
};
|
|
40
|
+
export default getEditorChangeHandler;
|
|
41
|
+
//# sourceMappingURL=getEditorChangeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEditorChangeHandler.js","sourceRoot":"","sources":["../../../../src/QuillEditor/utils/getEditorChangeHandler/getEditorChangeHandler.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,uBAAuB,GAAG,CAAC,EAC/B,KAAK,EACL,iBAAiB,EACjB,WAAW,EAKZ,EAAE,EAAE;;IACH,MAAM,gBAAgB,GACpB,MAAA,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,UAAU,CAAA;IAEzD,MAAM,qBAAqB,GAAG,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,IAAI,CAAA;IAC/D,MAAM,mBAAmB,GAAG,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,MAAK,IAAI,CAAA;IAE3D,IAAI,qBAAqB,IAAI,mBAAmB,EAAE;QAChD,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,EAAgB,CAAA;QAE9C,iBAAiB,iCAAM,MAAM,KAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,IAAG,CAAA;KACrE;AACH,CAAC,CAAA;AAED,MAAM,4BAA4B,GAAG,CAAC,KAAY,EAAE,EAAE;IACpD,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAExC,OAAO,YAAY,IAAI,YAAY,GAAG,CAAC,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,sBAAsB,GAAG,CAC7B,KAAY,EACZ,iBAA+C,EAC/C,EAAE;IACF,MAAM,OAAO,GAAG,CACd,IAAwC,EACxC,GAAG,IAA0C,EAC7C,EAAE;QACF,IAAI,IAAI,KAAK,aAAa,EAAE;YAC1B,MAAM,CAAC,WAAW,EAAE,AAAD,EAAG,MAAM,CAAC,GAAG,IAAsB,CAAA;YAEtD,MAAM,SAAS,GAAG,MAAM,KAAK,KAAK,CAAA;YAClC,MAAM,UAAU,GAAG,MAAM,KAAK,MAAM,CAAA;YAEpC,IAAI,SAAS,EAAE;gBACb,kEAAkE;gBAClE,oCAAoC;gBACpC,iBAAiB,CAAC,KAAK,CAAC,SAAS,EAAgB,CAAC,CAAA;aACnD;iBAAM,IAAI,UAAU,EAAE;gBACrB,uBAAuB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAA;gBAElE,IAAI,4BAA4B,CAAC,WAAW,CAAC,EAAE;oBAC7C,iBAAiB,CAAC,KAAK,CAAC,SAAS,EAAgB,CAAC,CAAA;iBACnD;aACF;SACF;IACH,CAAC,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './getEditorChangeHandler';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/QuillEditor/utils/getEditorChangeHandler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const getFormatChangeHandler = (quill) => {
|
|
2
|
+
const handler = (e) => {
|
|
3
|
+
const format = e.detail;
|
|
4
|
+
Object.entries(format).forEach(([key, value]) => {
|
|
5
|
+
quill.format(key, value);
|
|
6
|
+
if (key === 'header') {
|
|
7
|
+
setTimeout(() => quill.focus(), 0);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
return handler;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=getFormatChangeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFormatChangeHandler.js","sourceRoot":"","sources":["../../../../src/QuillEditor/utils/getFormatChangeHandler/getFormatChangeHandler.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAY,EAAE,EAAE;IACrD,MAAM,OAAO,GAAG,CAAC,CAA0B,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAA;QAEvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YAExB,IAAI,GAAG,KAAK,QAAQ,EAAE;gBACpB,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;aACnC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|