@uxf/wysiwyg 11.74.0 → 11.74.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.d.ts +7 -0
- package/components.js +34 -0
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +183 -0
- package/config/icons.js +51 -0
- package/create-all-plugins-with-ui.d.ts +64 -0
- package/create-all-plugins-with-ui.js +127 -0
- package/create-plugins-with-ui.d.ts +4 -0
- package/create-plugins-with-ui.js +47 -0
- package/hooks.d.ts +9 -0
- package/hooks.js +20 -0
- package/index.d.ts +6 -0
- package/index.js +38 -0
- package/package.json +3 -3
- package/plugins/blockquote/create-blockquote-plugin.d.ts +3 -0
- package/plugins/blockquote/create-blockquote-plugin.js +9 -0
- package/plugins/blockquote/types.d.ts +2 -0
- package/plugins/blockquote/types.js +6 -0
- package/plugins/button/constants.d.ts +2 -0
- package/plugins/button/constants.js +5 -0
- package/plugins/button/create-button-plugin.d.ts +2 -0
- package/plugins/button/create-button-plugin.js +11 -0
- package/plugins/button/index.d.ts +3 -0
- package/plugins/button/index.js +23 -0
- package/plugins/button/transforms/get-active-button.d.ts +2 -0
- package/plugins/button/transforms/get-active-button.js +9 -0
- package/plugins/button/transforms/index.d.ts +4 -0
- package/plugins/button/transforms/index.js +11 -0
- package/plugins/button/transforms/insert-button.d.ts +2 -0
- package/plugins/button/transforms/insert-button.js +16 -0
- package/plugins/button/transforms/is-button-active.d.ts +2 -0
- package/plugins/button/transforms/is-button-active.js +7 -0
- package/plugins/button/transforms/remove-selected-button.d.ts +2 -0
- package/plugins/button/transforms/remove-selected-button.js +13 -0
- package/plugins/button/transforms/update-button.d.ts +2 -0
- package/plugins/button/transforms/update-button.js +9 -0
- package/plugins/embedded/utils.d.ts +1 -0
- package/plugins/embedded/utils.js +7 -0
- package/plugins/embedded/video/create-video-plugin.d.ts +4 -0
- package/plugins/embedded/video/create-video-plugin.js +19 -0
- package/plugins/embedded/video/get-active-video.d.ts +2 -0
- package/plugins/embedded/video/get-active-video.js +9 -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 +30 -0
- package/plugins/heading/constants.d.ts +8 -0
- package/plugins/heading/constants.js +11 -0
- package/plugins/heading/create-headings-plugin.d.ts +8 -0
- package/plugins/heading/create-headings-plugin.js +40 -0
- package/plugins/highlight/createHighlightPlugin.d.ts +3 -0
- package/plugins/highlight/createHighlightPlugin.js +27 -0
- package/plugins/highlight/types.d.ts +10 -0
- package/plugins/highlight/types.js +4 -0
- package/plugins/image/create-image-plugin.d.ts +6 -0
- package/plugins/image/create-image-plugin.js +105 -0
- package/plugins/image/hooks/use-image-handlers.d.ts +5 -0
- package/plugins/image/hooks/use-image-handlers.js +19 -0
- package/plugins/image/transforms/get-active-image.d.ts +2 -0
- package/plugins/image/transforms/get-active-image.js +9 -0
- package/plugins/image/transforms/insert-image.d.ts +3 -0
- package/plugins/image/transforms/insert-image.js +19 -0
- package/plugins/image/transforms/is-image-active.d.ts +2 -0
- package/plugins/image/transforms/is-image-active.js +7 -0
- package/plugins/image/transforms/remove-selected-image.d.ts +2 -0
- package/plugins/image/transforms/remove-selected-image.js +13 -0
- package/plugins/image/transforms/update-image.d.ts +3 -0
- package/plugins/image/transforms/update-image.js +12 -0
- package/plugins/image/types.d.ts +12 -0
- package/plugins/image/types.js +6 -0
- package/plugins/image/utils/is-image-url.d.ts +2 -0
- package/plugins/image/utils/is-image-url.js +135 -0
- package/plugins/image/with-image.d.ts +7 -0
- package/plugins/image/with-image.js +19 -0
- package/plugins/image/with-paste-image-url.d.ts +7 -0
- package/plugins/image/with-paste-image-url.js +36 -0
- package/plugins/image/with-paste-image.d.ts +7 -0
- package/plugins/image/with-paste-image.js +49 -0
- package/plugins/link/constants.d.ts +2 -0
- package/plugins/link/constants.js +6 -0
- package/plugins/link/create-link-plugin.d.ts +3 -0
- package/plugins/link/create-link-plugin.js +15 -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 +11 -0
- package/plugins/link/hooks/use-link-actions.d.ts +12 -0
- package/plugins/link/hooks/use-link-actions.js +48 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.d.ts +1 -0
- package/plugins/link/hooks/use-link-cancel-on-escape.js +5 -0
- package/plugins/link/hooks/use-link-submit-on-enter.d.ts +1 -0
- package/plugins/link/hooks/use-link-submit-on-enter.js +23 -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 +15 -0
- package/plugins/link/transforms/submit-link.d.ts +8 -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 +6 -0
- package/plugins/link/transforms/unwrap-link.d.ts +2 -0
- package/plugins/link/transforms/unwrap-link.js +10 -0
- package/plugins/link/types.d.ts +5 -0
- package/plugins/link/types.js +2 -0
- package/plugins/list/constants.d.ts +4 -0
- package/plugins/list/constants.js +14 -0
- package/plugins/list/create-list-plugin.d.ts +4 -0
- package/plugins/list/create-list-plugin.js +16 -0
- package/plugins/mark-bold/create-bold-plugin.d.ts +3 -0
- package/plugins/mark-bold/create-bold-plugin.js +6 -0
- package/plugins/mark-bold/types.d.ts +2 -0
- package/plugins/mark-bold/types.js +6 -0
- package/plugins/mark-code/create-code-plugin.d.ts +3 -0
- package/plugins/mark-code/create-code-plugin.js +6 -0
- package/plugins/mark-code/types.d.ts +2 -0
- package/plugins/mark-code/types.js +6 -0
- package/plugins/mark-italic/create-italic-plugin.d.ts +3 -0
- package/plugins/mark-italic/create-italic-plugin.js +6 -0
- package/plugins/mark-italic/types.d.ts +2 -0
- package/plugins/mark-italic/types.js +6 -0
- package/plugins/mark-underline/create-underline-plugin.d.ts +3 -0
- package/plugins/mark-underline/create-underline-plugin.js +6 -0
- package/plugins/mark-underline/types.d.ts +2 -0
- package/plugins/mark-underline/types.js +6 -0
- package/plugins/node-id/add-ids-to-nodes.d.ts +2 -0
- package/plugins/node-id/add-ids-to-nodes.js +22 -0
- package/plugins/node-id/create-node-id-plugin.d.ts +3 -0
- package/plugins/node-id/create-node-id-plugin.js +6 -0
- package/plugins/paragraph/create-paragraph-plugin.d.ts +3 -0
- package/plugins/paragraph/create-paragraph-plugin.js +9 -0
- package/plugins/paragraph/types.d.ts +2 -0
- package/plugins/paragraph/types.js +6 -0
- package/plugins/reset-node/create-reset-node.d.ts +3 -0
- package/plugins/reset-node/create-reset-node.js +28 -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 +14 -0
- package/plugins/soft-break/create-soft-break-plugin.d.ts +3 -0
- package/plugins/soft-break/create-soft-break-plugin.js +22 -0
- package/plugins/trailing-block/create-trailing-block-plugin.d.ts +3 -0
- package/plugins/trailing-block/create-trailing-block-plugin.js +6 -0
- package/serializers/serialize-to-plaintext.d.ts +2 -0
- package/serializers/serialize-to-plaintext.js +8 -0
- package/types.d.ts +118 -0
- package/types.js +2 -0
- package/ui/blockquote-element.d.ts +2 -0
- package/ui/blockquote-element.js +13 -0
- package/ui/bold-mark.d.ts +2 -0
- package/ui/bold-mark.js +13 -0
- package/ui/button/button-element.d.ts +2 -0
- package/ui/button/button-element.js +54 -0
- package/ui/button/index.d.ts +1 -0
- package/ui/button/index.js +5 -0
- package/ui/button/insert-button-modal-content.d.ts +8 -0
- package/ui/button/insert-button-modal-content.js +81 -0
- package/ui/code-mark.d.ts +2 -0
- package/ui/code-mark.js +13 -0
- package/ui/components/element/element-action-buttons.d.ts +9 -0
- package/ui/components/element/element-action-buttons.js +22 -0
- package/ui/components/element/element-with-action-buttons.d.ts +10 -0
- package/ui/components/element/element-with-action-buttons.js +17 -0
- package/ui/components/modal/modal-button-cancel.d.ts +9 -0
- package/ui/components/modal/modal-button-cancel.js +45 -0
- package/ui/components/modal/modal-button-submit.d.ts +6 -0
- package/ui/components/modal/modal-button-submit.js +12 -0
- package/ui/components/modal/modal-buttons.d.ts +11 -0
- package/ui/components/modal/modal-buttons.js +16 -0
- package/ui/components/modal/modal-content.d.ts +6 -0
- package/ui/components/modal/modal-content.js +14 -0
- package/ui/create-uxf-ui.d.ts +21 -0
- package/ui/create-uxf-ui.js +51 -0
- package/ui/floating-link.d.ts +2 -0
- package/ui/floating-link.js +110 -0
- package/ui/heading-elements.d.ts +7 -0
- package/ui/heading-elements.js +38 -0
- package/ui/highlight-mark.d.ts +3 -0
- package/ui/highlight-mark.js +13 -0
- package/ui/image/image-element.d.ts +2 -0
- package/ui/image/image-element.js +53 -0
- package/ui/image/insert-image-modal-content.d.ts +8 -0
- package/ui/image/insert-image-modal-content.js +89 -0
- package/ui/italic-mark.d.ts +2 -0
- package/ui/italic-mark.js +13 -0
- package/ui/link-element.d.ts +3 -0
- package/ui/link-element.js +14 -0
- package/ui/list-item-element.d.ts +2 -0
- package/ui/list-item-element.js +13 -0
- package/ui/list-ordered-element.d.ts +2 -0
- package/ui/list-ordered-element.js +13 -0
- package/ui/list-unordered-element.d.ts +2 -0
- package/ui/list-unordered-element.js +13 -0
- package/ui/paragraph-element.d.ts +2 -0
- package/ui/paragraph-element.js +13 -0
- package/ui/toolbar/buttons/button-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/button-toolbar-button.js +20 -0
- package/ui/toolbar/buttons/element-toolbar-button.d.ts +12 -0
- package/ui/toolbar/buttons/element-toolbar-button.js +25 -0
- package/ui/toolbar/buttons/image-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/image-toolbar-button.js +20 -0
- package/ui/toolbar/buttons/link-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/link-toolbar-button.js +29 -0
- package/ui/toolbar/buttons/list-toolbar-button.d.ts +13 -0
- package/ui/toolbar/buttons/list-toolbar-button.js +27 -0
- package/ui/toolbar/buttons/mark-toolbar-button.d.ts +13 -0
- package/ui/toolbar/buttons/mark-toolbar-button.js +25 -0
- package/ui/toolbar/buttons/modal-toolbar-button.d.ts +15 -0
- package/ui/toolbar/buttons/modal-toolbar-button.js +22 -0
- package/ui/toolbar/buttons/toolbar-button.d.ts +15 -0
- package/ui/toolbar/buttons/toolbar-button.js +35 -0
- package/ui/toolbar/buttons/undo-redo-button-group.d.ts +8 -0
- package/ui/toolbar/buttons/undo-redo-button-group.js +64 -0
- package/ui/toolbar/buttons/video-toolbar-button.d.ts +10 -0
- package/ui/toolbar/buttons/video-toolbar-button.js +20 -0
- package/ui/toolbar/toolbar.d.ts +3 -0
- package/ui/toolbar/toolbar.js +77 -0
- package/ui/toolbar/types.d.ts +8 -0
- package/ui/toolbar/types.js +2 -0
- package/ui/underline-mark.d.ts +2 -0
- package/ui/underline-mark.js +13 -0
- package/ui/utils.d.ts +2 -0
- package/ui/utils.js +13 -0
- package/ui/video/insert-video-modal-content.d.ts +8 -0
- package/ui/video/insert-video-modal-content.js +80 -0
- package/ui/video/video-element.d.ts +2 -0
- package/ui/video/video-element.js +55 -0
- package/utils/get-video-meta-data.d.ts +2 -0
- package/utils/get-video-meta-data.js +41 -0
- package/utils/url-helper.d.ts +7 -0
- package/utils/url-helper.js +15 -0
- package/utils/url-helper.test.d.ts +1 -0
- package/utils/url-helper.test.js +37 -0
- package/utils.d.ts +30 -0
- package/utils.js +88 -0
- package/wysiwyg-editor.d.ts +15 -0
- package/wysiwyg-editor.js +42 -0
- package/wysiwyg-editor.stories.d.ts +5 -0
- package/wysiwyg-editor.stories.js +193 -0
package/components.d.ts
ADDED
package/components.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.components = void 0;
|
|
27
|
+
// generated file
|
|
28
|
+
const wysiwygEditorStories = __importStar(require("./wysiwyg-editor.stories"));
|
|
29
|
+
exports.components = {
|
|
30
|
+
"wysiwyg-editor": {
|
|
31
|
+
title: "WysiwygEditor",
|
|
32
|
+
stories: wysiwygEditorStories
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly "arrow-left": {
|
|
3
|
+
readonly w: 448;
|
|
4
|
+
readonly h: 512;
|
|
5
|
+
};
|
|
6
|
+
readonly "arrow-right": {
|
|
7
|
+
readonly w: 448;
|
|
8
|
+
readonly h: 512;
|
|
9
|
+
};
|
|
10
|
+
readonly calendar: {
|
|
11
|
+
readonly w: 448;
|
|
12
|
+
readonly h: 512;
|
|
13
|
+
};
|
|
14
|
+
readonly camera: {
|
|
15
|
+
readonly w: 512;
|
|
16
|
+
readonly h: 512;
|
|
17
|
+
};
|
|
18
|
+
readonly caretDown: {
|
|
19
|
+
readonly w: 320;
|
|
20
|
+
readonly h: 512;
|
|
21
|
+
};
|
|
22
|
+
readonly clock: {
|
|
23
|
+
readonly w: 512;
|
|
24
|
+
readonly h: 512;
|
|
25
|
+
};
|
|
26
|
+
readonly bars: {
|
|
27
|
+
readonly w: 448;
|
|
28
|
+
readonly h: 512;
|
|
29
|
+
};
|
|
30
|
+
readonly check: {
|
|
31
|
+
readonly w: 512;
|
|
32
|
+
readonly h: 512;
|
|
33
|
+
};
|
|
34
|
+
readonly chevronDown: {
|
|
35
|
+
readonly w: 512;
|
|
36
|
+
readonly h: 512;
|
|
37
|
+
};
|
|
38
|
+
readonly chevronLeft: {
|
|
39
|
+
readonly w: 384;
|
|
40
|
+
readonly h: 512;
|
|
41
|
+
};
|
|
42
|
+
readonly chevronsLeft: {
|
|
43
|
+
readonly w: 512;
|
|
44
|
+
readonly h: 512;
|
|
45
|
+
};
|
|
46
|
+
readonly chevronRight: {
|
|
47
|
+
readonly w: 384;
|
|
48
|
+
readonly h: 512;
|
|
49
|
+
};
|
|
50
|
+
readonly chevronsRight: {
|
|
51
|
+
readonly w: 512;
|
|
52
|
+
readonly h: 512;
|
|
53
|
+
};
|
|
54
|
+
readonly chevronUp: {
|
|
55
|
+
readonly w: 512;
|
|
56
|
+
readonly h: 512;
|
|
57
|
+
};
|
|
58
|
+
readonly cloud: {
|
|
59
|
+
readonly w: 640;
|
|
60
|
+
readonly h: 512;
|
|
61
|
+
};
|
|
62
|
+
readonly copy: {
|
|
63
|
+
readonly w: 512;
|
|
64
|
+
readonly h: 512;
|
|
65
|
+
};
|
|
66
|
+
readonly "ellipsis-vertical": {
|
|
67
|
+
readonly w: 128;
|
|
68
|
+
readonly h: 512;
|
|
69
|
+
};
|
|
70
|
+
readonly file: {
|
|
71
|
+
readonly w: 384;
|
|
72
|
+
readonly h: 512;
|
|
73
|
+
};
|
|
74
|
+
readonly imageFile: {
|
|
75
|
+
readonly w: 384;
|
|
76
|
+
readonly h: 512;
|
|
77
|
+
};
|
|
78
|
+
readonly videoFile: {
|
|
79
|
+
readonly w: 384;
|
|
80
|
+
readonly h: 512;
|
|
81
|
+
};
|
|
82
|
+
readonly user: {
|
|
83
|
+
readonly w: 448;
|
|
84
|
+
readonly h: 512;
|
|
85
|
+
};
|
|
86
|
+
readonly xmarkLarge: {
|
|
87
|
+
readonly w: 448;
|
|
88
|
+
readonly h: 512;
|
|
89
|
+
};
|
|
90
|
+
readonly h1: {
|
|
91
|
+
readonly w: 576;
|
|
92
|
+
readonly h: 512;
|
|
93
|
+
};
|
|
94
|
+
readonly h2: {
|
|
95
|
+
readonly w: 640;
|
|
96
|
+
readonly h: 512;
|
|
97
|
+
};
|
|
98
|
+
readonly h3: {
|
|
99
|
+
readonly w: 640;
|
|
100
|
+
readonly h: 512;
|
|
101
|
+
};
|
|
102
|
+
readonly h4: {
|
|
103
|
+
readonly w: 640;
|
|
104
|
+
readonly h: 512;
|
|
105
|
+
};
|
|
106
|
+
readonly h5: {
|
|
107
|
+
readonly w: 640;
|
|
108
|
+
readonly h: 512;
|
|
109
|
+
};
|
|
110
|
+
readonly h6: {
|
|
111
|
+
readonly w: 640;
|
|
112
|
+
readonly h: 512;
|
|
113
|
+
};
|
|
114
|
+
readonly bold: {
|
|
115
|
+
readonly w: 384;
|
|
116
|
+
readonly h: 512;
|
|
117
|
+
};
|
|
118
|
+
readonly italic: {
|
|
119
|
+
readonly w: 384;
|
|
120
|
+
readonly h: 512;
|
|
121
|
+
};
|
|
122
|
+
readonly underline: {
|
|
123
|
+
readonly w: 448;
|
|
124
|
+
readonly h: 512;
|
|
125
|
+
};
|
|
126
|
+
readonly ol: {
|
|
127
|
+
readonly w: 512;
|
|
128
|
+
readonly h: 512;
|
|
129
|
+
};
|
|
130
|
+
readonly ul: {
|
|
131
|
+
readonly w: 576;
|
|
132
|
+
readonly h: 512;
|
|
133
|
+
};
|
|
134
|
+
readonly "code-simple": {
|
|
135
|
+
readonly w: 576;
|
|
136
|
+
readonly h: 512;
|
|
137
|
+
};
|
|
138
|
+
readonly link: {
|
|
139
|
+
readonly w: 640;
|
|
140
|
+
readonly h: 512;
|
|
141
|
+
};
|
|
142
|
+
readonly image: {
|
|
143
|
+
readonly w: 512;
|
|
144
|
+
readonly h: 512;
|
|
145
|
+
};
|
|
146
|
+
readonly youtube: {
|
|
147
|
+
readonly w: 576;
|
|
148
|
+
readonly h: 512;
|
|
149
|
+
};
|
|
150
|
+
readonly "block-quote": {
|
|
151
|
+
readonly w: 576;
|
|
152
|
+
readonly h: 512;
|
|
153
|
+
};
|
|
154
|
+
readonly "arrow-turn-down-left": {
|
|
155
|
+
readonly w: 512;
|
|
156
|
+
readonly h: 512;
|
|
157
|
+
};
|
|
158
|
+
readonly "arrow-turn-down-right": {
|
|
159
|
+
readonly w: 512;
|
|
160
|
+
readonly h: 512;
|
|
161
|
+
};
|
|
162
|
+
readonly "rectangle-wide": {
|
|
163
|
+
readonly w: 640;
|
|
164
|
+
readonly h: 512;
|
|
165
|
+
};
|
|
166
|
+
readonly edit: {
|
|
167
|
+
readonly w: 512;
|
|
168
|
+
readonly h: 512;
|
|
169
|
+
};
|
|
170
|
+
readonly delete: {
|
|
171
|
+
readonly w: 448;
|
|
172
|
+
readonly h: 512;
|
|
173
|
+
};
|
|
174
|
+
readonly "open-link-in-new-tab": {
|
|
175
|
+
readonly w: 512;
|
|
176
|
+
readonly h: 512;
|
|
177
|
+
};
|
|
178
|
+
readonly "highlighter-line": {
|
|
179
|
+
readonly w: 576;
|
|
180
|
+
readonly h: 512;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export type IconsSet = keyof typeof ICONS;
|
package/config/icons.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
"arrow-left": { w: 448, h: 512 },
|
|
7
|
+
"arrow-right": { w: 448, h: 512 },
|
|
8
|
+
"calendar": { w: 448, h: 512 },
|
|
9
|
+
"camera": { w: 512, h: 512 },
|
|
10
|
+
"caretDown": { w: 320, h: 512 },
|
|
11
|
+
"clock": { w: 512, h: 512 },
|
|
12
|
+
"bars": { w: 448, h: 512 },
|
|
13
|
+
"check": { w: 512, h: 512 },
|
|
14
|
+
"chevronDown": { w: 512, h: 512 },
|
|
15
|
+
"chevronLeft": { w: 384, h: 512 },
|
|
16
|
+
"chevronsLeft": { w: 512, h: 512 },
|
|
17
|
+
"chevronRight": { w: 384, h: 512 },
|
|
18
|
+
"chevronsRight": { w: 512, h: 512 },
|
|
19
|
+
"chevronUp": { w: 512, h: 512 },
|
|
20
|
+
"cloud": { w: 640, h: 512 },
|
|
21
|
+
"copy": { w: 512, h: 512 },
|
|
22
|
+
"ellipsis-vertical": { w: 128, h: 512 },
|
|
23
|
+
"file": { w: 384, h: 512 },
|
|
24
|
+
"imageFile": { w: 384, h: 512 },
|
|
25
|
+
"videoFile": { w: 384, h: 512 },
|
|
26
|
+
"user": { w: 448, h: 512 },
|
|
27
|
+
"xmarkLarge": { w: 448, h: 512 },
|
|
28
|
+
"h1": { w: 576, h: 512 },
|
|
29
|
+
"h2": { w: 640, h: 512 },
|
|
30
|
+
"h3": { w: 640, h: 512 },
|
|
31
|
+
"h4": { w: 640, h: 512 },
|
|
32
|
+
"h5": { w: 640, h: 512 },
|
|
33
|
+
"h6": { w: 640, h: 512 },
|
|
34
|
+
"bold": { w: 384, h: 512 },
|
|
35
|
+
"italic": { w: 384, h: 512 },
|
|
36
|
+
"underline": { w: 448, h: 512 },
|
|
37
|
+
"ol": { w: 512, h: 512 },
|
|
38
|
+
"ul": { w: 576, h: 512 },
|
|
39
|
+
"code-simple": { w: 576, h: 512 },
|
|
40
|
+
"link": { w: 640, h: 512 },
|
|
41
|
+
"image": { w: 512, h: 512 },
|
|
42
|
+
"youtube": { w: 576, h: 512 },
|
|
43
|
+
"block-quote": { w: 576, h: 512 },
|
|
44
|
+
"arrow-turn-down-left": { w: 512, h: 512 },
|
|
45
|
+
"arrow-turn-down-right": { w: 512, h: 512 },
|
|
46
|
+
"rectangle-wide": { w: 640, h: 512 },
|
|
47
|
+
"edit": { w: 512, h: 512 },
|
|
48
|
+
"delete": { w: 448, h: 512 },
|
|
49
|
+
"open-link-in-new-tab": { w: 512, h: 512 },
|
|
50
|
+
"highlighter-line": { w: 576, h: 512 },
|
|
51
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { HeadingsPluginOptions } from "./plugins/heading/create-headings-plugin";
|
|
3
|
+
import { UxfImagePluginOptions } from "./plugins/image/types";
|
|
4
|
+
import { ElementUiComponent } from "./types";
|
|
5
|
+
export declare const createHeadingsPluginWithUi: (options?: HeadingsPluginOptions) => {
|
|
6
|
+
plugin: import("@udecode/plate-core").PlatePlugin<HeadingsPluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
7
|
+
components: {
|
|
8
|
+
[key: string]: ElementUiComponent;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const createBlockquotePluginWithUi: () => {
|
|
12
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").HotkeyPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
13
|
+
component: ElementUiComponent;
|
|
14
|
+
};
|
|
15
|
+
export declare const createBoldPluginWithUi: () => {
|
|
16
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
17
|
+
component: import("./types").LeafUiComponent;
|
|
18
|
+
};
|
|
19
|
+
export declare const createHighlightPluginWithUi: (color?: CSSProperties["color"]) => {
|
|
20
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("./plugins/highlight/types").HighlightPluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
21
|
+
component: import("react").FC<import("./plugins/highlight/types").HighlightLeafElementProps>;
|
|
22
|
+
};
|
|
23
|
+
export declare const createItalicPluginWithUi: () => {
|
|
24
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
25
|
+
component: ElementUiComponent;
|
|
26
|
+
};
|
|
27
|
+
export declare const createUnderlinePluginWithUi: () => {
|
|
28
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
29
|
+
component: import("./types").LeafUiComponent;
|
|
30
|
+
};
|
|
31
|
+
export declare const createCodePluginWithUi: () => {
|
|
32
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
33
|
+
component: import("./types").LeafUiComponent;
|
|
34
|
+
};
|
|
35
|
+
export declare const createListPluginWithUi: () => {
|
|
36
|
+
plugin: import("./types").UxfPlatePlugin<import("@udecode/plate-list").ListPlugin>;
|
|
37
|
+
components: {
|
|
38
|
+
ul: ElementUiComponent;
|
|
39
|
+
ol: ElementUiComponent;
|
|
40
|
+
li: ElementUiComponent;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const createLinkPluginWithUi: () => {
|
|
44
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-link").LinkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
|
|
45
|
+
component: ElementUiComponent<import("./plugins/link/types").TLinkElement>;
|
|
46
|
+
};
|
|
47
|
+
export declare const createImagePluginWithUi: (options: UxfImagePluginOptions) => {
|
|
48
|
+
plugin: import("@udecode/plate-core").PlatePlugin<UxfImagePluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
49
|
+
component: ElementUiComponent<import("./types").UxfImageElement>;
|
|
50
|
+
};
|
|
51
|
+
export declare const createVideoPluginWithUi: () => {
|
|
52
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-media").MediaPlugin, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
53
|
+
component: ElementUiComponent<import("./types").UxfVideoElement>;
|
|
54
|
+
};
|
|
55
|
+
export declare const createButtonPluginWithUi: () => {
|
|
56
|
+
plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
|
|
57
|
+
component: ElementUiComponent<import("./types").UxfButtonElement>;
|
|
58
|
+
};
|
|
59
|
+
export interface CreateAllPluginsOptions {
|
|
60
|
+
image: UxfImagePluginOptions;
|
|
61
|
+
headings?: HeadingsPluginOptions;
|
|
62
|
+
highlightColor?: CSSProperties["color"];
|
|
63
|
+
}
|
|
64
|
+
export declare const createAllPluginsWithUi: (options: CreateAllPluginsOptions) => import("./types").UxfPlatePlugin[];
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAllPluginsWithUi = exports.createButtonPluginWithUi = exports.createVideoPluginWithUi = exports.createImagePluginWithUi = exports.createLinkPluginWithUi = exports.createListPluginWithUi = exports.createCodePluginWithUi = exports.createUnderlinePluginWithUi = exports.createItalicPluginWithUi = exports.createHighlightPluginWithUi = exports.createBoldPluginWithUi = exports.createBlockquotePluginWithUi = exports.createHeadingsPluginWithUi = void 0;
|
|
4
|
+
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
5
|
+
const tw_colors_1 = require("@uxf/ui/tw-tokens/tw-colors");
|
|
6
|
+
const create_plugins_with_ui_1 = require("./create-plugins-with-ui");
|
|
7
|
+
const create_blockquote_plugin_1 = require("./plugins/blockquote/create-blockquote-plugin");
|
|
8
|
+
const button_1 = require("./plugins/button");
|
|
9
|
+
const create_video_plugin_1 = require("./plugins/embedded/video/create-video-plugin");
|
|
10
|
+
const constants_1 = require("./plugins/heading/constants");
|
|
11
|
+
const create_headings_plugin_1 = require("./plugins/heading/create-headings-plugin");
|
|
12
|
+
const createHighlightPlugin_1 = require("./plugins/highlight/createHighlightPlugin");
|
|
13
|
+
const create_image_plugin_1 = require("./plugins/image/create-image-plugin");
|
|
14
|
+
const create_link_plugin_1 = require("./plugins/link/create-link-plugin");
|
|
15
|
+
const create_list_plugin_1 = require("./plugins/list/create-list-plugin");
|
|
16
|
+
const create_bold_plugin_1 = require("./plugins/mark-bold/create-bold-plugin");
|
|
17
|
+
const create_code_plugin_1 = require("./plugins/mark-code/create-code-plugin");
|
|
18
|
+
const create_italic_plugin_1 = require("./plugins/mark-italic/create-italic-plugin");
|
|
19
|
+
const create_underline_plugin_1 = require("./plugins/mark-underline/create-underline-plugin");
|
|
20
|
+
const blockquote_element_1 = require("./ui/blockquote-element");
|
|
21
|
+
const bold_mark_1 = require("./ui/bold-mark");
|
|
22
|
+
const button_2 = require("./ui/button");
|
|
23
|
+
const code_mark_1 = require("./ui/code-mark");
|
|
24
|
+
const heading_elements_1 = require("./ui/heading-elements");
|
|
25
|
+
const highlight_mark_1 = require("./ui/highlight-mark");
|
|
26
|
+
const image_element_1 = require("./ui/image/image-element");
|
|
27
|
+
const italic_mark_1 = require("./ui/italic-mark");
|
|
28
|
+
const link_element_1 = require("./ui/link-element");
|
|
29
|
+
const list_item_element_1 = require("./ui/list-item-element");
|
|
30
|
+
const list_ordered_element_1 = require("./ui/list-ordered-element");
|
|
31
|
+
const list_unordered_element_1 = require("./ui/list-unordered-element");
|
|
32
|
+
const underline_mark_1 = require("./ui/underline-mark");
|
|
33
|
+
const video_element_1 = require("./ui/video/video-element");
|
|
34
|
+
const createHeadingsPluginWithUi = (options) => {
|
|
35
|
+
var _a;
|
|
36
|
+
const disabledLevels = (_a = options === null || options === void 0 ? void 0 : options.disabledLevels) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY;
|
|
37
|
+
const isDisabled = (level) => disabledLevels.findIndex((e) => e === level) !== -1;
|
|
38
|
+
const components = {};
|
|
39
|
+
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];
|
|
40
|
+
for (let level = 1; level <= 6; level++) {
|
|
41
|
+
if (isDisabled(level)) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
components[constants_1.KEYS_HEADING[level - 1]] = elementsByKey[level - 1];
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
plugin: (0, create_headings_plugin_1.createHeadingsPlugin)({ options }),
|
|
48
|
+
components,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.createHeadingsPluginWithUi = createHeadingsPluginWithUi;
|
|
52
|
+
const createBlockquotePluginWithUi = () => ({
|
|
53
|
+
plugin: (0, create_blockquote_plugin_1.createBlockquotePlugin)(),
|
|
54
|
+
component: blockquote_element_1.BlockquoteElement,
|
|
55
|
+
});
|
|
56
|
+
exports.createBlockquotePluginWithUi = createBlockquotePluginWithUi;
|
|
57
|
+
const createBoldPluginWithUi = () => ({
|
|
58
|
+
plugin: (0, create_bold_plugin_1.createBoldPlugin)(),
|
|
59
|
+
component: bold_mark_1.BoldMark,
|
|
60
|
+
});
|
|
61
|
+
exports.createBoldPluginWithUi = createBoldPluginWithUi;
|
|
62
|
+
const createHighlightPluginWithUi = (color = tw_colors_1.twColors.yellow["300"]) => ({
|
|
63
|
+
plugin: (0, createHighlightPlugin_1.createHighlightPlugin)(color),
|
|
64
|
+
component: highlight_mark_1.HighlightMark,
|
|
65
|
+
});
|
|
66
|
+
exports.createHighlightPluginWithUi = createHighlightPluginWithUi;
|
|
67
|
+
const createItalicPluginWithUi = () => ({
|
|
68
|
+
plugin: (0, create_italic_plugin_1.createItalicPlugin)(),
|
|
69
|
+
component: italic_mark_1.ItalicMark,
|
|
70
|
+
});
|
|
71
|
+
exports.createItalicPluginWithUi = createItalicPluginWithUi;
|
|
72
|
+
const createUnderlinePluginWithUi = () => ({
|
|
73
|
+
plugin: (0, create_underline_plugin_1.createUnderlinePlugin)(),
|
|
74
|
+
component: underline_mark_1.UnderlineMark,
|
|
75
|
+
});
|
|
76
|
+
exports.createUnderlinePluginWithUi = createUnderlinePluginWithUi;
|
|
77
|
+
const createCodePluginWithUi = () => ({
|
|
78
|
+
plugin: (0, create_code_plugin_1.createCodePlugin)(),
|
|
79
|
+
component: code_mark_1.CodeMark,
|
|
80
|
+
});
|
|
81
|
+
exports.createCodePluginWithUi = createCodePluginWithUi;
|
|
82
|
+
const createListPluginWithUi = () => ({
|
|
83
|
+
plugin: (0, create_list_plugin_1.createListPlugin)(),
|
|
84
|
+
components: {
|
|
85
|
+
ul: list_unordered_element_1.ListUnorderedElement,
|
|
86
|
+
ol: list_ordered_element_1.ListOrderedElement,
|
|
87
|
+
li: list_item_element_1.ListItemElement,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
exports.createListPluginWithUi = createListPluginWithUi;
|
|
91
|
+
const createLinkPluginWithUi = () => ({
|
|
92
|
+
plugin: (0, create_link_plugin_1.createLinkPlugin)(),
|
|
93
|
+
component: link_element_1.LinkElement,
|
|
94
|
+
});
|
|
95
|
+
exports.createLinkPluginWithUi = createLinkPluginWithUi;
|
|
96
|
+
const createImagePluginWithUi = (options) => ({
|
|
97
|
+
plugin: (0, create_image_plugin_1.createImagePlugin)({
|
|
98
|
+
options,
|
|
99
|
+
}),
|
|
100
|
+
component: image_element_1.ImageElement,
|
|
101
|
+
});
|
|
102
|
+
exports.createImagePluginWithUi = createImagePluginWithUi;
|
|
103
|
+
const createVideoPluginWithUi = () => ({
|
|
104
|
+
plugin: (0, create_video_plugin_1.createVideoPlugin)(),
|
|
105
|
+
component: video_element_1.VideoElement,
|
|
106
|
+
});
|
|
107
|
+
exports.createVideoPluginWithUi = createVideoPluginWithUi;
|
|
108
|
+
const createButtonPluginWithUi = () => ({
|
|
109
|
+
plugin: (0, button_1.createButtonPlugin)(),
|
|
110
|
+
component: button_2.ButtonElement,
|
|
111
|
+
});
|
|
112
|
+
exports.createButtonPluginWithUi = createButtonPluginWithUi;
|
|
113
|
+
const createAllPluginsWithUi = (options) => (0, create_plugins_with_ui_1.createPluginsWithUi)([
|
|
114
|
+
(0, exports.createHeadingsPluginWithUi)(options.headings),
|
|
115
|
+
(0, exports.createBlockquotePluginWithUi)(),
|
|
116
|
+
(0, exports.createBoldPluginWithUi)(),
|
|
117
|
+
(0, exports.createItalicPluginWithUi)(),
|
|
118
|
+
(0, exports.createUnderlinePluginWithUi)(),
|
|
119
|
+
(0, exports.createCodePluginWithUi)(),
|
|
120
|
+
(0, exports.createListPluginWithUi)(),
|
|
121
|
+
(0, exports.createLinkPluginWithUi)(),
|
|
122
|
+
(0, exports.createImagePluginWithUi)(options.image),
|
|
123
|
+
(0, exports.createVideoPluginWithUi)(),
|
|
124
|
+
(0, exports.createButtonPluginWithUi)(),
|
|
125
|
+
(0, exports.createHighlightPluginWithUi)(options.highlightColor),
|
|
126
|
+
]);
|
|
127
|
+
exports.createAllPluginsWithUi = createAllPluginsWithUi;
|
|
@@ -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,47 @@
|
|
|
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 /* TODO: fix this type mismatch */,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.createPluginsWithUi = createPluginsWithUi;
|
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,20 @@
|
|
|
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; } });
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createAllPluginsWithUi, createBlockquotePluginWithUi, createBoldPluginWithUi, createButtonPluginWithUi, createCodePluginWithUi, createHeadingsPluginWithUi, createHighlightPluginWithUi, createImagePluginWithUi, createItalicPluginWithUi, createLinkPluginWithUi, createListPluginWithUi, createUnderlinePluginWithUi, createVideoPluginWithUi, type CreateAllPluginsOptions, } from "./create-all-plugins-with-ui";
|
|
2
|
+
export * from "./hooks";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export * from "./utils";
|
|
5
|
+
export { WysiwygEditor } from "./wysiwyg-editor";
|
|
6
|
+
export { createPluginsWithUi } from "./create-plugins-with-ui";
|
package/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createPluginsWithUi = exports.WysiwygEditor = exports.createVideoPluginWithUi = exports.createUnderlinePluginWithUi = exports.createListPluginWithUi = exports.createLinkPluginWithUi = exports.createItalicPluginWithUi = exports.createImagePluginWithUi = exports.createHighlightPluginWithUi = exports.createHeadingsPluginWithUi = exports.createCodePluginWithUi = exports.createButtonPluginWithUi = exports.createBoldPluginWithUi = exports.createBlockquotePluginWithUi = exports.createAllPluginsWithUi = void 0;
|
|
18
|
+
var create_all_plugins_with_ui_1 = require("./create-all-plugins-with-ui");
|
|
19
|
+
Object.defineProperty(exports, "createAllPluginsWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createAllPluginsWithUi; } });
|
|
20
|
+
Object.defineProperty(exports, "createBlockquotePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createBlockquotePluginWithUi; } });
|
|
21
|
+
Object.defineProperty(exports, "createBoldPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createBoldPluginWithUi; } });
|
|
22
|
+
Object.defineProperty(exports, "createButtonPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createButtonPluginWithUi; } });
|
|
23
|
+
Object.defineProperty(exports, "createCodePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createCodePluginWithUi; } });
|
|
24
|
+
Object.defineProperty(exports, "createHeadingsPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createHeadingsPluginWithUi; } });
|
|
25
|
+
Object.defineProperty(exports, "createHighlightPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createHighlightPluginWithUi; } });
|
|
26
|
+
Object.defineProperty(exports, "createImagePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createImagePluginWithUi; } });
|
|
27
|
+
Object.defineProperty(exports, "createItalicPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createItalicPluginWithUi; } });
|
|
28
|
+
Object.defineProperty(exports, "createLinkPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createLinkPluginWithUi; } });
|
|
29
|
+
Object.defineProperty(exports, "createListPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createListPluginWithUi; } });
|
|
30
|
+
Object.defineProperty(exports, "createUnderlinePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createUnderlinePluginWithUi; } });
|
|
31
|
+
Object.defineProperty(exports, "createVideoPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createVideoPluginWithUi; } });
|
|
32
|
+
__exportStar(require("./hooks"), exports);
|
|
33
|
+
__exportStar(require("./types"), exports);
|
|
34
|
+
__exportStar(require("./utils"), exports);
|
|
35
|
+
var wysiwyg_editor_1 = require("./wysiwyg-editor");
|
|
36
|
+
Object.defineProperty(exports, "WysiwygEditor", { enumerable: true, get: function () { return wysiwyg_editor_1.WysiwygEditor; } });
|
|
37
|
+
var create_plugins_with_ui_1 = require("./create-plugins-with-ui");
|
|
38
|
+
Object.defineProperty(exports, "createPluginsWithUi", { enumerable: true, get: function () { return create_plugins_with_ui_1.createPluginsWithUi; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/wysiwyg",
|
|
3
|
-
"version": "11.74.
|
|
3
|
+
"version": "11.74.1",
|
|
4
4
|
"description": "UXF Wysiwyg editor",
|
|
5
5
|
"author": "Robin Dvorak <dvorak@uxf.cz>",
|
|
6
6
|
"homepage": "https://gitlab.com/uxf-npm/wysiwyg",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@udecode/plate-select": "20.7.2",
|
|
27
27
|
"@udecode/plate-trailing-block": "20.7.2",
|
|
28
28
|
"@uxf/core": "11.72.3",
|
|
29
|
-
"@uxf/core-react": "11.74.
|
|
30
|
-
"@uxf/ui": "11.74.
|
|
29
|
+
"@uxf/core-react": "11.74.1",
|
|
30
|
+
"@uxf/ui": "11.74.1",
|
|
31
31
|
"slate": "0.90.0",
|
|
32
32
|
"slate-history": "0.86.0",
|
|
33
33
|
"slate-hyperscript": "0.77.0",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBlockquotePlugin = void 0;
|
|
4
|
+
const plate_block_quote_1 = require("@udecode/plate-block-quote");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const createBlockquotePlugin = () => (0, plate_block_quote_1.createBlockquotePlugin)({
|
|
7
|
+
type: types_1.BLOCKQUOTE_PLUGIN_TYPE,
|
|
8
|
+
});
|
|
9
|
+
exports.createBlockquotePlugin = createBlockquotePlugin;
|