@sdata/web-vue 3.18.0 → 3.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/dist/sd.css +489 -0
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/icon-hover.vue.d.ts +1 -1
  4. package/es/_components/input-label/input-label.d.ts +13 -1
  5. package/es/_components/input-label/input-label.js +35 -5
  6. package/es/_components/input-label/style/index.css +6 -0
  7. package/es/_components/input-label/style/input-label.scss +8 -0
  8. package/es/_components/picker/input-range.vue.d.ts +24 -1
  9. package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +42 -6
  10. package/es/_components/picker/input.vue.d.ts +24 -1
  11. package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +31 -4
  12. package/es/_components/picker/style/index.scss +8 -0
  13. package/es/_components/select-view/select-view.d.ts +15 -3
  14. package/es/_components/select-view/select-view.js +10 -1
  15. package/es/_components/select-view/style/index.css +12 -0
  16. package/es/_components/virtual-list/virtual-list.vue.d.ts +6 -6
  17. package/es/_hooks/use-fit-width.d.ts +22 -0
  18. package/es/_hooks/use-fit-width.js +76 -0
  19. package/es/_hooks/use-form-item.d.ts +1 -1
  20. package/es/_hooks/use-size.d.ts +1 -1
  21. package/es/anchor/anchor.vue.d.ts +1 -1
  22. package/es/anchor/index.d.ts +3 -3
  23. package/es/auto-complete/auto-complete.d.ts +20 -2
  24. package/es/auto-complete/auto-complete.js +18 -0
  25. package/es/auto-complete/index.d.ts +36 -6
  26. package/es/basic-crud-table/basic-crud-table.vue.d.ts +2 -2
  27. package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +6 -4
  28. package/es/basic-crud-table/index.d.ts +5 -5
  29. package/es/basic-crud-table/types.d.ts +2 -0
  30. package/es/button/button.vue.d.ts +2 -2
  31. package/es/button/index.d.ts +6 -6
  32. package/es/card/card.d.ts +25 -3
  33. package/es/card/card.js +11 -2
  34. package/es/card/index.d.ts +45 -6
  35. package/es/carousel/carousel-indicator.vue.d.ts +1 -1
  36. package/es/cascader/base-cascader-panel.d.ts +4 -1
  37. package/es/cascader/base-cascader-panel.js +2 -1
  38. package/es/cascader/cascader-option.d.ts +1 -1
  39. package/es/cascader/cascader-panel.vue.d.ts +1 -1
  40. package/es/cascader/cascader-search-panel.d.ts +4 -1
  41. package/es/cascader/cascader-search-panel.js +2 -1
  42. package/es/cascader/cascader.vue.d.ts +7 -5
  43. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +22 -2
  44. package/es/cascader/types.d.ts +4 -1
  45. package/es/checkbox/checkbox.d.ts +3 -3
  46. package/es/checkbox/index.d.ts +6 -6
  47. package/es/collapse/collapse-item.d.ts +3 -3
  48. package/es/collapse/index.d.ts +3 -3
  49. package/es/color-picker/color-picker.d.ts +2 -2
  50. package/es/color-picker/index.d.ts +6 -6
  51. package/es/components.d.ts +4 -0
  52. package/es/config-provider/config-provider.vue.d.ts +68 -1
  53. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +67 -1
  54. package/es/config-provider/context.d.ts +12 -0
  55. package/es/config-provider/index.d.ts +102 -3
  56. package/es/date-picker/index.d.ts +87 -23
  57. package/es/date-picker/interface.d.ts +2 -1
  58. package/es/date-picker/picker-panel.vue.d.ts +1 -1
  59. package/es/date-picker/picker.vue.d.ts +39 -17
  60. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +30 -1
  61. package/es/date-picker/pickers/date-picker.d.ts +18 -0
  62. package/es/date-picker/pickers/date-picker.js +16 -0
  63. package/es/date-picker/range-picker-panel.vue.d.ts +1 -1
  64. package/es/date-picker/range-picker.vue.d.ts +39 -17
  65. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +27 -1
  66. package/es/date-picker/style/index.css +6 -0
  67. package/es/descriptions/descriptions.d.ts +3 -3
  68. package/es/descriptions/index.d.ts +9 -9
  69. package/es/divider/divider.d.ts +1 -1
  70. package/es/divider/index.d.ts +3 -3
  71. package/es/drawer/drawer.vue.d.ts +4 -4
  72. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
  73. package/es/drawer/index.d.ts +11 -11
  74. package/es/dropdown/dropdown-button.vue.d.ts +2 -2
  75. package/es/dropdown/dropdown-option.vue.d.ts +1 -1
  76. package/es/dropdown/dropdown-submenu.vue.d.ts +2 -2
  77. package/es/dropdown/dropdown.vue.d.ts +1 -1
  78. package/es/dropdown/index.d.ts +21 -21
  79. package/es/ellipsis/ellipsis.vue.d.ts +1 -1
  80. package/es/ellipsis/index.d.ts +6 -6
  81. package/es/ellipsis/performant-ellipsis.vue.d.ts +1 -1
  82. package/es/form/form-item.vue.d.ts +1 -1
  83. package/es/form/form.vue.d.ts +1 -1
  84. package/es/form/index.d.ts +9 -9
  85. package/es/grid/grid-row.vue.d.ts +3 -3
  86. package/es/grid/index.d.ts +9 -9
  87. package/es/icon/icon-arrow-up/icon-arrow-up.js +5 -0
  88. package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +52 -0
  89. package/es/icon/icon-arrow-up/index.js +9 -0
  90. package/es/icon/icon-mute/icon-mute.js +5 -0
  91. package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +52 -0
  92. package/es/icon/icon-mute/index.js +9 -0
  93. package/es/icon/icon-voice/icon-voice.js +5 -0
  94. package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +52 -0
  95. package/es/icon/icon-voice/index.js +9 -0
  96. package/es/image/preview-action.d.ts +6 -6
  97. package/es/image/preview-group.vue.d.ts +1 -1
  98. package/es/index.css +489 -0
  99. package/es/index.d.ts +6 -1
  100. package/es/index.js +5 -1
  101. package/es/index.scss +2 -0
  102. package/es/input/index.d.ts +99 -6
  103. package/es/input/input-password.vue.d.ts +18 -0
  104. package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +24 -2
  105. package/es/input/input-search.d.ts +18 -0
  106. package/es/input/input-search.js +20 -2
  107. package/es/input/input.d.ts +29 -2
  108. package/es/input/input.js +45 -3
  109. package/es/input/style/index.css +16 -0
  110. package/es/input/style/index.scss +21 -0
  111. package/es/input-number/index.d.ts +36 -6
  112. package/es/input-number/input-number.d.ts +20 -2
  113. package/es/input-number/input-number.js +19 -0
  114. package/es/input-tag/index.d.ts +36 -6
  115. package/es/input-tag/input-tag.d.ts +20 -2
  116. package/es/input-tag/input-tag.js +35 -4
  117. package/es/input-tag/style/index.css +6 -0
  118. package/es/input-tag/style/input-tag.scss +8 -0
  119. package/es/kv-list/index.d.ts +72 -32
  120. package/es/link/index.d.ts +6 -6
  121. package/es/link/link.vue.d.ts +2 -2
  122. package/es/list/index.d.ts +9 -0
  123. package/es/list/list.d.ts +7 -0
  124. package/es/list/list.js +8 -2
  125. package/es/locale/interface.d.ts +22 -0
  126. package/es/locale/lang/ar-eg.js +21 -1
  127. package/es/locale/lang/de-de.js +21 -1
  128. package/es/locale/lang/en-us.js +21 -1
  129. package/es/locale/lang/es-es.js +21 -1
  130. package/es/locale/lang/fr-fr.js +21 -1
  131. package/es/locale/lang/id-id.js +21 -1
  132. package/es/locale/lang/it-it.js +21 -1
  133. package/es/locale/lang/ja-jp.js +21 -1
  134. package/es/locale/lang/km-kh.js +21 -1
  135. package/es/locale/lang/ko-kr.js +21 -1
  136. package/es/locale/lang/ms-my.js +21 -1
  137. package/es/locale/lang/nl-nl.js +21 -1
  138. package/es/locale/lang/pt-pt.js +21 -1
  139. package/es/locale/lang/ru-ru.js +21 -1
  140. package/es/locale/lang/th-th.js +21 -1
  141. package/es/locale/lang/vi-vn.js +21 -1
  142. package/es/locale/lang/zh-cn.js +21 -1
  143. package/es/locale/lang/zh-tw.js +21 -1
  144. package/es/mention/index.d.ts +39 -9
  145. package/es/mention/mention.d.ts +21 -3
  146. package/es/mention/mention.js +24 -1
  147. package/es/mention/style/index.css +6 -0
  148. package/es/mention/style/index.scss +8 -0
  149. package/es/menu/item.d.ts +1 -1
  150. package/es/message/message-list.d.ts +1 -1
  151. package/es/modal/index.d.ts +9 -9
  152. package/es/modal/modal.vue.d.ts +3 -3
  153. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
  154. package/es/popconfirm/index.d.ts +3 -3
  155. package/es/popconfirm/popconfirm.vue.d.ts +1 -1
  156. package/es/popover/index.d.ts +6 -6
  157. package/es/popover/popover.vue.d.ts +2 -2
  158. package/es/progress/circle.vue.d.ts +1 -1
  159. package/es/progress/line.vue.d.ts +1 -1
  160. package/es/qr-code/index.d.ts +27 -21
  161. package/es/qr-code/qr-code.vue.d.ts +8 -6
  162. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +5 -2
  163. package/es/radio/index.d.ts +6 -6
  164. package/es/radio/radio.d.ts +3 -3
  165. package/es/rate/index.d.ts +3 -3
  166. package/es/rate/rate.d.ts +1 -1
  167. package/es/resize-box/index.d.ts +5 -5
  168. package/es/resize-box/resize-box.vue.d.ts +3 -3
  169. package/es/rich-text-editor/built-in-components.d.ts +5 -0
  170. package/es/rich-text-editor/built-in-components.js +6 -0
  171. package/es/rich-text-editor/index.d.ts +195 -0
  172. package/es/rich-text-editor/index.js +12 -0
  173. package/es/rich-text-editor/nodes/inline-component-node.d.ts +30 -0
  174. package/es/rich-text-editor/nodes/inline-component-node.js +86 -0
  175. package/es/rich-text-editor/rich-text-editor.js +5 -0
  176. package/es/rich-text-editor/rich-text-editor.vue.d.ts +76 -0
  177. package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +630 -0
  178. package/es/rich-text-editor/rich-text-node-renderer.js +5 -0
  179. package/es/rich-text-editor/rich-text-node-renderer.vue.d.ts +28 -0
  180. package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +133 -0
  181. package/es/rich-text-editor/style/css.js +2 -0
  182. package/es/rich-text-editor/style/index.css +164 -0
  183. package/es/rich-text-editor/style/index.d.ts +2 -0
  184. package/es/rich-text-editor/style/index.js +2 -0
  185. package/es/rich-text-editor/style/index.scss +193 -0
  186. package/es/rich-text-editor/style/token.scss +36 -0
  187. package/es/rich-text-editor/types.d.ts +148 -0
  188. package/es/sd-vue.js +6 -0
  189. package/es/select/index.d.ts +117 -54
  190. package/es/select/interface.d.ts +2 -1
  191. package/es/select/select-dropdown.vue.d.ts +3 -0
  192. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +2 -4
  193. package/es/select/select.d.ts +62 -25
  194. package/es/select/select.js +28 -1
  195. package/es/sender/context.d.ts +8 -0
  196. package/es/sender/context.js +4 -0
  197. package/es/sender/index.d.ts +119 -0
  198. package/es/sender/index.js +20 -0
  199. package/es/sender/sender-header.js +5 -0
  200. package/es/sender/sender-header.vue.d.ts +28 -0
  201. package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +127 -0
  202. package/es/sender/sender-switch.js +5 -0
  203. package/es/sender/sender-switch.vue.d.ts +32 -0
  204. package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +95 -0
  205. package/es/sender/sender.js +5 -0
  206. package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +895 -0
  207. package/es/sender/style/css.js +3 -0
  208. package/es/sender/style/index.css +301 -0
  209. package/es/sender/style/index.d.ts +3 -0
  210. package/es/sender/style/index.js +3 -0
  211. package/es/sender/style/index.scss +359 -0
  212. package/es/sender/style/token.scss +43 -0
  213. package/es/sender/types.d.ts +228 -0
  214. package/es/sender/use-speech.d.ts +19 -0
  215. package/es/sender/use-speech.js +338 -0
  216. package/es/slider/index.d.ts +3 -3
  217. package/es/slider/slider-input.vue.d.ts +1 -1
  218. package/es/slider/slider.vue.d.ts +1 -1
  219. package/es/space/index.d.ts +9 -9
  220. package/es/space/space.d.ts +2 -2
  221. package/es/spin/index.d.ts +18 -3
  222. package/es/spin/spin.d.ts +10 -1
  223. package/es/spin/spin.js +72 -10
  224. package/es/statistic/index.d.ts +3 -3
  225. package/es/statistic/statistic.vue.d.ts +1 -1
  226. package/es/steps/index.d.ts +5 -5
  227. package/es/steps/step.vue.d.ts +2 -2
  228. package/es/steps/steps.vue.d.ts +1 -1
  229. package/es/table/index.d.ts +68 -23
  230. package/es/table/interface.d.ts +3 -0
  231. package/es/table/table-column.d.ts +1 -1
  232. package/es/table/table-operation-td.d.ts +12 -12
  233. package/es/table/table-td.d.ts +2 -2
  234. package/es/table/table.d.ts +27 -8
  235. package/es/table/table.js +7 -2
  236. package/es/tabs/index.d.ts +12 -12
  237. package/es/tabs/tabs-nav.d.ts +1 -1
  238. package/es/tabs/tabs.d.ts +4 -4
  239. package/es/tag/index.d.ts +6 -6
  240. package/es/tag/tag.vue.d.ts +2 -2
  241. package/es/textarea/index.d.ts +38 -8
  242. package/es/textarea/style/index.css +6 -0
  243. package/es/textarea/style/index.scss +8 -0
  244. package/es/textarea/textarea.vue.d.ts +21 -3
  245. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +36 -3
  246. package/es/time-picker/index.d.ts +36 -6
  247. package/es/time-picker/interface.d.ts +2 -1
  248. package/es/time-picker/range-panel.js +58 -0
  249. package/es/time-picker/time-picker.vue.d.ts +20 -2
  250. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +30 -1
  251. package/es/timeline/index.d.ts +45 -6
  252. package/es/timeline/timeline.d.ts +25 -3
  253. package/es/timeline/timeline.js +11 -2
  254. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +9 -5
  255. package/es/toolbar/types.d.ts +2 -0
  256. package/es/tooltip/index.d.ts +6 -6
  257. package/es/tooltip/tooltip.vue.d.ts +2 -2
  258. package/es/tour/index.d.ts +3 -3
  259. package/es/tour/tour.vue.d.ts +1 -1
  260. package/es/transfer/index.d.ts +3 -3
  261. package/es/transfer/transfer.vue.d.ts +1 -1
  262. package/es/tree/tree.vue.d.ts +4 -4
  263. package/es/tree-select/interface.d.ts +2 -1
  264. package/es/tree-select/tree-select.vue.d.ts +32 -7
  265. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +27 -1
  266. package/es/trigger/index.d.ts +12 -12
  267. package/es/trigger/trigger.d.ts +4 -4
  268. package/es/typography/base.d.ts +4 -4
  269. package/es/typography/edit-content.vue.d.ts +2 -2
  270. package/es/upload/index.d.ts +6 -6
  271. package/es/upload/upload-button.d.ts +1 -1
  272. package/es/upload/upload.d.ts +2 -2
  273. package/es/verification-code/index.d.ts +3 -3
  274. package/es/verification-code/verification-code.d.ts +1 -1
  275. package/es/watermark/index.d.ts +3 -3
  276. package/es/watermark/watermark.d.ts +1 -1
  277. package/json/vetur-attributes.json +295 -2
  278. package/json/vetur-tags.json +103 -3
  279. package/json/web-types.json +746 -53
  280. package/package.json +10 -1
