@uxf/wysiwyg 11.74.0 → 11.74.2

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.
Files changed (245) hide show
  1. package/components.d.ts +7 -0
  2. package/components.js +34 -0
  3. package/config/icons-config.d.ts +2 -0
  4. package/config/icons-config.js +5 -0
  5. package/config/icons.d.ts +183 -0
  6. package/config/icons.js +51 -0
  7. package/create-all-plugins-with-ui.d.ts +64 -0
  8. package/create-all-plugins-with-ui.js +127 -0
  9. package/create-plugins-with-ui.d.ts +4 -0
  10. package/create-plugins-with-ui.js +47 -0
  11. package/hooks.d.ts +9 -0
  12. package/hooks.js +20 -0
  13. package/index.d.ts +6 -0
  14. package/index.js +38 -0
  15. package/package.json +3 -3
  16. package/plugins/blockquote/create-blockquote-plugin.d.ts +3 -0
  17. package/plugins/blockquote/create-blockquote-plugin.js +9 -0
  18. package/plugins/blockquote/types.d.ts +2 -0
  19. package/plugins/blockquote/types.js +6 -0
  20. package/plugins/button/constants.d.ts +2 -0
  21. package/plugins/button/constants.js +5 -0
  22. package/plugins/button/create-button-plugin.d.ts +2 -0
  23. package/plugins/button/create-button-plugin.js +11 -0
  24. package/plugins/button/index.d.ts +3 -0
  25. package/plugins/button/index.js +23 -0
  26. package/plugins/button/transforms/get-active-button.d.ts +2 -0
  27. package/plugins/button/transforms/get-active-button.js +9 -0
  28. package/plugins/button/transforms/index.d.ts +4 -0
  29. package/plugins/button/transforms/index.js +11 -0
  30. package/plugins/button/transforms/insert-button.d.ts +2 -0
  31. package/plugins/button/transforms/insert-button.js +16 -0
  32. package/plugins/button/transforms/is-button-active.d.ts +2 -0
  33. package/plugins/button/transforms/is-button-active.js +7 -0
  34. package/plugins/button/transforms/remove-selected-button.d.ts +2 -0
  35. package/plugins/button/transforms/remove-selected-button.js +13 -0
  36. package/plugins/button/transforms/update-button.d.ts +2 -0
  37. package/plugins/button/transforms/update-button.js +9 -0
  38. package/plugins/embedded/utils.d.ts +1 -0
  39. package/plugins/embedded/utils.js +7 -0
  40. package/plugins/embedded/video/create-video-plugin.d.ts +4 -0
  41. package/plugins/embedded/video/create-video-plugin.js +19 -0
  42. package/plugins/embedded/video/get-active-video.d.ts +2 -0
  43. package/plugins/embedded/video/get-active-video.js +9 -0
  44. package/plugins/embedded/video/insert-video.d.ts +2 -0
  45. package/plugins/embedded/video/insert-video.js +19 -0
  46. package/plugins/embedded/video/update-video.d.ts +2 -0
  47. package/plugins/embedded/video/update-video.js +12 -0
  48. package/plugins/exit-break/create-exit-break-plugin.d.ts +3 -0
  49. package/plugins/exit-break/create-exit-break-plugin.js +30 -0
  50. package/plugins/heading/constants.d.ts +8 -0
  51. package/plugins/heading/constants.js +11 -0
  52. package/plugins/heading/create-headings-plugin.d.ts +8 -0
  53. package/plugins/heading/create-headings-plugin.js +40 -0
  54. package/plugins/highlight/createHighlightPlugin.d.ts +3 -0
  55. package/plugins/highlight/createHighlightPlugin.js +27 -0
  56. package/plugins/highlight/types.d.ts +10 -0
  57. package/plugins/highlight/types.js +4 -0
  58. package/plugins/image/create-image-plugin.d.ts +6 -0
  59. package/plugins/image/create-image-plugin.js +105 -0
  60. package/plugins/image/hooks/use-image-handlers.d.ts +5 -0
  61. package/plugins/image/hooks/use-image-handlers.js +19 -0
  62. package/plugins/image/transforms/get-active-image.d.ts +2 -0
  63. package/plugins/image/transforms/get-active-image.js +9 -0
  64. package/plugins/image/transforms/insert-image.d.ts +3 -0
  65. package/plugins/image/transforms/insert-image.js +19 -0
  66. package/plugins/image/transforms/is-image-active.d.ts +2 -0
  67. package/plugins/image/transforms/is-image-active.js +7 -0
  68. package/plugins/image/transforms/remove-selected-image.d.ts +2 -0
  69. package/plugins/image/transforms/remove-selected-image.js +13 -0
  70. package/plugins/image/transforms/update-image.d.ts +3 -0
  71. package/plugins/image/transforms/update-image.js +12 -0
  72. package/plugins/image/types.d.ts +12 -0
  73. package/plugins/image/types.js +6 -0
  74. package/plugins/image/utils/is-image-url.d.ts +2 -0
  75. package/plugins/image/utils/is-image-url.js +135 -0
  76. package/plugins/image/with-image.d.ts +7 -0
  77. package/plugins/image/with-image.js +19 -0
  78. package/plugins/image/with-paste-image-url.d.ts +7 -0
  79. package/plugins/image/with-paste-image-url.js +36 -0
  80. package/plugins/image/with-paste-image.d.ts +7 -0
  81. package/plugins/image/with-paste-image.js +49 -0
  82. package/plugins/link/constants.d.ts +2 -0
  83. package/plugins/link/constants.js +6 -0
  84. package/plugins/link/create-link-plugin.d.ts +3 -0
  85. package/plugins/link/create-link-plugin.js +15 -0
  86. package/plugins/link/floating-link-wrapper.d.ts +11 -0
  87. package/plugins/link/floating-link-wrapper.js +26 -0
  88. package/plugins/link/hooks/index.d.ts +4 -0
  89. package/plugins/link/hooks/index.js +11 -0
  90. package/plugins/link/hooks/use-link-actions.d.ts +12 -0
  91. package/plugins/link/hooks/use-link-actions.js +48 -0
  92. package/plugins/link/hooks/use-link-cancel-on-escape.d.ts +1 -0
  93. package/plugins/link/hooks/use-link-cancel-on-escape.js +5 -0
  94. package/plugins/link/hooks/use-link-submit-on-enter.d.ts +1 -0
  95. package/plugins/link/hooks/use-link-submit-on-enter.js +23 -0
  96. package/plugins/link/transforms/get-active-link.d.ts +3 -0
  97. package/plugins/link/transforms/get-active-link.js +17 -0
  98. package/plugins/link/transforms/insert-link.d.ts +2 -0
  99. package/plugins/link/transforms/insert-link.js +27 -0
  100. package/plugins/link/transforms/is-link-selected.d.ts +2 -0
  101. package/plugins/link/transforms/is-link-selected.js +15 -0
  102. package/plugins/link/transforms/submit-link.d.ts +8 -0
  103. package/plugins/link/transforms/submit-link.js +36 -0
  104. package/plugins/link/transforms/trigger-link-insert-or-edit.d.ts +2 -0
  105. package/plugins/link/transforms/trigger-link-insert-or-edit.js +6 -0
  106. package/plugins/link/transforms/unwrap-link.d.ts +2 -0
  107. package/plugins/link/transforms/unwrap-link.js +10 -0
  108. package/plugins/link/types.d.ts +5 -0
  109. package/plugins/link/types.js +2 -0
  110. package/plugins/list/constants.d.ts +4 -0
  111. package/plugins/list/constants.js +14 -0
  112. package/plugins/list/create-list-plugin.d.ts +4 -0
  113. package/plugins/list/create-list-plugin.js +16 -0
  114. package/plugins/mark-bold/create-bold-plugin.d.ts +3 -0
  115. package/plugins/mark-bold/create-bold-plugin.js +6 -0
  116. package/plugins/mark-bold/types.d.ts +2 -0
  117. package/plugins/mark-bold/types.js +6 -0
  118. package/plugins/mark-code/create-code-plugin.d.ts +3 -0
  119. package/plugins/mark-code/create-code-plugin.js +6 -0
  120. package/plugins/mark-code/types.d.ts +2 -0
  121. package/plugins/mark-code/types.js +6 -0
  122. package/plugins/mark-italic/create-italic-plugin.d.ts +3 -0
  123. package/plugins/mark-italic/create-italic-plugin.js +6 -0
  124. package/plugins/mark-italic/types.d.ts +2 -0
  125. package/plugins/mark-italic/types.js +6 -0
  126. package/plugins/mark-underline/create-underline-plugin.d.ts +3 -0
  127. package/plugins/mark-underline/create-underline-plugin.js +6 -0
  128. package/plugins/mark-underline/types.d.ts +2 -0
  129. package/plugins/mark-underline/types.js +6 -0
  130. package/plugins/node-id/add-ids-to-nodes.d.ts +2 -0
  131. package/plugins/node-id/add-ids-to-nodes.js +22 -0
  132. package/plugins/node-id/create-node-id-plugin.d.ts +3 -0
  133. package/plugins/node-id/create-node-id-plugin.js +6 -0
  134. package/plugins/paragraph/create-paragraph-plugin.d.ts +3 -0
  135. package/plugins/paragraph/create-paragraph-plugin.js +9 -0
  136. package/plugins/paragraph/types.d.ts +2 -0
  137. package/plugins/paragraph/types.js +6 -0
  138. package/plugins/reset-node/create-reset-node.d.ts +3 -0
  139. package/plugins/reset-node/create-reset-node.js +28 -0
  140. package/plugins/select-on-backspace/create-select-on-backspace-plugin.d.ts +3 -0
  141. package/plugins/select-on-backspace/create-select-on-backspace-plugin.js +14 -0
  142. package/plugins/soft-break/create-soft-break-plugin.d.ts +3 -0
  143. package/plugins/soft-break/create-soft-break-plugin.js +22 -0
  144. package/plugins/trailing-block/create-trailing-block-plugin.d.ts +3 -0
  145. package/plugins/trailing-block/create-trailing-block-plugin.js +6 -0
  146. package/serializers/serialize-to-plaintext.d.ts +2 -0
  147. package/serializers/serialize-to-plaintext.js +8 -0
  148. package/translations/cs.json +134 -0
  149. package/translations/de.json +134 -0
  150. package/translations/en.json +134 -0
  151. package/translations/sk.json +134 -0
  152. package/types.d.ts +118 -0
  153. package/types.js +2 -0
  154. package/ui/blockquote-element.d.ts +2 -0
  155. package/ui/blockquote-element.js +13 -0
  156. package/ui/bold-mark.d.ts +2 -0
  157. package/ui/bold-mark.js +13 -0
  158. package/ui/button/button-element.d.ts +2 -0
  159. package/ui/button/button-element.js +54 -0
  160. package/ui/button/index.d.ts +1 -0
  161. package/ui/button/index.js +5 -0
  162. package/ui/button/insert-button-modal-content.d.ts +8 -0
  163. package/ui/button/insert-button-modal-content.js +81 -0
  164. package/ui/code-mark.d.ts +2 -0
  165. package/ui/code-mark.js +13 -0
  166. package/ui/components/element/element-action-buttons.d.ts +9 -0
  167. package/ui/components/element/element-action-buttons.js +22 -0
  168. package/ui/components/element/element-with-action-buttons.d.ts +10 -0
  169. package/ui/components/element/element-with-action-buttons.js +17 -0
  170. package/ui/components/modal/modal-button-cancel.d.ts +9 -0
  171. package/ui/components/modal/modal-button-cancel.js +45 -0
  172. package/ui/components/modal/modal-button-submit.d.ts +6 -0
  173. package/ui/components/modal/modal-button-submit.js +12 -0
  174. package/ui/components/modal/modal-buttons.d.ts +11 -0
  175. package/ui/components/modal/modal-buttons.js +16 -0
  176. package/ui/components/modal/modal-content.d.ts +6 -0
  177. package/ui/components/modal/modal-content.js +14 -0
  178. package/ui/create-uxf-ui.d.ts +21 -0
  179. package/ui/create-uxf-ui.js +51 -0
  180. package/ui/floating-link.d.ts +2 -0
  181. package/ui/floating-link.js +110 -0
  182. package/ui/heading-elements.d.ts +7 -0
  183. package/ui/heading-elements.js +38 -0
  184. package/ui/highlight-mark.d.ts +3 -0
  185. package/ui/highlight-mark.js +13 -0
  186. package/ui/image/image-element.d.ts +2 -0
  187. package/ui/image/image-element.js +53 -0
  188. package/ui/image/insert-image-modal-content.d.ts +8 -0
  189. package/ui/image/insert-image-modal-content.js +89 -0
  190. package/ui/italic-mark.d.ts +2 -0
  191. package/ui/italic-mark.js +13 -0
  192. package/ui/link-element.d.ts +3 -0
  193. package/ui/link-element.js +14 -0
  194. package/ui/list-item-element.d.ts +2 -0
  195. package/ui/list-item-element.js +13 -0
  196. package/ui/list-ordered-element.d.ts +2 -0
  197. package/ui/list-ordered-element.js +13 -0
  198. package/ui/list-unordered-element.d.ts +2 -0
  199. package/ui/list-unordered-element.js +13 -0
  200. package/ui/paragraph-element.d.ts +2 -0
  201. package/ui/paragraph-element.js +13 -0
  202. package/ui/toolbar/buttons/button-toolbar-button.d.ts +10 -0
  203. package/ui/toolbar/buttons/button-toolbar-button.js +20 -0
  204. package/ui/toolbar/buttons/element-toolbar-button.d.ts +12 -0
  205. package/ui/toolbar/buttons/element-toolbar-button.js +25 -0
  206. package/ui/toolbar/buttons/image-toolbar-button.d.ts +10 -0
  207. package/ui/toolbar/buttons/image-toolbar-button.js +20 -0
  208. package/ui/toolbar/buttons/link-toolbar-button.d.ts +10 -0
  209. package/ui/toolbar/buttons/link-toolbar-button.js +29 -0
  210. package/ui/toolbar/buttons/list-toolbar-button.d.ts +13 -0
  211. package/ui/toolbar/buttons/list-toolbar-button.js +27 -0
  212. package/ui/toolbar/buttons/mark-toolbar-button.d.ts +13 -0
  213. package/ui/toolbar/buttons/mark-toolbar-button.js +25 -0
  214. package/ui/toolbar/buttons/modal-toolbar-button.d.ts +15 -0
  215. package/ui/toolbar/buttons/modal-toolbar-button.js +22 -0
  216. package/ui/toolbar/buttons/toolbar-button.d.ts +15 -0
  217. package/ui/toolbar/buttons/toolbar-button.js +35 -0
  218. package/ui/toolbar/buttons/undo-redo-button-group.d.ts +8 -0
  219. package/ui/toolbar/buttons/undo-redo-button-group.js +64 -0
  220. package/ui/toolbar/buttons/video-toolbar-button.d.ts +10 -0
  221. package/ui/toolbar/buttons/video-toolbar-button.js +20 -0
  222. package/ui/toolbar/toolbar.d.ts +3 -0
  223. package/ui/toolbar/toolbar.js +77 -0
  224. package/ui/toolbar/types.d.ts +8 -0
  225. package/ui/toolbar/types.js +2 -0
  226. package/ui/underline-mark.d.ts +2 -0
  227. package/ui/underline-mark.js +13 -0
  228. package/ui/utils.d.ts +2 -0
  229. package/ui/utils.js +13 -0
  230. package/ui/video/insert-video-modal-content.d.ts +8 -0
  231. package/ui/video/insert-video-modal-content.js +80 -0
  232. package/ui/video/video-element.d.ts +2 -0
  233. package/ui/video/video-element.js +55 -0
  234. package/utils/get-video-meta-data.d.ts +2 -0
  235. package/utils/get-video-meta-data.js +41 -0
  236. package/utils/url-helper.d.ts +7 -0
  237. package/utils/url-helper.js +15 -0
  238. package/utils/url-helper.test.d.ts +1 -0
  239. package/utils/url-helper.test.js +37 -0
  240. package/utils.d.ts +30 -0
  241. package/utils.js +88 -0
  242. package/wysiwyg-editor.d.ts +15 -0
  243. package/wysiwyg-editor.js +42 -0
  244. package/wysiwyg-editor.stories.d.ts +5 -0
  245. package/wysiwyg-editor.stories.js +193 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.triggerLinkInsertOrEdit = void 0;
