@uxf/wysiwyg 2.0.0-beta.8 → 10.0.0-beta.8

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 (179) hide show
  1. package/config/icons-config.d.ts +2 -0
  2. package/config/icons-config.js +5 -0
  3. package/config/icons.d.ts +183 -0
  4. package/config/icons.js +51 -0
  5. package/create-all-plugins-with-ui.d.ts +22 -15
  6. package/create-all-plugins-with-ui.js +17 -2
  7. package/create-plugins-with-ui.js +0 -1
  8. package/hooks.js +0 -1
  9. package/index.d.ts +1 -1
  10. package/index.js +2 -2
  11. package/package.json +28 -44
  12. package/plugins/block-quote/create-block-quote-plugin.js +0 -1
  13. package/plugins/block-quote/types.js +0 -1
  14. package/plugins/button/constants.d.ts +2 -0
  15. package/plugins/button/constants.js +5 -0
  16. package/plugins/button/create-button-plugin.d.ts +2 -0
  17. package/plugins/button/create-button-plugin.js +11 -0
  18. package/plugins/button/index.d.ts +3 -0
  19. package/plugins/button/index.js +23 -0
  20. package/plugins/button/transforms/get-active-button.d.ts +2 -0
  21. package/plugins/button/transforms/get-active-button.js +9 -0
  22. package/plugins/button/transforms/index.d.ts +4 -0
  23. package/plugins/button/transforms/index.js +11 -0
  24. package/plugins/button/transforms/insert-button.d.ts +2 -0
  25. package/plugins/button/transforms/insert-button.js +16 -0
  26. package/plugins/button/transforms/is-button-active.d.ts +2 -0
  27. package/plugins/button/transforms/is-button-active.js +7 -0
  28. package/plugins/button/transforms/remove-selected-button.d.ts +2 -0
  29. package/plugins/button/transforms/remove-selected-button.js +13 -0
  30. package/plugins/button/transforms/update-button.d.ts +2 -0
  31. package/plugins/button/transforms/update-button.js +9 -0
  32. package/plugins/embedded/utils.js +0 -1
  33. package/plugins/embedded/video/create-video-plugin.d.ts +1 -1
  34. package/plugins/embedded/video/create-video-plugin.js +0 -1
  35. package/plugins/embedded/video/get-active-video.d.ts +2 -0
  36. package/plugins/embedded/video/get-active-video.js +9 -0
  37. package/plugins/embedded/video/insert-video.d.ts +2 -0
  38. package/plugins/embedded/video/insert-video.js +18 -0
  39. package/plugins/embedded/video/update-video.d.ts +2 -0
  40. package/plugins/embedded/video/update-video.js +11 -0
  41. package/plugins/exit-break/create-exit-break-plugin.js +0 -1
  42. package/plugins/heading/constants.js +0 -1
  43. package/plugins/heading/create-headings-plugin.d.ts +2 -2
  44. package/plugins/heading/create-headings-plugin.js +3 -4
  45. package/plugins/highlight/createHighlightPlugin.d.ts +3 -0
  46. package/plugins/highlight/createHighlightPlugin.js +27 -0
  47. package/plugins/highlight/types.d.ts +10 -0
  48. package/plugins/highlight/types.js +4 -0
  49. package/plugins/image/create-image-plugin.d.ts +1 -1
  50. package/plugins/image/create-image-plugin.js +0 -1
  51. package/plugins/image/hooks/use-image-handlers.js +0 -1
  52. package/plugins/image/transforms/get-active-image.js +2 -10
  53. package/plugins/image/transforms/insert-image.js +3 -4
  54. package/plugins/image/transforms/is-image-active.js +2 -3
  55. package/plugins/image/transforms/remove-selected-image.js +2 -7
  56. package/plugins/image/transforms/update-image.js +2 -3
  57. package/plugins/image/types.js +0 -1
  58. package/plugins/image/utils/is-image-url.js +2 -3
  59. package/plugins/image/with-image.js +0 -1
  60. package/plugins/image/with-paste-image-url.js +0 -1
  61. package/plugins/image/with-paste-image.js +0 -1
  62. package/plugins/link/constants.js +0 -1
  63. package/plugins/link/create-link-plugin.js +8 -1
  64. package/plugins/link/floating-link-wrapper.d.ts +11 -0
  65. package/plugins/link/floating-link-wrapper.js +25 -0
  66. package/plugins/link/hooks/index.js +0 -1
  67. package/plugins/link/hooks/use-link-actions.d.ts +1 -2
  68. package/plugins/link/hooks/use-link-actions.js +3 -21
  69. package/plugins/link/hooks/use-link-cancel-on-escape.js +0 -1
  70. package/plugins/link/hooks/use-link-submit-on-enter.js +1 -2
  71. package/plugins/link/transforms/get-active-link.js +2 -2
  72. package/plugins/link/transforms/insert-link.js +3 -3
  73. package/plugins/link/transforms/is-link-selected.js +0 -1
  74. package/plugins/link/transforms/submit-link.d.ts +2 -1
  75. package/plugins/link/transforms/submit-link.js +3 -3
  76. package/plugins/link/transforms/trigger-link-insert-or-edit.js +0 -1
  77. package/plugins/link/transforms/unwrap-link.d.ts +2 -0
  78. package/plugins/link/transforms/unwrap-link.js +10 -0
  79. package/plugins/link/types.js +0 -1
  80. package/plugins/list/constants.js +0 -1
  81. package/plugins/list/create-list-plugin.js +0 -1
  82. package/plugins/mark-bold/create-bold-plugin.d.ts +1 -1
  83. package/plugins/mark-bold/create-bold-plugin.js +0 -1
  84. package/plugins/mark-bold/types.js +0 -1
  85. package/plugins/mark-code/create-code-plugin.d.ts +1 -1
  86. package/plugins/mark-code/create-code-plugin.js +0 -1
  87. package/plugins/mark-code/types.js +0 -1
  88. package/plugins/mark-italic/create-italic-plugin.d.ts +1 -1
  89. package/plugins/mark-italic/create-italic-plugin.js +0 -1
  90. package/plugins/mark-italic/types.js +0 -1
  91. package/plugins/mark-underline/create-underline-plugin.d.ts +1 -1
  92. package/plugins/mark-underline/create-underline-plugin.js +0 -1
  93. package/plugins/mark-underline/types.js +0 -1
  94. package/plugins/node-id/add-ids-to-nodes.js +0 -1
  95. package/plugins/node-id/create-node-id-plugin.js +0 -1
  96. package/plugins/paragraph/create-paragraph-plugin.js +0 -1
  97. package/plugins/paragraph/types.js +0 -1
  98. package/plugins/reset-node/create-reset-node.js +3 -4
  99. package/plugins/select-on-backspace/create-select-on-backspace-plugin.js +0 -1
  100. package/plugins/soft-break/create-soft-break-plugin.js +0 -1
  101. package/plugins/trailing-block/create-trailing-block-plugin.js +0 -1
  102. package/serializers/serialize-to-plaintext.js +0 -1
  103. package/types.d.ts +14 -3
  104. package/types.js +0 -1
  105. package/ui/block-quote-element.js +6 -4
  106. package/ui/bold-mark.js +5 -3
  107. package/ui/button/button-element.d.ts +2 -0
  108. package/ui/button/button-element.js +52 -0
  109. package/ui/button/index.d.ts +1 -0
  110. package/ui/button/index.js +5 -0
  111. package/ui/button/insert-button-modal-content.d.ts +8 -0
  112. package/ui/button/insert-button-modal-content.js +73 -0
  113. package/ui/code-mark.js +5 -3
  114. package/ui/components/element/element-action-buttons.d.ts +8 -0
  115. package/ui/components/element/element-action-buttons.js +21 -0
  116. package/ui/components/element/element-with-action-buttons.d.ts +9 -0
  117. package/ui/components/element/element-with-action-buttons.js +15 -0
  118. package/ui/components/modal/modal-button-cancel.d.ts +9 -0
  119. package/ui/components/modal/modal-button-cancel.js +42 -0
  120. package/ui/components/modal/modal-button-submit.d.ts +7 -0
  121. package/ui/components/modal/modal-button-submit.js +13 -0
  122. package/ui/components/modal/modal-buttons.d.ts +11 -0
  123. package/ui/components/modal/modal-buttons.js +16 -0
  124. package/ui/components/modal/modal-content.d.ts +6 -0
  125. package/ui/components/modal/modal-content.js +14 -0
  126. package/ui/create-uxf-ui.d.ts +16 -15
  127. package/ui/create-uxf-ui.js +3 -1
  128. package/ui/floating-link.d.ts +2 -2
  129. package/ui/floating-link.js +72 -30
  130. package/ui/heading-elements.js +10 -8
  131. package/ui/highlight-mark.d.ts +3 -0
  132. package/ui/highlight-mark.js +11 -0
  133. package/ui/image/image-element.js +32 -14
  134. package/ui/image/insert-image-modal-content.js +41 -9
  135. package/ui/italic-mark.js +5 -3
  136. package/ui/link-element.js +6 -4
  137. package/ui/list-item-element.js +5 -3
  138. package/ui/list-ordered-element.js +5 -3
  139. package/ui/list-unordered-element.js +5 -3
  140. package/ui/paragraph-element.js +5 -3
  141. package/ui/toolbar/buttons/button-toolbar-button.d.ts +8 -0
  142. package/ui/toolbar/buttons/button-toolbar-button.js +17 -0
  143. package/ui/toolbar/buttons/element-toolbar-button.d.ts +3 -2
  144. package/ui/toolbar/buttons/element-toolbar-button.js +6 -9
  145. package/ui/toolbar/buttons/image-toolbar-button.d.ts +2 -2
  146. package/ui/toolbar/buttons/image-toolbar-button.js +8 -19
  147. package/ui/toolbar/buttons/link-toolbar-button.d.ts +2 -2
  148. package/ui/toolbar/buttons/link-toolbar-button.js +10 -12
  149. package/ui/toolbar/buttons/list-toolbar-button.d.ts +2 -2
  150. package/ui/toolbar/buttons/list-toolbar-button.js +6 -9
  151. package/ui/toolbar/buttons/mark-toolbar-button.d.ts +4 -2
  152. package/ui/toolbar/buttons/mark-toolbar-button.js +7 -6
  153. package/ui/toolbar/buttons/modal-toolbar-button.d.ts +14 -0
  154. package/ui/toolbar/buttons/modal-toolbar-button.js +20 -0
  155. package/ui/toolbar/buttons/toolbar-button.d.ts +9 -3
  156. package/ui/toolbar/buttons/toolbar-button.js +44 -4
  157. package/ui/toolbar/buttons/undo-redo-button-group.d.ts +2 -0
  158. package/ui/toolbar/buttons/undo-redo-button-group.js +60 -0
  159. package/ui/toolbar/buttons/video-toolbar-button.d.ts +8 -0
  160. package/ui/toolbar/buttons/video-toolbar-button.js +17 -0
  161. package/ui/toolbar/toolbar.js +47 -5
  162. package/ui/toolbar/types.js +0 -1
  163. package/ui/underline-mark.js +5 -3
  164. package/ui/utils.d.ts +2 -0
  165. package/ui/utils.js +13 -0
  166. package/ui/video/insert-video-modal-content.d.ts +2 -1
  167. package/ui/video/insert-video-modal-content.js +52 -18
  168. package/ui/video/video-element.js +42 -3
  169. package/utils/icons-config.js +128 -0
  170. package/utils.d.ts +22 -16
  171. package/utils.js +67 -9
  172. package/wysiwyg-editor.js +9 -5
  173. package/README.md +0 -62
  174. package/plugins/embedded/insert-embedded.d.ts +0 -3
  175. package/plugins/embedded/insert-embedded.js +0 -9
  176. package/ui/toolbar/buttons/embed-video-toolbar-button.d.ts +0 -8
  177. package/ui/toolbar/buttons/embed-video-toolbar-button.js +0 -28
  178. package/ui/toolbar/buttons/icons.d.ts +0 -17
  179. package/ui/toolbar/buttons/icons.js +0 -39
