@uxf/wysiwyg 1.2.2 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -14
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +6 -0
- package/config/icons.d.ts +171 -0
- package/config/icons.js +49 -0
- package/create-all-plugins-with-ui.d.ts +49 -0
- package/create-all-plugins-with-ui.js +116 -0
- package/create-plugins-with-ui.d.ts +4 -0
- package/create-plugins-with-ui.js +48 -0
- package/hooks.d.ts +9 -0
- package/hooks.js +21 -0
- package/index.d.ts +5 -6
- package/index.js +19 -15
- package/package.json +52 -47
- package/plugins/block-quote/create-block-quote-plugin.d.ts +3 -0
- package/plugins/block-quote/create-block-quote-plugin.js +13 -0
- package/plugins/block-quote/types.d.ts +2 -0
- package/plugins/block-quote/types.js +7 -0
- package/plugins/button/constants.d.ts +2 -0
- package/plugins/button/constants.js +6 -0
- package/plugins/button/create-button-plugin.d.ts +2 -0
- package/plugins/button/create-button-plugin.js +12 -0
- package/plugins/button/index.d.ts +3 -0
- package/plugins/button/index.js +24 -0
- package/plugins/button/transforms/get-active-button.d.ts +2 -0
- package/plugins/button/transforms/get-active-button.js +10 -0
- package/plugins/button/transforms/index.d.ts +4 -0
- package/plugins/button/transforms/index.js +12 -0
- package/plugins/button/transforms/insert-button.d.ts +2 -0
- package/plugins/button/transforms/insert-button.js +17 -0
- package/plugins/button/transforms/is-button-active.d.ts +2 -0
- package/plugins/button/transforms/is-button-active.js +8 -0
- package/plugins/button/transforms/remove-selected-button.d.ts +2 -0
- package/plugins/button/transforms/remove-selected-button.js +14 -0
- package/plugins/button/transforms/update-button.d.ts +2 -0
- package/plugins/button/transforms/update-button.js +10 -0
- package/plugins/embedded/utils.d.ts +1 -0
- package/plugins/embedded/utils.js +8 -0
- package/plugins/embedded/video/create-video-plugin.d.ts +4 -0
- package/plugins/embedded/video/create-video-plugin.js +20 -0
- package/plugins/embedded/video/get-active-video.d.ts +2 -0
- package/plugins/embedded/video/get-active-video.js +10 -0
- package/plugins/embedded/video/insert-video.d.ts +2 -0
- package/plugins/embedded/video/insert-video.js +19 -0
- package/plugins/embedded/video/update-video.d.ts +2 -0
- package/plugins/embedded/video/update-video.js +12 -0
- package/plugins/exit-break/create-exit-break-plugin.d.ts +3 -0
- package/plugins/exit-break/create-exit-break-plugin.js +31 -0
- package/plugins/heading/constants.d.ts +8 -0
- package/plugins/heading/constants.js +12 -0
- package/plugins/heading/create-headings-plugin.d.ts +8 -0
- package/plugins/heading/create-headings-plugin.js +41 -0
- package/plugins/image/create-image-plugin.d.ts +6 -0
- package/plugins/image/create-image-plugin.js +106 -0
- package/plugins/image/hooks/use-image-handlers.d.ts +5 -0
- package/plugins/image/hooks/use-image-handlers.js +20 -0
- package/plugins/image/transforms/get-active-image.d.ts +2 -0
- package/plugins/image/transforms/get-active-image.js +10 -0
- package/plugins/image/transforms/insert-image.d.ts +3 -0
- package/plugins/image/transforms/insert-image.js +20 -0
- package/plugins/image/transforms/is-image-active.d.ts +2 -0
- package/plugins/image/transforms/is-image-active.js +8 -0
- package/plugins/image/transforms/remove-selected-image.d.ts +2 -0
- package/plugins/image/transforms/remove-selected-image.js +14 -0
- package/plugins/image/transforms/update-image.d.ts +3 -0
- package/plugins/image/transforms/update-image.js +13 -0
- package/plugins/image/types.d.ts +19 -0
- package/plugins/image/types.js +7 -0
- package/plugins/image/utils/is-image-url.d.ts +2 -0
- package/plugins/image/utils/is-image-url.js +136 -0
- package/plugins/image/with-image.d.ts +7 -0
- package/plugins/image/with-image.js +20 -0
- package/plugins/image/with-paste-image-url.d.ts +7 -0
- package/plugins/image/with-paste-image-url.js +37 -0
- package/plugins/image/with-paste-image.d.ts +7 -0
- package/plugins/image/with-paste-image.js +50 -0
- package/plugins/link/constants.d.ts +2 -0
- package/plugins/link/constants.js +7 -0
- package/plugins/link/create-link-plugin.d.ts +3 -0
- package/plugins/link/create-link-plugin.js +12 -0
- package/plugins/link/floating-link-wrapper.d.ts +11 -0
- package/plugins/link/floating-link-wrapper.js +26 -0
- package/plugins/link/hooks/index.d.ts +4 -0
- package/plugins/link/hooks/index.js +12 -0
- package/plugins/link/hooks/use-link-actions.d.ts +12 -0
- package/plugins/link/hooks/use-link-actions.js +49 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.d.ts +1 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.js +6 -0
- package/plugins/link/hooks/use-link-submit-on-enter.d.ts +1 -0
- package/plugins/link/hooks/use-link-submit-on-enter.js +24 -0
- package/plugins/link/transforms/get-active-link.d.ts +3 -0
- package/plugins/link/transforms/get-active-link.js +17 -0
- package/plugins/link/transforms/insert-link.d.ts +2 -0
- package/plugins/link/transforms/insert-link.js +27 -0
- package/plugins/link/transforms/is-link-selected.d.ts +2 -0
- package/plugins/link/transforms/is-link-selected.js +16 -0
- package/plugins/link/transforms/submit-link.d.ts +7 -0
- package/plugins/link/transforms/submit-link.js +36 -0
- package/plugins/link/transforms/trigger-link-insert-or-edit.d.ts +2 -0
- package/plugins/link/transforms/trigger-link-insert-or-edit.js +7 -0
- package/plugins/link/transforms/unwrap-link.d.ts +2 -0
- package/plugins/link/transforms/unwrap-link.js +11 -0
- package/plugins/link/types.d.ts +5 -0
- package/{Content/Renderer → plugins/link}/types.js +1 -1
- package/plugins/list/constants.d.ts +4 -0
- package/plugins/list/constants.js +15 -0
- package/plugins/list/create-list-plugin.d.ts +4 -0
- package/plugins/list/create-list-plugin.js +17 -0
- package/plugins/mark-bold/create-bold-plugin.d.ts +3 -0
- package/plugins/mark-bold/create-bold-plugin.js +7 -0
- package/plugins/mark-bold/types.d.ts +2 -0
- package/plugins/mark-bold/types.js +7 -0
- package/plugins/mark-code/create-code-plugin.d.ts +3 -0
- package/plugins/mark-code/create-code-plugin.js +7 -0
- package/plugins/mark-code/types.d.ts +2 -0
- package/plugins/mark-code/types.js +7 -0
- package/plugins/mark-italic/create-italic-plugin.d.ts +3 -0
- package/plugins/mark-italic/create-italic-plugin.js +7 -0
- package/plugins/mark-italic/types.d.ts +2 -0
- package/plugins/mark-italic/types.js +7 -0
- package/plugins/mark-underline/create-underline-plugin.d.ts +3 -0
- package/plugins/mark-underline/create-underline-plugin.js +7 -0
- package/plugins/mark-underline/types.d.ts +2 -0
- package/plugins/mark-underline/types.js +7 -0
- package/plugins/node-id/add-ids-to-nodes.d.ts +2 -0
- package/plugins/node-id/add-ids-to-nodes.js +23 -0
- package/plugins/node-id/create-node-id-plugin.d.ts +3 -0
- package/plugins/node-id/create-node-id-plugin.js +7 -0
- package/plugins/paragraph/create-paragraph-plugin.d.ts +3 -0
- package/plugins/paragraph/create-paragraph-plugin.js +13 -0
- package/plugins/paragraph/types.d.ts +2 -0
- package/plugins/paragraph/types.js +7 -0
- package/plugins/reset-node/create-reset-node.d.ts +3 -0
- package/plugins/reset-node/create-reset-node.js +29 -0
- package/plugins/select-on-backspace/create-select-on-backspace-plugin.d.ts +3 -0
- package/plugins/select-on-backspace/create-select-on-backspace-plugin.js +15 -0
- package/plugins/soft-break/create-soft-break-plugin.d.ts +3 -0
- package/plugins/soft-break/create-soft-break-plugin.js +23 -0
- package/plugins/trailing-block/create-trailing-block-plugin.d.ts +3 -0
- package/plugins/trailing-block/create-trailing-block-plugin.js +7 -0
- package/serializers/serialize-to-plaintext.d.ts +2 -0
- package/serializers/serialize-to-plaintext.js +9 -0
- package/types.d.ts +84 -131
- package/ui/block-quote-element.d.ts +2 -0
- package/ui/block-quote-element.js +10 -0
- package/ui/bold-mark.d.ts +2 -0
- package/ui/bold-mark.js +9 -0
- package/ui/button/button-element.d.ts +2 -0
- package/ui/button/button-element.js +27 -0
- package/ui/button/index.d.ts +1 -0
- package/ui/button/index.js +6 -0
- package/ui/button/insert-button-modal-content.d.ts +8 -0
- package/ui/button/insert-button-modal-content.js +48 -0
- package/ui/code-mark.d.ts +2 -0
- package/ui/code-mark.js +9 -0
- package/ui/components/element/element-action-buttons.d.ts +8 -0
- package/ui/components/element/element-action-buttons.js +14 -0
- package/ui/components/element/element-with-action-buttons.d.ts +9 -0
- package/ui/components/element/element-with-action-buttons.js +10 -0
- package/ui/components/modal/modal-button-cancel.d.ts +9 -0
- package/ui/components/modal/modal-button-cancel.js +20 -0
- package/ui/components/modal/modal-button-submit.d.ts +7 -0
- package/ui/components/modal/modal-button-submit.js +10 -0
- package/ui/components/modal/modal-buttons.d.ts +11 -0
- package/ui/components/modal/modal-buttons.js +11 -0
- package/ui/components/modal/modal-content.d.ts +6 -0
- package/ui/components/modal/modal-content.js +9 -0
- package/ui/create-uxf-ui.d.ts +21 -0
- package/ui/create-uxf-ui.js +52 -0
- package/ui/floating-link.d.ts +2 -0
- package/ui/floating-link.js +36 -0
- package/ui/heading-elements.d.ts +7 -0
- package/ui/heading-elements.js +29 -0
- package/ui/image/image-element.d.ts +2 -0
- package/ui/image/image-element.js +26 -0
- package/ui/image/insert-image-modal-content.d.ts +8 -0
- package/ui/image/insert-image-modal-content.js +53 -0
- package/ui/italic-mark.d.ts +2 -0
- package/ui/italic-mark.js +9 -0
- package/ui/link-element.d.ts +3 -0
- package/ui/link-element.js +9 -0
- package/ui/list-item-element.d.ts +2 -0
- package/ui/list-item-element.js +9 -0
- package/ui/list-ordered-element.d.ts +2 -0
- package/ui/list-ordered-element.js +9 -0
- package/ui/list-unordered-element.d.ts +2 -0
- package/ui/list-unordered-element.js +9 -0
- package/ui/paragraph-element.d.ts +2 -0
- package/ui/paragraph-element.js +9 -0
- package/ui/toolbar/buttons/button-toolbar-button.d.ts +8 -0
- package/ui/toolbar/buttons/button-toolbar-button.js +14 -0
- package/ui/toolbar/buttons/element-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/element-toolbar-button.js +20 -0
- package/ui/toolbar/buttons/image-toolbar-button.d.ts +8 -0
- package/ui/toolbar/buttons/image-toolbar-button.js +14 -0
- package/ui/toolbar/buttons/link-toolbar-button.d.ts +8 -0
- package/ui/toolbar/buttons/link-toolbar-button.js +23 -0
- package/ui/toolbar/buttons/list-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/list-toolbar-button.js +22 -0
- package/ui/toolbar/buttons/mark-toolbar-button.d.ts +11 -0
- package/ui/toolbar/buttons/mark-toolbar-button.js +21 -0
- package/ui/toolbar/buttons/modal-toolbar-button.d.ts +14 -0
- package/ui/toolbar/buttons/modal-toolbar-button.js +17 -0
- package/ui/toolbar/buttons/toolbar-button.d.ts +14 -0
- package/ui/toolbar/buttons/toolbar-button.js +25 -0
- package/ui/toolbar/buttons/undo-redo-button-group.d.ts +2 -0
- package/ui/toolbar/buttons/undo-redo-button-group.js +33 -0
- package/ui/toolbar/buttons/video-toolbar-button.d.ts +8 -0
- package/ui/toolbar/buttons/video-toolbar-button.js +14 -0
- package/ui/toolbar/toolbar.d.ts +3 -0
- package/ui/toolbar/toolbar.js +25 -0
- package/ui/toolbar/types.d.ts +9 -0
- package/ui/toolbar/types.js +3 -0
- package/ui/underline-mark.d.ts +2 -0
- package/ui/underline-mark.js +9 -0
- package/ui/utils.d.ts +2 -0
- package/ui/utils.js +14 -0
- package/ui/video/insert-video-modal-content.d.ts +8 -0
- package/ui/video/insert-video-modal-content.js +43 -0
- package/ui/video/video-element.d.ts +2 -0
- package/ui/video/video-element.js +26 -0
- package/utils.d.ts +29 -0
- package/utils.js +81 -0
- package/wysiwyg-editor.d.ts +10 -0
- package/wysiwyg-editor.js +19 -0
- package/Content/Renderer/Components/VideoComponent/VideoComponent.d.ts +0 -6
- package/Content/Renderer/Components/VideoComponent/VideoComponent.js +0 -43
- package/Content/Renderer/Components/VideoComponent/index.d.ts +0 -1
- package/Content/Renderer/Components/VideoComponent/index.js +0 -6
- package/Content/Renderer/ContentRenderer.d.ts +0 -3
- package/Content/Renderer/ContentRenderer.js +0 -44
- package/Content/Renderer/index.d.ts +0 -3
- package/Content/Renderer/index.js +0 -23
- package/Content/Renderer/renderElement.d.ts +0 -4
- package/Content/Renderer/renderElement.js +0 -152
- package/Content/Renderer/renderLeaf.d.ts +0 -4
- package/Content/Renderer/renderLeaf.js +0 -51
- package/Content/Renderer/typeGuards.d.ts +0 -5
- package/Content/Renderer/typeGuards.js +0 -20
- package/Content/Renderer/types.d.ts +0 -83
- package/Content/index.d.ts +0 -4
- package/Content/index.js +0 -23
- package/Converter/convertToPlainText.d.ts +0 -2
- package/Converter/convertToPlainText.js +0 -10
- package/Converter/index.d.ts +0 -1
- package/Converter/index.js +0 -6
- package/Editor/Slate/Element.d.ts +0 -6
- package/Editor/Slate/Element.js +0 -36
- package/Editor/Slate/Leaf.d.ts +0 -5
- package/Editor/Slate/Leaf.js +0 -27
- package/Editor/Slate/createUxfEditor.d.ts +0 -1
- package/Editor/Slate/createUxfEditor.js +0 -12
- package/Editor/Slate/index.d.ts +0 -3
- package/Editor/Slate/index.js +0 -10
- package/Editor/Slate/utils.d.ts +0 -24
- package/Editor/Slate/utils.js +0 -220
- package/Editor/Slate/withLinks.d.ts +0 -2
- package/Editor/Slate/withLinks.js +0 -74
- package/Editor/Slate/withUxfUtils.d.ts +0 -2
- package/Editor/Slate/withUxfUtils.js +0 -31
- package/Editor/Slate/withVoids.d.ts +0 -2
- package/Editor/Slate/withVoids.js +0 -41
- package/Editor/WysiwygEditor.d.ts +0 -3
- package/Editor/WysiwygEditor.js +0 -114
- package/Editor/index.d.ts +0 -2
- package/Editor/index.js +0 -21
package/README.md
CHANGED
|
@@ -1,23 +1,62 @@
|
|
|
1
|
-
# UXF Wysiwyg editor
|
|
2
1
|
[](https://www.npmjs.com/package/@uxf/wysiwyg)
|
|
3
2
|
[](https://www.npmjs.com/package/@uxf/wysiwyg)
|
|
4
3
|
[](https://www.npmjs.com/package/@uxf/wysiwyg)
|
|
5
4
|
[](https://www.npmjs.com/package/@uxf/wysiwyg)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
# UXF Wysiwyg editor
|
|
7
|
+
|
|
8
|
+
## @uxf/ui configuration
|
|
9
|
+
- wrap your app with `UiContextProvider`
|
|
10
|
+
- add `<Modal ref={getModalRef()} />` to make modals work
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
<UiContextProvider value={getProviderConfig()}>
|
|
14
|
+
<App />
|
|
15
|
+
<Modal ref={getModalRef()} />
|
|
16
|
+
</UiContextProvider>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage with all available plugins
|
|
20
|
+
```tsx
|
|
21
|
+
const plugins = useMemo(
|
|
22
|
+
() =>
|
|
23
|
+
createUxfPlugins({
|
|
24
|
+
headings: { disabledLevels: [1] },
|
|
25
|
+
image: {
|
|
26
|
+
uploadImage: fileUpload,
|
|
27
|
+
getImageUrl: getOriginalFileUrl,
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
[],
|
|
31
|
+
);
|
|
8
32
|
|
|
9
|
-
|
|
33
|
+
<WysiwygEditor initialValue={initialValue} onChange={onChange} plugins={plugins} />
|
|
34
|
+
```
|
|
10
35
|
|
|
11
|
-
|
|
36
|
+
## Usage with specific plugins
|
|
37
|
+
```tsx
|
|
38
|
+
const onlySelectedPlugins = useMemo(
|
|
39
|
+
() =>
|
|
40
|
+
createPluginsWithUi([
|
|
41
|
+
createHeadingsPluginWithUi({
|
|
42
|
+
disabledLevels: [1],
|
|
43
|
+
}),
|
|
44
|
+
createImagePluginWithUi({
|
|
45
|
+
uploadImage: fileUpload,
|
|
46
|
+
getImageUrl: getOriginalFileUrl,
|
|
47
|
+
}),
|
|
48
|
+
createBlockQuotePluginWithUi(),
|
|
49
|
+
createBoldPluginWithUi(),
|
|
50
|
+
createItalicPluginWithUi(),
|
|
51
|
+
createUnderlinePluginWithUi(),
|
|
52
|
+
createCodePluginWithUi(),
|
|
53
|
+
createListPluginWithUi(),
|
|
54
|
+
createLinkPluginWithUi(),
|
|
55
|
+
createVideoPluginWithUi(),
|
|
56
|
+
]),
|
|
12
57
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
yarn add @uxf/wysiywg-editor
|
|
16
|
-
```
|
|
58
|
+
[],
|
|
59
|
+
);
|
|
17
60
|
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
yarn add @uxf/wysiywg-editor
|
|
21
|
-
# Install peer dependencies if not installed
|
|
22
|
-
yarn add @material-ui/core @material-ui/icons @material-ui/lab
|
|
23
|
-
```
|
|
61
|
+
<WysiwygEditor initialValue={initialValue} onChange={onChange} plugins={onlySelectedPlugins} />
|
|
62
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
|
|
4
|
+
exports.ICONS_VERSION = "1676648859915";
|
|
5
|
+
exports.ICON_SPRITE = "/icons-generated/_icon-sprite.svg";
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbnMtY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy9pY29ucy1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxhQUFhLEdBQUcsZUFBZSxDQUFDO0FBQ2hDLFFBQUEsV0FBVyxHQUFHLG1DQUFtQyxDQUFDIn0=
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly calendar: {
|
|
3
|
+
readonly w: 448;
|
|
4
|
+
readonly h: 512;
|
|
5
|
+
};
|
|
6
|
+
readonly camera: {
|
|
7
|
+
readonly w: 512;
|
|
8
|
+
readonly h: 512;
|
|
9
|
+
};
|
|
10
|
+
readonly caretDown: {
|
|
11
|
+
readonly w: 320;
|
|
12
|
+
readonly h: 512;
|
|
13
|
+
};
|
|
14
|
+
readonly clock: {
|
|
15
|
+
readonly w: 512;
|
|
16
|
+
readonly h: 512;
|
|
17
|
+
};
|
|
18
|
+
readonly bars: {
|
|
19
|
+
readonly w: 448;
|
|
20
|
+
readonly h: 512;
|
|
21
|
+
};
|
|
22
|
+
readonly check: {
|
|
23
|
+
readonly w: 512;
|
|
24
|
+
readonly h: 512;
|
|
25
|
+
};
|
|
26
|
+
readonly chevronDown: {
|
|
27
|
+
readonly w: 512;
|
|
28
|
+
readonly h: 512;
|
|
29
|
+
};
|
|
30
|
+
readonly chevronLeft: {
|
|
31
|
+
readonly w: 384;
|
|
32
|
+
readonly h: 512;
|
|
33
|
+
};
|
|
34
|
+
readonly chevronsLeft: {
|
|
35
|
+
readonly w: 512;
|
|
36
|
+
readonly h: 512;
|
|
37
|
+
};
|
|
38
|
+
readonly chevronRight: {
|
|
39
|
+
readonly w: 384;
|
|
40
|
+
readonly h: 512;
|
|
41
|
+
};
|
|
42
|
+
readonly chevronsRight: {
|
|
43
|
+
readonly w: 512;
|
|
44
|
+
readonly h: 512;
|
|
45
|
+
};
|
|
46
|
+
readonly chevronUp: {
|
|
47
|
+
readonly w: 512;
|
|
48
|
+
readonly h: 512;
|
|
49
|
+
};
|
|
50
|
+
readonly cloud: {
|
|
51
|
+
readonly w: 640;
|
|
52
|
+
readonly h: 512;
|
|
53
|
+
};
|
|
54
|
+
readonly copy: {
|
|
55
|
+
readonly w: 512;
|
|
56
|
+
readonly h: 512;
|
|
57
|
+
};
|
|
58
|
+
readonly "ellipsis-vertical": {
|
|
59
|
+
readonly w: 128;
|
|
60
|
+
readonly h: 512;
|
|
61
|
+
};
|
|
62
|
+
readonly file: {
|
|
63
|
+
readonly w: 384;
|
|
64
|
+
readonly h: 512;
|
|
65
|
+
};
|
|
66
|
+
readonly imageFile: {
|
|
67
|
+
readonly w: 384;
|
|
68
|
+
readonly h: 512;
|
|
69
|
+
};
|
|
70
|
+
readonly videoFile: {
|
|
71
|
+
readonly w: 384;
|
|
72
|
+
readonly h: 512;
|
|
73
|
+
};
|
|
74
|
+
readonly user: {
|
|
75
|
+
readonly w: 448;
|
|
76
|
+
readonly h: 512;
|
|
77
|
+
};
|
|
78
|
+
readonly xmarkLarge: {
|
|
79
|
+
readonly w: 448;
|
|
80
|
+
readonly h: 512;
|
|
81
|
+
};
|
|
82
|
+
readonly h1: {
|
|
83
|
+
readonly w: 576;
|
|
84
|
+
readonly h: 512;
|
|
85
|
+
};
|
|
86
|
+
readonly h2: {
|
|
87
|
+
readonly w: 640;
|
|
88
|
+
readonly h: 512;
|
|
89
|
+
};
|
|
90
|
+
readonly h3: {
|
|
91
|
+
readonly w: 640;
|
|
92
|
+
readonly h: 512;
|
|
93
|
+
};
|
|
94
|
+
readonly h4: {
|
|
95
|
+
readonly w: 640;
|
|
96
|
+
readonly h: 512;
|
|
97
|
+
};
|
|
98
|
+
readonly h5: {
|
|
99
|
+
readonly w: 640;
|
|
100
|
+
readonly h: 512;
|
|
101
|
+
};
|
|
102
|
+
readonly h6: {
|
|
103
|
+
readonly w: 640;
|
|
104
|
+
readonly h: 512;
|
|
105
|
+
};
|
|
106
|
+
readonly bold: {
|
|
107
|
+
readonly w: 384;
|
|
108
|
+
readonly h: 512;
|
|
109
|
+
};
|
|
110
|
+
readonly italic: {
|
|
111
|
+
readonly w: 384;
|
|
112
|
+
readonly h: 512;
|
|
113
|
+
};
|
|
114
|
+
readonly underline: {
|
|
115
|
+
readonly w: 448;
|
|
116
|
+
readonly h: 512;
|
|
117
|
+
};
|
|
118
|
+
readonly ol: {
|
|
119
|
+
readonly w: 512;
|
|
120
|
+
readonly h: 512;
|
|
121
|
+
};
|
|
122
|
+
readonly ul: {
|
|
123
|
+
readonly w: 576;
|
|
124
|
+
readonly h: 512;
|
|
125
|
+
};
|
|
126
|
+
readonly "code-simple": {
|
|
127
|
+
readonly w: 576;
|
|
128
|
+
readonly h: 512;
|
|
129
|
+
};
|
|
130
|
+
readonly link: {
|
|
131
|
+
readonly w: 640;
|
|
132
|
+
readonly h: 512;
|
|
133
|
+
};
|
|
134
|
+
readonly image: {
|
|
135
|
+
readonly w: 512;
|
|
136
|
+
readonly h: 512;
|
|
137
|
+
};
|
|
138
|
+
readonly youtube: {
|
|
139
|
+
readonly w: 576;
|
|
140
|
+
readonly h: 512;
|
|
141
|
+
};
|
|
142
|
+
readonly "block-quote": {
|
|
143
|
+
readonly w: 576;
|
|
144
|
+
readonly h: 512;
|
|
145
|
+
};
|
|
146
|
+
readonly "arrow-left": {
|
|
147
|
+
readonly w: 448;
|
|
148
|
+
readonly h: 512;
|
|
149
|
+
};
|
|
150
|
+
readonly "arrow-right": {
|
|
151
|
+
readonly w: 448;
|
|
152
|
+
readonly h: 512;
|
|
153
|
+
};
|
|
154
|
+
readonly "rectangle-wide": {
|
|
155
|
+
readonly w: 640;
|
|
156
|
+
readonly h: 512;
|
|
157
|
+
};
|
|
158
|
+
readonly edit: {
|
|
159
|
+
readonly w: 512;
|
|
160
|
+
readonly h: 512;
|
|
161
|
+
};
|
|
162
|
+
readonly delete: {
|
|
163
|
+
readonly w: 448;
|
|
164
|
+
readonly h: 512;
|
|
165
|
+
};
|
|
166
|
+
readonly "open-link-in-new-tab": {
|
|
167
|
+
readonly w: 512;
|
|
168
|
+
readonly h: 512;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
export type IconsSet = keyof typeof ICONS;
|
package/config/icons.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file is generated automatically, do not change anything manually in the contents of this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ICONS = void 0;
|
|
5
|
+
exports.ICONS = {
|
|
6
|
+
"calendar": { w: 448, h: 512 },
|
|
7
|
+
"camera": { w: 512, h: 512 },
|
|
8
|
+
"caretDown": { w: 320, h: 512 },
|
|
9
|
+
"clock": { w: 512, h: 512 },
|
|
10
|
+
"bars": { w: 448, h: 512 },
|
|
11
|
+
"check": { w: 512, h: 512 },
|
|
12
|
+
"chevronDown": { w: 512, h: 512 },
|
|
13
|
+
"chevronLeft": { w: 384, h: 512 },
|
|
14
|
+
"chevronsLeft": { w: 512, h: 512 },
|
|
15
|
+
"chevronRight": { w: 384, h: 512 },
|
|
16
|
+
"chevronsRight": { w: 512, h: 512 },
|
|
17
|
+
"chevronUp": { w: 512, h: 512 },
|
|
18
|
+
"cloud": { w: 640, h: 512 },
|
|
19
|
+
"copy": { w: 512, h: 512 },
|
|
20
|
+
"ellipsis-vertical": { w: 128, h: 512 },
|
|
21
|
+
"file": { w: 384, h: 512 },
|
|
22
|
+
"imageFile": { w: 384, h: 512 },
|
|
23
|
+
"videoFile": { w: 384, h: 512 },
|
|
24
|
+
"user": { w: 448, h: 512 },
|
|
25
|
+
"xmarkLarge": { w: 448, h: 512 },
|
|
26
|
+
"h1": { w: 576, h: 512 },
|
|
27
|
+
"h2": { w: 640, h: 512 },
|
|
28
|
+
"h3": { w: 640, h: 512 },
|
|
29
|
+
"h4": { w: 640, h: 512 },
|
|
30
|
+
"h5": { w: 640, h: 512 },
|
|
31
|
+
"h6": { w: 640, h: 512 },
|
|
32
|
+
"bold": { w: 384, h: 512 },
|
|
33
|
+
"italic": { w: 384, h: 512 },
|
|
34
|
+
"underline": { w: 448, h: 512 },
|
|
35
|
+
"ol": { w: 512, h: 512 },
|
|
36
|
+
"ul": { w: 576, h: 512 },
|
|
37
|
+
"code-simple": { w: 576, h: 512 },
|
|
38
|
+
"link": { w: 640, h: 512 },
|
|
39
|
+
"image": { w: 512, h: 512 },
|
|
40
|
+
"youtube": { w: 576, h: 512 },
|
|
41
|
+
"block-quote": { w: 576, h: 512 },
|
|
42
|
+
"arrow-left": { w: 448, h: 512 },
|
|
43
|
+
"arrow-right": { w: 448, h: 512 },
|
|
44
|
+
"rectangle-wide": { w: 640, h: 512 },
|
|
45
|
+
"edit": { w: 512, h: 512 },
|
|
46
|
+
"delete": { w: 448, h: 512 },
|
|
47
|
+
"open-link-in-new-tab": { w: 512, h: 512 },
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWN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2pDLFlBQVksRUFBRSxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRTtJQUNoQyxhQUFhLEVBQUUsRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUU7SUFDakMsZ0JBQWdCLEVBQUUsRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUU7SUFDcEMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFO0lBQzFCLFFBQVEsRUFBRSxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRTtJQUM1QixzQkFBc0IsRUFBRSxFQUFFLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRTtDQUNwQyxDQUFDIn0=
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HeadingsPluginOptions } from "./plugins/heading/create-headings-plugin";
|
|
2
|
+
import { UxfImagePluginOptions } from "./plugins/image/types";
|
|
3
|
+
import { ElementUiComponent } from "./types";
|
|
4
|
+
export declare const createHeadingsPluginWithUi: (options?: HeadingsPluginOptions) => {
|
|
5
|
+
plugin: import("@udecode/plate-core").PlatePlugin<HeadingsPluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
6
|
+
components: {
|
|
7
|
+
[key: string]: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const createBlockQuotePluginWithUi: () => {
|
|
11
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").HotkeyPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
12
|
+
component: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
13
|
+
};
|
|
14
|
+
export declare const createBoldPluginWithUi: () => {
|
|
15
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
16
|
+
component: import("./types").LeafUiComponent<import("./types").RichText>;
|
|
17
|
+
};
|
|
18
|
+
export declare const createItalicPluginWithUi: () => {
|
|
19
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
20
|
+
component: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
21
|
+
};
|
|
22
|
+
export declare const createUnderlinePluginWithUi: () => {
|
|
23
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
24
|
+
component: import("./types").LeafUiComponent<import("./types").RichText>;
|
|
25
|
+
};
|
|
26
|
+
export declare const createCodePluginWithUi: () => {
|
|
27
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
28
|
+
component: import("./types").LeafUiComponent<import("./types").RichText>;
|
|
29
|
+
};
|
|
30
|
+
export declare const createListPluginWithUi: () => {
|
|
31
|
+
plugin: import("./types").UxfPlatePlugin<import("@udecode/plate-list").ListPlugin>;
|
|
32
|
+
components: {
|
|
33
|
+
ul: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
34
|
+
ol: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
35
|
+
li: ElementUiComponent<import("./types").UxfBlockElement>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const createImagePluginWithUi: (options: UxfImagePluginOptions) => {
|
|
39
|
+
plugin: import("@udecode/plate-core").PlatePlugin<UxfImagePluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
40
|
+
component: ElementUiComponent<import("./types").UxfImageElement>;
|
|
41
|
+
};
|
|
42
|
+
export declare const createVideoPluginWithUi: () => {
|
|
43
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-media").MediaPlugin, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
44
|
+
component: ElementUiComponent<import("./types").UxfVideoElement>;
|
|
45
|
+
};
|
|
46
|
+
export declare const createAllPluginsWithUi: (options: {
|
|
47
|
+
image: UxfImagePluginOptions;
|
|
48
|
+
headings?: HeadingsPluginOptions;
|
|
49
|
+
}) => import("./types").UxfPlatePlugin<import("@udecode/plate-core").AnyObject>[];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAllPluginsWithUi = exports.createVideoPluginWithUi = exports.createImagePluginWithUi = exports.createListPluginWithUi = exports.createCodePluginWithUi = exports.createUnderlinePluginWithUi = exports.createItalicPluginWithUi = exports.createBoldPluginWithUi = exports.createBlockQuotePluginWithUi = exports.createHeadingsPluginWithUi = void 0;
|
|
4
|
+
const create_plugins_with_ui_1 = require("./create-plugins-with-ui");
|
|
5
|
+
const create_block_quote_plugin_1 = require("./plugins/block-quote/create-block-quote-plugin");
|
|
6
|
+
const create_video_plugin_1 = require("./plugins/embedded/video/create-video-plugin");
|
|
7
|
+
const constants_1 = require("./plugins/heading/constants");
|
|
8
|
+
const create_headings_plugin_1 = require("./plugins/heading/create-headings-plugin");
|
|
9
|
+
const create_image_plugin_1 = require("./plugins/image/create-image-plugin");
|
|
10
|
+
const create_link_plugin_1 = require("./plugins/link/create-link-plugin");
|
|
11
|
+
const create_list_plugin_1 = require("./plugins/list/create-list-plugin");
|
|
12
|
+
const create_bold_plugin_1 = require("./plugins/mark-bold/create-bold-plugin");
|
|
13
|
+
const create_code_plugin_1 = require("./plugins/mark-code/create-code-plugin");
|
|
14
|
+
const create_italic_plugin_1 = require("./plugins/mark-italic/create-italic-plugin");
|
|
15
|
+
const create_underline_plugin_1 = require("./plugins/mark-underline/create-underline-plugin");
|
|
16
|
+
const block_quote_element_1 = require("./ui/block-quote-element");
|
|
17
|
+
const bold_mark_1 = require("./ui/bold-mark");
|
|
18
|
+
const code_mark_1 = require("./ui/code-mark");
|
|
19
|
+
const heading_elements_1 = require("./ui/heading-elements");
|
|
20
|
+
const image_element_1 = require("./ui/image/image-element");
|
|
21
|
+
const italic_mark_1 = require("./ui/italic-mark");
|
|
22
|
+
const link_element_1 = require("./ui/link-element");
|
|
23
|
+
const list_item_element_1 = require("./ui/list-item-element");
|
|
24
|
+
const list_ordered_element_1 = require("./ui/list-ordered-element");
|
|
25
|
+
const list_unordered_element_1 = require("./ui/list-unordered-element");
|
|
26
|
+
const underline_mark_1 = require("./ui/underline-mark");
|
|
27
|
+
const video_element_1 = require("./ui/video/video-element");
|
|
28
|
+
const button_1 = require("./plugins/button");
|
|
29
|
+
const button_2 = require("./ui/button");
|
|
30
|
+
const createHeadingsPluginWithUi = (options) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const disabledLevels = (_a = options === null || options === void 0 ? void 0 : options.disabledLevels) !== null && _a !== void 0 ? _a : [];
|
|
33
|
+
const isDisabled = (level) => disabledLevels.findIndex((e) => e === level) !== -1;
|
|
34
|
+
const components = {};
|
|
35
|
+
const elementsByKey = [heading_elements_1.H1Element, heading_elements_1.H2Element, heading_elements_1.H3Element, heading_elements_1.H4Element, heading_elements_1.H5Element, heading_elements_1.H6Element];
|
|
36
|
+
for (let level = 1; level <= 6; level++) {
|
|
37
|
+
if (isDisabled(level)) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
components[constants_1.KEYS_HEADING[level - 1]] = elementsByKey[level - 1];
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
plugin: (0, create_headings_plugin_1.createHeadingsPlugin)({ options }),
|
|
44
|
+
components,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.createHeadingsPluginWithUi = createHeadingsPluginWithUi;
|
|
48
|
+
const createBlockQuotePluginWithUi = () => ({
|
|
49
|
+
plugin: (0, create_block_quote_plugin_1.createBlockquotePlugin)(),
|
|
50
|
+
component: block_quote_element_1.BlockQuoteElement,
|
|
51
|
+
});
|
|
52
|
+
exports.createBlockQuotePluginWithUi = createBlockQuotePluginWithUi;
|
|
53
|
+
const createBoldPluginWithUi = () => ({
|
|
54
|
+
plugin: (0, create_bold_plugin_1.createBoldPlugin)(),
|
|
55
|
+
component: bold_mark_1.BoldMark,
|
|
56
|
+
});
|
|
57
|
+
exports.createBoldPluginWithUi = createBoldPluginWithUi;
|
|
58
|
+
const createItalicPluginWithUi = () => ({
|
|
59
|
+
plugin: (0, create_italic_plugin_1.createItalicPlugin)(),
|
|
60
|
+
component: italic_mark_1.ItalicMark,
|
|
61
|
+
});
|
|
62
|
+
exports.createItalicPluginWithUi = createItalicPluginWithUi;
|
|
63
|
+
const createUnderlinePluginWithUi = () => ({
|
|
64
|
+
plugin: (0, create_underline_plugin_1.createUnderlinePlugin)(),
|
|
65
|
+
component: underline_mark_1.UnderlineMark,
|
|
66
|
+
});
|
|
67
|
+
exports.createUnderlinePluginWithUi = createUnderlinePluginWithUi;
|
|
68
|
+
const createCodePluginWithUi = () => ({
|
|
69
|
+
plugin: (0, create_code_plugin_1.createCodePlugin)(),
|
|
70
|
+
component: code_mark_1.CodeMark,
|
|
71
|
+
});
|
|
72
|
+
exports.createCodePluginWithUi = createCodePluginWithUi;
|
|
73
|
+
const createListPluginWithUi = () => ({
|
|
74
|
+
plugin: (0, create_list_plugin_1.createListPlugin)(),
|
|
75
|
+
components: {
|
|
76
|
+
ul: list_unordered_element_1.ListUnorderedElement,
|
|
77
|
+
ol: list_ordered_element_1.ListOrderedElement,
|
|
78
|
+
li: list_item_element_1.ListItemElement,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
exports.createListPluginWithUi = createListPluginWithUi;
|
|
82
|
+
const createLinkPluginWithUi = () => ({
|
|
83
|
+
plugin: (0, create_link_plugin_1.createLinkPlugin)(),
|
|
84
|
+
component: link_element_1.LinkElement,
|
|
85
|
+
});
|
|
86
|
+
const createImagePluginWithUi = (options) => ({
|
|
87
|
+
plugin: (0, create_image_plugin_1.createImagePlugin)({
|
|
88
|
+
options,
|
|
89
|
+
}),
|
|
90
|
+
component: image_element_1.ImageElement,
|
|
91
|
+
});
|
|
92
|
+
exports.createImagePluginWithUi = createImagePluginWithUi;
|
|
93
|
+
const createVideoPluginWithUi = () => ({
|
|
94
|
+
plugin: (0, create_video_plugin_1.createVideoPlugin)(),
|
|
95
|
+
component: video_element_1.VideoElement,
|
|
96
|
+
});
|
|
97
|
+
exports.createVideoPluginWithUi = createVideoPluginWithUi;
|
|
98
|
+
const createButtonPluginWithUi = () => ({
|
|
99
|
+
plugin: (0, button_1.createButtonPlugin)(),
|
|
100
|
+
component: button_2.ButtonElement,
|
|
101
|
+
});
|
|
102
|
+
const createAllPluginsWithUi = (options) => (0, create_plugins_with_ui_1.createPluginsWithUi)([
|
|
103
|
+
(0, exports.createHeadingsPluginWithUi)(options.headings),
|
|
104
|
+
(0, exports.createBlockQuotePluginWithUi)(),
|
|
105
|
+
(0, exports.createBoldPluginWithUi)(),
|
|
106
|
+
(0, exports.createItalicPluginWithUi)(),
|
|
107
|
+
(0, exports.createUnderlinePluginWithUi)(),
|
|
108
|
+
(0, exports.createCodePluginWithUi)(),
|
|
109
|
+
(0, exports.createListPluginWithUi)(),
|
|
110
|
+
createLinkPluginWithUi(),
|
|
111
|
+
(0, exports.createImagePluginWithUi)(options.image),
|
|
112
|
+
(0, exports.createVideoPluginWithUi)(),
|
|
113
|
+
createButtonPluginWithUi(),
|
|
114
|
+
]);
|
|
115
|
+
exports.createAllPluginsWithUi = createAllPluginsWithUi;
|
|
116
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXR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BQXVCLDJCQUtqQztBQUVJLE1BQU0sdUJBQXVCLEdBQUcsR0FBRyxFQUFFLENBQUMsQ0FBQztJQUMxQyxNQUFNLEVBQUUsSUFBQSx1Q0FBaUIsR0FBRTtJQUMzQixTQUFTLEVBQUUsNEJBQVk7Q0FDMUIsQ0FBQyxDQUFDO0FBSFUsUUFBQSx1QkFBdUIsMkJBR2pDO0FBRUgsTUFBTSx3QkFBd0IsR0FBRyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0lBQ3BDLE1BQU0sRUFBRSxJQUFBLDJCQUFrQixHQUFFO0lBQzVCLFNBQVMsRUFBRSxzQkFBYTtDQUMzQixDQUFDLENBQUM7QUFFSSxNQUFNLHNCQUFzQixHQUFHLENBQUMsT0FBMkUsRUFBRSxFQUFFLENBQ2xILElBQUEsNENBQW1CLEVBQUM7SUFDaEIsSUFBQSxrQ0FBMEIsRUFBQyxPQUFPLENBQUMsUUFBUSxDQUFDO0lBQzVDLElBQUEsb0NBQTRCLEdBQUU7SUFDOUIsSUFBQSw4QkFBc0IsR0FBRTtJQUN4QixJQUFBLGdDQUF3QixHQUFFO0lBQzFCLElBQUEsbUNBQTJCLEdBQUU7SUFDN0IsSUFBQSw4QkFBc0IsR0FBRTtJQUN4QixJQUFBLDhCQUFzQixHQUFFO0lBQ3hCLHNCQUFzQixFQUFFO0lBQ3hCLElBQUEsK0JBQXVCLEVBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUN0QyxJQUFBLCtCQUF1QixHQUFFO0lBQ3pCLHdCQUF3QixFQUFFO0NBQzdCLENBQUMsQ0FBQztBQWJNLFFBQUEsc0JBQXNCLDBCQWE1QiJ9
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MyOverrideByKey, UxfPlatePlugin, WysiwygPlugin, WysiwygRecursivePlugin } from "./types";
|
|
2
|
+
export declare const createPluginsWithUi: (wysiwygPlugins: Array<WysiwygPlugin<any> | WysiwygRecursivePlugin<string>>, options?: {
|
|
3
|
+
overrideByKey?: MyOverrideByKey;
|
|
4
|
+
}) => UxfPlatePlugin[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPluginsWithUi = void 0;
|
|
4
|
+
const plate_core_1 = require("@udecode/plate-core");
|
|
5
|
+
const create_exit_break_plugin_1 = require("./plugins/exit-break/create-exit-break-plugin");
|
|
6
|
+
const create_node_id_plugin_1 = require("./plugins/node-id/create-node-id-plugin");
|
|
7
|
+
const create_paragraph_plugin_1 = require("./plugins/paragraph/create-paragraph-plugin");
|
|
8
|
+
const types_1 = require("./plugins/paragraph/types");
|
|
9
|
+
const create_reset_node_1 = require("./plugins/reset-node/create-reset-node");
|
|
10
|
+
const create_select_on_backspace_plugin_1 = require("./plugins/select-on-backspace/create-select-on-backspace-plugin");
|
|
11
|
+
const create_soft_break_plugin_1 = require("./plugins/soft-break/create-soft-break-plugin");
|
|
12
|
+
const create_trailing_block_plugin_1 = require("./plugins/trailing-block/create-trailing-block-plugin");
|
|
13
|
+
const paragraph_element_1 = require("./ui/paragraph-element");
|
|
14
|
+
function isRecursivePlugin(plugin) {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
16
|
+
return plugin.components !== undefined;
|
|
17
|
+
}
|
|
18
|
+
const createPluginsWithUi = (wysiwygPlugins, options) => {
|
|
19
|
+
const plugins = wysiwygPlugins.map((p) => p.plugin);
|
|
20
|
+
const pluginComponents = {
|
|
21
|
+
[types_1.PARAGRAPH_PLUGIN_KEY]: paragraph_element_1.ParagraphElement,
|
|
22
|
+
};
|
|
23
|
+
wysiwygPlugins.forEach((p) => {
|
|
24
|
+
if (isRecursivePlugin(p)) {
|
|
25
|
+
Object.keys(p.components).forEach((componentKey) => {
|
|
26
|
+
pluginComponents[componentKey] = p.components[componentKey];
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
pluginComponents[p.plugin.key] = p.component;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return (0, plate_core_1.createPlugins)([
|
|
34
|
+
(0, create_paragraph_plugin_1.createParagraphPlugin)(),
|
|
35
|
+
(0, create_exit_break_plugin_1.createExitBreakPlugin)(),
|
|
36
|
+
(0, create_reset_node_1.createResetNodePlugin)(),
|
|
37
|
+
(0, create_soft_break_plugin_1.createSoftBreakPlugin)(),
|
|
38
|
+
(0, create_node_id_plugin_1.createNodeIdPlugin)(),
|
|
39
|
+
(0, create_select_on_backspace_plugin_1.createSelectOnBackspacePlugin)(),
|
|
40
|
+
(0, create_trailing_block_plugin_1.createTrailingBlockPlugin)(),
|
|
41
|
+
...plugins,
|
|
42
|
+
], {
|
|
43
|
+
...options,
|
|
44
|
+
components: pluginComponents,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.createPluginsWithUi = createPluginsWithUi;
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXBsdWdpbnMtd2l0aC11aS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUtcGx1Z2lucy13aXRoLXVpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG9EQUFvRDtBQUNwRCw0RkFBc0Y7QUFDdEYsbUZBQTZFO0FBQzdFLHlGQUFvRjtBQUNwRixxREFBaUU7QUFDakUsOEVBQStFO0FBQy9FLHVIQUFnSDtBQUNoSCw0RkFBc0Y7QUFDdEYsd0dBQWtHO0FBV2xHLDhEQUEwRDtBQUUxRCxTQUFTLGlCQUFpQixDQUN0QixNQUFzRDtJQUV0RCx1RUFBdUU7SUFDdkUsT0FBUSxNQUF5QyxDQUFDLFVBQVUsS0FBSyxTQUFTLENBQUM7QUFDL0UsQ0FBQztBQUVNLE1BQU0sbUJBQW1CLEdBQUcsQ0FDL0IsY0FBMEUs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1FBQ1YsVUFBVSxFQUFFLGdCQUFnQjtLQUMvQixDQUNKLENBQUM7QUFDTixDQUFDLENBQUM7QUF0Q1csUUFBQSxtQkFBbUIsdUJBc0M5QiJ9
|
package/hooks.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UxfEditor, WysiwygContent } from "./types";
|
|
2
|
+
export declare const useUxfPlateEditorRef: (id?: any) => UxfEditor;
|
|
3
|
+
export declare const useUxfEditorRef: () => UxfEditor;
|
|
4
|
+
export declare const useUxfEditorState: () => UxfEditor;
|
|
5
|
+
export declare const useUxfPlateEditorState: (id?: any) => UxfEditor;
|
|
6
|
+
export declare const useUxfPlateSelectors: (id?: any) => import("@udecode/plate-core").GetRecord<import("@udecode/plate-core").PlateStoreState<WysiwygContent, UxfEditor>>;
|
|
7
|
+
export declare const useUxfPlateActions: (id?: any) => import("@udecode/plate-core").SetRecord<import("@udecode/plate-core").PlateStoreState<WysiwygContent, UxfEditor>>;
|
|
8
|
+
export declare const useUxfPlateStates: (id?: any) => import("@udecode/plate-core").UseRecord<import("@udecode/plate-core").PlateStoreState<WysiwygContent, UxfEditor>>;
|
|
9
|
+
export { useSelected } from "slate-react";
|
package/hooks.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSelected = exports.useUxfPlateStates = exports.useUxfPlateActions = exports.useUxfPlateSelectors = exports.useUxfPlateEditorState = exports.useUxfEditorState = exports.useUxfEditorRef = exports.useUxfPlateEditorRef = void 0;
|
|
4
|
+
const plate_core_1 = require("@udecode/plate-core");
|
|
5
|
+
const useUxfPlateEditorRef = (id) => (0, plate_core_1.usePlateEditorRef)(id);
|
|
6
|
+
exports.useUxfPlateEditorRef = useUxfPlateEditorRef;
|
|
7
|
+
const useUxfEditorRef = () => (0, plate_core_1.useEditorRef)();
|
|
8
|
+
exports.useUxfEditorRef = useUxfEditorRef;
|
|
9
|
+
const useUxfEditorState = () => (0, plate_core_1.useEditorState)();
|
|
10
|
+
exports.useUxfEditorState = useUxfEditorState;
|
|
11
|
+
const useUxfPlateEditorState = (id) => (0, plate_core_1.usePlateEditorState)((0, plate_core_1.useEventPlateId)(id));
|
|
12
|
+
exports.useUxfPlateEditorState = useUxfPlateEditorState;
|
|
13
|
+
const useUxfPlateSelectors = (id) => (0, plate_core_1.usePlateSelectors)(id);
|
|
14
|
+
exports.useUxfPlateSelectors = useUxfPlateSelectors;
|
|
15
|
+
const useUxfPlateActions = (id) => (0, plate_core_1.usePlateActions)(id);
|
|
16
|
+
exports.useUxfPlateActions = useUxfPlateActions;
|
|
17
|
+
const useUxfPlateStates = (id) => (0, plate_core_1.usePlateStates)(id);
|
|
18
|
+
exports.useUxfPlateStates = useUxfPlateStates;
|
|
19
|
+
var slate_react_1 = require("slate-react");
|
|
20
|
+
Object.defineProperty(exports, "useSelected", { enumerable: true, get: function () { return slate_react_1.useSelected; } });
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaG9va3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0RBVTZCO0FBR3RCLE1BQU0sb0JBQW9CLEdBQUcsQ0FBQyxFQUFZLEVBQUUsRUFBRSxDQUFDLElBQUEsOEJBQWlCLEVBQTRCLEVBQUUsQ0FBQyxDQUFDO0FBQTFGLFFBQUEsb0JBQW9CLHdCQUFzRTtBQUNoRyxNQUFNLGVBQWUsR0FBRyxHQUFHLEVBQUUsQ0FBQyxJQUFBLHlCQUFZLEdBQTZCLENBQUM7QUFBbEUsUUFBQSxlQUFlLG1CQUFtRDtBQUN4RSxNQUFNLGlCQUFpQixHQUFHLEdBQUcsRUFBRSxDQUFDLElBQUEsMkJBQWMsR0FBNkIsQ0FBQztBQUF0RSxRQUFBLGlCQUFpQixxQkFBcUQ7QUFDNUUsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLEVBQVksRUFBRSxFQUFFLENBQ25ELElBQUEsZ0NBQW1CLEVBQTRCLElBQUEsNEJBQWUsRUFBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBRDNELFFBQUEsc0JBQXNCLDBCQUNxQztBQUNqRSxNQUFNLG9CQUFvQixHQUFHLENBQUMsRUFBWSxFQUFFLEVBQUUsQ0FBQyxJQUFBLDhCQUFpQixFQUE0QixFQUFFLENBQUMsQ0FBQztBQUExRixRQUFBLG9CQUFvQix3QkFBc0U7QUFDaEcsTUFBTSxrQkFBa0IsR0FBRyxDQUFDLEVBQVksRUFBRSxFQUFFLENBQUMsSUFBQSw0QkFBZSxFQUE0QixFQUFFLENBQUMsQ0FBQztBQUF0RixRQUFBLGtCQUFrQixzQkFBb0U7QUFDNUYsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLEVBQVksRUFBRSxFQUFFLENBQUMsSUFBQSwyQkFBYyxFQUE0QixFQUFFLENBQUMsQ0FBQztBQUFwRixRQUFBLGlCQUFpQixxQkFBbUU7QUFFakcsMkNBQTBDO0FBQWpDLDBHQUFBLFdBQVcsT0FBQSJ9
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { WysiwygEditor } from "./
|
|
2
|
-
export { ContentRenderer } from "./Content";
|
|
3
|
-
export { convertToPlainText } from "./Converter";
|
|
4
|
-
export * from "./Content/Renderer/typeGuards";
|
|
1
|
+
export { WysiwygEditor } from "./wysiwyg-editor";
|
|
5
2
|
export * from "./types";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
3
|
+
export * from "./utils";
|
|
4
|
+
export * from "./hooks";
|
|
5
|
+
export { createAllPluginsWithUi, createVideoPluginWithUi, createBoldPluginWithUi, createCodePluginWithUi, createHeadingsPluginWithUi, createBlockQuotePluginWithUi, createImagePluginWithUi, createItalicPluginWithUi, createListPluginWithUi, createUnderlinePluginWithUi, } from "./create-all-plugins-with-ui";
|
|
6
|
+
export { createPluginsWithUi } from "./create-plugins-with-ui";
|
package/index.js
CHANGED
|
@@ -14,19 +14,23 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "WysiwygEditor", { enumerable: true, get: function () { return
|
|
20
|
-
var Content_1 = require("./Content");
|
|
21
|
-
Object.defineProperty(exports, "ContentRenderer", { enumerable: true, get: function () { return Content_1.ContentRenderer; } });
|
|
22
|
-
var Converter_1 = require("./Converter");
|
|
23
|
-
Object.defineProperty(exports, "convertToPlainText", { enumerable: true, get: function () { return Converter_1.convertToPlainText; } });
|
|
24
|
-
__exportStar(require("./Content/Renderer/typeGuards"), exports);
|
|
17
|
+
exports.createPluginsWithUi = exports.createUnderlinePluginWithUi = exports.createListPluginWithUi = exports.createItalicPluginWithUi = exports.createImagePluginWithUi = exports.createBlockQuotePluginWithUi = exports.createHeadingsPluginWithUi = exports.createCodePluginWithUi = exports.createBoldPluginWithUi = exports.createVideoPluginWithUi = exports.createAllPluginsWithUi = exports.WysiwygEditor = void 0;
|
|
18
|
+
var wysiwyg_editor_1 = require("./wysiwyg-editor");
|
|
19
|
+
Object.defineProperty(exports, "WysiwygEditor", { enumerable: true, get: function () { return wysiwyg_editor_1.WysiwygEditor; } });
|
|
25
20
|
__exportStar(require("./types"), exports);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
Object.defineProperty(exports, "
|
|
31
|
-
Object.defineProperty(exports, "
|
|
32
|
-
|
|
21
|
+
__exportStar(require("./utils"), exports);
|
|
22
|
+
__exportStar(require("./hooks"), exports);
|
|
23
|
+
var create_all_plugins_with_ui_1 = require("./create-all-plugins-with-ui");
|
|
24
|
+
Object.defineProperty(exports, "createAllPluginsWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createAllPluginsWithUi; } });
|
|
25
|
+
Object.defineProperty(exports, "createVideoPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createVideoPluginWithUi; } });
|
|
26
|
+
Object.defineProperty(exports, "createBoldPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createBoldPluginWithUi; } });
|
|
27
|
+
Object.defineProperty(exports, "createCodePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createCodePluginWithUi; } });
|
|
28
|
+
Object.defineProperty(exports, "createHeadingsPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createHeadingsPluginWithUi; } });
|
|
29
|
+
Object.defineProperty(exports, "createBlockQuotePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createBlockQuotePluginWithUi; } });
|
|
30
|
+
Object.defineProperty(exports, "createImagePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createImagePluginWithUi; } });
|
|
31
|
+
Object.defineProperty(exports, "createItalicPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createItalicPluginWithUi; } });
|
|
32
|
+
Object.defineProperty(exports, "createListPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createListPluginWithUi; } });
|
|
33
|
+
Object.defineProperty(exports, "createUnderlinePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createUnderlinePluginWithUi; } });
|
|
34
|
+
var create_plugins_with_ui_1 = require("./create-plugins-with-ui");
|
|
35
|
+
Object.defineProperty(exports, "createPluginsWithUi", { enumerable: true, get: function () { return create_plugins_with_ui_1.createPluginsWithUi; } });
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtREFBaUQ7QUFBeEMsK0dBQUEsYUFBYSxPQUFBO0FBQ3RCLDBDQUF3QjtBQUN4QiwwQ0FBd0I7QUFDeEIsMENBQXdCO0FBQ3hCLDJFQVdzQztBQVZsQyxvSUFBQSxzQkFBc0IsT0FBQTtBQUN0QixxSUFBQSx1QkFBdUIsT0FBQTtBQUN2QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0Qix3SUFBQSwwQkFBMEIsT0FBQTtBQUMxQiwwSUFBQSw0QkFBNEIsT0FBQTtBQUM1QixxSUFBQSx1QkFBdUIsT0FBQTtBQUN2QixzSUFBQSx3QkFBd0IsT0FBQTtBQUN4QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0Qix5SUFBQSwyQkFBMkIsT0FBQTtBQUcvQixtRUFBK0Q7QUFBdEQsNkhBQUEsbUJBQW1CLE9BQUEifQ==
|