@@ -0,0 +1,5 @@
1
+ import type { JsonFormBuiltinComponentType } from '../json-form/types';
2
+ export type RichTextEditorJsonFormNodeName = JsonFormBuiltinComponentType;
3
+ export type RichTextEditorBuiltInNodeName = RichTextEditorJsonFormNodeName | 'tag';
4
+ export declare const RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES: readonly RichTextEditorJsonFormNodeName[];
5
+ export declare const RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES: readonly RichTextEditorBuiltInNodeName[];
@@ -0,0 +1,6 @@
1
+ import { JSON_FORM_COMPONENT_TYPES } from "../json-form/types.js";
2
+ //#region components/rich-text-editor/built-in-components.ts
3
+ var RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES = Object.freeze(Object.values(JSON_FORM_COMPONENT_TYPES));
4
+ var RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES = Object.freeze([...RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES, "tag"]);
5
+ //#endregion
6
+ export { RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES };
@@ -0,0 +1,195 @@
1
+ import type { App } from 'vue';
2
+ import type { SDOptions } from '../_utils/types';
3
+ import _RichTextEditor from './rich-text-editor.vue';
4
+ declare const RichTextEditor: {
5
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types").RichTextEditorProps> & Readonly<{
6
+ onUpdate?: ((context: import("./types").RichTextEditorChangeContext) => any) | undefined;
7
+ onError?: ((error: Error) => any) | undefined;
8
+ onFocus?: ((event: FocusEvent) => any) | undefined;
9
+ onBlur?: ((event: FocusEvent) => any) | undefined;
10
+ onChange?: ((value: import("./types").RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((value: import("./types").RichTextEditorValue) => any) | undefined;
12
+ onReady?: ((editor: import("lexical").LexicalEditor) => any) | undefined;
13
+ }>, {
14
+ readonly editor: import("lexical").LexicalEditor | null;
15
+ readonly editorState: import("lexical").EditorState | null;
16
+ readonly rootElement: HTMLDivElement | null;
17
+ readonly canUndo: boolean;
18
+ readonly canRedo: boolean;
19
+ focus: (callback?: () => void, options?: import("./types").RichTextEditorFocusOptions) => void;
20
+ blur: () => void | undefined;
21
+ clear: () => void;
22
+ undo: () => boolean;
23
+ redo: () => boolean;
24
+ getJSON: () => import("lexical").SerializedEditorState<import("lexical").SerializedLexicalNode> | undefined;
25
+ setJSON: (value: import("./types").RichTextEditorValue | string, options?: import("lexical").EditorSetOptions) => void;
26
+ getContent: () => import("./types").RichTextEditorContentSnapshot[];
27
+ setContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("lexical").EditorUpdateOptions) => void;
28
+ insertContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("./types").RichTextEditorInsertOptions) => void;
29
+ getText: () => string;
30
+ getHTML: () => string;
31
+ setHTML: (html: string, options?: import("lexical").EditorUpdateOptions) => void;
32
+ getMarkdown: (transformers?: readonly import("@lexical/markdown").Transformer[]) => string;
33
+ setMarkdown: (markdown: string, transformers?: readonly import("@lexical/markdown").Transformer[], options?: import("lexical").EditorUpdateOptions) => void;
34
+ insertText: (text: string, options?: import("./types").RichTextEditorInsertOptions) => void;
35
+ insertComponent: (data: import("./types").RichTextEditorComponentNodeData, options?: import("./types").RichTextEditorInsertOptions) => void;
36
+ updateComponent: (nodeKey: import("lexical").NodeKey, value: import("type-fest").JsonValue, options?: import("lexical").EditorUpdateOptions) => void;
37
+ removeComponent: (nodeKey: import("lexical").NodeKey, options?: import("lexical").EditorUpdateOptions) => void;
38
+ formatText: (format: import("lexical").TextFormatType) => boolean;
39
+ read: <T>(callback: () => T) => T | undefined;
40
+ update: (callback: () => void, options?: import("lexical").EditorUpdateOptions) => void | undefined;
41
+ dispatchCommand: <T>(command: import("lexical").LexicalCommand<T>, payload: T) => boolean;
42
+ registerCommand: <T>(command: import("lexical").LexicalCommand<T>, listener: import("lexical").CommandListener<T>, priority: import("lexical").CommandListenerPriority) => () => void;
43
+ registerUpdateListener: (listener: import("lexical").UpdateListener) => () => void;
44
+ registerMutationListener: (klass: import("lexical").Klass<import("lexical").LexicalNode>, listener: import("lexical").MutationListener, options?: import("./types").RichTextEditorMutationListenerOptions) => () => void;
45
+ registerNodeTransform: <T extends import("lexical").LexicalNode>(klass: import("lexical").Klass<T>, listener: import("lexical").Transform<T>) => () => void;
46
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
47
+ update: (context: import("./types").RichTextEditorChangeContext) => any;
48
+ error: (error: Error) => any;
49
+ focus: (event: FocusEvent) => any;
50
+ blur: (event: FocusEvent) => any;
51
+ change: (value: import("./types").RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any;
52
+ "update:modelValue": (value: import("./types").RichTextEditorValue) => any;
53
+ ready: (editor: import("lexical").LexicalEditor) => any;
54
+ }, import("vue").PublicProps, {
55
+ classNames: Partial<Record<import("./types").RichTextEditorSemanticType, string>>;
56
+ autoSize: boolean | import("./types").RichTextEditorAutoSize;
57
+ styles: Partial<Record<import("./types").RichTextEditorSemanticType, import("vue").CSSProperties>>;
58
+ plugins: readonly import("./types").RichTextEditorPlugin[];
59
+ transformers: readonly import("@lexical/markdown").Transformer[];
60
+ history: boolean;
61
+ historyDelay: number;
62
+ historyMaxDepth: number | null;
63
+ spellcheck: boolean;
64
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
65
+ P: {};
66
+ B: {};
67
+ D: {};
68
+ C: {};
69
+ M: {};
70
+ Defaults: {};
71
+ }, Readonly<import("./types").RichTextEditorProps> & Readonly<{
72
+ onUpdate?: ((context: import("./types").RichTextEditorChangeContext) => any) | undefined;
73
+ onError?: ((error: Error) => any) | undefined;
74
+ onFocus?: ((event: FocusEvent) => any) | undefined;
75
+ onBlur?: ((event: FocusEvent) => any) | undefined;
76
+ onChange?: ((value: import("./types").RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any) | undefined;
77
+ "onUpdate:modelValue"?: ((value: import("./types").RichTextEditorValue) => any) | undefined;
78
+ onReady?: ((editor: import("lexical").LexicalEditor) => any) | undefined;
79
+ }>, {
80
+ readonly editor: import("lexical").LexicalEditor | null;
81
+ readonly editorState: import("lexical").EditorState | null;
82
+ readonly rootElement: HTMLDivElement | null;
83
+ readonly canUndo: boolean;
84
+ readonly canRedo: boolean;
85
+ focus: (callback?: () => void, options?: import("./types").RichTextEditorFocusOptions) => void;
86
+ blur: () => void | undefined;
87
+ clear: () => void;
88
+ undo: () => boolean;
89
+ redo: () => boolean;
90
+ getJSON: () => import("lexical").SerializedEditorState<import("lexical").SerializedLexicalNode> | undefined;
91
+ setJSON: (value: import("./types").RichTextEditorValue | string, options?: import("lexical").EditorSetOptions) => void;
92
+ getContent: () => import("./types").RichTextEditorContentSnapshot[];
93
+ setContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("lexical").EditorUpdateOptions) => void;
94
+ insertContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("./types").RichTextEditorInsertOptions) => void;
95
+ getText: () => string;
96
+ getHTML: () => string;
97
+ setHTML: (html: string, options?: import("lexical").EditorUpdateOptions) => void;
98
+ getMarkdown: (transformers?: readonly import("@lexical/markdown").Transformer[]) => string;
99
+ setMarkdown: (markdown: string, transformers?: readonly import("@lexical/markdown").Transformer[], options?: import("lexical").EditorUpdateOptions) => void;
100
+ insertText: (text: string, options?: import("./types").RichTextEditorInsertOptions) => void;
101
+ insertComponent: (data: import("./types").RichTextEditorComponentNodeData, options?: import("./types").RichTextEditorInsertOptions) => void;
102
+ updateComponent: (nodeKey: import("lexical").NodeKey, value: import("type-fest").JsonValue, options?: import("lexical").EditorUpdateOptions) => void;
103
+ removeComponent: (nodeKey: import("lexical").NodeKey, options?: import("lexical").EditorUpdateOptions) => void;
104
+ formatText: (format: import("lexical").TextFormatType) => boolean;
105
+ read: <T>(callback: () => T) => T | undefined;
106
+ update: (callback: () => void, options?: import("lexical").EditorUpdateOptions) => void | undefined;
107
+ dispatchCommand: <T>(command: import("lexical").LexicalCommand<T>, payload: T) => boolean;
108
+ registerCommand: <T>(command: import("lexical").LexicalCommand<T>, listener: import("lexical").CommandListener<T>, priority: import("lexical").CommandListenerPriority) => () => void;
109
+ registerUpdateListener: (listener: import("lexical").UpdateListener) => () => void;
110
+ registerMutationListener: (klass: import("lexical").Klass<import("lexical").LexicalNode>, listener: import("lexical").MutationListener, options?: import("./types").RichTextEditorMutationListenerOptions) => () => void;
111
+ registerNodeTransform: <T extends import("lexical").LexicalNode>(klass: import("lexical").Klass<T>, listener: import("lexical").Transform<T>) => () => void;
112
+ }, {}, {}, {}, {
113
+ classNames: Partial<Record<import("./types").RichTextEditorSemanticType, string>>;
114
+ autoSize: boolean | import("./types").RichTextEditorAutoSize;
115
+ styles: Partial<Record<import("./types").RichTextEditorSemanticType, import("vue").CSSProperties>>;
116
+ plugins: readonly import("./types").RichTextEditorPlugin[];
117
+ transformers: readonly import("@lexical/markdown").Transformer[];
118
+ history: boolean;
119
+ historyDelay: number;
120
+ historyMaxDepth: number | null;
121
+ spellcheck: boolean;
122
+ }>;
123
+ __isFragment?: never;
124
+ __isTeleport?: never;
125
+ __isSuspense?: never;
126
+ } & import("vue").ComponentOptionsBase<Readonly<import("./types").RichTextEditorProps> & Readonly<{
127
+ onUpdate?: ((context: import("./types").RichTextEditorChangeContext) => any) | undefined;
128
+ onError?: ((error: Error) => any) | undefined;
129
+ onFocus?: ((event: FocusEvent) => any) | undefined;
130
+ onBlur?: ((event: FocusEvent) => any) | undefined;
131
+ onChange?: ((value: import("./types").RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any) | undefined;
132
+ "onUpdate:modelValue"?: ((value: import("./types").RichTextEditorValue) => any) | undefined;
133
+ onReady?: ((editor: import("lexical").LexicalEditor) => any) | undefined;
134
+ }>, {
135
+ readonly editor: import("lexical").LexicalEditor | null;
136
+ readonly editorState: import("lexical").EditorState | null;
137
+ readonly rootElement: HTMLDivElement | null;
138
+ readonly canUndo: boolean;
139
+ readonly canRedo: boolean;
140
+ focus: (callback?: () => void, options?: import("./types").RichTextEditorFocusOptions) => void;
141
+ blur: () => void | undefined;
142
+ clear: () => void;
143
+ undo: () => boolean;
144
+ redo: () => boolean;
145
+ getJSON: () => import("lexical").SerializedEditorState<import("lexical").SerializedLexicalNode> | undefined;
146
+ setJSON: (value: import("./types").RichTextEditorValue | string, options?: import("lexical").EditorSetOptions) => void;
147
+ getContent: () => import("./types").RichTextEditorContentSnapshot[];
148
+ setContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("lexical").EditorUpdateOptions) => void;
149
+ insertContent: (content: readonly import("./types").RichTextEditorContentItem[], options?: import("./types").RichTextEditorInsertOptions) => void;
150
+ getText: () => string;
151
+ getHTML: () => string;
152
+ setHTML: (html: string, options?: import("lexical").EditorUpdateOptions) => void;
153
+ getMarkdown: (transformers?: readonly import("@lexical/markdown").Transformer[]) => string;
154
+ setMarkdown: (markdown: string, transformers?: readonly import("@lexical/markdown").Transformer[], options?: import("lexical").EditorUpdateOptions) => void;
155
+ insertText: (text: string, options?: import("./types").RichTextEditorInsertOptions) => void;
156
+ insertComponent: (data: import("./types").RichTextEditorComponentNodeData, options?: import("./types").RichTextEditorInsertOptions) => void;
157
+ updateComponent: (nodeKey: import("lexical").NodeKey, value: import("type-fest").JsonValue, options?: import("lexical").EditorUpdateOptions) => void;
158
+ removeComponent: (nodeKey: import("lexical").NodeKey, options?: import("lexical").EditorUpdateOptions) => void;
159
+ formatText: (format: import("lexical").TextFormatType) => boolean;
160
+ read: <T>(callback: () => T) => T | undefined;
161
+ update: (callback: () => void, options?: import("lexical").EditorUpdateOptions) => void | undefined;
162
+ dispatchCommand: <T>(command: import("lexical").LexicalCommand<T>, payload: T) => boolean;
163
+ registerCommand: <T>(command: import("lexical").LexicalCommand<T>, listener: import("lexical").CommandListener<T>, priority: import("lexical").CommandListenerPriority) => () => void;
164
+ registerUpdateListener: (listener: import("lexical").UpdateListener) => () => void;
165
+ registerMutationListener: (klass: import("lexical").Klass<import("lexical").LexicalNode>, listener: import("lexical").MutationListener, options?: import("./types").RichTextEditorMutationListenerOptions) => () => void;
166
+ registerNodeTransform: <T extends import("lexical").LexicalNode>(klass: import("lexical").Klass<T>, listener: import("lexical").Transform<T>) => () => void;
167
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
168
+ update: (context: import("./types").RichTextEditorChangeContext) => any;
169
+ error: (error: Error) => any;
170
+ focus: (event: FocusEvent) => any;
171
+ blur: (event: FocusEvent) => any;
172
+ change: (value: import("./types").RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any;
173
+ "update:modelValue": (value: import("./types").RichTextEditorValue) => any;
174
+ ready: (editor: import("lexical").LexicalEditor) => any;
175
+ }, string, {
176
+ classNames: Partial<Record<import("./types").RichTextEditorSemanticType, string>>;
177
+ autoSize: boolean | import("./types").RichTextEditorAutoSize;
178
+ styles: Partial<Record<import("./types").RichTextEditorSemanticType, import("vue").CSSProperties>>;
179
+ plugins: readonly import("./types").RichTextEditorPlugin[];
180
+ transformers: readonly import("@lexical/markdown").Transformer[];
181
+ history: boolean;
182
+ historyDelay: number;
183
+ historyMaxDepth: number | null;
184
+ spellcheck: boolean;
185
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
186
+ $slots: import("./types").RichTextEditorSlots;
187
+ }) & {
188
+ install: (app: App, options?: SDOptions) => void;
189
+ };
190
+ export { $createInlineComponentNode, $isInlineComponentNode, InlineComponentNode, } from './nodes/inline-component-node';
191
+ export { RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES, } from './built-in-components';
192
+ export type { SerializedInlineComponentNode } from './nodes/inline-component-node';
193
+ export type { RichTextEditorAutoSize, RichTextEditorBuiltInNodeData, RichTextEditorBuiltInNodeName, RichTextEditorChangeContext, RichTextEditorComponentNodeData, RichTextEditorComponentNodeSnapshot, RichTextEditorConfig, RichTextEditorContentItem, RichTextEditorContentSnapshot, RichTextEditorEmits, RichTextEditorFocusOptions, RichTextEditorInputNodeData, RichTextEditorJsonFormNodeData, RichTextEditorJsonFormNodeName, RichTextEditorInsertOptions, RichTextEditorMutationListenerOptions, RichTextEditorNodeRenderContext, RichTextEditorPlugin, RichTextEditorPluginContext, RichTextEditorProps, RichTextEditorRef, RichTextEditorSelectNodeData, RichTextEditorSemanticType, RichTextEditorSlots, RichTextEditorTagNodeData, RichTextEditorValue, } from './types';
194
+ export type RichTextEditorInstance = InstanceType<typeof _RichTextEditor>;
195
+ export default RichTextEditor;
@@ -0,0 +1,12 @@
1
+ import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
2
+ import { $createInlineComponentNode, $isInlineComponentNode, InlineComponentNode } from "./nodes/inline-component-node.js";
3
+ import rich_text_editor_default from "./rich-text-editor.js";
4
+ import { RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES } from "./built-in-components.js";
5
+ //#region components/rich-text-editor/index.ts
6
+ var RichTextEditor = Object.assign(rich_text_editor_default, { install: (app, options) => {
7
+ setGlobalConfig(app, options);
8
+ const componentPrefix = getComponentPrefix(options);
9
+ app.component(componentPrefix + rich_text_editor_default.name, rich_text_editor_default);
10
+ } });
11
+ //#endregion
12
+ export { $createInlineComponentNode, $isInlineComponentNode, InlineComponentNode, RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES, RichTextEditor as default };
@@ -0,0 +1,30 @@
1
+ import type { DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode } from 'lexical';
2
+ import type { JsonValue } from 'type-fest';
3
+ import { DecoratorNode } from 'lexical';
4
+ import type { RichTextEditorComponentNodeData, RichTextEditorComponentNodeSnapshot } from '../types';
5
+ export interface SerializedInlineComponentNode extends SerializedLexicalNode {
6
+ data: RichTextEditorComponentNodeData;
7
+ type: 'sd-inline-component';
8
+ version: 1;
9
+ }
10
+ export declare class InlineComponentNode extends DecoratorNode<null> {
11
+ __data: RichTextEditorComponentNodeData;
12
+ static getType(): string;
13
+ static clone(node: InlineComponentNode): InlineComponentNode;
14
+ static importJSON(serializedNode: SerializedLexicalNode & Record<string, unknown>): InlineComponentNode;
15
+ constructor(data?: RichTextEditorComponentNodeData, key?: NodeKey);
16
+ createDOM(): HTMLElement;
17
+ updateDOM(previousNode: InlineComponentNode, element: HTMLElement): boolean;
18
+ decorate(_editor: LexicalEditor, _config: EditorConfig): null;
19
+ exportDOM(): DOMExportOutput;
20
+ exportJSON(): SerializedInlineComponentNode;
21
+ getData(): RichTextEditorComponentNodeSnapshot;
22
+ getTextContent(): string;
23
+ setValue(value: JsonValue): this;
24
+ setData(data: RichTextEditorComponentNodeData): this;
25
+ isInline(): true;
26
+ isIsolated(): false;
27
+ isKeyboardSelectable(): true;
28
+ }
29
+ export declare function $createInlineComponentNode(data: RichTextEditorComponentNodeData): InlineComponentNode;
30
+ export declare function $isInlineComponentNode(node: LexicalNode | null | undefined): node is InlineComponentNode;
@@ -0,0 +1,86 @@
1
+ import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
2
+ import { cloneDeep } from "es-toolkit";
3
+ import { $applyNodeReplacement, DecoratorNode } from "lexical";
4
+ //#region components/rich-text-editor/nodes/inline-component-node.ts
5
+ var InlineComponentNode = class InlineComponentNode extends DecoratorNode {
6
+ static getType() {
7
+ return "sd-inline-component";
8
+ }
9
+ static clone(node) {
10
+ return new InlineComponentNode(node.__data, node.__key);
11
+ }
12
+ static importJSON(serializedNode) {
13
+ return $createInlineComponentNode(serializedNode.data);
14
+ }
15
+ constructor(data = {
16
+ key: "",
17
+ name: "custom"
18
+ }, key) {
19
+ super(key);
20
+ this.__data = cloneDeep(data);
21
+ }
22
+ createDOM() {
23
+ const element = document.createElement("span");
24
+ element.className = "sd-rich-text-editor-component";
25
+ element.dataset.richTextComponent = this.__data.name;
26
+ element.dataset.richTextComponentKey = this.__data.key;
27
+ return element;
28
+ }
29
+ updateDOM(previousNode, element) {
30
+ if (previousNode.__data.name !== this.__data.name) element.dataset.richTextComponent = this.__data.name;
31
+ if (previousNode.__data.key !== this.__data.key) element.dataset.richTextComponentKey = this.__data.key;
32
+ return false;
33
+ }
34
+ decorate(_editor, _config) {
35
+ return null;
36
+ }
37
+ exportDOM() {
38
+ const element = document.createElement("span");
39
+ element.dataset.richTextComponent = this.__data.name;
40
+ element.dataset.richTextComponentKey = this.__data.key;
41
+ element.textContent = this.getTextContent();
42
+ return { element };
43
+ }
44
+ exportJSON() {
45
+ return _objectSpread2(_objectSpread2({}, super.exportJSON()), {}, {
46
+ data: cloneDeep(this.getLatest().__data),
47
+ type: "sd-inline-component",
48
+ version: 1
49
+ });
50
+ }
51
+ getData() {
52
+ return cloneDeep(this.getLatest().__data);
53
+ }
54
+ getTextContent() {
55
+ var _data$textValue, _data$value;
56
+ const data = this.getLatest().__data;
57
+ return (_data$textValue = data.textValue) !== null && _data$textValue !== void 0 ? _data$textValue : String((_data$value = data.value) !== null && _data$value !== void 0 ? _data$value : "");
58
+ }
59
+ setValue(value) {
60
+ const writable = this.getWritable();
61
+ writable.__data = _objectSpread2(_objectSpread2({}, writable.__data), {}, { value: cloneDeep(value) });
62
+ return writable;
63
+ }
64
+ setData(data) {
65
+ const writable = this.getWritable();
66
+ writable.__data = cloneDeep(data);
67
+ return writable;
68
+ }
69
+ isInline() {
70
+ return true;
71
+ }
72
+ isIsolated() {
73
+ return false;
74
+ }
75
+ isKeyboardSelectable() {
76
+ return true;
77
+ }
78
+ };
79
+ function $createInlineComponentNode(data) {
80
+ return $applyNodeReplacement(new InlineComponentNode(data));
81
+ }
82
+ function $isInlineComponentNode(node) {
83
+ return node instanceof InlineComponentNode;
84
+ }
85
+ //#endregion
86
+ export { $createInlineComponentNode, $isInlineComponentNode, InlineComponentNode };
@@ -0,0 +1,5 @@
1
+ import rich_text_editor_vue_vue_type_script_setup_true_lang_default from "./rich-text-editor.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/rich-text-editor/rich-text-editor.vue
3
+ var rich_text_editor_default = rich_text_editor_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { rich_text_editor_default as default };
@@ -0,0 +1,76 @@
1
+ import type { CommandListener, CommandListenerPriority, EditorSetOptions, EditorState, EditorUpdateOptions, Klass, LexicalCommand, LexicalEditor, LexicalNode, MutationListener, NodeKey, TextFormatType, Transform } from 'lexical';
2
+ import type { JsonValue } from 'type-fest';
3
+ import type { CSSProperties } from 'vue';
4
+ import type { RichTextEditorComponentNodeData, RichTextEditorContentItem, RichTextEditorContentSnapshot, RichTextEditorFocusOptions, RichTextEditorInsertOptions, RichTextEditorMutationListenerOptions, RichTextEditorProps, RichTextEditorSlots, RichTextEditorValue } from './types';
5
+ type __VLS_Slots = RichTextEditorSlots;
6
+ declare function dispatchCommand<T>(command: LexicalCommand<T>, payload: T): boolean;
7
+ declare function registerCommand<T>(command: LexicalCommand<T>, listener: CommandListener<T>, priority: CommandListenerPriority): () => void;
8
+ declare function registerNodeTransform<T extends LexicalNode>(klass: Klass<T>, listener: Transform<T>): () => void;
9
+ declare const __VLS_base: import("vue").DefineComponent<RichTextEditorProps, {
10
+ readonly editor: LexicalEditor | null;
11
+ readonly editorState: EditorState | null;
12
+ readonly rootElement: HTMLDivElement | null;
13
+ readonly canUndo: boolean;
14
+ readonly canRedo: boolean;
15
+ focus: (callback?: () => void, options?: RichTextEditorFocusOptions) => void;
16
+ blur: () => void | undefined;
17
+ clear: () => void;
18
+ undo: () => boolean;
19
+ redo: () => boolean;
20
+ getJSON: () => import("lexical").SerializedEditorState<import("lexical").SerializedLexicalNode> | undefined;
21
+ setJSON: (value: RichTextEditorValue | string, options?: EditorSetOptions) => void;
22
+ getContent: () => RichTextEditorContentSnapshot[];
23
+ setContent: (content: readonly RichTextEditorContentItem[], options?: EditorUpdateOptions) => void;
24
+ insertContent: (content: readonly RichTextEditorContentItem[], options?: RichTextEditorInsertOptions) => void;
25
+ getText: () => string;
26
+ getHTML: () => string;
27
+ setHTML: (html: string, options?: EditorUpdateOptions) => void;
28
+ getMarkdown: (transformers?: readonly import("@lexical/markdown").Transformer[]) => string;
29
+ setMarkdown: (markdown: string, transformers?: readonly import("@lexical/markdown").Transformer[], options?: EditorUpdateOptions) => void;
30
+ insertText: (text: string, options?: RichTextEditorInsertOptions) => void;
31
+ insertComponent: (data: RichTextEditorComponentNodeData, options?: RichTextEditorInsertOptions) => void;
32
+ updateComponent: (nodeKey: NodeKey, value: JsonValue, options?: EditorUpdateOptions) => void;
33
+ removeComponent: (nodeKey: NodeKey, options?: EditorUpdateOptions) => void;
34
+ formatText: (format: TextFormatType) => boolean;
35
+ read: <T>(callback: () => T) => T | undefined;
36
+ update: (callback: () => void, options?: EditorUpdateOptions) => void | undefined;
37
+ dispatchCommand: typeof dispatchCommand;
38
+ registerCommand: typeof registerCommand;
39
+ registerUpdateListener: (listener: import("lexical").UpdateListener) => () => void;
40
+ registerMutationListener: (klass: Klass<LexicalNode>, listener: MutationListener, options?: RichTextEditorMutationListenerOptions) => () => void;
41
+ registerNodeTransform: typeof registerNodeTransform;
42
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ update: (context: import("./types").RichTextEditorChangeContext) => any;
44
+ error: (error: Error) => any;
45
+ focus: (event: FocusEvent) => any;
46
+ blur: (event: FocusEvent) => any;
47
+ change: (value: RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any;
48
+ "update:modelValue": (value: RichTextEditorValue) => any;
49
+ ready: (editor: LexicalEditor) => any;
50
+ }, string, import("vue").PublicProps, Readonly<RichTextEditorProps> & Readonly<{
51
+ onUpdate?: ((context: import("./types").RichTextEditorChangeContext) => any) | undefined;
52
+ onError?: ((error: Error) => any) | undefined;
53
+ onFocus?: ((event: FocusEvent) => any) | undefined;
54
+ onBlur?: ((event: FocusEvent) => any) | undefined;
55
+ onChange?: ((value: RichTextEditorValue, context: import("./types").RichTextEditorChangeContext) => any) | undefined;
56
+ "onUpdate:modelValue"?: ((value: RichTextEditorValue) => any) | undefined;
57
+ onReady?: ((editor: LexicalEditor) => any) | undefined;
58
+ }>, {
59
+ classNames: Partial<Record<import("./types").RichTextEditorSemanticType, string>>;
60
+ autoSize: boolean | import("./types").RichTextEditorAutoSize;
61
+ styles: Partial<Record<import("./types").RichTextEditorSemanticType, CSSProperties>>;
62
+ plugins: readonly import("./types").RichTextEditorPlugin[];
63
+ transformers: readonly import("@lexical/markdown").Transformer[];
64
+ history: boolean;
65
+ historyDelay: number;
66
+ historyMaxDepth: number | null;
67
+ spellcheck: boolean;
68
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
69
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
70
+ declare const _default: typeof __VLS_export;
71
+ export default _default;
72
+ type __VLS_WithSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };