@cgboiler/biz-basic 1.0.65 → 1.0.67

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 (57) hide show
  1. package/es/index.d.ts +1 -1
  2. package/es/index.js +1 -1
  3. package/es/rich-text-editor/extensions/HashTag.js +3 -0
  4. package/es/rich-text-editor/index.css +1 -1
  5. package/es/rich-text-editor/index.less +0 -4
  6. package/es/rich-text-editor/menu-system/styles/animations.less +91 -91
  7. package/es/rich-text-editor/menu-system/styles/button-colors.less +142 -142
  8. package/es/rich-text-editor/menu-system/styles/button-group.less +23 -23
  9. package/es/rich-text-editor/menu-system/styles/button.less +322 -322
  10. package/es/rich-text-editor/menu-system/styles/card.less +78 -78
  11. package/es/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -57
  12. package/es/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -51
  13. package/es/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -40
  14. package/es/rich-text-editor/menu-system/styles/image-upload-node.less +240 -240
  15. package/es/rich-text-editor/menu-system/styles/input.less +53 -53
  16. package/es/rich-text-editor/menu-system/styles/link-popover.less +32 -32
  17. package/es/rich-text-editor/menu-system/styles/separator.less +26 -26
  18. package/es/rich-text-editor/menu-system/styles/simple-editor.less +39 -39
  19. package/es/rich-text-editor/menu-system/styles/toolbar.less +87 -87
  20. package/es/rich-text-editor/menu-system/styles/variables.less +294 -294
  21. package/es/vue-sfc-shim.d.ts +6 -6
  22. package/es/vue-tsx-shim.d.ts +24 -24
  23. package/lib/index.d.ts +1 -1
  24. package/lib/index.js +1 -1
  25. package/lib/rich-text-editor/extensions/HashTag.js +3 -0
  26. package/lib/rich-text-editor/index.css +1 -1
  27. package/lib/rich-text-editor/index.less +0 -4
  28. package/lib/rich-text-editor/menu-system/styles/animations.less +91 -91
  29. package/lib/rich-text-editor/menu-system/styles/button-colors.less +142 -142
  30. package/lib/rich-text-editor/menu-system/styles/button-group.less +23 -23
  31. package/lib/rich-text-editor/menu-system/styles/button.less +322 -322
  32. package/lib/rich-text-editor/menu-system/styles/card.less +78 -78
  33. package/lib/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -57
  34. package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -51
  35. package/lib/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -40
  36. package/lib/rich-text-editor/menu-system/styles/image-upload-node.less +240 -240
  37. package/lib/rich-text-editor/menu-system/styles/input.less +53 -53
  38. package/lib/rich-text-editor/menu-system/styles/link-popover.less +32 -32
  39. package/lib/rich-text-editor/menu-system/styles/separator.less +26 -26
  40. package/lib/rich-text-editor/menu-system/styles/simple-editor.less +39 -39
  41. package/lib/rich-text-editor/menu-system/styles/toolbar.less +87 -87
  42. package/lib/rich-text-editor/menu-system/styles/variables.less +294 -294
  43. package/lib/vue-sfc-shim.d.ts +6 -6
  44. package/lib/vue-tsx-shim.d.ts +24 -24
  45. package/package.json +1 -1
  46. package/es/rich-text-editor/index copy 2.css +0 -1
  47. package/es/rich-text-editor/index copy 2.less +0 -598
  48. package/es/rich-text-editor/index copy.css +0 -1
  49. package/es/rich-text-editor/index copy.less +0 -356
  50. package/es/rich-text-editor/lib/utils.d.ts +0 -123
  51. package/es/rich-text-editor/lib/utils.js +0 -244
  52. package/lib/rich-text-editor/index copy 2.css +0 -1
  53. package/lib/rich-text-editor/index copy 2.less +0 -598
  54. package/lib/rich-text-editor/index copy.css +0 -1
  55. package/lib/rich-text-editor/index copy.less +0 -356
  56. package/lib/rich-text-editor/lib/utils.d.ts +0 -123
  57. package/lib/rich-text-editor/lib/utils.js +0 -263
