@lingxiteam/lcdp-ueditor-react 1.0.3-alpha.9 → 1.0.4-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/es/LcdpUeditor.d.ts +10 -4
  2. package/es/LcdpUeditor.d.ts.map +1 -0
  3. package/es/LcdpUeditor.js +78 -11
  4. package/es/ToolBottomBar/FormatModal/index.d.ts +9 -0
  5. package/es/ToolBottomBar/FormatModal/index.d.ts.map +1 -0
  6. package/es/ToolBottomBar/FormatModal/index.js +543 -0
  7. package/es/ToolBottomBar/FormatModal/index.less +276 -0
  8. package/es/ToolBottomBar/ProgressModal/index.d.ts +10 -0
  9. package/es/ToolBottomBar/ProgressModal/index.d.ts.map +1 -0
  10. package/es/ToolBottomBar/ProgressModal/index.js +53 -0
  11. package/es/ToolBottomBar/ProgressModal/index.less +16 -0
  12. package/es/ToolBottomBar/index.d.ts +32 -0
  13. package/es/ToolBottomBar/index.d.ts.map +1 -0
  14. package/es/ToolBottomBar/index.js +319 -0
  15. package/es/ToolBottomBar/index.less +75 -0
  16. package/es/const.d.ts.map +1 -0
  17. package/es/icon/ExportPDF.d.ts +3 -0
  18. package/es/icon/ExportPDF.d.ts.map +1 -0
  19. package/es/icon/ExportPDF.js +24 -0
  20. package/es/icon/TextCopy.d.ts +3 -0
  21. package/es/icon/TextCopy.d.ts.map +1 -0
  22. package/es/icon/TextCopy.js +25 -0
  23. package/es/icon/TextFileIcon.d.ts +3 -0
  24. package/es/icon/TextFileIcon.d.ts.map +1 -0
  25. package/es/icon/TextFileIcon.js +26 -0
  26. package/es/icon/TextIcon.d.ts +3 -0
  27. package/es/icon/TextIcon.d.ts.map +1 -0
  28. package/es/icon/TextIcon.js +28 -0
  29. package/es/index.d.ts.map +1 -0
  30. package/es/tools/UeditorResourceLoader.d.ts.map +1 -0
  31. package/es/tools/exportPDF.d.ts +27 -0
  32. package/es/tools/exportPDF.d.ts.map +1 -0
  33. package/es/tools/exportPDF.js +146 -0
  34. package/es/tools/filterHtmlNode.d.ts.map +1 -0
  35. package/es/tools/generateStylesFromSettings.d.ts +38 -0
  36. package/es/tools/generateStylesFromSettings.d.ts.map +1 -0
  37. package/es/tools/generateStylesFromSettings.js +24 -0
  38. package/es/tools/loadScript.d.ts.map +1 -0
  39. package/es/type.d.ts +20 -0
  40. package/es/type.d.ts.map +1 -0
  41. package/lib/LcdpUeditor.d.ts +10 -4
  42. package/lib/LcdpUeditor.js +63 -8
  43. package/lib/ToolBottomBar/FormatModal/index.d.ts +9 -0
  44. package/lib/ToolBottomBar/FormatModal/index.js +261 -0
  45. package/lib/ToolBottomBar/FormatModal/index.less +276 -0
  46. package/lib/ToolBottomBar/ProgressModal/index.d.ts +10 -0
  47. package/lib/ToolBottomBar/ProgressModal/index.js +73 -0
  48. package/lib/ToolBottomBar/ProgressModal/index.less +16 -0
  49. package/lib/ToolBottomBar/index.d.ts +32 -0
  50. package/lib/ToolBottomBar/index.js +254 -0
  51. package/lib/ToolBottomBar/index.less +75 -0
  52. package/lib/icon/ExportPDF.d.ts +3 -0
  53. package/lib/icon/ExportPDF.js +57 -0
  54. package/lib/icon/TextCopy.d.ts +3 -0
  55. package/lib/icon/TextCopy.js +39 -0
  56. package/lib/icon/TextFileIcon.d.ts +3 -0
  57. package/lib/icon/TextFileIcon.js +39 -0
  58. package/lib/icon/TextIcon.d.ts +3 -0
  59. package/lib/icon/TextIcon.js +39 -0
  60. package/lib/tools/exportPDF.d.ts +27 -0
  61. package/lib/tools/exportPDF.js +95 -0
  62. package/lib/tools/generateStylesFromSettings.d.ts +38 -0
  63. package/lib/tools/generateStylesFromSettings.js +77 -0
  64. package/lib/type.d.ts +20 -0
  65. package/package.json +8 -3
  66. package/ueditor-resource/themes/default/css/ueditor.css +1 -1
  67. package/ueditor-resource/ueditor.all.js +1 -1
