@agentscope-ai/design 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/antd/styles/alert.style.d.ts +2 -10
- package/lib/antd/styles/alert.style.js +11 -12
- package/lib/antd/styles/breadcrumb.style.d.ts +2 -18
- package/lib/antd/styles/breadcrumb.style.js +13 -15
- package/lib/antd/styles/button.style.d.ts +2 -80
- package/lib/antd/styles/button.style.js +63 -47
- package/lib/antd/styles/dropdown.style.d.ts +2 -15
- package/lib/antd/styles/dropdown.style.js +27 -16
- package/lib/antd/styles/floatButton.style.d.ts +2 -8
- package/lib/antd/styles/floatButton.style.js +13 -12
- package/lib/antd/styles/index.style.d.ts +4 -18
- package/lib/antd/styles/index.style.js +52 -53
- package/lib/antd/styles/inputNumber.style.d.ts +2 -18
- package/lib/antd/styles/inputNumber.style.js +23 -17
- package/lib/antd/styles/message.style.d.ts +2 -5
- package/lib/antd/styles/message.style.js +9 -10
- package/lib/antd/styles/notification.style.d.ts +2 -46
- package/lib/antd/styles/notification.style.js +31 -29
- package/lib/antd/styles/popover.style.d.ts +2 -13
- package/lib/antd/styles/popover.style.js +15 -14
- package/lib/antd/styles/radio.style.d.ts +2 -24
- package/lib/antd/styles/radio.style.js +29 -18
- package/lib/antd/styles/segment.style.d.ts +2 -7
- package/lib/antd/styles/segment.style.js +11 -12
- package/lib/antd/styles/select.style.d.ts +2 -31
- package/lib/antd/styles/select.style.js +51 -28
- package/lib/antd/styles/slider.style.d.ts +2 -22
- package/lib/antd/styles/slider.style.js +19 -21
- package/lib/antd/styles/table.style.d.ts +2 -5
- package/lib/antd/styles/table.style.js +7 -10
- package/lib/antd/styles/tooltip.style.d.ts +2 -8
- package/lib/antd/styles/tooltip.style.js +13 -11
- package/lib/antd/themes/generateThemeByToken.js +8 -2
- package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
- package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
- package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
- package/lib/components/commonComponents/AlertDialog/index.js +25 -17
- package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
- package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
- package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
- package/lib/components/commonComponents/Anchor/index.js +7 -3
- package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
- package/lib/components/commonComponents/Anchor/index.style.js +18 -23
- package/lib/components/commonComponents/Avatar/index.js +11 -7
- package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Avatar/index.style.js +6 -21
- package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
- package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
- package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
- package/lib/components/commonComponents/Button/index.d.ts +1 -1
- package/lib/components/commonComponents/Button/index.js +7 -7
- package/lib/components/commonComponents/Card/index.js +23 -20
- package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
- package/lib/components/commonComponents/Card/index.style.js +24 -46
- package/lib/components/commonComponents/Checkbox/index.js +13 -10
- package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
- package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
- package/lib/components/commonComponents/CodeBlock/index.js +15 -13
- package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
- package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
- package/lib/components/commonComponents/Collapse/index.js +7 -3
- package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
- package/lib/components/commonComponents/Collapse/index.style.js +34 -47
- package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
- package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
- package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
- package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
- package/lib/components/commonComponents/ConfigProvider/index.js +20 -14
- package/lib/components/commonComponents/DatePicker/index.js +45 -39
- package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
- package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
- package/lib/components/commonComponents/Descriptions/index.js +14 -10
- package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
- package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
- package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
- package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
- package/lib/components/commonComponents/Drawer/index.js +15 -11
- package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
- package/lib/components/commonComponents/Drawer/index.style.js +44 -54
- package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
- package/lib/components/commonComponents/Dropdown/index.js +15 -12
- package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
- package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
- package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
- package/lib/components/commonComponents/Empty/index.js +46 -44
- package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
- package/lib/components/commonComponents/Empty/index.style.js +22 -51
- package/lib/components/commonComponents/FileIcon/index.js +27 -24
- package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
- package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
- package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
- package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
- package/lib/components/commonComponents/Form/index.js +6 -5
- package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
- package/lib/components/commonComponents/Form/index.style.js +26 -38
- package/lib/components/commonComponents/HelpIcon/index.js +25 -20
- package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
- package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
- package/lib/components/commonComponents/IconButton/index.js +15 -11
- package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
- package/lib/components/commonComponents/IconButton/index.style.js +10 -24
- package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
- package/lib/components/commonComponents/IconFont/index.js +14 -9
- package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
- package/lib/components/commonComponents/IconFont/index.style.js +14 -44
- package/lib/components/commonComponents/Image/index.js +8 -5
- package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
- package/lib/components/commonComponents/Image/index.style.js +16 -30
- package/lib/components/commonComponents/Input/index.js +17 -11
- package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
- package/lib/components/commonComponents/Input/index.style.js +46 -42
- package/lib/components/commonComponents/Modal/index.js +18 -16
- package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
- package/lib/components/commonComponents/Modal/index.style.js +54 -72
- package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
- package/lib/components/commonComponents/Pagination/index.js +96 -36
- package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
- package/lib/components/commonComponents/Pagination/index.style.js +26 -42
- package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
- package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
- package/lib/components/commonComponents/Popconfirm/index.js +50 -8
- package/lib/components/commonComponents/PromptsEditor/demo/basic.js +5 -4
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +8 -2
- package/lib/components/commonComponents/PromptsEditor/index.js +17 -11
- package/lib/components/commonComponents/RadioButton/index.js +9 -10
- package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
- package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
- package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
- package/lib/components/commonComponents/Result/index.style.js +4 -16
- package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
- package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
- package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
- package/lib/components/commonComponents/SlateEditor/index.js +34 -31
- package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
- package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
- package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +93 -0
- package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
- package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
- package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
- package/lib/components/commonComponents/Slider/index.d.ts +2 -2
- package/lib/components/commonComponents/Slider/index.js +11 -7
- package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Slider/index.style.js +10 -22
- package/lib/components/commonComponents/SliderSelector/index.js +38 -35
- package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
- package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
- package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
- package/lib/components/commonComponents/Spinner/index.js +28 -24
- package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
- package/lib/components/commonComponents/Spinner/index.style.js +30 -61
- package/lib/components/commonComponents/Statistic/index.js +7 -3
- package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
- package/lib/components/commonComponents/Statistic/index.style.js +14 -26
- package/lib/components/commonComponents/Steps/index.js +10 -6
- package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
- package/lib/components/commonComponents/Steps/index.style.js +68 -78
- package/lib/components/commonComponents/Switch/index.js +14 -11
- package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
- package/lib/components/commonComponents/Switch/index.style.js +22 -33
- package/lib/components/commonComponents/Table/demo/demo1.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo2.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo3.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo4.js +1 -9
- package/lib/components/commonComponents/Table/index.d.ts +1 -1
- package/lib/components/commonComponents/Table/index.js +11 -7
- package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
- package/lib/components/commonComponents/Table/index.style.js +34 -32
- package/lib/components/commonComponents/Tabs/index.js +37 -29
- package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
- package/lib/components/commonComponents/Tabs/index.style.js +38 -44
- package/lib/components/commonComponents/Tag/index.js +13 -9
- package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
- package/lib/components/commonComponents/Tag/index.style.js +54 -58
- package/lib/components/commonComponents/TimePicker/index.js +36 -30
- package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
- package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
- package/lib/components/commonComponents/Tooltip/index.js +14 -10
- package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
- package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
- package/lib/components/commonComponents/Upload/index.js +15 -9
- package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
- package/lib/components/commonComponents/Upload/index.style.js +80 -90
- package/lib/components/commonComponents/Video/Control.d.ts +19 -0
- package/lib/components/commonComponents/Video/Control.js +104 -0
- package/lib/components/commonComponents/Video/demo/demo1.d.ts +2 -0
- package/lib/components/commonComponents/Video/demo/demo1.js +12 -0
- package/lib/components/commonComponents/Video/index.d.ts +18 -0
- package/lib/components/commonComponents/Video/index.js +222 -0
- package/lib/components/commonComponents/Video/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Video/index.style.js +40 -0
- package/lib/i18n/strings/en-US.json +3 -1
- package/lib/i18n/strings/zh-CN.json +3 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.js +3 -2
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/env/index.js +1 -1
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +3 -3
- package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
- package/lib/components/commonComponents/Slider/slider.input.js +0 -76
- package/lib/components/commonComponents/spark.style.d.ts +0 -45
- package/lib/components/commonComponents/spark.style.js +0 -62
- package/llms/all.llms.txt +0 -4235
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -74
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -61
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -89
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -99
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -79
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -88
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -34
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -76
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -227
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -60
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -100
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -70
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -383
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -68
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -168
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -66
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -114
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -154
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -62
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -56
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -64
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -94
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -120
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -83
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -38
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -77
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -82
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -58
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -228
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -95
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -57
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -104
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -105
- package/llms/index.llms.txt +0 -45
- /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface PromptsEditorProps {
|
|
2
3
|
/**
|
|
3
4
|
* @description 可以输入内容的最大长度
|
|
@@ -36,7 +37,12 @@ export interface PromptsEditorProps {
|
|
|
36
37
|
* @descriptionEn Text of the create variable button
|
|
37
38
|
*/
|
|
38
39
|
createBtnText?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @description 提示文本,传入 false 时隐藏提示
|
|
42
|
+
* @descriptionEn Text of the tips, set to false to hide the tips
|
|
43
|
+
*/
|
|
44
|
+
tipsText?: string | React.ReactNode | false;
|
|
39
45
|
}
|
|
40
46
|
export declare const langExtensionsMap: Record<string, any[]>;
|
|
41
|
-
declare const
|
|
42
|
-
export default
|
|
47
|
+
declare const _default: React.MemoExoticComponent<(props: PromptsEditorProps) => import("react/jsx-runtime").JSX.Element>;
|
|
48
|
+
export default _default;
|
|
@@ -22,7 +22,7 @@ import CodeMirror from '@uiw/react-codemirror';
|
|
|
22
22
|
import { ConfigProvider, theme } from 'antd';
|
|
23
23
|
import { createStyles } from 'antd-style';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
25
|
+
import React, { memo, useEffect, useMemo, useState } from 'react';
|
|
26
26
|
import VarRender from "./VarRender";
|
|
27
27
|
import VarSelectInput from "./VarSelectInput";
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -31,8 +31,8 @@ var useStyles = createStyles(function (_ref) {
|
|
|
31
31
|
var css = _ref.css,
|
|
32
32
|
token = _ref.token;
|
|
33
33
|
return {
|
|
34
|
-
onCreate: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
35
|
-
cm: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
34
|
+
onCreate: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .cm-tooltip li:last-of-type {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 40px;\n border-top: 1px solid ", ";\n border-radius: 0 !important;\n background-color: ", " !important;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 !important;\n }\n\n .cm-tooltip ul {\n margin-bottom: 40px !important;\n }\n\n .cm-tooltip li:first-of-type {\n border-top: none !important;\n }\n "])), token.colorBorderSecondary, token.colorBgContainer),
|
|
35
|
+
cm: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .cm-line {\n color: ", ";\n }\n .cm-line span {\n color: ", ";\n }\n\n .cm-editor {\n position: absolute !important;\n background-color: transparent !important;\n\n top: 0;\n left: 8px;\n right: 0;\n bottom: 30px;\n }\n .cm-focused {\n outline: none;\n }\n\n .cm-content {\n width: 100%;\n padding: 8px 0;\n white-space: break-spaces;\n }\n\n .cm-line {\n line-height: 24px;\n height: auto !important;\n }\n\n .cm-prompt-var {\n font-size: inherit;\n color: ", " !important;\n background-color: ", " !important;\n line-height: 1.7;\n font-weight: 500;\n margin: 0 2px;\n height: 24px;\n display: inline-flex;\n padding: 0 4px;\n border-radius: 4px;\n }\n\n .cm-tooltip {\n position: relative;\n background-color: ", ";\n border: 0;\n border-radius: 4px;\n overflow: hidden;\n box-shadow: 0px 3px 12px 0px rgba(47, 49, 51, 0.12);\n }\n\n .cm-tooltip ul {\n max-height: 17em !important;\n display: flex;\n flex-direction: column;\n }\n\n .cm-tooltip li {\n margin: 4px 8px;\n height: 32px;\n padding: 0 12px !important;\n flex: 0 0 32px;\n display: flex;\n align-items: center;\n }\n\n .cm-tooltip-autocomplete ul li[aria-selected] {\n border-radius: 6px;\n font-weight: 600;\n color: ", ";\n background-color: ", ";\n }\n\n .cm-completionInfo-right {\n display: none;\n }\n\n .cm-completionIcon {\n display: none;\n }\n "])), token.colorTextSecondary, token.colorBlue, token.colorPurple, token.colorPurpleBg, token.colorBgContainer, token.colorText, token.colorFillSecondary),
|
|
36
36
|
root: {
|
|
37
37
|
position: 'relative',
|
|
38
38
|
minHeight: 300,
|
|
@@ -68,7 +68,7 @@ export var langExtensionsMap = {
|
|
|
68
68
|
markdown: [markdown()]
|
|
69
69
|
};
|
|
70
70
|
var empty = [];
|
|
71
|
-
var
|
|
71
|
+
var Editor = function Editor(props) {
|
|
72
72
|
var _useStyles = useStyles(),
|
|
73
73
|
styles = _useStyles.styles;
|
|
74
74
|
var variables = props.variables || empty;
|
|
@@ -103,6 +103,17 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
103
103
|
setReady(false);
|
|
104
104
|
};
|
|
105
105
|
}, []);
|
|
106
|
+
var tips = React.useMemo(function () {
|
|
107
|
+
if (props.tipsText === false) return /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: styles.tips
|
|
109
|
+
});
|
|
110
|
+
return props.tipsText ? props.tipsText : /*#__PURE__*/_jsxs("div", {
|
|
111
|
+
className: styles.tips,
|
|
112
|
+
children: ["\u8F93\u5165\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
|
|
113
|
+
size: 16
|
|
114
|
+
}), " \u56DE\u8F66\u65B0\u589E"]
|
|
115
|
+
});
|
|
116
|
+
}, [props.tipsText]);
|
|
106
117
|
if (!ready) return null;
|
|
107
118
|
return /*#__PURE__*/_jsxs("div", {
|
|
108
119
|
className: styles.root,
|
|
@@ -120,15 +131,10 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
120
131
|
}
|
|
121
132
|
}, getTheme), /*#__PURE__*/_jsxs("div", {
|
|
122
133
|
className: styles.footer,
|
|
123
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
124
|
-
className: styles.tips,
|
|
125
|
-
children: ["\u8F93\u5165\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
|
|
126
|
-
size: 16
|
|
127
|
-
}), " \u56DE\u8F66\u65B0\u589E"]
|
|
128
|
-
}), props.maxLength ? /*#__PURE__*/_jsxs("div", {
|
|
134
|
+
children: [tips, props.maxLength ? /*#__PURE__*/_jsxs("div", {
|
|
129
135
|
children: [props.value.length, "/", props.maxLength]
|
|
130
136
|
}) : null]
|
|
131
137
|
})]
|
|
132
138
|
});
|
|
133
139
|
};
|
|
134
|
-
export default
|
|
140
|
+
export default /*#__PURE__*/memo(Editor);
|
|
@@ -7,8 +7,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { getCommonConfig } from "../../../config";
|
|
8
8
|
import { Radio } from 'antd';
|
|
9
9
|
import cls from 'classnames';
|
|
10
|
-
import
|
|
10
|
+
import { useStyle } from "./index.style";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
export default (function (props) {
|
|
13
15
|
var commonConfig = getCommonConfig();
|
|
14
16
|
var sparkPrefix = commonConfig.sparkPrefix,
|
|
@@ -19,14 +21,11 @@ export default (function (props) {
|
|
|
19
21
|
bordered = _props$bordered === void 0 ? false : _props$bordered,
|
|
20
22
|
_props$ghost = props.ghost,
|
|
21
23
|
ghost = _props$ghost === void 0 ? true : _props$ghost;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
var Style = useStyle();
|
|
25
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Radio.Group, _objectSpread(_objectSpread({}, props), {}, {
|
|
27
|
+
className: cls(props.className, props.bordered ? "".concat(sparkPrefix, "-radio-group-bordered") : '', ghost ? "".concat(antPrefix, "-radio-group-ghost") : ''),
|
|
28
|
+
optionType: "button"
|
|
29
|
+
}))]
|
|
27
30
|
});
|
|
28
|
-
return /*#__PURE__*/_jsx(Radio.Group, _objectSpread(_objectSpread({}, props), {}, {
|
|
29
|
-
className: cls(props.className, props.bordered ? "".concat(sparkPrefix, "-radio-group-bordered") : '', ghost ? "".concat(antPrefix, "-radio-group-ghost") : ''),
|
|
30
|
-
optionType: "button"
|
|
31
|
-
}));
|
|
32
31
|
});
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
[x: string]: {
|
|
3
|
-
border: string;
|
|
4
|
-
backgroundColor: string;
|
|
5
|
-
'&:first-child': {
|
|
6
|
-
'border-inline-start': string;
|
|
7
|
-
};
|
|
8
|
-
borderRadius: string;
|
|
9
|
-
'&::before': {
|
|
10
|
-
display: string;
|
|
11
|
-
};
|
|
12
|
-
'&:not(:last-child)': {
|
|
13
|
-
marginRight: string;
|
|
14
|
-
};
|
|
15
|
-
color?: undefined;
|
|
16
|
-
'&:hover'?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
[x: string]: {
|
|
19
|
-
[x: string]: {
|
|
20
|
-
[x: string]: string | {
|
|
21
|
-
backgroundColor: string;
|
|
22
|
-
};
|
|
23
|
-
color: string;
|
|
24
|
-
backgroundColor: string;
|
|
25
|
-
'&:hover'?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
'&:hover': {
|
|
28
|
-
backgroundColor: string;
|
|
29
|
-
};
|
|
30
|
-
color?: undefined;
|
|
31
|
-
backgroundColor?: undefined;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
border?: undefined;
|
|
35
|
-
backgroundColor?: undefined;
|
|
36
|
-
'&:first-child'?: undefined;
|
|
37
|
-
borderRadius?: undefined;
|
|
38
|
-
'&::before'?: undefined;
|
|
39
|
-
'&:not(:last-child)'?: undefined;
|
|
40
|
-
color?: undefined;
|
|
41
|
-
'&:hover'?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
[x: string]: {
|
|
44
|
-
border: string;
|
|
45
|
-
'&:not(:first-child)': {
|
|
46
|
-
'border-inline-start-width': string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
border?: undefined;
|
|
50
|
-
backgroundColor?: undefined;
|
|
51
|
-
'&:first-child'?: undefined;
|
|
52
|
-
borderRadius?: undefined;
|
|
53
|
-
'&::before'?: undefined;
|
|
54
|
-
'&:not(:last-child)'?: undefined;
|
|
55
|
-
color?: undefined;
|
|
56
|
-
'&:hover'?: undefined;
|
|
57
|
-
} | {
|
|
58
|
-
color: string;
|
|
59
|
-
backgroundColor: string;
|
|
60
|
-
'&:hover': {
|
|
61
|
-
color: string;
|
|
62
|
-
backgroundColor: string;
|
|
63
|
-
};
|
|
64
|
-
border?: undefined;
|
|
65
|
-
'&:first-child'?: undefined;
|
|
66
|
-
borderRadius?: undefined;
|
|
67
|
-
'&::before'?: undefined;
|
|
68
|
-
'&:not(:last-child)'?: undefined;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
72
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,63 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
backgroundColor: "var(--".concat(antPrefix, "-color-fill-tertiary)")
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
var useIndexStyle = createStyle(function (_ref2) {
|
|
58
|
-
var css = _ref2.css,
|
|
59
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
60
|
-
var result = css(getIndexStyleData(params));
|
|
61
|
-
return result;
|
|
62
|
-
});
|
|
63
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-radio-button-wrapper {\n border: none;\n background-color: transparent;\n border-radius: 6px;\n \n &:first-child {\n border-inline-start: initial;\n }\n \n &::before {\n display: none !important;\n }\n \n &:not(:last-child) {\n margin-right: 12px;\n }\n}\n\n.", "-radio-group-ghost {\n .", "-radio-button-wrapper-checked {\n &:not(.", "-radio-button-wrapper-disabled) {\n color: var(--", "-color-primary);\n background-color: var(--", "-color-primary-bg);\n \n .", "-radio-button-wrapper-checked {\n background-color: var(--", "-color-primary-bg);\n }\n }\n \n &.", "-radio-button-wrapper-disabled {\n &:hover {\n background-color: var(--", "-color-fill-tertiary);\n }\n }\n }\n}\n\n.", "-radio-group-bordered {\n .", "-radio-button-wrapper {\n border: var(--", "-line-width) var(--", "-line-type) var(--", "-color-border);\n \n &:not(:first-child) {\n border-inline-start-width: 1px;\n }\n }\n}\n\n.", "-radio-button-wrapper-disabled {\n color: var(--", "-color-text-tertiary);\n background-color: transparent;\n \n &:hover {\n color: var(--", "-color-text-tertiary);\n background-color: transparent;\n }\n}\n\n.", "-radio-button-wrapper-checked.", "-radio-button-wrapper-disabled {\n color: var(--", "-color-text-tertiary);\n background-color: var(--", "-color-fill-tertiary);\n \n &:hover {\n color: var(--", "-color-text-tertiary);\n background-color: var(--", "-color-fill-tertiary);\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.antPrefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.antPrefix;
|
|
18
|
+
}, function (p) {
|
|
19
|
+
return p.antPrefix;
|
|
20
|
+
}, function (p) {
|
|
21
|
+
return p.antPrefix;
|
|
22
|
+
}, function (p) {
|
|
23
|
+
return p.antPrefix;
|
|
24
|
+
}, function (p) {
|
|
25
|
+
return p.sparkPrefix;
|
|
26
|
+
}, function (p) {
|
|
27
|
+
return p.antPrefix;
|
|
28
|
+
}, function (p) {
|
|
29
|
+
return p.antPrefix;
|
|
30
|
+
}, function (p) {
|
|
31
|
+
return p.antPrefix;
|
|
32
|
+
}, function (p) {
|
|
33
|
+
return p.antPrefix;
|
|
34
|
+
}, function (p) {
|
|
35
|
+
return p.antPrefix;
|
|
36
|
+
}, function (p) {
|
|
37
|
+
return p.antPrefix;
|
|
38
|
+
}, function (p) {
|
|
39
|
+
return p.antPrefix;
|
|
40
|
+
}, function (p) {
|
|
41
|
+
return p.antPrefix;
|
|
42
|
+
}, function (p) {
|
|
43
|
+
return p.antPrefix;
|
|
44
|
+
}, function (p) {
|
|
45
|
+
return p.antPrefix;
|
|
46
|
+
}, function (p) {
|
|
47
|
+
return p.antPrefix;
|
|
48
|
+
}, function (p) {
|
|
49
|
+
return p.antPrefix;
|
|
50
|
+
}, function (p) {
|
|
51
|
+
return p.antPrefix;
|
|
52
|
+
});
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function getIndexStyleData(params) {
|
|
6
|
-
var sparkPrefix = params.sparkPrefix,
|
|
7
|
-
antPrefix = params.antPrefix;
|
|
8
|
-
return {};
|
|
9
|
-
}
|
|
10
|
-
var useIndexStyle = createStyle(function (_ref) {
|
|
11
|
-
var css = _ref.css,
|
|
12
|
-
params = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
var result = css(getIndexStyleData(params));
|
|
14
|
-
return result;
|
|
15
|
-
});
|
|
16
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* No styles needed for Result component */\n"])));
|
|
@@ -5,17 +5,20 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { memo } from 'react';
|
|
8
|
-
import
|
|
8
|
+
import { useStyle } from "./index.style";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
12
|
export var Var = /*#__PURE__*/memo(function (props) {
|
|
12
13
|
var attributes = props.attributes,
|
|
13
14
|
renderVarLabel = props.renderVarLabel;
|
|
14
|
-
|
|
15
|
-
return /*#__PURE__*/_jsxs(
|
|
16
|
-
children: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
var Style = useStyle();
|
|
16
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
17
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("span", _objectSpread(_objectSpread({}, attributes), {}, {
|
|
18
|
+
children: [props.children, /*#__PURE__*/_jsx("span", {
|
|
19
|
+
className: 'spark-editor-var-tag',
|
|
20
|
+
children: renderVarLabel ? renderVarLabel(props.element.code) : props.element.label
|
|
21
|
+
})]
|
|
22
|
+
}))]
|
|
23
|
+
});
|
|
21
24
|
});
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
'.spark-editor-var-tag': {
|
|
3
|
-
padding: string;
|
|
4
|
-
lineHeight: string;
|
|
5
|
-
fontSize: string;
|
|
6
|
-
margin: string;
|
|
7
|
-
background: string;
|
|
8
|
-
borderRadius: string;
|
|
9
|
-
height: string;
|
|
10
|
-
display: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const useIndexStyle: (props?: {}) => import("../../../../config").CommonConfig;
|
|
14
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
padding: '0 6px',
|
|
6
|
-
lineHeight: '24px',
|
|
7
|
-
fontSize: '12px',
|
|
8
|
-
margin: '0 2px',
|
|
9
|
-
background: 'rgba(205, 208, 220, 0.2)',
|
|
10
|
-
borderRadius: '6px',
|
|
11
|
-
height: '24px',
|
|
12
|
-
display: 'inline-block'
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
var useIndexStyle = createStyle(function (_ref) {
|
|
17
|
-
var css = _ref.css;
|
|
18
|
-
var result = css(getIndexStyleData());
|
|
19
|
-
return result;
|
|
20
|
-
});
|
|
21
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.spark-editor-var-tag {\n padding: 0 6px;\n line-height: 24px;\n font-size: 12px;\n margin: 0 2px;\n background: rgba(205, 208, 220, 0.2);\n border-radius: 6px;\n height: 24px;\n display: inline-block;\n}\n"])));
|
|
@@ -17,12 +17,13 @@ import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRe
|
|
|
17
17
|
import { Node, createEditor } from 'slate';
|
|
18
18
|
import { withHistory } from 'slate-history';
|
|
19
19
|
import { Editable, Slate, withReact } from 'slate-react';
|
|
20
|
-
import
|
|
20
|
+
import { useStyle } from "./index.style";
|
|
21
21
|
import { findNodePath, getEditorText, insertNodes, serialize, setCursorRemove, setEditorContent, setNodes, text2json, transformTagRules, transformVarText, withEditor, wrapNodes, wrapSpeakTag } from "./utils";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
25
|
var SlateEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
|
-
|
|
26
|
+
var Style = useStyle();
|
|
26
27
|
var initText = props.value,
|
|
27
28
|
_props$wordLimit = props.wordLimit,
|
|
28
29
|
wordLimit = _props$wordLimit === void 0 ? 1000 : _props$wordLimit,
|
|
@@ -234,36 +235,38 @@ var SlateEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
234
235
|
insertFragment(pastedText, false);
|
|
235
236
|
e.preventDefault();
|
|
236
237
|
};
|
|
237
|
-
return /*#__PURE__*/
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
238
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
239
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx("div", {
|
|
240
|
+
id: 'text-editor',
|
|
241
|
+
className: cls('text-editor', props.className),
|
|
242
|
+
children: /*#__PURE__*/_jsx(Slate, {
|
|
243
|
+
editor: editor,
|
|
244
|
+
value: value,
|
|
245
|
+
onChange: onChange,
|
|
246
|
+
children: /*#__PURE__*/_jsx(Editable, {
|
|
247
|
+
onKeyDown: props.onKeyDown,
|
|
248
|
+
placeholder: props.placeholder || $i18n.get({
|
|
249
|
+
id: 'components.commonComponents.SlateEditor.EnterHere',
|
|
250
|
+
dm: '在这里输入'
|
|
251
|
+
}),
|
|
252
|
+
onBlur: props.onBlur,
|
|
253
|
+
onFocus: props.onFocus,
|
|
254
|
+
className: cls('text-editor-content', props.contentClassName),
|
|
255
|
+
readOnly: readOnly,
|
|
256
|
+
renderElement: renderElement,
|
|
257
|
+
renderLeaf: renderLeaf,
|
|
258
|
+
onCompositionStart: onCompositionStart,
|
|
259
|
+
onCompositionEnd: onCompositionEnd,
|
|
260
|
+
onPaste: handlePaste,
|
|
261
|
+
maxLength: props.wordLimit,
|
|
262
|
+
onCopy: function onCopy(e) {
|
|
263
|
+
var formattedText = _generateTextBySelection() || '';
|
|
264
|
+
e.clipboardData.setData('text/plain', formattedText);
|
|
265
|
+
e.preventDefault();
|
|
266
|
+
}
|
|
267
|
+
})
|
|
265
268
|
})
|
|
266
|
-
})
|
|
269
|
+
})]
|
|
267
270
|
});
|
|
268
271
|
});
|
|
269
272
|
export default SlateEditor;
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
'.text-editor': {
|
|
3
|
-
position: string;
|
|
4
|
-
display: string;
|
|
5
|
-
flexDirection: string;
|
|
6
|
-
height: string;
|
|
7
|
-
width: string;
|
|
8
|
-
borderRadius: string;
|
|
9
|
-
'&-content': {
|
|
10
|
-
flex: number;
|
|
11
|
-
overflowY: string;
|
|
12
|
-
overflowX: string;
|
|
13
|
-
};
|
|
14
|
-
'.text-editor-content': {
|
|
15
|
-
display: string;
|
|
16
|
-
flexDirection: string;
|
|
17
|
-
gap: number;
|
|
18
|
-
'div[data-slate-node="element"]': {
|
|
19
|
-
margin: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
'.text-editor-user-select-none': {
|
|
24
|
-
userSelect: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
28
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,36 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
position: 'relative',
|
|
6
|
-
display: 'flex',
|
|
7
|
-
flexDirection: 'column',
|
|
8
|
-
height: '100%',
|
|
9
|
-
width: '100%',
|
|
10
|
-
borderRadius: '5px',
|
|
11
|
-
'&-content': {
|
|
12
|
-
flex: 1,
|
|
13
|
-
overflowY: 'auto',
|
|
14
|
-
overflowX: 'hidden'
|
|
15
|
-
},
|
|
16
|
-
'.text-editor-content': {
|
|
17
|
-
display: 'flex',
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
gap: 6,
|
|
20
|
-
'div[data-slate-node="element"]': {
|
|
21
|
-
margin: '0px !important'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
// 文本无法选中的样式
|
|
26
|
-
'.text-editor-user-select-none': {
|
|
27
|
-
userSelect: 'none'
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
var useIndexStyle = createStyle(function (_ref) {
|
|
32
|
-
var css = _ref.css;
|
|
33
|
-
var result = css(getIndexStyleData());
|
|
34
|
-
return result;
|
|
35
|
-
});
|
|
36
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.text-editor {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n border-radius: 5px;\n \n &-content {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n }\n \n .text-editor-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n \n div[data-slate-node=\"element\"] {\n margin: 0px !important;\n }\n }\n}\n\n/* \u6587\u672C\u65E0\u6CD5\u9009\u4E2D\u7684\u6837\u5F0F */\n.text-editor-user-select-none {\n user-select: none;\n}\n"])));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputNumberProps } from 'antd';
|
|
3
3
|
import { SliderSingleProps } from 'antd/es/slider';
|
|
4
|
-
export type SliderInputProps = Omit<SliderSingleProps, 'classNames' | 'styles'> & {
|
|
4
|
+
export type SliderInputProps = Omit<SliderSingleProps, 'classNames' | 'styles' | 'className' | 'style'> & {
|
|
5
5
|
classNames?: {
|
|
6
6
|
slider?: string;
|
|
7
7
|
inputNumber?: string;
|