@@ -1,356 +0,0 @@
1
- body .ProseMirror {
2
- flex: 1;
3
- overflow: auto;
4
- outline: none;
5
-
6
- line-height: 1.6;
7
- font-size: var(--font-base);
8
- --white: #fff;
9
- --black: #2e2b29;
10
- --gray-1: rgba(61, 37, 20, 0.05);
11
- --gray-2: rgba(61, 37, 20, 0.08);
12
- --gray-3: rgba(61, 37, 20, 0.12);
13
- --gray-4: rgba(53, 38, 28, 0.3);
14
- --gray-5: rgba(28, 25, 23, 0.6);
15
- --green: #22c55e;
16
- --purple: #才537;
17
- --purple-contrast: #5800cc;
18
- --purple-light: rgba(88, 5, 255, 0.05);
19
- --yellow-contrast: #facc15;
20
- --yellow: rgba(250, 204, 21, 0.4);
21
- --yellow-light: #fffae5;
22
- --red: #ff5c33;
23
- --red-light: #ffebe5;
24
- --shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
25
- :first-child {
26
- margin-top: 0;
27
- }
28
-
29
- video {
30
- width: 100%;
31
- }
32
- /* List styles */
33
- ol {
34
- list-style: auto;
35
- ol {
36
- list-style: disc;
37
- }
38
- }
39
-
40
- ul {
41
- list-style: disc;
42
- }
43
-
44
- ol,
45
- ul {
46
- padding-left: 1.5em;
47
- margin: 0 0 12px 0;
48
- li p {
49
- margin-top: 0.25em;
50
- margin-bottom: 0.25em;
51
- }
52
- }
53
-
54
- li::marker {
55
- text-align: start !important;
56
- }
57
-
58
- /* Heading styles */
59
- h1,
60
- h2,
61
- h3,
62
- h4,
63
- h5,
64
- h6 {
65
- line-height: 1.1;
66
- margin-top: 2.5rem;
67
- text-wrap: pretty;
68
- }
69
-
70
- h1,
71
- h2 {
72
- margin-top: 1rem;
73
- margin-bottom: 1rem;
74
- }
75
-
76
- h1 {
77
- font-size: 1.4rem;
78
- }
79
-
80
- h2 {
81
- font-size: 1.2rem;
82
- }
83
-
84
- h3 {
85
- font-size: 1.1rem;
86
- }
87
-
88
- h4,
89
- h5,
90
- h6 {
91
- font-size: 1rem;
92
- }
93
-
94
- /* Link styles */
95
- a,
96
- .editor-link {
97
- color: var(--purple);
98
- text-decoration: underline;
99
- cursor: pointer;
100
- transition: color 0.2s ease;
101
-
102
- &:hover {
103
- color: var(--purple-contrast);
104
- text-decoration: underline;
105
- }
106
- }
107
-
108
- /* Code and preformatted text styles */
109
- code {
110
- background-color: #ffe5e8;
111
- border-radius: 0.4rem;
112
- color: #c02537;
113
- padding: 2px 4px;
114
- }
115
-
116
- pre {
117
- border-radius: 0.5rem;
118
- font-family: 'JetBrainsMono', monospace;
119
- margin: 1.5rem 0;
120
- padding: 0.75rem 1rem;
121
-
122
- code {
123
- background: none;
124
- color: inherit;
125
- font-size: 0.8rem;
126
- padding: 0;
127
- }
128
- }
129
-
130
- blockquote {
131
- border-left: 3px solid var(--gray-3);
132
- margin: 1.5rem 0;
133
- padding-left: 1rem;
134
- }
135
-
136
- hr {
137
- border: none;
138
- border-top: 1px solid var(--gray-2);
139
- margin: 2rem 0;
140
- }
141
-
142
- /* Placeholder (at the top) */
143
- p.is-editor-empty:first-child::before {
144
- color: var(--gray-4);
145
- content: attr(data-placeholder);
146
- float: left;
147
- height: 0;
148
- pointer-events: none;
149
- }
150
-
151
- .is-empty::before {
152
- color: var(--gray-4);
153
- content: attr(data-placeholder);
154
- float: left;
155
- height: 0;
156
- pointer-events: none;
157
- }
158
- /* Table-specific styling */
159
- table {
160
- border-collapse: collapse;
161
- margin: 0;
162
- overflow: hidden;
163
- table-layout: fixed;
164
- width: 100%;
165
-
166
- td,
167
- th {
168
- border: 1px solid var(--gray-3);
169
- box-sizing: border-box;
170
- min-width: 1em;
171
- padding: 6px 8px;
172
- position: relative;
173
- vertical-align: top;
174
-
175
- > * {
176
- margin-bottom: 0;
177
- }
178
- }
179
-
180
- th {
181
- background-color: var(--gray-1);
182
- font-weight: bold;
183
- text-align: left;
184
- }
185
-
186
- .selectedCell:after {
187
- background: var(--gray-2);
188
- content: '';
189
- left: 0;
190
- right: 0;
191
- top: 0;
192
- bottom: 0;
193
- pointer-events: none;
194
- position: absolute;
195
- z-index: 2;
196
- }
197
-
198
- .column-resize-handle {
199
- background-color: var(--purple);
200
- bottom: -2px;
201
- pointer-events: none;
202
- position: absolute;
203
- right: -2px;
204
- top: 0;
205
- width: 4px;
206
- }
207
- }
208
-
209
- .tableWrapper {
210
- margin: 1.5rem 0;
211
- overflow-x: auto;
212
- }
213
-
214
- &.resize-cursor {
215
- cursor: ew-resize;
216
- cursor: col-resize;
217
- }
218
- img {
219
- max-width: 100%;
220
- }
221
- // @人的样式 #话题的样式 自定义内容的样式
222
- .mention,
223
- .hash-tag {
224
- color: #c02537;
225
- padding: 0 0.3em;
226
- }
227
-
228
- .custom-content {
229
- color: var(--custom-content-color, #000);
230
- padding: 0 0.3em;
231
- cursor: pointer;
232
- transition: color 0.2s ease;
233
-
234
- &:hover {
235
- color: var(--custom-content-hover-color, #c02537);
236
- }
237
- }
238
- }
239
-
240
- // animation
241
- .animation-indent--right {
242
- animation: indent-right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1 alternate-reverse;
243
- }
244
-
245
- @keyframes indent-right {
246
- 0% {
247
- -webkit-transform: translateX(0);
248
- transform: translateX(0);
249
- }
250
-
251
- to {
252
- -webkit-transform: translateX(12px);
253
- transform: translateX(12px);
254
- }
255
- }
256
-
257
- .tiptap-editor-container {
258
- display: flex;
259
- flex-direction: column;
260
- border: 1px solid var(--gray-3);
261
- border-radius: 8px;
262
- overflow: hidden;
263
- height: 100%;
264
- background-color: var(--white);
265
-
266
- .dark & {
267
- background-color: var(--black);
268
- border-color: var(--gray-4);
269
- }
270
-
271
- .tiptap-editor-toolbar {
272
- flex: 0 0 auto;
273
- border-bottom: 1px solid var(--gray-3);
274
- padding: 4px;
275
- background-color: var(--gray-1);
276
- display: flex;
277
- flex-wrap: wrap;
278
- gap: 4px;
279
-
280
- .dark & {
281
- border-bottom-color: var(--gray-4);
282
- background-color: var(--gray-2);
283
- }
284
- }
285
-
286
- .tiptap-editor-content-wrapper {
287
- flex: 1 1 auto;
288
- overflow-y: auto;
289
- position: relative;
290
- padding: 16px 8px;
291
- background-color: var(--white);
292
- display: flex;
293
- justify-content: center;
294
-
295
- .dark & {
296
- background-color: var(--black);
297
- }
298
-
299
- .ProseMirror {
300
- width: 100%;
301
- }
302
- }
303
- }
304
-
305
- /* Dropdown styling */
306
- .tiptap-dropdown-menu {
307
- .el-dropdown-menu__item {
308
- &.is-active {
309
- color: var(--tt-brand-color-500) !important;
310
- background-color: var(--tt-brand-color-50) !important;
311
-
312
- .dark & {
313
- color: var(--tt-brand-color-400) !important;
314
- background-color: var(--tt-brand-color-900) !important;
315
- }
316
- }
317
- }
318
- }
319
-
320
- .tiptap-dropdown-menu-item-content {
321
- display: flex;
322
- align-items: center;
323
- gap: 8px;
324
- width: 100%;
325
- }
326
-
327
- .tiptap-dropdown-menu-item-label {
328
- font-size: 10px;
329
- font-weight: 700;
330
- color: var(--tt-text-muted);
331
- background-color: var(--tt-gray-light-100);
332
- padding: 1px 4px;
333
- border-radius: 4px;
334
- min-width: 20px;
335
- text-align: center;
336
-
337
- .dark & {
338
- background-color: var(--tt-gray-dark-200);
339
- }
340
- }
341
-
342
- .tiptap-heading-trigger,
343
- .tiptap-list-dropdown-trigger {
344
- .tiptap-button-icon-chevron {
345
- width: 12px;
346
- height: 12px;
347
- margin-left: 2px;
348
- color: var(--tt-text-muted);
349
- }
350
- }
351
-
352
- .tiptap-dropdown-menu-item-icon {
353
- width: 16px;
354
- height: 16px;
355
- color: var(--tt-text-muted);
356
- }
@@ -1,123 +0,0 @@
1
- import type { Node as TiptapNode } from '@tiptap/pm/model';
2
- import type { Editor } from '@tiptap/core';
3
- import { type ClassValue } from 'clsx';
4
- export declare const MAX_FILE_SIZE: number;
5
- export declare const MAC_SYMBOLS: Record<string, string>;
6
- export declare function cn(...inputs: ClassValue[]): string;
7
- /**
8
- * Determines if the current platform is macOS
9
- * @returns boolean indicating if the current platform is Mac
10
- */
11
- export declare function isMac(): boolean;
12
- /**
13
- * Formats a shortcut key based on the platform (Mac or non-Mac)
14
- * @param key - The key to format (e.g., "ctrl", "alt", "shift")
15
- * @param isMac - Boolean indicating if the platform is Mac
16
- * @param capitalize - Whether to capitalize the key (default: true)
17
- * @returns Formatted shortcut key symbol
18
- */
19
- export declare const formatShortcutKey: (key: string, isMac: boolean, capitalize?: boolean) => string;
20
- /**
21
- * Parses a shortcut key string into an array of formatted key symbols
22
- * @param shortcutKeys - The string of shortcut keys (e.g., "ctrl-alt-shift")
23
- * @param delimiter - The delimiter used to split the keys (default: "-")
24
- * @param capitalize - Whether to capitalize the keys (default: true)
25
- * @returns Array of formatted shortcut key symbols
26
- */
27
- export declare const parseShortcutKeys: (props: {
28
- shortcutKeys: string | undefined;
29
- delimiter?: string;
30
- capitalize?: boolean;
31
- }) => string[];
32
- /**
33
- * Checks if a mark exists in the editor schema
34
- * @param markName - The name of the mark to check
35
- * @param editor - The editor instance
36
- * @returns boolean indicating if the mark exists in the schema
37
- */
38
- export declare const isMarkInSchema: (markName: string, editor: Editor | null) => boolean;
39
- /**
40
- * Checks if a node exists in the editor schema
41
- * @param nodeName - The name of the node to check
42
- * @param editor - The editor instance
43
- * @returns boolean indicating if the node exists in the schema
44
- */
45
- export declare const isNodeInSchema: (nodeName: string, editor: Editor | null) => boolean;
46
- /**
47
- * Moves the focus to the next node in the editor
48
- * @param editor - The editor instance
49
- * @returns boolean indicating if the focus was moved
50
- */
51
- export declare function focusNextNode(editor: Editor): boolean;
52
- /**
53
- * Checks if a value is a valid number (not null, undefined, or NaN)
54
- * @param value - The value to check
55
- * @returns boolean indicating if the value is a valid number
56
- */
57
- export declare function isValidPosition(pos: number | null | undefined): pos is number;
58
- /**
59
- * Checks if one or more extensions are registered in the Tiptap editor.
60
- * @param editor - The Tiptap editor instance
61
- * @param extensionNames - A single extension name or an array of names to check
62
- * @returns True if at least one of the extensions is available, false otherwise
63
- */
64
- export declare function isExtensionAvailable(editor: Editor | null, extensionNames: string | string[]): boolean;
65
- /**
66
- * Finds a node at the specified position with error handling
67
- * @param editor The Tiptap editor instance
68
- * @param position The position in the document to find the node
69
- * @returns The node at the specified position, or null if not found
70
- */
71
- export declare function findNodeAtPosition(editor: Editor, position: number): TiptapNode | null;
72
- /**
73
- * Finds the position and instance of a node in the document
74
- * @param props Object containing editor, node (optional), and nodePos (optional)
75
- * @param props.editor The Tiptap editor instance
76
- * @param props.node The node to find (optional if nodePos is provided)
77
- * @param props.nodePos The position of the node to find (optional if node is provided)
78
- * @returns An object with the position and node, or null if not found
79
- */
80
- export declare function findNodePosition(props: {
81
- editor: Editor | null;
82
- node?: TiptapNode | null;
83
- nodePos?: number | null;
84
- }): {
85
- pos: number;
86
- node: TiptapNode;
87
- } | null;
88
- /**
89
- * Checks if the current selection in the editor is a node selection of specified types
90
- * @param editor The Tiptap editor instance
91
- * @param types An array of node type names to check against
92
- * @returns boolean indicating if the selected node matches any of the specified types
93
- */
94
- export declare function isNodeTypeSelected(editor: Editor | null, types?: string[]): boolean;
95
- /**
96
- * Handles image upload with progress tracking and abort capability
97
- * @param file The file to upload
98
- * @param onProgress Optional callback for tracking upload progress
99
- * @param abortSignal Optional AbortSignal for cancelling the upload
100
- * @returns Promise resolving to the URL of the uploaded image
101
- */
102
- export declare const handleImageUpload: (file: File, onProgress?: (event: {
103
- progress: number;
104
- }) => void, abortSignal?: AbortSignal) => Promise<string>;
105
- type ProtocolOptions = {
106
- /**
107
- * The protocol scheme to be registered.
108
- * @default '''
109
- * @example 'ftp'
110
- * @example 'git'
111
- */
112
- scheme: string;
113
- /**
114
- * If enabled, it allows optional slashes after the protocol.
115
- * @default false
116
- * @example true
117
- */
118
- optionalSlashes?: boolean;
119
- };
120
- type ProtocolConfig = Array<ProtocolOptions | string>;
121
- export declare function isAllowedUri(uri: string | undefined, protocols?: ProtocolConfig): true | RegExpMatchArray | null;
122
- export declare function sanitizeUrl(inputUrl: string, baseUrl: string, protocols?: ProtocolConfig): string;
123
- export {};