@@ -0,0 +1,276 @@
1
+ @prefixCls: pcfactory;
2
+ @suffixCls: ueditor-format;
3
+ .@{suffixCls}-settings-popover {
4
+ max-width: 720px;
5
+
6
+ input[type="color"] {
7
+ -webkit-appearance: none;
8
+ border: none;
9
+ padding: 0;
10
+ cursor: pointer;
11
+
12
+ &::-webkit-color-swatch-wrapper {
13
+ padding: 0;
14
+ border-radius: 2px;
15
+ }
16
+
17
+ &::-webkit-color-swatch {
18
+ border: none;
19
+ border-radius: 2px;
20
+ }
21
+ }
22
+
23
+ .@{prefixCls}-form-item {
24
+ margin-bottom: 0;
25
+ }
26
+
27
+ .@{prefixCls}-form-item-control-input {
28
+ min-height: 28px;
29
+ }
30
+
31
+ .@{suffixCls}-popover-content {
32
+ width: 680px;
33
+ padding: 0;
34
+ }
35
+
36
+ .@{prefixCls}-popover-inner-content {
37
+ padding: 16px 20px;
38
+ border-radius: 8px;
39
+ }
40
+
41
+ .@{prefixCls}-popover-title {
42
+ font-weight: 600;
43
+ text-align: center;
44
+ font-size: 16px;
45
+ color: #1a202c;
46
+ padding: 16px 20px 12px;
47
+ border-bottom: 1px solid #e2e8f0;
48
+ margin-bottom: 0;
49
+ }
50
+ }
51
+
52
+ .@{suffixCls}-section {
53
+ overflow-y: auto;
54
+ padding: 0;
55
+ max-height: 400px;
56
+ }
57
+
58
+ .@{suffixCls}-style-row {
59
+ margin-bottom: 8px;
60
+ padding: 12px 16px;
61
+ border-bottom: 1px solid #f0f0f0;
62
+ border-radius: 6px;
63
+ background-color: #fafbfc;
64
+ transition: all 0.2s ease;
65
+ display: flex;
66
+ align-items: center;
67
+
68
+ &:hover {
69
+ background-color: #f1f5f9;
70
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
71
+ }
72
+
73
+ &:last-child {
74
+ border-bottom: none;
75
+ margin-bottom: 0;
76
+ }
77
+
78
+ .@{suffixCls}-row-label {
79
+ font-weight: 600;
80
+ font-size: 14px;
81
+ width: 80px;
82
+ color: #374151;
83
+ flex-shrink: 0;
84
+ margin-right: 12px;
85
+ margin-bottom: 0;
86
+ }
87
+
88
+ .@{prefixCls}-row {
89
+ flex: 1;
90
+ align-items: center;
91
+ margin: 0;
92
+ .@{prefixCls}-select-selector {
93
+ width: 100%;
94
+ }
95
+ }
96
+
97
+ .@{prefixCls}-col {
98
+ margin-bottom: 0;
99
+ display: flex;
100
+ align-items: center;
101
+ }
102
+
103
+ .@{prefixCls}-select {
104
+ width: 100%;
105
+
106
+ .@{prefixCls}-select-selector {
107
+ border-radius: 4px;
108
+ border-color: #d1d5db;
109
+ transition: all 0.2s ease;
110
+ height: 28px;
111
+
112
+ .@{prefixCls}-select-selection-item {
113
+ line-height: 26px;
114
+ }
115
+
116
+ &:hover {
117
+ border-color: #6366f1;
118
+ }
119
+ }
120
+
121
+ &.@{prefixCls}-select-focused .@{prefixCls}-select-selector {
122
+ border-color: #6366f1 !important;
123
+ box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
124
+ }
125
+ }
126
+
127
+ .@{prefixCls}-input-number {
128
+ width: 100%;
129
+ border-radius: 4px;
130
+ border-color: #d1d5db;
131
+ height: 28px;
132
+
133
+ .@{prefixCls}-input-number-input {
134
+ height: 26px;
135
+ }
136
+
137
+ &:hover {
138
+ border-color: #6366f1;
139
+ }
140
+
141
+ &:focus,
142
+ &.@{prefixCls}-input-number-focused {
143
+ border-color: #6366f1 !important;
144
+ box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
145
+ }
146
+ }
147
+
148
+ input[type="color"] {
149
+ width: 100%;
150
+ height: 28px;
151
+ border-radius: 4px;
152
+ border: 1px solid #d1d5db;
153
+ cursor: pointer;
154
+
155
+ &:hover {
156
+ border-color: #6366f1;
157
+ }
158
+ }
159
+ }
160
+
161
+ .@{suffixCls}-footer {
162
+ display: flex;
163
+ justify-content: flex-end;
164
+ gap: 12px;
165
+ margin-top: 16px;
166
+ padding-top: 12px;
167
+ border-top: 1px solid #e2e8f0;
168
+
169
+ .@{prefixCls}-btn {
170
+ height: 32px;
171
+ padding: 0 16px;
172
+ border-radius: 4px;
173
+ font-weight: 500;
174
+ transition: all 0.2s ease;
175
+
176
+ &.@{prefixCls}-btn-default {
177
+ border-color: #d1d5db;
178
+ color: #6b7280;
179
+
180
+ &:hover {
181
+ border-color: #9ca3af;
182
+ color: #374151;
183
+ }
184
+ }
185
+
186
+ &.@{prefixCls}-btn-primary {
187
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
188
+ border: none;
189
+ box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
190
+
191
+ &:hover {
192
+ background: linear-gradient(135deg, #5b61f0 0%, #7c3aed 100%);
193
+ box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
194
+ transform: translateY(-1px);
195
+ }
196
+ }
197
+ }
198
+ }
199
+
200
+ @media (max-width: 768px) {
201
+ .@{suffixCls}-settings-popover {
202
+ max-width: 95vw;
203
+
204
+ .@{suffixCls}-popover-content {
205
+ width: calc(95vw - 40px);
206
+ }
207
+ }
208
+
209
+ .@{suffixCls}-style-row {
210
+ flex-direction: column;
211
+ align-items: stretch;
212
+
213
+ .@{suffixCls}-row-label {
214
+ width: 100%;
215
+ margin-right: 0;
216
+ margin-bottom: 8px;
217
+ }
218
+
219
+ .@{prefixCls}-row {
220
+ width: 100%;
221
+ }
222
+
223
+ .@{prefixCls}-col {
224
+ margin-bottom: 8px;
225
+
226
+ &:last-child {
227
+ margin-bottom: 0;
228
+ }
229
+ }
230
+ }
231
+ }
232
+
233
+ .@{suffixCls}-style-section {
234
+ margin-bottom: 15px;
235
+ }
236
+
237
+ .@{suffixCls}-section-title {
238
+ font-weight: 500;
239
+ margin-bottom: 10px;
240
+ font-size: 15px;
241
+ }
242
+
243
+ .@{suffixCls}-system-info {
244
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
245
+ color: white !important;
246
+ border-radius: 8px !important;
247
+ padding: 12px 16px !important;
248
+ margin-bottom: 16px !important;
249
+ text-align: center !important;
250
+ font-size: 13px !important;
251
+ font-weight: 500 !important;
252
+ box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2) !important;
253
+ }
254
+
255
+ .@{suffixCls}-section::-webkit-scrollbar {
256
+ width: 6px;
257
+ }
258
+
259
+ .@{suffixCls}-section::-webkit-scrollbar-track {
260
+ background: #f1f5f9;
261
+ border-radius: 3px;
262
+ }
263
+
264
+ .@{suffixCls}-section::-webkit-scrollbar-thumb {
265
+ background: #cbd5e1;
266
+ border-radius: 3px;
267
+
268
+ &:hover {
269
+ background: #94a3b8;
270
+ }
271
+ }
272
+
273
+ .@{suffixCls}-section.loading {
274
+ opacity: 0.6;
275
+ pointer-events: none;
276
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface ProgressModalRef {
4
+ updateProgress: (progress: number, title?: string) => void;
5
+ updateVisible: (open: boolean) => void;
6
+ }
7
+ export interface ProgressModalProps {
8
+ }
9
+ declare const ProgressModal: React.ForwardRefExoticComponent<ProgressModalProps & React.RefAttributes<ProgressModalRef>>;
10
+ export default ProgressModal;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;CAClC;AAGD,QAAA,MAAM,aAAa,6FAkCjB,CAAC;AAIH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,53 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { forwardRef, useImperativeHandle, useState } from 'react';
3
+ import { Modal, Progress } from 'antd';
4
+ import "./index.less";
5
+ var suffixCls = 'ueditor-progress-modal';
6
+ var ProgressModal = /*#__PURE__*/forwardRef(function (props, ref) {
7
+ var _useState = useState(false),
8
+ _useState2 = _slicedToArray(_useState, 2),
9
+ visible = _useState2[0],
10
+ setVisible = _useState2[1];
11
+ var _useState3 = useState(0),
12
+ _useState4 = _slicedToArray(_useState3, 2),
13
+ progress = _useState4[0],
14
+ setProgress = _useState4[1];
15
+ var _useState5 = useState('准备中...'),
16
+ _useState6 = _slicedToArray(_useState5, 2),
17
+ title = _useState6[0],
18
+ setTitle = _useState6[1];
19
+ useImperativeHandle(ref, function () {
20
+ return {
21
+ updateProgress: function updateProgress(newProgress, title) {
22
+ if (!visible) {
23
+ setVisible(true);
24
+ }
25
+ setProgress(newProgress);
26
+ if (title) {
27
+ setTitle(title);
28
+ }
29
+ },
30
+ updateVisible: function updateVisible(open) {
31
+ setVisible(open);
32
+ }
33
+ };
34
+ });
35
+ return /*#__PURE__*/React.createElement(Modal, {
36
+ title: null,
37
+ visible: visible,
38
+ footer: null,
39
+ closable: false,
40
+ maskClosable: false,
41
+ wrapClassName: suffixCls
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: "".concat(suffixCls, "-title")
44
+ }, "\u6B63\u5728\u751F\u6210PDF\u6587\u4EF6..."), /*#__PURE__*/React.createElement(Progress, {
45
+ percent: progress,
46
+ status: "active",
47
+ showInfo: false
48
+ }), title && /*#__PURE__*/React.createElement("div", {
49
+ className: "".concat(suffixCls, "-sub-title")
50
+ }, title, " ", progress, "%"));
51
+ });
52
+ ProgressModal.displayName = 'ProgressModal';
53
+ export default ProgressModal;
@@ -0,0 +1,16 @@
1
+ @suffixCls: ~'ueditor-progress-modal';
2
+
3
+ .@{suffixCls} {
4
+ &-title {
5
+ font-size: 16px;
6
+ font-weight: 500;
7
+ margin-bottom: 12px;
8
+ color: #333;
9
+ }
10
+ &-sub-title {
11
+ font-size: 14px;
12
+ color: #666;
13
+ text-align: center;
14
+ margin-top: 8px;
15
+ }
16
+ }
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { ILcdpUeditorProps } from '../type';
4
+ declare const ToolBottomBar: (props: {
5
+ /**
6
+ * 编辑器实例
7
+ */
8
+ ueditorInst: any;
9
+ /**
10
+ * 前缀类名
11
+ */
12
+ prefixCls?: string | undefined;
13
+ /**
14
+ * 容器引用
15
+ */
16
+ containerRef?: React.RefObject<HTMLDivElement> | undefined;
17
+ defaultSetting?: Record<"chineseCount" | "charCount" | "pageWidth" | "formatSetting" | "exportPdf" | "fullScreen" | "copy", any> | undefined;
18
+ onSettingChange?: ((setting: Partial<Record<Required<ILcdpUeditorProps>['bottomTypes'][number], any>>) => void) | undefined;
19
+ /**
20
+ * 是否准备就绪
21
+ */
22
+ isReady?: boolean | undefined;
23
+ /**
24
+ * 底部功能类型
25
+ */
26
+ bottomTypes?: ILcdpUeditorProps['bottomTypes'];
27
+ /**
28
+ * 导出文件名
29
+ */
30
+ exportFileName?: string | undefined;
31
+ }) => JSX.Element;
32
+ export default ToolBottomBar;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAU5C,QAAA,MAAM,aAAa;IAEjB;;OAEG;iBACU,GAAG;IAEhB;;OAEG;;IAGH;;OAEG;;;iCAGyB,QAAQ,OAAO,SAAS,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,IAAI;IAE7G;;OAEG;;IAGH;;OAEG;kBACW,iBAAiB,CAAC,aAAa,CAAC;IAE9C;;OAEG;;iBA4PJ,CAAC;AAEF,eAAe,aAAa,CAAC"}