@yuntijs/ui 1.0.0-beta.8 → 1.0.0-beta.80

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 (239) hide show
  1. package/es/Alert/index.d.ts +13 -0
  2. package/es/Alert/index.js +25 -0
  3. package/es/Alert/style.d.ts +4 -0
  4. package/es/Alert/style.js +13 -0
  5. package/es/App/index.d.ts +7 -0
  6. package/es/App/index.js +19 -0
  7. package/es/ButtonGroup/index.d.ts +24 -0
  8. package/es/ButtonGroup/index.js +66 -0
  9. package/es/Card/index.d.ts +1 -0
  10. package/es/Card/index.js +1 -0
  11. package/es/CardList/Item/index.d.ts +4 -0
  12. package/es/CardList/Item/index.js +43 -0
  13. package/es/CardList/Item/style.d.ts +0 -0
  14. package/es/CardList/Item/style.js +0 -0
  15. package/es/CardList/index.d.ts +2 -0
  16. package/es/CardList/index.js +39 -0
  17. package/es/ChatInputArea/desktop/ChatInputArea.d.ts +19 -0
  18. package/es/ChatInputArea/desktop/ChatInputArea.js +72 -0
  19. package/es/ChatInputArea/index.d.ts +6 -0
  20. package/es/ChatInputArea/index.js +6 -0
  21. package/es/ChatItem/components/MessageContent.d.ts +21 -0
  22. package/es/ChatItem/components/MessageContent.js +59 -0
  23. package/es/ChatItem/index.d.ts +4 -0
  24. package/es/ChatItem/index.js +120 -0
  25. package/es/ChatItem/style.d.ts +24 -0
  26. package/es/ChatItem/style.js +38 -0
  27. package/es/ChatItem/type.d.ts +82 -0
  28. package/es/ChatItem/type.js +1 -0
  29. package/es/CollapseGroup/index.d.ts +4 -0
  30. package/es/CollapseGroup/index.js +23 -0
  31. package/es/CollapseGroup/style.d.ts +3 -0
  32. package/es/CollapseGroup/style.js +11 -0
  33. package/es/ConfigProvider/index.d.ts +3 -0
  34. package/es/ConfigProvider/index.js +17 -11
  35. package/es/Descriptions/index.d.ts +14 -0
  36. package/es/Descriptions/index.js +31 -0
  37. package/es/Descriptions/style.d.ts +4 -0
  38. package/es/Descriptions/style.js +24 -0
  39. package/es/Divider/index.d.ts +38 -0
  40. package/es/Divider/index.js +66 -0
  41. package/es/Divider/style.d.ts +3 -0
  42. package/es/Divider/style.js +12 -0
  43. package/es/DragPanel/index.d.ts +10 -0
  44. package/es/DragPanel/index.js +97 -0
  45. package/es/DragPanel/style.d.ts +7 -0
  46. package/es/DragPanel/style.js +15 -0
  47. package/es/Drawer/index.d.ts +13 -0
  48. package/es/Drawer/index.js +20 -0
  49. package/es/Drawer/style.d.ts +4 -0
  50. package/es/Drawer/style.js +16 -0
  51. package/es/Dropdown/index.d.ts +14 -0
  52. package/es/Dropdown/index.js +59 -0
  53. package/es/Dropdown/style.d.ts +7 -0
  54. package/es/Dropdown/style.js +13 -0
  55. package/es/EditableMessage/index.d.ts +75 -0
  56. package/es/EditableMessage/index.js +99 -0
  57. package/es/Form/collapse-list/index.d.ts +40 -0
  58. package/es/Form/collapse-list/index.js +209 -0
  59. package/es/Form/collapse-list/style.d.ts +5 -0
  60. package/es/Form/collapse-list/style.js +13 -0
  61. package/es/Form/index.d.ts +8 -0
  62. package/es/Form/index.js +5 -0
  63. package/es/FormHelper/autoFocus.d.ts +10 -0
  64. package/es/FormHelper/autoFocus.js +38 -0
  65. package/es/FormHelper/index.d.ts +13 -0
  66. package/es/FormHelper/index.js +41 -0
  67. package/es/Highlighter/FullFeatured.d.ts +18 -0
  68. package/es/Highlighter/FullFeatured.js +102 -0
  69. package/es/Highlighter/SyntaxHighlighter/index.d.ts +7 -0
  70. package/es/Highlighter/SyntaxHighlighter/index.js +51 -0
  71. package/es/Highlighter/SyntaxHighlighter/style.d.ts +5 -0
  72. package/es/Highlighter/SyntaxHighlighter/style.js +16 -0
  73. package/es/Highlighter/index.d.ts +50 -0
  74. package/es/Highlighter/index.js +77 -0
  75. package/es/Highlighter/style.d.ts +9 -0
  76. package/es/Highlighter/style.js +23 -0
  77. package/es/Highlighter/theme.d.ts +1 -0
  78. package/es/Highlighter/theme.js +1661 -0
  79. package/es/LogViewer/index.d.ts +10 -0
  80. package/es/LogViewer/index.js +141 -0
  81. package/es/LogViewer/style.d.ts +6 -0
  82. package/es/LogViewer/style.js +16 -0
  83. package/es/LogViewer/types.d.ts +235 -0
  84. package/es/LogViewer/types.js +1 -0
  85. package/es/Mentions/constants.d.ts +6 -0
  86. package/es/Mentions/constants.js +28 -0
  87. package/es/Mentions/hooks.d.ts +20 -0
  88. package/es/Mentions/hooks.js +133 -0
  89. package/es/Mentions/index.d.ts +19 -0
  90. package/es/Mentions/index.js +136 -0
  91. package/es/Mentions/plugins/custom-text/node.d.ts +11 -0
  92. package/es/Mentions/plugins/custom-text/node.js +72 -0
  93. package/es/Mentions/plugins/mention-node/component.d.ts +6 -0
  94. package/es/Mentions/plugins/mention-node/component.js +64 -0
  95. package/es/Mentions/plugins/mention-node/index.d.ts +9 -0
  96. package/es/Mentions/plugins/mention-node/index.js +32 -0
  97. package/es/Mentions/plugins/mention-node/node.d.ts +23 -0
  98. package/es/Mentions/plugins/mention-node/node.js +97 -0
  99. package/es/Mentions/plugins/mention-node/replacement.d.ts +5 -0
  100. package/es/Mentions/plugins/mention-node/replacement.js +42 -0
  101. package/es/Mentions/plugins/mention-node/style.d.ts +8 -0
  102. package/es/Mentions/plugins/mention-node/style.js +47 -0
  103. package/es/Mentions/plugins/mention-node/utils.d.ts +4 -0
  104. package/es/Mentions/plugins/mention-node/utils.js +5 -0
  105. package/es/Mentions/plugins/mention-picker/hooks.d.ts +5 -0
  106. package/es/Mentions/plugins/mention-picker/hooks.js +39 -0
  107. package/es/Mentions/plugins/mention-picker/index.d.ts +36 -0
  108. package/es/Mentions/plugins/mention-picker/index.js +87 -0
  109. package/es/Mentions/plugins/mention-picker/menu-item.d.ts +11 -0
  110. package/es/Mentions/plugins/mention-picker/menu-item.js +71 -0
  111. package/es/Mentions/plugins/mention-picker/menu.d.ts +9 -0
  112. package/es/Mentions/plugins/mention-picker/menu.js +30 -0
  113. package/es/Mentions/plugins/mention-picker/style.d.ts +11 -0
  114. package/es/Mentions/plugins/mention-picker/style.js +19 -0
  115. package/es/Mentions/plugins/mention-picker/utils.d.ts +22 -0
  116. package/es/Mentions/plugins/mention-picker/utils.js +39 -0
  117. package/es/Mentions/plugins/on-blur-or-focus-block.d.ts +7 -0
  118. package/es/Mentions/plugins/on-blur-or-focus-block.js +36 -0
  119. package/es/Mentions/provider.d.ts +12 -0
  120. package/es/Mentions/provider.js +15 -0
  121. package/es/Mentions/style.d.ts +11 -0
  122. package/es/Mentions/style.js +22 -0
  123. package/es/Mentions/types.d.ts +17 -0
  124. package/es/Mentions/types.js +1 -0
  125. package/es/Mentions/utils.d.ts +9 -0
  126. package/es/Mentions/utils.js +95 -0
  127. package/es/Modal/index.d.ts +19 -0
  128. package/es/Modal/index.js +36 -0
  129. package/es/Modal/style.d.ts +4 -0
  130. package/es/Modal/style.js +17 -0
  131. package/es/MonacoEditor/base/controller.d.ts +17 -0
  132. package/es/MonacoEditor/base/controller.js +49 -0
  133. package/es/MonacoEditor/base/helper.d.ts +65 -0
  134. package/es/MonacoEditor/base/helper.js +324 -0
  135. package/es/MonacoEditor/base/index.d.ts +35 -0
  136. package/es/MonacoEditor/base/index.js +236 -0
  137. package/es/MonacoEditor/base/monaco.d.ts +6 -0
  138. package/es/MonacoEditor/base/monaco.js +64 -0
  139. package/es/MonacoEditor/base/style.d.ts +12 -0
  140. package/es/MonacoEditor/base/style.js +26 -0
  141. package/es/MonacoEditor/index.d.ts +2 -4
  142. package/es/MonacoEditor/index.js +26 -62
  143. package/es/MonacoEditor/style.js +3 -2
  144. package/es/Page/Breadcrumb/index.d.ts +9 -0
  145. package/es/Page/Breadcrumb/index.js +56 -0
  146. package/es/Page/Content/index.d.ts +4 -0
  147. package/es/Page/Content/index.js +59 -0
  148. package/es/Page/Content/style.d.ts +3 -0
  149. package/es/Page/Content/style.js +12 -0
  150. package/es/Page/Footer/index.d.ts +2 -0
  151. package/es/Page/Footer/index.js +6 -0
  152. package/es/Page/Header/Icon.d.ts +17 -0
  153. package/es/Page/Header/Icon.js +42 -0
  154. package/es/Page/Header/index.d.ts +43 -0
  155. package/es/Page/Header/index.js +202 -0
  156. package/es/Page/Header/style.d.ts +12 -0
  157. package/es/Page/Header/style.js +21 -0
  158. package/es/Page/Page.d.ts +9 -0
  159. package/es/Page/Page.js +49 -0
  160. package/es/Page/PageContext.d.ts +15 -0
  161. package/es/Page/PageContext.js +21 -0
  162. package/es/Page/Title/index.d.ts +5 -0
  163. package/es/Page/Title/index.js +18 -0
  164. package/es/Page/Title/style.d.ts +3 -0
  165. package/es/Page/Title/style.js +10 -0
  166. package/es/Page/index.d.ts +18 -0
  167. package/es/Page/index.js +15 -0
  168. package/es/Page/style.d.ts +3 -0
  169. package/es/Page/style.js +10 -0
  170. package/es/ProCard/Card/index.d.ts +6 -0
  171. package/es/ProCard/Card/index.js +25 -0
  172. package/es/ProCard/Card/style.d.ts +7 -0
  173. package/es/ProCard/Card/style.js +15 -0
  174. package/es/ProCard/Content/index.d.ts +4 -0
  175. package/es/ProCard/Content/index.js +24 -0
  176. package/es/ProCard/Content/style.d.ts +3 -0
  177. package/es/ProCard/Content/style.js +10 -0
  178. package/es/ProCard/Descriptions/index.d.ts +4 -0
  179. package/es/ProCard/Descriptions/index.js +28 -0
  180. package/es/ProCard/Descriptions/style.d.ts +3 -0
  181. package/es/ProCard/Descriptions/style.js +12 -0
  182. package/es/ProCard/Header/index.d.ts +15 -0
  183. package/es/ProCard/Header/index.js +86 -0
  184. package/es/ProCard/Header/style.d.ts +12 -0
  185. package/es/ProCard/Header/style.js +21 -0
  186. package/es/ProCard/index.d.ts +13 -0
  187. package/es/ProCard/index.js +8 -0
  188. package/es/Radio/index.d.ts +36 -0
  189. package/es/Radio/index.js +26 -0
  190. package/es/Radio/style.d.ts +4 -0
  191. package/es/Radio/style.js +66 -0
  192. package/es/SelectCard/index.d.ts +33 -0
  193. package/es/SelectCard/index.js +132 -0
  194. package/es/SelectCard/style.d.ts +10 -0
  195. package/es/SelectCard/style.js +42 -0
  196. package/es/SliderInput/index.js +2 -2
  197. package/es/Status/index.d.ts +7 -0
  198. package/es/Status/index.js +39 -0
  199. package/es/Status/style.d.ts +4 -0
  200. package/es/Status/style.js +14 -0
  201. package/es/Table/collapse/index.d.ts +8 -0
  202. package/es/Table/collapse/index.js +39 -0
  203. package/es/Table/collapse/style.d.ts +3 -0
  204. package/es/Table/collapse/style.js +11 -0
  205. package/es/Table/index.d.ts +20 -0
  206. package/es/Table/index.js +56 -0
  207. package/es/Typography/index.d.ts +32 -0
  208. package/es/Typography/index.js +77 -0
  209. package/es/WaveformIcon/index.d.ts +9 -0
  210. package/es/WaveformIcon/index.js +51 -0
  211. package/es/hooks/languageMap.d.ts +1 -0
  212. package/es/hooks/languageMap.js +1 -0
  213. package/es/hooks/useHighlight.d.ts +5 -0
  214. package/es/hooks/useHighlight.js +78 -0
  215. package/es/index.d.ts +38 -1
  216. package/es/index.js +52 -1
  217. package/es/notification/index.d.ts +24 -0
  218. package/es/notification/index.js +237 -0
  219. package/es/notification/style.d.ts +2 -0
  220. package/es/notification/style.js +28 -0
  221. package/es/styles/colors/colors.d.ts +39 -0
  222. package/es/styles/colors/colors.js +86 -0
  223. package/es/styles/colors/generateColorPalette.d.ts +11 -0
  224. package/es/styles/colors/generateColorPalette.js +31 -0
  225. package/es/styles/colors/neutralColors.d.ts +9 -0
  226. package/es/styles/colors/neutralColors.js +32 -0
  227. package/es/styles/index.d.ts +4 -0
  228. package/es/styles/index.js +4 -0
  229. package/es/useSpeechSynthes/const/polyfill.d.ts +3 -0
  230. package/es/useSpeechSynthes/const/polyfill.js +21 -0
  231. package/es/useSpeechSynthes/index.d.ts +13 -0
  232. package/es/useSpeechSynthes/index.js +69 -0
  233. package/es/utils/constants.d.ts +1 -0
  234. package/es/utils/constants.js +1 -0
  235. package/es/utils/tools.d.ts +1 -0
  236. package/es/utils/tools.js +1 -0
  237. package/package.json +30 -9
  238. package/umd/index.min.js +1 -1
  239. package/umd/index.min.js.map +1 -1
@@ -0,0 +1,87 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
3
+ import { LexicalTypeaheadMenuPlugin } from '@lexical/react/LexicalTypeaheadMenuPlugin';
4
+ import React, { memo, useCallback, useState } from 'react';
5
+ import ReactDOM from 'react-dom';
6
+ import { DEFAULT_PUNCTUATION, PRE_TRIGGER_CHARS } from "../../constants";
7
+ import { useCheckForMentionMatch } from "../../hooks";
8
+ import { useOptions } from "./hooks";
9
+ import { MentionMenu } from "./menu";
10
+ import { useStyles } from "./style";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ export var MentionPickerPlugin = /*#__PURE__*/memo(function (_ref) {
13
+ var triggers = _ref.triggers,
14
+ _ref$options = _ref.options,
15
+ allOptions = _ref$options === void 0 ? [] : _ref$options,
16
+ _ref$allowSpaces = _ref.allowSpaces,
17
+ allowSpaces = _ref$allowSpaces === void 0 ? true : _ref$allowSpaces,
18
+ _ref$punctuation = _ref.punctuation,
19
+ punctuation = _ref$punctuation === void 0 ? DEFAULT_PUNCTUATION : _ref$punctuation,
20
+ _ref$preTriggerChars = _ref.preTriggerChars,
21
+ preTriggerChars = _ref$preTriggerChars === void 0 ? PRE_TRIGGER_CHARS : _ref$preTriggerChars,
22
+ onSelect = _ref.onSelect;
23
+ var _useStyles = useStyles({}),
24
+ styles = _useStyles.styles;
25
+ var _useLexicalComposerCo = useLexicalComposerContext(),
26
+ _useLexicalComposerCo2 = _slicedToArray(_useLexicalComposerCo, 1),
27
+ editor = _useLexicalComposerCo2[0];
28
+ var _useCheckForMentionMa = useCheckForMentionMatch(triggers, {
29
+ punctuation: punctuation,
30
+ preTriggerChars: preTriggerChars,
31
+ allowSpaces: allowSpaces
32
+ }),
33
+ trigger = _useCheckForMentionMa.trigger,
34
+ checkForMentionMatch = _useCheckForMentionMa.checkForMentionMatch;
35
+ var _useState = useState(null),
36
+ _useState2 = _slicedToArray(_useState, 2),
37
+ queryString = _useState2[0],
38
+ setQueryString = _useState2[1];
39
+ var _useOptions = useOptions(allOptions, queryString),
40
+ options = _useOptions.options;
41
+ var onSelectOption = useCallback(function (selectedOption, nodeToRemove, closeMenu, matchingString) {
42
+ onSelect === null || onSelect === void 0 || onSelect(selectedOption, trigger, queryString);
43
+ editor.update(function () {
44
+ if (nodeToRemove && selectedOption !== null && selectedOption !== void 0 && selectedOption.key) {
45
+ nodeToRemove.remove();
46
+ }
47
+ if (selectedOption !== null && selectedOption !== void 0 && selectedOption.onSelect) {
48
+ selectedOption.onSelect(matchingString);
49
+ }
50
+ closeMenu();
51
+ });
52
+ }, [editor, onSelect, queryString, trigger]);
53
+ var renderMenu = useCallback(function (anchorElementRef, _ref2) {
54
+ var selectedIndex = _ref2.selectedIndex,
55
+ selectOptionAndCleanUp = _ref2.selectOptionAndCleanUp,
56
+ setHighlightedIndex = _ref2.setHighlightedIndex;
57
+ if (anchorElementRef.current) {
58
+ return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/_jsx("div", {
59
+ className: styles.menuOverlay,
60
+ role: "menu",
61
+ children: /*#__PURE__*/_jsx(MentionMenu, {
62
+ onClick: function onClick(index, option) {
63
+ if (option.disabled) return;
64
+ setHighlightedIndex(index);
65
+ selectOptionAndCleanUp(option);
66
+ },
67
+ onMouseEnter: function onMouseEnter(index, option) {
68
+ if (option.disabled) return;
69
+ setHighlightedIndex(index);
70
+ },
71
+ options: options,
72
+ queryString: queryString,
73
+ selectedIndex: selectedIndex
74
+ })
75
+ }), anchorElementRef.current);
76
+ }
77
+ return null;
78
+ }, [options, queryString, styles.menuOverlay]);
79
+ return /*#__PURE__*/_jsx(LexicalTypeaheadMenuPlugin, {
80
+ anchorClassName: styles.anchor,
81
+ menuRenderFn: renderMenu,
82
+ onQueryChange: setQueryString,
83
+ onSelectOption: onSelectOption,
84
+ options: options,
85
+ triggerFn: checkForMentionMatch
86
+ });
87
+ });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { MentionMenuOption } from './utils';
3
+ export interface MentionMenuItemProps {
4
+ index: number;
5
+ isSelected: boolean;
6
+ onClick: (index: number, option: MentionMenuOption) => void;
7
+ onMouseEnter: (index: number, option: MentionMenuOption) => void;
8
+ option: MentionMenuOption;
9
+ queryString: string | null;
10
+ }
11
+ export declare const MentionMenuItem: React.FC<MentionMenuItemProps>;
@@ -0,0 +1,71 @@
1
+ import { Flex } from 'antd';
2
+ import { escapeRegExp } from 'lodash-es';
3
+ import React, { memo, useMemo } from 'react';
4
+ import Typography from "../../../Typography";
5
+ import { useStyles } from "./style";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ var Text = Typography.Text;
9
+ export var MentionMenuItem = /*#__PURE__*/memo(function (_ref) {
10
+ var index = _ref.index,
11
+ isSelected = _ref.isSelected,
12
+ _onClick = _ref.onClick,
13
+ _onMouseEnter = _ref.onMouseEnter,
14
+ option = _ref.option,
15
+ queryString = _ref.queryString;
16
+ var _useStyles = useStyles({
17
+ isSelected: isSelected,
18
+ disabled: option.disabled
19
+ }),
20
+ styles = _useStyles.styles;
21
+ var label = option.label;
22
+ var _useMemo = useMemo(function () {
23
+ var before = label;
24
+ var middle = '';
25
+ var after = '';
26
+ if (queryString) {
27
+ var regex = new RegExp(escapeRegExp(queryString), 'i');
28
+ var match = regex.exec(option.label);
29
+ if (match) {
30
+ before = label.slice(0, Math.max(0, match.index));
31
+ middle = match[0];
32
+ after = label.slice(Math.max(0, match.index + match[0].length));
33
+ }
34
+ }
35
+ return {
36
+ before: before,
37
+ middle: middle,
38
+ after: after
39
+ };
40
+ }, [option.label, queryString, label]),
41
+ before = _useMemo.before,
42
+ middle = _useMemo.middle,
43
+ after = _useMemo.after;
44
+ return /*#__PURE__*/_jsxs(Flex, {
45
+ align: "center",
46
+ className: styles.menuItem,
47
+ gap: 4,
48
+ onClick: function onClick() {
49
+ return _onClick(index, option);
50
+ },
51
+ onMouseEnter: function onMouseEnter() {
52
+ return _onMouseEnter(index, option);
53
+ },
54
+ ref: option.setRefElement,
55
+ tabIndex: -1,
56
+ children: [/*#__PURE__*/_jsx(Flex, {
57
+ className: styles.menuItemIcon,
58
+ children: option.icon
59
+ }), /*#__PURE__*/_jsxs("div", {
60
+ className: styles.menuItemLabel,
61
+ title: option.label,
62
+ children: [before, /*#__PURE__*/_jsx(Text, {
63
+ mark: true,
64
+ children: middle
65
+ }), after]
66
+ }), /*#__PURE__*/_jsx(Flex, {
67
+ children: option.extraElement
68
+ })]
69
+ }, option.key);
70
+ });
71
+ MentionMenuItem.displayName = 'MentionMenuItem';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface MentionMenuProps {
3
+ selectedIndex: number | null;
4
+ options: any[];
5
+ onClick: (index: number, option: any) => void;
6
+ onMouseEnter: (index: number, option: any) => void;
7
+ queryString: string | null;
8
+ }
9
+ export declare const MentionMenu: React.FC<MentionMenuProps>;
@@ -0,0 +1,30 @@
1
+ import { Empty } from 'antd';
2
+ import React, { memo } from 'react';
3
+ import { MentionMenuItem } from "./menu-item";
4
+ import { useStyles } from "./style";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { Fragment as _Fragment } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ export var MentionMenu = /*#__PURE__*/memo(function (_ref) {
9
+ var selectedIndex = _ref.selectedIndex,
10
+ options = _ref.options,
11
+ onClick = _ref.onClick,
12
+ onMouseEnter = _ref.onMouseEnter,
13
+ queryString = _ref.queryString;
14
+ var _useStyles = useStyles({}),
15
+ styles = _useStyles.styles;
16
+ return /*#__PURE__*/_jsxs(_Fragment, {
17
+ children: [options.length === 0 && /*#__PURE__*/_jsx(Empty, {
18
+ className: styles.menuEmpty
19
+ }), options.map(function (option, index) {
20
+ return /*#__PURE__*/_jsx(MentionMenuItem, {
21
+ index: index,
22
+ isSelected: selectedIndex === index,
23
+ onClick: onClick,
24
+ onMouseEnter: onMouseEnter,
25
+ option: option,
26
+ queryString: queryString
27
+ }, option.key);
28
+ })]
29
+ });
30
+ });
@@ -0,0 +1,11 @@
1
+ export declare const useStyles: (props?: {
2
+ isSelected?: boolean | undefined;
3
+ disabled?: boolean | undefined;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
5
+ anchor: import("antd-style").SerializedStyles;
6
+ menuEmpty: import("antd-style").SerializedStyles;
7
+ menuOverlay: import("antd-style").SerializedStyles;
8
+ menuItem: import("antd-style").SerializedStyles;
9
+ menuItemIcon: import("antd-style").SerializedStyles;
10
+ menuItemLabel: import("antd-style").SerializedStyles;
11
+ }>;
@@ -0,0 +1,19 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref, _ref2) {
5
+ var css = _ref.css,
6
+ token = _ref.token,
7
+ prefixCls = _ref.prefixCls;
8
+ var isSelected = _ref2.isSelected,
9
+ disabled = _ref2.disabled;
10
+ var selectedBg = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), token.colorFillTertiary);
11
+ return {
12
+ anchor: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 9999;\n "]))),
13
+ menuEmpty: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n "])), token.padding),
14
+ menuOverlay: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: auto;\n\n width: 240px;\n max-height: 320px;\n margin-top: ", "px;\n\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n "])), token.marginXXS, token.colorBgElevated, token.borderRadius, token.boxShadow),
15
+ menuItem: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: ", ";\n pointer-events: ", ";\n\n padding: ", "px ", "px;\n\n position: relative;\n\n border-radius: ", "px;\n\n color: ", ";\n font-size: ", "px;\n line-height: ", ";\n ", "\n &:hover {\n ", "\n }\n "])), disabled ? 'not-allowed' : 'pointer', disabled ? 'none' : 'all', token.paddingSM / 2, token.paddingSM, token.borderRadius, disabled ? token.colorTextDisabled : token.colorText, token.fontSize, token.lineHeight, isSelected && selectedBg, selectedBg),
16
+ menuItemIcon: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorInfoText),
17
+ menuItemLabel: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: inline-block;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
18
+ };
19
+ });
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { MenuOption } from '@lexical/react/LexicalTypeaheadMenuPlugin';
3
+ export declare class MentionMenuOption extends MenuOption {
4
+ label: string;
5
+ value: string;
6
+ icon?: JSX.Element;
7
+ extraElement?: JSX.Element;
8
+ keywords: Array<string>;
9
+ keyboardShortcut?: string;
10
+ onSelect: (queryString: string) => void;
11
+ disabled?: boolean;
12
+ data?: any;
13
+ constructor(value: string, label: string, options: {
14
+ icon?: JSX.Element;
15
+ extraElement?: JSX.Element;
16
+ keywords?: Array<string>;
17
+ keyboardShortcut?: string;
18
+ onSelect: (queryString: string) => void;
19
+ disabled?: boolean;
20
+ data?: any;
21
+ });
22
+ }
@@ -0,0 +1,39 @@
1
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
2
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
4
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
5
+ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
6
+ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+ import { MenuOption } from '@lexical/react/LexicalTypeaheadMenuPlugin';
11
+ export var MentionMenuOption = /*#__PURE__*/function (_MenuOption) {
12
+ _inherits(MentionMenuOption, _MenuOption);
13
+ var _super = _createSuper(MentionMenuOption);
14
+ function MentionMenuOption(value, label, options) {
15
+ var _this;
16
+ _classCallCheck(this, MentionMenuOption);
17
+ _this = _super.call(this, value);
18
+ _defineProperty(_assertThisInitialized(_this), "label", void 0);
19
+ _defineProperty(_assertThisInitialized(_this), "value", void 0);
20
+ _defineProperty(_assertThisInitialized(_this), "icon", void 0);
21
+ _defineProperty(_assertThisInitialized(_this), "extraElement", void 0);
22
+ _defineProperty(_assertThisInitialized(_this), "keywords", void 0);
23
+ _defineProperty(_assertThisInitialized(_this), "keyboardShortcut", void 0);
24
+ _defineProperty(_assertThisInitialized(_this), "onSelect", void 0);
25
+ _defineProperty(_assertThisInitialized(_this), "disabled", void 0);
26
+ _defineProperty(_assertThisInitialized(_this), "data", void 0);
27
+ _this.value = value;
28
+ _this.label = label;
29
+ _this.keywords = options.keywords || [];
30
+ _this.icon = options.icon;
31
+ _this.extraElement = options.extraElement;
32
+ _this.keyboardShortcut = options.keyboardShortcut;
33
+ _this.onSelect = options.onSelect.bind(_assertThisInitialized(_this));
34
+ _this.disabled = options.disabled;
35
+ _this.data = options.data;
36
+ return _this;
37
+ }
38
+ return _createClass(MentionMenuOption);
39
+ }(MenuOption);
@@ -0,0 +1,7 @@
1
+ import type { FC } from 'react';
2
+ type OnBlurBlockProps = {
3
+ onBlur?: () => void;
4
+ onFocus?: () => void;
5
+ };
6
+ declare const OnBlurBlock: FC<OnBlurBlockProps>;
7
+ export default OnBlurBlock;
@@ -0,0 +1,36 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
3
+ import { mergeRegister } from '@lexical/utils';
4
+ import { BLUR_COMMAND, COMMAND_PRIORITY_EDITOR, FOCUS_COMMAND, KEY_ESCAPE_COMMAND } from 'lexical';
5
+ import { useEffect, useRef } from 'react';
6
+ import { CLEAR_HIDE_MENU_TIMEOUT } from "./mention-node";
7
+ var OnBlurBlock = function OnBlurBlock(_ref) {
8
+ var onBlur = _ref.onBlur,
9
+ onFocus = _ref.onFocus;
10
+ var _useLexicalComposerCo = useLexicalComposerContext(),
11
+ _useLexicalComposerCo2 = _slicedToArray(_useLexicalComposerCo, 1),
12
+ editor = _useLexicalComposerCo2[0];
13
+ var ref = useRef(null);
14
+ useEffect(function () {
15
+ return mergeRegister(editor.registerCommand(CLEAR_HIDE_MENU_TIMEOUT, function () {
16
+ if (ref.current) {
17
+ clearTimeout(ref.current);
18
+ ref.current = null;
19
+ }
20
+ return true;
21
+ }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(BLUR_COMMAND, function () {
22
+ ref.current = setTimeout(function () {
23
+ editor.dispatchCommand(KEY_ESCAPE_COMMAND, new KeyboardEvent('keydown', {
24
+ key: 'Escape'
25
+ }));
26
+ }, 200);
27
+ if (onBlur) onBlur();
28
+ return true;
29
+ }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(FOCUS_COMMAND, function () {
30
+ if (onFocus) onFocus();
31
+ return true;
32
+ }, COMMAND_PRIORITY_EDITOR));
33
+ }, [editor, onBlur, onFocus]);
34
+ return null;
35
+ };
36
+ export default OnBlurBlock;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { MentionsOptionsMap } from './types';
3
+ interface Value {
4
+ optionsMap: MentionsOptionsMap;
5
+ }
6
+ export declare const MentionsConfigContext: import("react").Context<Value | null>;
7
+ export declare const MentionsConfigProvider: import("react").NamedExoticComponent<{
8
+ children: ReactNode;
9
+ value: Value;
10
+ }>;
11
+ export declare const useOptionsMap: () => MentionsOptionsMap | undefined;
12
+ export {};
@@ -0,0 +1,15 @@
1
+ import { createContext, memo, useContext } from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export var MentionsConfigContext = /*#__PURE__*/createContext(null);
4
+ export var MentionsConfigProvider = /*#__PURE__*/memo(function (_ref) {
5
+ var children = _ref.children,
6
+ value = _ref.value;
7
+ return /*#__PURE__*/_jsx(MentionsConfigContext.Provider, {
8
+ value: value,
9
+ children: children
10
+ });
11
+ });
12
+ export var useOptionsMap = function useOptionsMap() {
13
+ var config = useContext(MentionsConfigContext);
14
+ return config === null || config === void 0 ? void 0 : config.optionsMap;
15
+ };
@@ -0,0 +1,11 @@
1
+ import { AutoSize } from './types';
2
+ export declare const useStyles: (props?: {
3
+ autoSize?: AutoSize | undefined;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
5
+ wrapper: import("antd-style").SerializedStyles;
6
+ placeholder: import("antd-style").SerializedStyles;
7
+ root: import("antd-style").SerializedStyles;
8
+ filled: import("antd-style").SerializedStyles;
9
+ borderless: import("antd-style").SerializedStyles;
10
+ disabled: import("antd-style").SerializedStyles;
11
+ }>;
@@ -0,0 +1,22 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
+ import { createStyles } from 'antd-style';
4
+ var inputHeight = 32;
5
+ var lineHeight = 22;
6
+ var calculateHeight = function calculateHeight(rows) {
7
+ return inputHeight + Math.max(rows - 1, 0) * lineHeight;
8
+ };
9
+ export var useStyles = createStyles(function (_ref, _ref2) {
10
+ var css = _ref.css,
11
+ token = _ref.token,
12
+ prefixCls = _ref.prefixCls;
13
+ var autoSize = _ref2.autoSize;
14
+ return {
15
+ wrapper: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n width: 100%;\n min-width: 0;\n "]))),
16
+ placeholder: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n user-select: none;\n\n position: absolute;\n top: 0;\n left: 13px;\n\n height: ", "px;\n\n font-size: ", "px;\n line-height: ", "px;\n color: ", ";\n "])), inputHeight, token.fontSize, inputHeight, token.colorTextPlaceholder),
17
+ root: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n outline: none;\n border: 1px solid ", ";\n border-radius: ", "px;\n\n margin: 0;\n padding: 4px 11px;\n\n color: ", ";\n font-size: ", "px;\n font-family: ", ";\n\n display: inline-block;\n\n width: 100%;\n min-width: 0;\n\n ", "\n ", "\n overflow: auto;\n\n transition: all ", ";\n &:focus {\n border-color: ", ";\n }\n p {\n margin-bottom: 0;\n margin-block: 0 0;\n line-height: ", "px;\n }\n "])), token.colorBorder, token.borderRadius, token.colorText, token.fontSize, token.fontFamily, (autoSize === null || autoSize === void 0 ? void 0 : autoSize.minRows) && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), calculateHeight(autoSize.minRows)), (autoSize === null || autoSize === void 0 ? void 0 : autoSize.maxRows) && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), calculateHeight(autoSize.maxRows)), token.motionDurationMid, token.colorPrimaryBorder, lineHeight),
18
+ filled: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background: ", ";\n border-color: transparent;\n &:hover {\n background: ", ";\n }\n &:focus {\n background: ", ";\n }\n "])), token.colorFillTertiary, token.colorFillSecondary, token.colorBgBase),
19
+ borderless: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n "]))),
20
+ disabled: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n color: ", ";\n background: ", ";\n "])), token.colorTextDisabled, token.colorBgContainerDisabled)
21
+ };
22
+ });
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ export interface MentionOption {
3
+ label: string;
4
+ value: string;
5
+ data?: any;
6
+ icon?: JSX.Element;
7
+ extraElement?: JSX.Element;
8
+ keywords?: Array<string>;
9
+ keyboardShortcut?: string;
10
+ error?: string;
11
+ disabled?: boolean;
12
+ }
13
+ export type MentionsOptionsMap = Record<string, MentionOption>;
14
+ export interface AutoSize {
15
+ minRows?: number;
16
+ maxRows?: number;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { EntityMatch } from '@lexical/text';
2
+ import type { LexicalNode, TextNode } from 'lexical';
3
+ import { CustomTextNode } from './plugins/custom-text/node';
4
+ export declare const INSERT_MENTION_COMMAND: import("lexical").LexicalCommand<unknown>;
5
+ export declare const DELETE_MENTION_COMMAND: import("lexical").LexicalCommand<unknown>;
6
+ export declare const CLEAR_HIDE_MENU_TIMEOUT: import("lexical").LexicalCommand<unknown>;
7
+ export declare const UPDATE_MENTIONS_OPTIONS: import("lexical").LexicalCommand<unknown>;
8
+ export declare const decoratorTransform: (node: CustomTextNode, getMatch: (text: string) => null | EntityMatch, createNode: (textNode: TextNode) => LexicalNode) => void;
9
+ export declare function textToEditorState(text: string): string;
@@ -0,0 +1,95 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import { $isTextNode, createCommand } from 'lexical';
3
+ export var INSERT_MENTION_COMMAND = createCommand('INSERT_MENTION_COMMAND');
4
+ export var DELETE_MENTION_COMMAND = createCommand('DELETE_MENTION_COMMAND');
5
+ export var CLEAR_HIDE_MENU_TIMEOUT = createCommand('CLEAR_HIDE_MENU_TIMEOUT');
6
+ export var UPDATE_MENTIONS_OPTIONS = createCommand('UPDATE_MENTIONS_OPTIONS');
7
+ export var decoratorTransform = function decoratorTransform(node, getMatch, createNode) {
8
+ if (!node.isSimpleText()) {
9
+ return;
10
+ }
11
+ var prevSibling = node.getPreviousSibling();
12
+ var text = node.getTextContent();
13
+ var currentNode = node;
14
+ var match;
15
+
16
+ // eslint-disable-next-line no-constant-condition
17
+ while (true) {
18
+ match = getMatch(text);
19
+ var nextText = match === null ? '' : text.slice(match.end);
20
+ text = nextText;
21
+ if (nextText === '') {
22
+ var nextSibling = currentNode.getNextSibling();
23
+ if ($isTextNode(nextSibling)) {
24
+ nextText = currentNode.getTextContent() + nextSibling.getTextContent();
25
+ var nextMatch = getMatch(nextText);
26
+ if (nextMatch === null) {
27
+ nextSibling.markDirty();
28
+ return;
29
+ } else if (nextMatch.start !== 0) {
30
+ return;
31
+ }
32
+ }
33
+ } else {
34
+ var _nextMatch = getMatch(nextText);
35
+ if (_nextMatch !== null && _nextMatch.start === 0) {
36
+ return;
37
+ }
38
+ }
39
+ if (match === null) {
40
+ return;
41
+ }
42
+ if (match.start === 0 && $isTextNode(prevSibling) && prevSibling.isTextEntity()) {
43
+ continue;
44
+ }
45
+ var nodeToReplace = void 0;
46
+ if (match.start === 0) {
47
+ var _currentNode$splitTex = currentNode.splitText(match.end);
48
+ var _currentNode$splitTex2 = _slicedToArray(_currentNode$splitTex, 2);
49
+ nodeToReplace = _currentNode$splitTex2[0];
50
+ currentNode = _currentNode$splitTex2[1];
51
+ } else {
52
+ var _currentNode$splitTex3 = currentNode.splitText(match.start, match.end);
53
+ var _currentNode$splitTex4 = _slicedToArray(_currentNode$splitTex3, 3);
54
+ nodeToReplace = _currentNode$splitTex4[1];
55
+ currentNode = _currentNode$splitTex4[2];
56
+ }
57
+ var replacementNode = createNode(nodeToReplace);
58
+ nodeToReplace.replace(replacementNode);
59
+
60
+ // eslint-disable-next-line eqeqeq
61
+ if (currentNode == null) {
62
+ return;
63
+ }
64
+ }
65
+ };
66
+ export function textToEditorState(text) {
67
+ var paragraph = text.split('\n');
68
+ return JSON.stringify({
69
+ root: {
70
+ children: paragraph.map(function (p) {
71
+ return {
72
+ children: [{
73
+ detail: 0,
74
+ format: 0,
75
+ mode: 'normal',
76
+ style: '',
77
+ text: p,
78
+ type: 'custom-text',
79
+ version: 1
80
+ }],
81
+ direction: 'ltr',
82
+ format: '',
83
+ indent: 0,
84
+ type: 'paragraph',
85
+ version: 1
86
+ };
87
+ }),
88
+ direction: 'ltr',
89
+ format: '',
90
+ indent: 0,
91
+ type: 'root',
92
+ version: 1
93
+ }
94
+ });
95
+ }
@@ -0,0 +1,19 @@
1
+ import { type ModalFuncProps as AntdModalFuncProps, type ModalProps as AntdModalProps } from 'antd';
2
+ import React from 'react';
3
+ export type ModalFuncProps = AntdModalFuncProps;
4
+ interface CustomModalProps {
5
+ /**
6
+ * @description Whether support border-bottom of header and border-top of footer.
7
+ * @default 'true'
8
+ */
9
+ borderd?: boolean;
10
+ }
11
+ export interface ModalProps extends AntdModalProps, CustomModalProps {
12
+ }
13
+ export declare const Modal: React.FC<AntdModalProps> & import("antd/es/modal/confirm").ModalStaticFunctions & {
14
+ useModal: typeof import("antd/es/modal/useModal").default;
15
+ destroyAll: () => void;
16
+ config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
17
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
18
+ };
19
+ export default Modal;
@@ -0,0 +1,36 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["className", "borderd"];
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import { Modal as AntdModal } from 'antd';
7
+ import React from 'react';
8
+ import { prefixCls } from "../utils/constants";
9
+ import { useStyles } from "./style";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ var OriginModal = function OriginModal(props) {
12
+ var className = props.className,
13
+ _props$borderd = props.borderd,
14
+ borderd = _props$borderd === void 0 ? true : _props$borderd,
15
+ otherProps = _objectWithoutProperties(props, _excluded);
16
+ var _useStyles = useStyles(_objectSpread({
17
+ borderd: borderd
18
+ }, otherProps)),
19
+ styles = _useStyles.styles,
20
+ cx = _useStyles.cx;
21
+ return /*#__PURE__*/_jsx(AntdModal, _objectSpread(_objectSpread({}, otherProps), {}, {
22
+ className: cx(styles.custom, "".concat(prefixCls, "-modal"), className)
23
+ }));
24
+ };
25
+ export var Modal = OriginModal;
26
+ Modal.useModal = AntdModal.useModal;
27
+ Modal.destroyAll = AntdModal.destroyAll;
28
+ Modal.config = AntdModal.config;
29
+ Modal._InternalPanelDoNotUseOrYouWillBeFired = AntdModal._InternalPanelDoNotUseOrYouWillBeFired;
30
+ Modal.info = AntdModal.info;
31
+ Modal.success = AntdModal.success;
32
+ Modal.error = AntdModal.error;
33
+ Modal.warning = AntdModal.warning;
34
+ Modal.warn = AntdModal.warn;
35
+ Modal.confirm = AntdModal.confirm;
36
+ export default Modal;
@@ -0,0 +1,4 @@
1
+ import { ModalProps } from './index';
2
+ export declare const useStyles: (props?: ModalProps | undefined) => import("antd-style").ReturnStyles<{
3
+ custom: import("antd-style").SerializedStyles;
4
+ }>;
@@ -0,0 +1,17 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2;
3
+ import { createStyles } from 'antd-style';
4
+ export var useStyles = createStyles(function (_ref, _ref2) {
5
+ var css = _ref.css,
6
+ prefixCls = _ref.prefixCls;
7
+ var _ref2$borderd = _ref2.borderd,
8
+ borderd = _ref2$borderd === void 0 ? true : _ref2$borderd,
9
+ footer = _ref2.footer;
10
+ var noFooter = footer === null || Array.isArray(footer) && footer.length === 0;
11
+ var borderdStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-modal-header::after {\n content: ' ';\n\n position: absolute;\n top: 56px;\n left: 0;\n\n width: 100%;\n height: 1px;\n\n background: rgba(5, 5, 5, 0.06);\n }\n .", "-modal-body {\n margin-top: 40px;\n margin-bottom: ", ";\n }\n .", "-modal-body::after {\n content: ' ';\n\n position: absolute;\n bottom: 72px;\n left: 0;\n\n width: 100%;\n height: ", ";\n\n background: rgba(5, 5, 5, 0.06);\n }\n "])), prefixCls, prefixCls, noFooter ? 0 : '40px', prefixCls, noFooter ? 0 : '1px');
12
+ return {
13
+ custom: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n "])), borderd && borderdStyle)
14
+ };
15
+ }, {
16
+ hashPriority: 'low'
17
+ });
@@ -0,0 +1,17 @@
1
+ export interface EditorMeta {
2
+ singleton: boolean;
3
+ [key: string]: any;
4
+ }
5
+ export declare class Controller {
6
+ private methodMap;
7
+ private meta;
8
+ constructor();
9
+ registerMethod(name: string, fn: (...args: any[]) => void): void;
10
+ call(name: string, ...args: any[]): void;
11
+ updateMeta(obj: Partial<EditorMeta>): void;
12
+ getMeta(): Readonly<{
13
+ [x: string]: any;
14
+ singleton: boolean;
15
+ }>;
16
+ }
17
+ export declare const controller: Controller;