@@ -0,0 +1,2 @@
1
+ export declare const ICONS_VERSION = "1685639575157";
2
+ export declare const ICON_SPRITE = "/icons-generated/_icon-sprite.svg";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
4
+ exports.ICONS_VERSION = "1685639575157";
5
+ exports.ICON_SPRITE = "/icons-generated/_icon-sprite.svg";
@@ -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;
@@ -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
+ };
@@ -1,38 +1,43 @@
1
1
  import { HeadingsPluginOptions } from "./plugins/heading/create-headings-plugin";
2
2
  import { UxfImagePluginOptions } from "./plugins/image/types";
3
3
  import { ElementUiComponent } from "./types";
4
+ import { CSSProperties } from "react";
4
5
  export declare const createHeadingsPluginWithUi: (options?: HeadingsPluginOptions) => {
5
6
  plugin: import("@udecode/plate-core").PlatePlugin<HeadingsPluginOptions, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
6
7
  components: {
7
- [key: string]: ElementUiComponent<import("./types").UxfBlockElement>;
8
+ [key: string]: ElementUiComponent;
8
9
  };
9
10
  };
10
11
  export declare const createBlockQuotePluginWithUi: () => {
11
12
  plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").HotkeyPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
12
- component: ElementUiComponent<import("./types").UxfBlockElement>;
13
+ component: ElementUiComponent;
13
14
  };
14
15
  export declare const createBoldPluginWithUi: () => {
15
- plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin<import("./types").WysiwygContent>, import("./types").WysiwygContent, import("./types").UxfEditor>;
16
- component: import("./types").LeafUiComponent<import("./types").RichText>;
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>;
17
22
  };
18
23
  export declare const createItalicPluginWithUi: () => {
19
- plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin<import("./types").WysiwygContent>, import("./types").WysiwygContent, import("./types").UxfEditor>;
20
- component: ElementUiComponent<import("./types").UxfBlockElement>;
24
+ plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
25
+ component: ElementUiComponent;
21
26
  };
22
27
  export declare const createUnderlinePluginWithUi: () => {
23
- plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin<import("./types").WysiwygContent>, import("./types").WysiwygContent, import("./types").UxfEditor>;
24
- component: import("./types").LeafUiComponent<import("./types").RichText>;
28
+ plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
29
+ component: import("./types").LeafUiComponent;
25
30
  };
26
31
  export declare const createCodePluginWithUi: () => {
27
- plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin<import("./types").WysiwygContent>, import("./types").WysiwygContent, import("./types").UxfEditor>;
28
- component: import("./types").LeafUiComponent<import("./types").RichText>;
32
+ plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("./types").WysiwygContent, import("./types").UxfEditor>;
33
+ component: import("./types").LeafUiComponent;
29
34
  };
30
35
  export declare const createListPluginWithUi: () => {
31
36
  plugin: import("./types").UxfPlatePlugin<import("@udecode/plate-list").ListPlugin>;
32
37
  components: {
33
- ul: ElementUiComponent<import("./types").UxfBlockElement>;
34
- ol: ElementUiComponent<import("./types").UxfBlockElement>;
35
- li: ElementUiComponent<import("./types").UxfBlockElement>;
38
+ ul: ElementUiComponent;
39
+ ol: ElementUiComponent;
40
+ li: ElementUiComponent;
36
41
  };
37
42
  };
38
43
  export declare const createImagePluginWithUi: (options: UxfImagePluginOptions) => {
@@ -43,7 +48,9 @@ export declare const createVideoPluginWithUi: () => {
43
48
  plugin: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-media").MediaPlugin, import("./types").WysiwygContent, import("@udecode/plate-core").PlateEditor<import("./types").WysiwygContent>>;
44
49
  component: ElementUiComponent<import("./types").UxfVideoElement>;
45
50
  };
46
- export declare const createAllPluginsWithUi: (options: {
51
+ export interface CreateAllPluginsOptions {
47
52
  image: UxfImagePluginOptions;
48
53
  headings?: HeadingsPluginOptions;
49
- }) => import("./types").UxfPlatePlugin<import("@udecode/plate-core").AnyObject>[];
54
+ highlightColor?: CSSProperties["color"];
55
+ }
56
+ export declare const createAllPluginsWithUi: (options: CreateAllPluginsOptions) => import("./types").UxfPlatePlugin[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
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;
3
+ exports.createAllPluginsWithUi = exports.createVideoPluginWithUi = exports.createImagePluginWithUi = exports.createListPluginWithUi = exports.createCodePluginWithUi = exports.createUnderlinePluginWithUi = exports.createItalicPluginWithUi = exports.createHighlightPluginWithUi = exports.createBoldPluginWithUi = exports.createBlockQuotePluginWithUi = exports.createHeadingsPluginWithUi = void 0;
4
4
  const create_plugins_with_ui_1 = require("./create-plugins-with-ui");
5
5
  const create_block_quote_plugin_1 = require("./plugins/block-quote/create-block-quote-plugin");
6
6
  const create_video_plugin_1 = require("./plugins/embedded/video/create-video-plugin");
@@ -25,6 +25,11 @@ const list_ordered_element_1 = require("./ui/list-ordered-element");
25
25
  const list_unordered_element_1 = require("./ui/list-unordered-element");
26
26
  const underline_mark_1 = require("./ui/underline-mark");
27
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 createHighlightPlugin_1 = require("./plugins/highlight/createHighlightPlugin");
31
+ const highlight_mark_1 = require("./ui/highlight-mark");
32
+ const tw_colors_1 = require("@uxf/ui/tw-tokens/tw-colors");
28
33
  const createHeadingsPluginWithUi = (options) => {
29
34
  var _a;
30
35
  const disabledLevels = (_a = options === null || options === void 0 ? void 0 : options.disabledLevels) !== null && _a !== void 0 ? _a : [];
@@ -53,6 +58,11 @@ const createBoldPluginWithUi = () => ({
53
58
  component: bold_mark_1.BoldMark,
54
59
  });
55
60
  exports.createBoldPluginWithUi = createBoldPluginWithUi;
61
+ const createHighlightPluginWithUi = (color = tw_colors_1.twColors.yellow["300"]) => ({
62
+ plugin: (0, createHighlightPlugin_1.createHighlightPlugin)(color),
63
+ component: highlight_mark_1.HighlightMark,
64
+ });
65
+ exports.createHighlightPluginWithUi = createHighlightPluginWithUi;
56
66
  const createItalicPluginWithUi = () => ({
57
67
  plugin: (0, create_italic_plugin_1.createItalicPlugin)(),
58
68
  component: italic_mark_1.ItalicMark,
@@ -93,6 +103,10 @@ const createVideoPluginWithUi = () => ({
93
103
  component: video_element_1.VideoElement,
94
104
  });
95
105
  exports.createVideoPluginWithUi = createVideoPluginWithUi;
106
+ const createButtonPluginWithUi = () => ({
107
+ plugin: (0, button_1.createButtonPlugin)(),
108
+ component: button_2.ButtonElement,
109
+ });
96
110
  const createAllPluginsWithUi = (options) => (0, create_plugins_with_ui_1.createPluginsWithUi)([
97
111
  (0, exports.createHeadingsPluginWithUi)(options.headings),
98
112
  (0, exports.createBlockQuotePluginWithUi)(),
@@ -104,6 +118,7 @@ const createAllPluginsWithUi = (options) => (0, create_plugins_with_ui_1.createP
104
118
  createLinkPluginWithUi(),
105
119
  (0, exports.createImagePluginWithUi)(options.image),
106
120
  (0, exports.createVideoPluginWithUi)(),
121
+ createButtonPluginWithUi(),
122
+ (0, exports.createHighlightPluginWithUi)(options.highlightColor),
107
123
  ]);
108
124
  exports.createAllPluginsWithUi = createAllPluginsWithUi;
109
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWFsbC1wbHVnaW5zLXdpdGgtdWkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY3JlYXRlLWFsbC1wbHVnaW5zLXdpdGgtdWkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQStEO0FBQy9ELCtGQUF5RjtBQUN6RixzRkFBaUY7QUFDakYsMkRBQTJEO0FBQzNELHFGQUFxSDtBQUNySCw2RUFBd0U7QUFFeEUsMEVBQXFFO0FBQ3JFLDBFQUFxRTtBQUNyRSwrRUFBMEU7QUFDMUUsK0VBQTBFO0FBQzFFLHFGQUFnRjtBQUNoRiw4RkFBeUY7QUFFekYsa0VBQTZEO0FBQzdELDhDQUEwQztBQUMxQyw4Q0FBMEM7QUFDMUMsNERBQXlHO0FBQ3pHLDREQUF3RDtBQUN4RCxrREFBOEM7QUFDOUMsb0RBQWdEO0FBQ2hELDhEQUF5RDtBQUN6RCxvRUFBK0Q7QUFDL0Qsd0VBQW1FO0FBQ25FLHdEQUFvRDtBQUNwRCw0REFBd0Q7QUFFakQsTUFBTSwwQkFBMEIsR0FBRyxDQUFDLE9BQStCLEVBQUUsRUFBRTs7SUFDMUUsTUFBTSxjQUFjLEdBQUcsTUFBQSxPQUFPLGFBQVAsT0FBTyx1QkFBUCxPQUFPLENBQUUsY0FBYyxtQ0FBSSxFQUFFLENBQUM7SUFDck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dCQUMvQyxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLENBQUMsVUFBVSxDQUFDLFlBQVksQ0FBQyxDQUFDO1lBQ2hFLENBQUMsQ0FBQyxDQUFDO1NBQ047YUFBTTtZQUNILGdCQUFnQixDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDLFNBQVMsQ0FBQztTQUNoRDtJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsT0FBTyxJQUFBLDBCQUFhLEVBQ2hCO1FBQ0ksSUFBQSwrQ0FBcUIsR0FBRTtRQUN2QixJQUFBLGdEQUFxQixHQUFFO1FBQ3ZCLElBQUEseUNBQXFCLEdBQUU7UUFDdkIsSUFBQSxnREFBcUIsR0FBRTtRQUN2QixJQUFBLDBDQUFrQixHQUFFO1FBQ3BCLElBQUEsaUVBQTZCLEdBQUU7UUFDL0IsSUFBQSx3REFBeUIsR0FBRTtRQUMzQixHQUFHLE9BQU87S0FDYixFQUNEO1FBQ0ksR0FBRyxPQUFPO1FBQ1YsVUFBVSxFQUFFLGdCQUFnQjtLQUMvQixDQUNKLENBQUM7QUFDTixDQUFDLENBQUM7QUF0Q1csUUFBQSxtQkFBbUIsdUJBc0M5QiJ9
package/hooks.js CHANGED
@@ -18,4 +18,3 @@ const useUxfPlateStates = (id) => (0, plate_core_1.usePlateStates)(id);
18
18
  exports.useUxfPlateStates = useUxfPlateStates;
19
19
  var slate_react_1 = require("slate-react");
20
20
  Object.defineProperty(exports, "useSelected", { enumerable: true, get: function () { return slate_react_1.useSelected; } });
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaG9va3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsb0RBVTZCO0FBR3RCLE1BQU0sb0JBQW9C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3
3
  export * from "./utils";
4
4
  export * from "./hooks";
5
- export { createAllPluginsWithUi, createVideoPluginWithUi, createBoldPluginWithUi, createCodePluginWithUi, createHeadingsPluginWithUi, createBlockQuotePluginWithUi, createImagePluginWithUi, createItalicPluginWithUi, createListPluginWithUi, createUnderlinePluginWithUi, } from "./create-all-plugins-with-ui";
5
+ export { createAllPluginsWithUi, createVideoPluginWithUi, createBoldPluginWithUi, createCodePluginWithUi, createHeadingsPluginWithUi, createBlockQuotePluginWithUi, createImagePluginWithUi, createItalicPluginWithUi, createListPluginWithUi, createUnderlinePluginWithUi, createHighlightPluginWithUi, type CreateAllPluginsOptions, } from "./create-all-plugins-with-ui";
6
6
  export { createPluginsWithUi } from "./create-plugins-with-ui";
package/index.js CHANGED
@@ -14,7 +14,7 @@ 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.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;
17
+ exports.createPluginsWithUi = exports.createHighlightPluginWithUi = 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
18
  var wysiwyg_editor_1 = require("./wysiwyg-editor");
19
19
  Object.defineProperty(exports, "WysiwygEditor", { enumerable: true, get: function () { return wysiwyg_editor_1.WysiwygEditor; } });
20
20
  __exportStar(require("./types"), exports);
@@ -31,6 +31,6 @@ Object.defineProperty(exports, "createImagePluginWithUi", { enumerable: true, ge
31
31
  Object.defineProperty(exports, "createItalicPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createItalicPluginWithUi; } });
32
32
  Object.defineProperty(exports, "createListPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createListPluginWithUi; } });
33
33
  Object.defineProperty(exports, "createUnderlinePluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createUnderlinePluginWithUi; } });
34
+ Object.defineProperty(exports, "createHighlightPluginWithUi", { enumerable: true, get: function () { return create_all_plugins_with_ui_1.createHighlightPluginWithUi; } });
34
35
  var create_plugins_with_ui_1 = require("./create-plugins-with-ui");
35
36
  Object.defineProperty(exports, "createPluginsWithUi", { enumerable: true, get: function () { return create_plugins_with_ui_1.createPluginsWithUi; } });
36
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtREFBaUQ7QUFBeEMsK0dBQUEsYUFBYSxPQUFBO0FBQ3RCLDBDQUF3QjtBQUN4QiwwQ0FBd0I7QUFDeEIsMENBQXdCO0FBQ3hCLDJFQVdzQztBQVZsQyxvSUFBQSxzQkFBc0IsT0FBQTtBQUN0QixxSUFBQSx1QkFBdUIsT0FBQTtBQUN2QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0Qix3SUFBQSwwQkFBMEIsT0FBQTtBQUMxQiwwSUFBQSw0QkFBNEIsT0FBQTtBQUM1QixxSUFBQSx1QkFBdUIsT0FBQTtBQUN2QixzSUFBQSx3QkFBd0IsT0FBQTtBQUN4QixvSUFBQSxzQkFBc0IsT0FBQTtBQUN0Qix5SUFBQSwyQkFBMkIsT0FBQTtBQUcvQixtRUFBK0Q7QUFBdEQsNkhBQUEsbUJBQW1CLE9BQUEifQ==
package/package.json CHANGED
@@ -1,61 +1,45 @@
1
1
  {
2
2
  "name": "@uxf/wysiwyg",
3
- "version": "2.0.0-beta.8",
3
+ "version": "10.0.0-beta.8",
4
4
  "description": "UXF Wysiwyg editor",
5
5
  "author": "Robin Dvorak <dvorak@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/wysiwyg",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
- "build": "npm run-script clean && tsc -P tsconfig.build.json",
10
- "clean": "rm -rf ./dist ./example/.cache ./example/dist",
11
- "typecheck": "tsc --noEmit --skipLibCheck",
12
- "lint": "eslint -c .eslintrc.js \"./**/*.ts*\"",
13
- "check": "yarn typecheck && yarn lint",
14
- "dev": "parcel ./example/index.html --dist-dir example/dist --cache-dir example/.cache --port 8081"
9
+ "build": "tsc -P tsconfig.json",
10
+ "typecheck": "tsc --noEmit --skipLibCheck"
15
11
  },
16
12
  "devDependencies": {
17
- "@tailwindcss/aspect-ratio": "^0.4.2",
18
- "@tailwindcss/line-clamp": "^0.4.2",
19
- "@types/react": "^18.0.26",
20
- "@types/react-dom": "^18.0.10",
21
- "@uxf/eslint-config": "^1.2.3",
22
- "@uxf/ui": "^1.0.0-beta.115",
23
- "autoprefixer": "^10.4.13",
24
- "eslint": "^8.31.0",
25
- "parcel": "^2.8.3",
26
- "postcss": "^8.4.21",
27
- "prettier": "^2.8.2",
28
- "process": "^0.11.10",
13
+ "@uxf/ui": "10.0.0-beta.8",
14
+ "autoprefixer": "^10.4.14",
29
15
  "react": "^18.2.0",
30
- "react-dom": "^18.2.0",
31
- "tailwindcss": "^3.2.4",
32
- "typescript": "^4.9.4"
16
+ "react-dom": "^18.2.0"
33
17
  },
34
18
  "peerDependencies": {
35
- "@uxf/ui": "^1.0.0-beta.115",
36
- "react": "17 - 18",
37
- "react-dom": "17 - 18"
19
+ "@uxf/ui": "10.0.0-beta.8",
20
+ "react": ">=18.0.0",
21
+ "react-dom": ">=18.0.0"
38
22
  },
39
23
  "dependencies": {
40
- "@headlessui/react": "^1.7.7",
41
- "@udecode/plate-basic-marks": "^19.0.3",
42
- "@udecode/plate-block-quote": "^19.0.3",
43
- "@udecode/plate-break": "^19.0.3",
44
- "@udecode/plate-code-block": "^19.0.3",
45
- "@udecode/plate-core": "^19.0.3",
46
- "@udecode/plate-link": "^19.0.3",
47
- "@udecode/plate-list": "^19.4.2",
48
- "@udecode/plate-media": "^19.2.0",
49
- "@udecode/plate-node-id": "^19.0.3",
50
- "@udecode/plate-paragraph": "^19.0.3",
51
- "@udecode/plate-reset-node": "^19.4.2",
52
- "@udecode/plate-select": "^19.2.0",
53
- "@udecode/plate-trailing-block": "^19.2.0",
54
- "react-dnd": "^16.0.1",
55
- "react-dnd-html5-backend": "^16.0.1",
56
- "slate": "^0.88.1",
24
+ "@headlessui/react": "1.7.14",
25
+ "@udecode/plate-basic-marks": "^20.4.0",
26
+ "@udecode/plate-block-quote": "^20.4.0",
27
+ "@udecode/plate-break": "^20.4.0",
28
+ "@udecode/plate-code-block": "^20.4.0",
29
+ "@udecode/plate-common": "^20.4.0",
30
+ "@udecode/plate-core": "^20.4.0",
31
+ "@udecode/plate-floating": "^20.4.0",
32
+ "@udecode/plate-link": "^20.4.0",
33
+ "@udecode/plate-list": "^20.4.0",
34
+ "@udecode/plate-media": "^20.4.0",
35
+ "@udecode/plate-node-id": "^20.4.0",
36
+ "@udecode/plate-paragraph": "^20.4.0",
37
+ "@udecode/plate-reset-node": "^20.4.0",
38
+ "@udecode/plate-select": "^20.4.0",
39
+ "@udecode/plate-trailing-block": "^20.4.0",
40
+ "slate": "^0.90.0",
57
41
  "slate-history": "^0.86.0",
58
42
  "slate-hyperscript": "^0.77.0",
59
- "slate-react": "^0.88.0"
43
+ "slate-react": "^0.91.0"
60
44
  }
61
- }
45
+ }
@@ -10,4 +10,3 @@ const createBlockquotePlugin = () => (0, plate_block_quote_1.createBlockquotePlu
10
10
  type: types_1.BLOCK_QUOTE_PLUGIN_TYPE,
11
11
  });
12
12
  exports.createBlockquotePlugin = createBlockquotePlugin;
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWJsb2NrLXF1b3RlLXBsdWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wbHVnaW5zL2Jsb2NrLXF1b3RlL2NyZWF0ZS1ibG9jay1xdW90ZS1wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsa0VBQW1HO0FBR25HLG1DQUFrRDtBQUUzQyxNQUFNLHNCQUFzQixHQUFHLEdBQUcsRUFBRSxDQUN2QyxJQUFBLDBDQUEyQixFQUEwQztJQUNqRSxLQUFLLEVBQUU7UUFDSCxTQUFTLEVBQUUsd0JBQXdCO0tBQ3RDO0lBQ0QsSUFBSSxFQUFFLCtCQUF1QjtDQUNoQyxDQUFDLENBQUM7QUFOTSxRQUFBLHNCQUFzQiwwQkFNNUIifQ==
@@ -4,4 +4,3 @@ exports.BLOCK_QUOTE_PLUGIN_TYPE = exports.BLOCK_QUOTE_PLUGIN_KEY = void 0;
4
4
  const plate_block_quote_1 = require("@udecode/plate-block-quote");
5
5
  exports.BLOCK_QUOTE_PLUGIN_KEY = plate_block_quote_1.ELEMENT_BLOCKQUOTE;
6
6
  exports.BLOCK_QUOTE_PLUGIN_TYPE = "block-quote";
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcGx1Z2lucy9ibG9jay1xdW90ZS90eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrRUFBZ0U7QUFFbkQsUUFBQSxzQkFBc0IsR0FBRyxzQ0FBa0IsQ0FBQztBQUM1QyxRQUFBLHVCQUF1QixHQUFHLGFBQWEsQ0FBQyJ9
@@ -0,0 +1,2 @@
1
+ export declare const PLUGIN_BUTTON_KEY = "button";
2
+ export declare const PLUGIN_BUTTON_TYPE = "button";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLUGIN_BUTTON_TYPE = exports.PLUGIN_BUTTON_KEY = void 0;
4
+ exports.PLUGIN_BUTTON_KEY = "button";
5
+ exports.PLUGIN_BUTTON_TYPE = exports.PLUGIN_BUTTON_KEY;
@@ -0,0 +1,2 @@
1
+ import { WysiwygContent } from "../../types";
2
+ export declare const createButtonPlugin: <OP = import("@udecode/utils").AnyObject, OV extends import("@udecode/slate").Value = WysiwygContent, OE extends import("@udecode/plate-core").PlateEditor<OV> = import("@udecode/plate-core").PlateEditor<OV>>(override?: Partial<import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").NoInfer<OP>, OV, OE>> | undefined, overrideByKey?: import("@udecode/plate-core").OverrideByKey<OV, OE> | undefined) => import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").NoInfer<OP>, OV, OE>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createButtonPlugin = void 0;
4
+ const plate_core_1 = require("@udecode/plate-core");
5
+ const constants_1 = require("./constants");
6
+ exports.createButtonPlugin = (0, plate_core_1.createPluginFactory)({
7
+ key: constants_1.PLUGIN_BUTTON_KEY,
8
+ type: constants_1.PLUGIN_BUTTON_TYPE,
9
+ isElement: true,
10
+ isVoid: true,
11
+ });
@@ -0,0 +1,3 @@
1
+ export { createButtonPlugin } from "./create-button-plugin";
2
+ export { PLUGIN_BUTTON_KEY, PLUGIN_BUTTON_TYPE } from "./constants";
3
+ export * from "./transforms";
@@ -0,0 +1,23 @@
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.PLUGIN_BUTTON_TYPE = exports.PLUGIN_BUTTON_KEY = exports.createButtonPlugin = void 0;
18
+ var create_button_plugin_1 = require("./create-button-plugin");
19
+ Object.defineProperty(exports, "createButtonPlugin", { enumerable: true, get: function () { return create_button_plugin_1.createButtonPlugin; } });
20
+ var constants_1 = require("./constants");
21
+ Object.defineProperty(exports, "PLUGIN_BUTTON_KEY", { enumerable: true, get: function () { return constants_1.PLUGIN_BUTTON_KEY; } });
22
+ Object.defineProperty(exports, "PLUGIN_BUTTON_TYPE", { enumerable: true, get: function () { return constants_1.PLUGIN_BUTTON_TYPE; } });
23
+ __exportStar(require("./transforms"), exports);
@@ -0,0 +1,2 @@
1
+ import { UxfButtonElement, UxfEditor } from "../../../types";
2
+ export declare const getActiveButton: (editor: UxfEditor) => UxfButtonElement | undefined;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveButton = void 0;
4
+ const utils_1 = require("../../../utils");
5
+ const constants_1 = require("../constants");
6
+ const getActiveButton = (editor) => {
7
+ return (0, utils_1.getActiveElement)(editor, constants_1.PLUGIN_BUTTON_TYPE);
8
+ };
9
+ exports.getActiveButton = getActiveButton;
@@ -0,0 +1,4 @@
1
+ export { isButtonActive } from "./is-button-active";
2
+ export { getActiveButton } from "./get-active-button";
3
+ export { insertButton } from "./insert-button";
4
+ export { updateButton } from "./update-button";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateButton = exports.insertButton = exports.getActiveButton = exports.isButtonActive = void 0;
4
+ var is_button_active_1 = require("./is-button-active");
5
+ Object.defineProperty(exports, "isButtonActive", { enumerable: true, get: function () { return is_button_active_1.isButtonActive; } });
6
+ var get_active_button_1 = require("./get-active-button");
7
+ Object.defineProperty(exports, "getActiveButton", { enumerable: true, get: function () { return get_active_button_1.getActiveButton; } });
8
+ var insert_button_1 = require("./insert-button");
9
+ Object.defineProperty(exports, "insertButton", { enumerable: true, get: function () { return insert_button_1.insertButton; } });
10
+ var update_button_1 = require("./update-button");
11
+ Object.defineProperty(exports, "updateButton", { enumerable: true, get: function () { return update_button_1.updateButton; } });
@@ -0,0 +1,2 @@
1
+ import { UxfEditor } from "../../../types";
2
+ export declare const insertButton: (editor: UxfEditor, buttonText: string, buttonUrl: string) => void;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.insertButton = void 0;
4
+ const utils_1 = require("../../../utils");
5
+ const constants_1 = require("../constants");
6
+ const insertButton = (editor, buttonText, buttonUrl) => {
7
+ const text = { text: "" };
8
+ const button = {
9
+ type: constants_1.PLUGIN_BUTTON_KEY,
10
+ buttonText,
11
+ buttonUrl,
12
+ children: [text],
13
+ };
14
+ (0, utils_1.insertVoid)(editor, button);
15
+ };
16
+ exports.insertButton = insertButton;