4
+ const plate_link_1 = require("@udecode/plate-link");
5
+ const triggerLinkInsertOrEdit = (editor, focused = false) => (0, plate_link_1.triggerFloatingLink)(editor, { focused });
6
+ exports.triggerLinkInsertOrEdit = triggerLinkInsertOrEdit;
@@ -0,0 +1,2 @@
1
+ import { UxfEditor } from "../../../types";
2
+ export declare const removeLink: (editor: UxfEditor) => void;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeLink = void 0;
4
+ const plate_link_1 = require("@udecode/plate-link");
5
+ const utils_1 = require("../../../utils");
6
+ const removeLink = (editor) => {
7
+ (0, plate_link_1.unwrapLink)(editor);
8
+ (0, utils_1.focusEditor)(editor);
9
+ };
10
+ exports.removeLink = removeLink;
@@ -0,0 +1,5 @@
1
+ import { UxfBlockElement } from "../../types";
2
+ export interface TLinkElement extends UxfBlockElement {
3
+ url: string;
4
+ target: "_blank" | "_self";
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare const LIST_PLUGIN_KEY = "list";
2
+ export declare const LIST_ORDERED_TYPE = "ol";
3
+ export declare const LIST_UNORDERED_TYPE = "ul";
4
+ export { ELEMENT_LI, ELEMENT_LIC, ELEMENT_OL, ELEMENT_UL, getListItemEntry, toggleList } from "@udecode/plate-list";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toggleList = exports.getListItemEntry = exports.ELEMENT_UL = exports.ELEMENT_OL = exports.ELEMENT_LIC = exports.ELEMENT_LI = exports.LIST_UNORDERED_TYPE = exports.LIST_ORDERED_TYPE = exports.LIST_PLUGIN_KEY = void 0;
4
+ const plate_list_1 = require("@udecode/plate-list");
5
+ exports.LIST_PLUGIN_KEY = "list";
6
+ exports.LIST_ORDERED_TYPE = plate_list_1.ELEMENT_OL;
7
+ exports.LIST_UNORDERED_TYPE = plate_list_1.ELEMENT_UL;
8
+ var plate_list_2 = require("@udecode/plate-list");
9
+ Object.defineProperty(exports, "ELEMENT_LI", { enumerable: true, get: function () { return plate_list_2.ELEMENT_LI; } });
10
+ Object.defineProperty(exports, "ELEMENT_LIC", { enumerable: true, get: function () { return plate_list_2.ELEMENT_LIC; } });
11
+ Object.defineProperty(exports, "ELEMENT_OL", { enumerable: true, get: function () { return plate_list_2.ELEMENT_OL; } });
12
+ Object.defineProperty(exports, "ELEMENT_UL", { enumerable: true, get: function () { return plate_list_2.ELEMENT_UL; } });
13
+ Object.defineProperty(exports, "getListItemEntry", { enumerable: true, get: function () { return plate_list_2.getListItemEntry; } });
14
+ Object.defineProperty(exports, "toggleList", { enumerable: true, get: function () { return plate_list_2.toggleList; } });
@@ -0,0 +1,4 @@
1
+ import { ListPlugin } from "@udecode/plate-list";
2
+ import { UxfPlatePlugin } from "../../types";
3
+ export { getListItemEntry, toggleList } from "@udecode/plate-list";
4
+ export declare const createListPlugin: () => UxfPlatePlugin<ListPlugin>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createListPlugin = exports.toggleList = exports.getListItemEntry = void 0;
4
+ const plate_list_1 = require("@udecode/plate-list");
5
+ const types_1 = require("../paragraph/types");
6
+ var plate_list_2 = require("@udecode/plate-list");
7
+ Object.defineProperty(exports, "getListItemEntry", { enumerable: true, get: function () { return plate_list_2.getListItemEntry; } });
8
+ Object.defineProperty(exports, "toggleList", { enumerable: true, get: function () { return plate_list_2.toggleList; } });
9
+ const createListPlugin = () => (0, plate_list_1.createListPlugin)({
10
+ inject: {
11
+ props: {
12
+ validTypes: [types_1.PARAGRAPH_PLUGIN_KEY],
13
+ },
14
+ },
15
+ });
16
+ exports.createListPlugin = createListPlugin;
@@ -0,0 +1,3 @@
1
+ import { ToggleMarkPlugin } from "@udecode/plate-core";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createBoldPlugin: () => import("@udecode/plate-core").PlatePlugin<ToggleMarkPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createBoldPlugin = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ const createBoldPlugin = () => (0, plate_basic_marks_1.createBoldPlugin)();
6
+ exports.createBoldPlugin = createBoldPlugin;
@@ -0,0 +1,2 @@
1
+ export declare const BOLD_PLUGIN_KEY = "bold";
2
+ export declare const BOLD_PLUGIN_TYPE = "bold";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BOLD_PLUGIN_TYPE = exports.BOLD_PLUGIN_KEY = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ exports.BOLD_PLUGIN_KEY = plate_basic_marks_1.MARK_BOLD;
6
+ exports.BOLD_PLUGIN_TYPE = plate_basic_marks_1.MARK_BOLD;
@@ -0,0 +1,3 @@
1
+ import { ToggleMarkPlugin } from "@udecode/plate-core";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createCodePlugin: () => import("@udecode/plate-core").PlatePlugin<ToggleMarkPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCodePlugin = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ const createCodePlugin = () => (0, plate_basic_marks_1.createCodePlugin)();
6
+ exports.createCodePlugin = createCodePlugin;
@@ -0,0 +1,2 @@
1
+ export declare const CODE_PLUGIN_KEY = "code";
2
+ export declare const CODE_PLUGIN_TYPE = "code";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CODE_PLUGIN_TYPE = exports.CODE_PLUGIN_KEY = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ exports.CODE_PLUGIN_KEY = plate_basic_marks_1.MARK_CODE;
6
+ exports.CODE_PLUGIN_TYPE = plate_basic_marks_1.MARK_CODE;
@@ -0,0 +1,3 @@
1
+ import { ToggleMarkPlugin } from "@udecode/plate-core";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createItalicPlugin: () => import("@udecode/plate-core").PlatePlugin<ToggleMarkPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createItalicPlugin = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ const createItalicPlugin = () => (0, plate_basic_marks_1.createItalicPlugin)();
6
+ exports.createItalicPlugin = createItalicPlugin;
@@ -0,0 +1,2 @@
1
+ export declare const ITALIC_PLUGIN_KEY = "italic";
2
+ export declare const ITALIC_PLUGIN_TYPE = "italic";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ITALIC_PLUGIN_TYPE = exports.ITALIC_PLUGIN_KEY = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ exports.ITALIC_PLUGIN_KEY = plate_basic_marks_1.MARK_ITALIC;
6
+ exports.ITALIC_PLUGIN_TYPE = plate_basic_marks_1.MARK_ITALIC;
@@ -0,0 +1,3 @@
1
+ import { ToggleMarkPlugin } from "@udecode/plate-core";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createUnderlinePlugin: () => import("@udecode/plate-core").PlatePlugin<ToggleMarkPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createUnderlinePlugin = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ const createUnderlinePlugin = () => (0, plate_basic_marks_1.createUnderlinePlugin)();
6
+ exports.createUnderlinePlugin = createUnderlinePlugin;
@@ -0,0 +1,2 @@
1
+ export declare const UNDER_LINE_PLUGIN_KEY = "underline";
2
+ export declare const UNDER_LINE_PLUGIN_TYPE = "underline";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNDER_LINE_PLUGIN_TYPE = exports.UNDER_LINE_PLUGIN_KEY = void 0;
4
+ const plate_basic_marks_1 = require("@udecode/plate-basic-marks");
5
+ exports.UNDER_LINE_PLUGIN_KEY = plate_basic_marks_1.MARK_UNDERLINE;
6
+ exports.UNDER_LINE_PLUGIN_TYPE = plate_basic_marks_1.MARK_UNDERLINE;
@@ -0,0 +1,2 @@
1
+ import { WysiwygContent } from "../../types";
2
+ export declare const addIdsToNodes: (nodes: any[]) => WysiwygContent;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addIdsToNodes = void 0;
4
+ const addIdsToNodes = (nodes) => {
5
+ return nodes.map((node) => {
6
+ let id = node.id;
7
+ let children = node.children;
8
+ if (!id && !node.text) {
9
+ id = Math.random().toString(36).substring(2, 7);
10
+ }
11
+ if (node.children) {
12
+ children = (0, exports.addIdsToNodes)(node.children);
13
+ }
14
+ return {
15
+ type: node.type,
16
+ id: id,
17
+ ...node,
18
+ children,
19
+ };
20
+ });
21
+ };
22
+ exports.addIdsToNodes = addIdsToNodes;
@@ -0,0 +1,3 @@
1
+ import { NodeIdPlugin } from "@udecode/plate-node-id";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createNodeIdPlugin: () => import("@udecode/plate-core").PlatePlugin<NodeIdPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createNodeIdPlugin = void 0;
4
+ const plate_node_id_1 = require("@udecode/plate-node-id");
5
+ const createNodeIdPlugin = () => (0, plate_node_id_1.createNodeIdPlugin)();
6
+ exports.createNodeIdPlugin = createNodeIdPlugin;
@@ -0,0 +1,3 @@
1
+ import { HotkeyPlugin } from "@udecode/plate-core";
2
+ import { UxfPlatePlugin } from "../../types";
3
+ export declare const createParagraphPlugin: () => UxfPlatePlugin<HotkeyPlugin>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createParagraphPlugin = void 0;
4
+ const plate_paragraph_1 = require("@udecode/plate-paragraph");
5
+ const types_1 = require("./types");
6
+ const createParagraphPlugin = () => (0, plate_paragraph_1.createParagraphPlugin)({
7
+ type: types_1.PARAGRAPH_PLUGIN_TYPE,
8
+ });
9
+ exports.createParagraphPlugin = createParagraphPlugin;
@@ -0,0 +1,2 @@
1
+ export declare const PARAGRAPH_PLUGIN_KEY = "p";
2
+ export declare const PARAGRAPH_PLUGIN_TYPE = "paragraph";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PARAGRAPH_PLUGIN_TYPE = exports.PARAGRAPH_PLUGIN_KEY = void 0;
4
+ const plate_paragraph_1 = require("@udecode/plate-paragraph");
5
+ exports.PARAGRAPH_PLUGIN_KEY = plate_paragraph_1.ELEMENT_PARAGRAPH;
6
+ exports.PARAGRAPH_PLUGIN_TYPE = "paragraph";
@@ -0,0 +1,3 @@
1
+ import { ResetNodePlugin } from "@udecode/plate-reset-node";
2
+ import { UxfPlatePlugin } from "../../types";
3
+ export declare const createResetNodePlugin: () => UxfPlatePlugin<ResetNodePlugin>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createResetNodePlugin = void 0;
4
+ const plate_common_1 = require("@udecode/plate-common");
5
+ const plate_reset_node_1 = require("@udecode/plate-reset-node");
6
+ const types_1 = require("../blockquote/types");
7
+ const types_2 = require("../paragraph/types");
8
+ const resetBlockTypesCommonRule = {
9
+ types: [types_1.BLOCKQUOTE_PLUGIN_KEY],
10
+ defaultType: types_2.PARAGRAPH_PLUGIN_KEY,
11
+ };
12
+ const createResetNodePlugin = () => (0, plate_reset_node_1.createResetNodePlugin)({
13
+ options: {
14
+ rules: [
15
+ {
16
+ ...resetBlockTypesCommonRule,
17
+ hotkey: "Enter",
18
+ predicate: plate_common_1.isBlockAboveEmpty,
19
+ },
20
+ {
21
+ ...resetBlockTypesCommonRule,
22
+ hotkey: "Backspace",
23
+ predicate: plate_common_1.isSelectionAtBlockStart,
24
+ },
25
+ ],
26
+ },
27
+ });
28
+ exports.createResetNodePlugin = createResetNodePlugin;
@@ -0,0 +1,3 @@
1
+ import { SelectOnBackspacePlugin } from "@udecode/plate-select";
2
+ import { UxfPlatePlugin } from "../../types";
3
+ export declare const createSelectOnBackspacePlugin: () => UxfPlatePlugin<SelectOnBackspacePlugin>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSelectOnBackspacePlugin = void 0;
4
+ const plate_media_1 = require("@udecode/plate-media");
5
+ const plate_select_1 = require("@udecode/plate-select");
6
+ const types_1 = require("../image/types");
7
+ const createSelectOnBackspacePlugin = () => (0, plate_select_1.createSelectOnBackspacePlugin)({
8
+ options: {
9
+ query: {
10
+ allow: [types_1.IMAGE_PLUGIN_KEY, plate_media_1.ELEMENT_MEDIA_EMBED],
11
+ },
12
+ },
13
+ });
14
+ exports.createSelectOnBackspacePlugin = createSelectOnBackspacePlugin;
@@ -0,0 +1,3 @@
1
+ import { SoftBreakPlugin } from "@udecode/plate-break";
2
+ import { UxfEditor, WysiwygContent } from "../../types";
3
+ export declare const createSoftBreakPlugin: () => import("@udecode/plate-core").PlatePlugin<SoftBreakPlugin, WysiwygContent, UxfEditor>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSoftBreakPlugin = void 0;
4
+ const plate_break_1 = require("@udecode/plate-break");
5
+ const types_1 = require("../blockquote/types");
6
+ const types_2 = require("../paragraph/types");
7
+ const createSoftBreakPlugin = () => (0, plate_break_1.createSoftBreakPlugin)({
8
+ options: {
9
+ rules: [
10
+ {
11
+ hotkey: "shift+enter",
12
+ },
13
+ {
14
+ hotkey: "enter",
15
+ query: {
16
+ allow: [types_2.PARAGRAPH_PLUGIN_KEY, types_1.BLOCKQUOTE_PLUGIN_KEY],
17
+ },
18
+ },
19
+ ],
20
+ },
21
+ });
22
+ exports.createSoftBreakPlugin = createSoftBreakPlugin;
@@ -0,0 +1,3 @@
1
+ import { TrailingBlockPlugin } from "@udecode/plate-trailing-block";
2
+ import { UxfPlatePlugin } from "../../types";
3
+ export declare const createTrailingBlockPlugin: () => UxfPlatePlugin<TrailingBlockPlugin>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTrailingBlockPlugin = void 0;
4
+ const plate_trailing_block_1 = require("@udecode/plate-trailing-block");
5
+ const createTrailingBlockPlugin = () => (0, plate_trailing_block_1.createTrailingBlockPlugin)();
6
+ exports.createTrailingBlockPlugin = createTrailingBlockPlugin;
@@ -0,0 +1,2 @@
1
+ import { WysiwygContent } from "../types";
2
+ export declare const serializeToPlaintext: (nodes: WysiwygContent, keepIndentation?: boolean) => string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeToPlaintext = void 0;
4
+ const slate_1 = require("slate");
5
+ const serializeToPlaintext = (nodes, keepIndentation = true) => {
6
+ return nodes.map((n) => slate_1.Node.string(n)).join(keepIndentation ? "\n" : " ");
7
+ };
8
+ exports.serializeToPlaintext = serializeToPlaintext;
@@ -0,0 +1,134 @@
1
+ {
2
+ "uxf-wysiwyg": {
3
+ "common": {
4
+ "placeholder": "Napište něco hezkého..."
5
+ },
6
+ "components": {
7
+ "modal": {
8
+ "button-cancel": "Zrušit"
9
+ }
10
+ },
11
+ "plugins": {
12
+ "formatting": {
13
+ "bold": {
14
+ "tooltip": "Tučné (Ctrl+B)"
15
+ },
16
+ "italic": {
17
+ "tooltip": "Kurzíva (Ctrl+I)"
18
+ },
19
+ "underline": {
20
+ "tooltip": "Podtržení (Ctrl+U)"
21
+ },
22
+ "code": {
23
+ "tooltip": "Kód"
24
+ },
25
+ "highlight": {
26
+ "tooltip": "Zvýraznění (Ctrl+Shift+H)"
27
+ }
28
+ },
29
+ "headings": {
30
+ "h1": {
31
+ "tooltip": "Nadpis H1"
32
+ },
33
+ "h2": {
34
+ "tooltip": "Nadpis H2"
35
+ },
36
+ "h3": {
37
+ "tooltip": "Nadpis H3"
38
+ },
39
+ "h4": {
40
+ "tooltip": "Nadpis H4"
41
+ },
42
+ "h5": {
43
+ "tooltip": "Nadpis H5"
44
+ },
45
+ "h6": {
46
+ "tooltip": "Nadpis H6"
47
+ }
48
+ },
49
+ "link": {
50
+ "url-address": {
51
+ "invalid": "Neplatná URL adresa",
52
+ "required": "URL adresa je povinná",
53
+ "label": "URL adresa",
54
+ "placeholder": "Zadejte URL adresu"
55
+ },
56
+ "link-text": {
57
+ "label": "Text odkazu",
58
+ "placeholder": "Zadejte text odkazu"
59
+ },
60
+ "open-in-new-tab": "Otevřít v nové záložce",
61
+ "tooltip": "Vložit odkaz",
62
+ "button-save": "Uložit",
63
+ "button-close": "Zavřít"
64
+ },
65
+ "blocks": {
66
+ "quote": {
67
+ "tooltip": "Citace"
68
+ }
69
+ },
70
+ "lists": {
71
+ "ul": {
72
+ "tooltip": "Vložit odrážkový seznam"
73
+ },
74
+ "ol": {
75
+ "tooltip": "Vložit číslovaný seznam"
76
+ }
77
+ },
78
+ "button": {
79
+ "tooltip": "Vložit tlačítko",
80
+ "button-text": {
81
+ "label": "Text tlačítka",
82
+ "placeholder": "Zadejte text tlačítka",
83
+ "required": "Toto pole je povinné"
84
+ },
85
+ "url-address": {
86
+ "label": "URL adresa",
87
+ "placeholder": "Zadejte URL adresu",
88
+ "required": "Toto pole je povinné"
89
+ },
90
+ "button-insert": "Vložit tlačítko",
91
+ "button-edit": "Upravit tlačítko"
92
+ },
93
+ "image": {
94
+ "tooltip": "Vložit obrázek",
95
+ "alt": {
96
+ "label": "Alt obrázku",
97
+ "placeholder": "Zadejte alt obrázku"
98
+ },
99
+ "caption": {
100
+ "label": "Popisek obrázku",
101
+ "placeholder": "Zadejte popisek obrázku"
102
+ },
103
+ "source": {
104
+ "label": "Zdroj obrázku",
105
+ "placeholder": "Zadejte zdroj obrázku"
106
+ },
107
+ "file-upload": {
108
+ "label": "Obrázek"
109
+ },
110
+ "button-insert": "Vložit obrázek",
111
+ "button-edit": "Upravit obrázek"
112
+ },
113
+ "video": {
114
+ "tooltip": "Vložit video",
115
+ "url-address": {
116
+ "label": "URL adresa",
117
+ "placeholder": "Zadejte URL adresu",
118
+ "invalid": "Neplatná URL adresa."
119
+ },
120
+ "iframe-title": "Video",
121
+ "button-insert": "Vložit video",
122
+ "button-edit": "Upravit video"
123
+ },
124
+ "actions": {
125
+ "undo": {
126
+ "tooltip": "Vrátit zpět (Ctrl+Z)"
127
+ },
128
+ "redo": {
129
+ "tooltip": "Opakovat (Ctrl+Y)"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "uxf-wysiwyg": {
3
+ "common": {
4
+ "placeholder": "Schreiben Sie etwas Schönes..."
5
+ },
6
+ "components": {
7
+ "modal": {
8
+ "button-cancel": "Abbrechen"
9
+ }
10
+ },
11
+ "plugins": {
12
+ "formatting": {
13
+ "bold": {
14
+ "tooltip": "Fett (Ctrl+B)"
15
+ },
16
+ "italic": {
17
+ "tooltip": "Kursiv (Ctrl+I)"
18
+ },
19
+ "underline": {
20
+ "tooltip": "Unterstrichen (Ctrl+U)"
21
+ },
22
+ "code": {
23
+ "tooltip": "Code"
24
+ },
25
+ "highlight": {
26
+ "tooltip": "Hervorheben (Ctrl+Shift+H)"
27
+ }
28
+ },
29
+ "headings": {
30
+ "h1": {
31
+ "tooltip": "Überschrift H1"
32
+ },
33
+ "h2": {
34
+ "tooltip": "Überschrift H2"
35
+ },
36
+ "h3": {
37
+ "tooltip": "Überschrift H3"
38
+ },
39
+ "h4": {
40
+ "tooltip": "Überschrift H4"
41
+ },
42
+ "h5": {
43
+ "tooltip": "Überschrift H5"
44
+ },
45
+ "h6": {
46
+ "tooltip": "Überschrift H6"
47
+ }
48
+ },
49
+ "link": {
50
+ "url-address": {
51
+ "invalid": "Ungültige URL-Adresse",
52
+ "required": "URL-Adresse ist erforderlich",
53
+ "label": "URL-Adresse",
54
+ "placeholder": "URL-Adresse eingeben"
55
+ },
56
+ "link-text": {
57
+ "label": "Link-Text",
58
+ "placeholder": "Link-Text eingeben"
59
+ },
60
+ "open-in-new-tab": "In neuem Tab öffnen",
61
+ "tooltip": "Link einfügen",
62
+ "button-save": "Speichern",
63
+ "button-close": "Schließen"
64
+ },
65
+ "blocks": {
66
+ "quote": {
67
+ "tooltip": "Zitat"
68
+ }
69
+ },
70
+ "lists": {
71
+ "ul": {
72
+ "tooltip": "Aufzählung einfügen"
73
+ },
74
+ "ol": {
75
+ "tooltip": "Nummerierte Liste einfügen"
76
+ }
77
+ },
78
+ "button": {
79
+ "tooltip": "Schaltfläche einfügen",
80
+ "button-text": {
81
+ "label": "Schaltflächen-Text",
82
+ "placeholder": "Schaltflächen-Text eingeben",
83
+ "required": "Dieses Feld ist erforderlich"
84
+ },
85
+ "url-address": {
86
+ "label": "URL-Adresse",
87
+ "placeholder": "URL-Adresse eingeben",
88
+ "required": "Dieses Feld ist erforderlich"
89
+ },
90
+ "button-insert": "Schaltfläche einfügen",
91
+ "button-edit": "Schaltfläche bearbeiten"
92
+ },
93
+ "image": {
94
+ "tooltip": "Bild einfügen",
95
+ "alt": {
96
+ "label": "Alt-Text des Bildes",
97
+ "placeholder": "Alt-Text des Bildes eingeben"
98
+ },
99
+ "caption": {
100
+ "label": "Bildunterschrift",
101
+ "placeholder": "Bildunterschrift eingeben"
102
+ },
103
+ "source": {
104
+ "label": "Bildquelle",
105
+ "placeholder": "Bildquelle eingeben"
106
+ },
107
+ "file-upload": {
108
+ "label": "Bild"
109
+ },
110
+ "button-insert": "Bild einfügen",
111
+ "button-edit": "Bild bearbeiten"
112
+ },
113
+ "video": {
114
+ "tooltip": "Video einfügen",
115
+ "url-address": {
116
+ "label": "URL-Adresse",
117
+ "placeholder": "URL-Adresse eingeben",
118
+ "invalid": "Ungültige URL-Adresse."
119
+ },
120
+ "iframe-title": "Video",
121
+ "button-insert": "Video einfügen",
122
+ "button-edit": "Video bearbeiten"
123
+ },
124
+ "actions": {
125
+ "undo": {
126
+ "tooltip": "Rückgängig (Ctrl+Z)"
127
+ },
128
+ "redo": {
129
+ "tooltip": "Wiederholen (Ctrl+Y)"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }