@cgboiler/biz-basic 1.0.7 → 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/es/index.d.ts CHANGED
@@ -1,10 +1,2 @@
1
- export * from "./rich-text-editor";
2
- declare namespace _default {
3
- export { install };
4
- export { version };
5
- }
6
- export default _default;
7
- export function install(app: any): void;
8
- export const version: "1.0.6";
9
- import RichTextEditor from './rich-text-editor';
10
- export { RichTextEditor };
1
+ export { default as RichTextEditor } from './rich-text-editor';
2
+ export type { RichTextEditorProps } from './rich-text-editor/types';
package/es/index.js CHANGED
@@ -1,25 +1,4 @@
1
- import RichTextEditor from "./rich-text-editor";
2
- const version = "1.0.6";
3
- function install(app) {
4
- const components = [
5
- RichTextEditor
6
- ];
7
- components.forEach((item) => {
8
- if (item.install) {
9
- app.use(item);
10
- } else if (item.name) {
11
- app.component(item.name, item);
12
- }
13
- });
14
- }
15
- export * from "./rich-text-editor";
16
- var stdin_default = {
17
- install,
18
- version
19
- };
1
+ import { default as default2 } from "./rich-text-editor";
20
2
  export {
21
- RichTextEditor,
22
- stdin_default as default,
23
- install,
24
- version
3
+ default2 as RichTextEditor
25
4
  };
@@ -18,6 +18,7 @@ var stdin_default = defineComponent({
18
18
  props,
19
19
  emit
20
20
  });
21
+ let isFocusFromPlaceholder = false;
21
22
  const initEditor = () => {
22
23
  editor.value = new Editor({
23
24
  extensions,
@@ -35,12 +36,16 @@ var stdin_default = defineComponent({
35
36
  onBlur: ({
36
37
  editor: editor2
37
38
  }) => {
38
- emit("blur");
39
+ if (!isFocusFromPlaceholder) {
40
+ emit("blur");
41
+ }
39
42
  },
40
43
  onFocus: ({
41
44
  editor: editor2
42
45
  }) => {
43
- emit("focus");
46
+ if (!isFocusFromPlaceholder) {
47
+ emit("focus");
48
+ }
44
49
  }
45
50
  });
46
51
  };
@@ -65,10 +70,12 @@ var stdin_default = defineComponent({
65
70
  });
66
71
  watch(() => props.placeholder, () => {
67
72
  var _a;
73
+ isFocusFromPlaceholder = true;
68
74
  (_a = editor.value) == null ? void 0 : _a.commands.blur();
69
75
  setTimeout(() => {
70
76
  var _a2;
71
77
  (_a2 = editor.value) == null ? void 0 : _a2.commands.focus();
78
+ isFocusFromPlaceholder = false;
72
79
  }, 100);
73
80
  });
74
81
  onMounted(() => {
@@ -1,226 +1,226 @@
1
- .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: #6a00f5;
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
- /* List styles */
30
- ol {
31
- list-style: auto;
32
- }
33
-
34
- ul {
35
- list-style: disc;
36
- }
37
-
38
- ol,
39
- ul {
40
- padding-left: 1.5em;
41
- margin: 0 0 12px 0;
42
- li p {
43
- margin-top: 0.25em;
44
- margin-bottom: 0.25em;
45
- }
46
- }
47
-
48
- li::marker {
49
- text-align: start !important;
50
- }
51
-
52
- /* Heading styles */
53
- h1,
54
- h2,
55
- h3,
56
- h4,
57
- h5,
58
- h6 {
59
- line-height: 1.1;
60
- margin-top: 2.5rem;
61
- text-wrap: pretty;
62
- }
63
-
64
- h1,
65
- h2 {
66
- margin-top: 1rem;
67
- margin-bottom: 1rem;
68
- }
69
-
70
- h1 {
71
- font-size: 1.4rem;
72
- }
73
-
74
- h2 {
75
- font-size: 1.2rem;
76
- }
77
-
78
- h3 {
79
- font-size: 1.1rem;
80
- }
81
-
82
- h4,
83
- h5,
84
- h6 {
85
- font-size: 1rem;
86
- }
87
-
88
- /* Code and preformatted text styles */
89
- code {
90
- background-color: #ffe5e8;
91
- border-radius: 0.4rem;
92
- color: var(--black);
93
- font-size: 0.85rem;
94
- padding: 0.25em 0.3em;
95
- }
96
-
97
- pre {
98
- background: var(--black);
99
- border-radius: 0.5rem;
100
- color: var(--white);
101
- font-family: 'JetBrainsMono', monospace;
102
- margin: 1.5rem 0;
103
- padding: 0.75rem 1rem;
104
-
105
- code {
106
- background: none;
107
- color: inherit;
108
- font-size: 0.8rem;
109
- padding: 0;
110
- }
111
- }
112
-
113
- blockquote {
114
- border-left: 3px solid var(--gray-3);
115
- margin: 1.5rem 0;
116
- padding-left: 1rem;
117
- }
118
-
119
- hr {
120
- border: none;
121
- border-top: 1px solid var(--gray-2);
122
- margin: 2rem 0;
123
- }
124
-
125
- /* Placeholder (at the top) */
126
- p.is-editor-empty:first-child::before {
127
- color: var(--gray-4);
128
- content: attr(data-placeholder);
129
- float: left;
130
- height: 0;
131
- pointer-events: none;
132
- }
133
-
134
- .is-empty::before {
135
- color: var(--gray-4);
136
- content: attr(data-placeholder);
137
- float: left;
138
- height: 0;
139
- pointer-events: none;
140
- }
141
- /* Table-specific styling */
142
- table {
143
- border-collapse: collapse;
144
- margin: 0;
145
- overflow: hidden;
146
- table-layout: fixed;
147
- width: 100%;
148
-
149
- td,
150
- th {
151
- border: 1px solid var(--gray-3);
152
- box-sizing: border-box;
153
- min-width: 1em;
154
- padding: 6px 8px;
155
- position: relative;
156
- vertical-align: top;
157
-
158
- > * {
159
- margin-bottom: 0;
160
- }
161
- }
162
-
163
- th {
164
- background-color: var(--gray-1);
165
- font-weight: bold;
166
- text-align: left;
167
- }
168
-
169
- .selectedCell:after {
170
- background: var(--gray-2);
171
- content: '';
172
- left: 0;
173
- right: 0;
174
- top: 0;
175
- bottom: 0;
176
- pointer-events: none;
177
- position: absolute;
178
- z-index: 2;
179
- }
180
-
181
- .column-resize-handle {
182
- background-color: var(--purple);
183
- bottom: -2px;
184
- pointer-events: none;
185
- position: absolute;
186
- right: -2px;
187
- top: 0;
188
- width: 4px;
189
- }
190
- }
191
-
192
- .tableWrapper {
193
- margin: 1.5rem 0;
194
- overflow-x: auto;
195
- }
196
-
197
- &.resize-cursor {
198
- cursor: ew-resize;
199
- cursor: col-resize;
200
- }
201
- img {
202
- max-width: 100%;
203
- }
204
- // @人的样式
205
- .mention {
206
- color: #c02537;
207
- padding: 0 0.3em;
208
- }
209
- }
210
-
211
- // animation
212
- .animation-indent--right {
213
- animation: indent-right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1 alternate-reverse;
214
- }
215
-
216
- @keyframes indent-right {
217
- 0% {
218
- -webkit-transform: translateX(0);
219
- transform: translateX(0);
220
- }
221
-
222
- to {
223
- -webkit-transform: translateX(12px);
224
- transform: translateX(12px);
225
- }
226
- }
1
+ .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: #6a00f5;
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
+ /* List styles */
30
+ ol {
31
+ list-style: auto;
32
+ }
33
+
34
+ ul {
35
+ list-style: disc;
36
+ }
37
+
38
+ ol,
39
+ ul {
40
+ padding-left: 1.5em;
41
+ margin: 0 0 12px 0;
42
+ li p {
43
+ margin-top: 0.25em;
44
+ margin-bottom: 0.25em;
45
+ }
46
+ }
47
+
48
+ li::marker {
49
+ text-align: start !important;
50
+ }
51
+
52
+ /* Heading styles */
53
+ h1,
54
+ h2,
55
+ h3,
56
+ h4,
57
+ h5,
58
+ h6 {
59
+ line-height: 1.1;
60
+ margin-top: 2.5rem;
61
+ text-wrap: pretty;
62
+ }
63
+
64
+ h1,
65
+ h2 {
66
+ margin-top: 1rem;
67
+ margin-bottom: 1rem;
68
+ }
69
+
70
+ h1 {
71
+ font-size: 1.4rem;
72
+ }
73
+
74
+ h2 {
75
+ font-size: 1.2rem;
76
+ }
77
+
78
+ h3 {
79
+ font-size: 1.1rem;
80
+ }
81
+
82
+ h4,
83
+ h5,
84
+ h6 {
85
+ font-size: 1rem;
86
+ }
87
+
88
+ /* Code and preformatted text styles */
89
+ code {
90
+ background-color: #ffe5e8;
91
+ border-radius: 0.4rem;
92
+ color: var(--black);
93
+ font-size: 0.85rem;
94
+ padding: 0.25em 0.3em;
95
+ }
96
+
97
+ pre {
98
+ background: var(--black);
99
+ border-radius: 0.5rem;
100
+ color: var(--white);
101
+ font-family: 'JetBrainsMono', monospace;
102
+ margin: 1.5rem 0;
103
+ padding: 0.75rem 1rem;
104
+
105
+ code {
106
+ background: none;
107
+ color: inherit;
108
+ font-size: 0.8rem;
109
+ padding: 0;
110
+ }
111
+ }
112
+
113
+ blockquote {
114
+ border-left: 3px solid var(--gray-3);
115
+ margin: 1.5rem 0;
116
+ padding-left: 1rem;
117
+ }
118
+
119
+ hr {
120
+ border: none;
121
+ border-top: 1px solid var(--gray-2);
122
+ margin: 2rem 0;
123
+ }
124
+
125
+ /* Placeholder (at the top) */
126
+ p.is-editor-empty:first-child::before {
127
+ color: var(--gray-4);
128
+ content: attr(data-placeholder);
129
+ float: left;
130
+ height: 0;
131
+ pointer-events: none;
132
+ }
133
+
134
+ .is-empty::before {
135
+ color: var(--gray-4);
136
+ content: attr(data-placeholder);
137
+ float: left;
138
+ height: 0;
139
+ pointer-events: none;
140
+ }
141
+ /* Table-specific styling */
142
+ table {
143
+ border-collapse: collapse;
144
+ margin: 0;
145
+ overflow: hidden;
146
+ table-layout: fixed;
147
+ width: 100%;
148
+
149
+ td,
150
+ th {
151
+ border: 1px solid var(--gray-3);
152
+ box-sizing: border-box;
153
+ min-width: 1em;
154
+ padding: 6px 8px;
155
+ position: relative;
156
+ vertical-align: top;
157
+
158
+ > * {
159
+ margin-bottom: 0;
160
+ }
161
+ }
162
+
163
+ th {
164
+ background-color: var(--gray-1);
165
+ font-weight: bold;
166
+ text-align: left;
167
+ }
168
+
169
+ .selectedCell:after {
170
+ background: var(--gray-2);
171
+ content: '';
172
+ left: 0;
173
+ right: 0;
174
+ top: 0;
175
+ bottom: 0;
176
+ pointer-events: none;
177
+ position: absolute;
178
+ z-index: 2;
179
+ }
180
+
181
+ .column-resize-handle {
182
+ background-color: var(--purple);
183
+ bottom: -2px;
184
+ pointer-events: none;
185
+ position: absolute;
186
+ right: -2px;
187
+ top: 0;
188
+ width: 4px;
189
+ }
190
+ }
191
+
192
+ .tableWrapper {
193
+ margin: 1.5rem 0;
194
+ overflow-x: auto;
195
+ }
196
+
197
+ &.resize-cursor {
198
+ cursor: ew-resize;
199
+ cursor: col-resize;
200
+ }
201
+ img {
202
+ max-width: 100%;
203
+ }
204
+ // @人的样式
205
+ .mention {
206
+ color: #c02537;
207
+ padding: 0 0.3em;
208
+ }
209
+ }
210
+
211
+ // animation
212
+ .animation-indent--right {
213
+ animation: indent-right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1 alternate-reverse;
214
+ }
215
+
216
+ @keyframes indent-right {
217
+ 0% {
218
+ -webkit-transform: translateX(0);
219
+ transform: translateX(0);
220
+ }
221
+
222
+ to {
223
+ -webkit-transform: translateX(12px);
224
+ transform: translateX(12px);
225
+ }
226
+ }
@@ -1,6 +1,6 @@
1
- declare module '*.vue' {
2
- // eslint-disable-next-line
3
- import { DefineComponent } from 'vue'
4
- const Component: DefineComponent
5
- export default Component
6
- }
1
+ declare module '*.vue' {
2
+ // eslint-disable-next-line
3
+ import { DefineComponent } from 'vue'
4
+ const Component: DefineComponent
5
+ export default Component
6
+ }
@@ -1,24 +1,24 @@
1
- import 'vue';
2
-
3
- type EventHandler = (...args: any[]) => void;
4
-
5
- declare module 'vue' {
6
- interface ComponentCustomProps {
7
- id?: string;
8
- role?: string;
9
- tabindex?: number;
10
- onClick?: EventHandler;
11
- onTouchend?: EventHandler;
12
- onTouchmove?: EventHandler;
13
- onTouchstart?: EventHandler;
14
- onTouchcancel?: EventHandler;
15
- onTouchmovePassive?: EventHandler;
16
- onTouchstartPassive?: EventHandler;
17
- }
18
-
19
- interface HTMLAttributes {
20
- onTouchmovePassive?: EventHandler;
21
- onTouchstartPassive?: EventHandler;
22
- onClickCapture?: EventHandler;
23
- }
24
- }
1
+ import 'vue';
2
+
3
+ type EventHandler = (...args: any[]) => void;
4
+
5
+ declare module 'vue' {
6
+ interface ComponentCustomProps {
7
+ id?: string;
8
+ role?: string;
9
+ tabindex?: number;
10
+ onClick?: EventHandler;
11
+ onTouchend?: EventHandler;
12
+ onTouchmove?: EventHandler;
13
+ onTouchstart?: EventHandler;
14
+ onTouchcancel?: EventHandler;
15
+ onTouchmovePassive?: EventHandler;
16
+ onTouchstartPassive?: EventHandler;
17
+ }
18
+
19
+ interface HTMLAttributes {
20
+ onTouchmovePassive?: EventHandler;
21
+ onTouchstartPassive?: EventHandler;
22
+ onClickCapture?: EventHandler;
23
+ }
24
+ }
package/lib/index.d.ts CHANGED
@@ -1,10 +1,2 @@
1
- export * from "./rich-text-editor";
2
- declare namespace _default {
3
- export { install };
4
- export { version };
5
- }
6
- export default _default;
7
- export function install(app: any): void;
8
- export const version: "1.0.6";
9
- import RichTextEditor from './rich-text-editor';
10
- export { RichTextEditor };
1
+ export { default as RichTextEditor } from './rich-text-editor';
2
+ export type { RichTextEditorProps } from './rich-text-editor/types';
package/lib/index.js CHANGED
@@ -16,7 +16,6 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
20
  // If the importer is in node compatibility mode or this is not an ESM
22
21
  // file that has been converted to a CommonJS file using a Babel-
@@ -28,28 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
28
  var stdin_exports = {};
30
29
  __export(stdin_exports, {
31
- RichTextEditor: () => import_rich_text_editor.default,
32
- default: () => stdin_default,
33
- install: () => install,
34
- version: () => version
30
+ RichTextEditor: () => import_rich_text_editor.default
35
31
  });
36
32
  module.exports = __toCommonJS(stdin_exports);
37
33
  var import_rich_text_editor = __toESM(require("./rich-text-editor"));
38
- __reExport(stdin_exports, require("./rich-text-editor"), module.exports);
39
- const version = "1.0.6";
40
- function install(app) {
41
- const components = [
42
- import_rich_text_editor.default
43
- ];
44
- components.forEach((item) => {
45
- if (item.install) {
46
- app.use(item);
47
- } else if (item.name) {
48
- app.component(item.name, item);
49
- }
50
- });
51
- }
52
- var stdin_default = {
53
- install,
54
- version
55
- };
@@ -40,6 +40,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
40
40
  props,
41
41
  emit
42
42
  });
43
+ let isFocusFromPlaceholder = false;
43
44
  const initEditor = () => {
44
45
  editor.value = new import_vue_3.Editor({
45
46
  extensions,
@@ -57,12 +58,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
57
58
  onBlur: ({
58
59
  editor: editor2
59
60
  }) => {
60
- emit("blur");
61
+ if (!isFocusFromPlaceholder) {
62
+ emit("blur");
63
+ }
61
64
  },
62
65
  onFocus: ({
63
66
  editor: editor2
64
67
  }) => {
65
- emit("focus");
68
+ if (!isFocusFromPlaceholder) {
69
+ emit("focus");
70
+ }
66
71
  }
67
72
  });
68
73
  };
@@ -87,10 +92,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
87
92
  });
88
93
  (0, import_vue2.watch)(() => props.placeholder, () => {
89
94
  var _a;
95
+ isFocusFromPlaceholder = true;
90
96
  (_a = editor.value) == null ? void 0 : _a.commands.blur();
91
97
  setTimeout(() => {
92
98
  var _a2;
93
99
  (_a2 = editor.value) == null ? void 0 : _a2.commands.focus();
100
+ isFocusFromPlaceholder = false;
94
101
  }, 100);
95
102
  });
96
103
  (0, import_vue2.onMounted)(() => {
@@ -1,226 +1,226 @@
1
- .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: #6a00f5;
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
- /* List styles */
30
- ol {
31
- list-style: auto;
32
- }
33
-
34
- ul {
35
- list-style: disc;
36
- }
37
-
38
- ol,
39
- ul {
40
- padding-left: 1.5em;
41
- margin: 0 0 12px 0;
42
- li p {
43
- margin-top: 0.25em;
44
- margin-bottom: 0.25em;
45
- }
46
- }
47
-
48
- li::marker {
49
- text-align: start !important;
50
- }
51
-
52
- /* Heading styles */
53
- h1,
54
- h2,
55
- h3,
56
- h4,
57
- h5,
58
- h6 {
59
- line-height: 1.1;
60
- margin-top: 2.5rem;
61
- text-wrap: pretty;
62
- }
63
-
64
- h1,
65
- h2 {
66
- margin-top: 1rem;
67
- margin-bottom: 1rem;
68
- }
69
-
70
- h1 {
71
- font-size: 1.4rem;
72
- }
73
-
74
- h2 {
75
- font-size: 1.2rem;
76
- }
77
-
78
- h3 {
79
- font-size: 1.1rem;
80
- }
81
-
82
- h4,
83
- h5,
84
- h6 {
85
- font-size: 1rem;
86
- }
87
-
88
- /* Code and preformatted text styles */
89
- code {
90
- background-color: #ffe5e8;
91
- border-radius: 0.4rem;
92
- color: var(--black);
93
- font-size: 0.85rem;
94
- padding: 0.25em 0.3em;
95
- }
96
-
97
- pre {
98
- background: var(--black);
99
- border-radius: 0.5rem;
100
- color: var(--white);
101
- font-family: 'JetBrainsMono', monospace;
102
- margin: 1.5rem 0;
103
- padding: 0.75rem 1rem;
104
-
105
- code {
106
- background: none;
107
- color: inherit;
108
- font-size: 0.8rem;
109
- padding: 0;
110
- }
111
- }
112
-
113
- blockquote {
114
- border-left: 3px solid var(--gray-3);
115
- margin: 1.5rem 0;
116
- padding-left: 1rem;
117
- }
118
-
119
- hr {
120
- border: none;
121
- border-top: 1px solid var(--gray-2);
122
- margin: 2rem 0;
123
- }
124
-
125
- /* Placeholder (at the top) */
126
- p.is-editor-empty:first-child::before {
127
- color: var(--gray-4);
128
- content: attr(data-placeholder);
129
- float: left;
130
- height: 0;
131
- pointer-events: none;
132
- }
133
-
134
- .is-empty::before {
135
- color: var(--gray-4);
136
- content: attr(data-placeholder);
137
- float: left;
138
- height: 0;
139
- pointer-events: none;
140
- }
141
- /* Table-specific styling */
142
- table {
143
- border-collapse: collapse;
144
- margin: 0;
145
- overflow: hidden;
146
- table-layout: fixed;
147
- width: 100%;
148
-
149
- td,
150
- th {
151
- border: 1px solid var(--gray-3);
152
- box-sizing: border-box;
153
- min-width: 1em;
154
- padding: 6px 8px;
155
- position: relative;
156
- vertical-align: top;
157
-
158
- > * {
159
- margin-bottom: 0;
160
- }
161
- }
162
-
163
- th {
164
- background-color: var(--gray-1);
165
- font-weight: bold;
166
- text-align: left;
167
- }
168
-
169
- .selectedCell:after {
170
- background: var(--gray-2);
171
- content: '';
172
- left: 0;
173
- right: 0;
174
- top: 0;
175
- bottom: 0;
176
- pointer-events: none;
177
- position: absolute;
178
- z-index: 2;
179
- }
180
-
181
- .column-resize-handle {
182
- background-color: var(--purple);
183
- bottom: -2px;
184
- pointer-events: none;
185
- position: absolute;
186
- right: -2px;
187
- top: 0;
188
- width: 4px;
189
- }
190
- }
191
-
192
- .tableWrapper {
193
- margin: 1.5rem 0;
194
- overflow-x: auto;
195
- }
196
-
197
- &.resize-cursor {
198
- cursor: ew-resize;
199
- cursor: col-resize;
200
- }
201
- img {
202
- max-width: 100%;
203
- }
204
- // @人的样式
205
- .mention {
206
- color: #c02537;
207
- padding: 0 0.3em;
208
- }
209
- }
210
-
211
- // animation
212
- .animation-indent--right {
213
- animation: indent-right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1 alternate-reverse;
214
- }
215
-
216
- @keyframes indent-right {
217
- 0% {
218
- -webkit-transform: translateX(0);
219
- transform: translateX(0);
220
- }
221
-
222
- to {
223
- -webkit-transform: translateX(12px);
224
- transform: translateX(12px);
225
- }
226
- }
1
+ .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: #6a00f5;
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
+ /* List styles */
30
+ ol {
31
+ list-style: auto;
32
+ }
33
+
34
+ ul {
35
+ list-style: disc;
36
+ }
37
+
38
+ ol,
39
+ ul {
40
+ padding-left: 1.5em;
41
+ margin: 0 0 12px 0;
42
+ li p {
43
+ margin-top: 0.25em;
44
+ margin-bottom: 0.25em;
45
+ }
46
+ }
47
+
48
+ li::marker {
49
+ text-align: start !important;
50
+ }
51
+
52
+ /* Heading styles */
53
+ h1,
54
+ h2,
55
+ h3,
56
+ h4,
57
+ h5,
58
+ h6 {
59
+ line-height: 1.1;
60
+ margin-top: 2.5rem;
61
+ text-wrap: pretty;
62
+ }
63
+
64
+ h1,
65
+ h2 {
66
+ margin-top: 1rem;
67
+ margin-bottom: 1rem;
68
+ }
69
+
70
+ h1 {
71
+ font-size: 1.4rem;
72
+ }
73
+
74
+ h2 {
75
+ font-size: 1.2rem;
76
+ }
77
+
78
+ h3 {
79
+ font-size: 1.1rem;
80
+ }
81
+
82
+ h4,
83
+ h5,
84
+ h6 {
85
+ font-size: 1rem;
86
+ }
87
+
88
+ /* Code and preformatted text styles */
89
+ code {
90
+ background-color: #ffe5e8;
91
+ border-radius: 0.4rem;
92
+ color: var(--black);
93
+ font-size: 0.85rem;
94
+ padding: 0.25em 0.3em;
95
+ }
96
+
97
+ pre {
98
+ background: var(--black);
99
+ border-radius: 0.5rem;
100
+ color: var(--white);
101
+ font-family: 'JetBrainsMono', monospace;
102
+ margin: 1.5rem 0;
103
+ padding: 0.75rem 1rem;
104
+
105
+ code {
106
+ background: none;
107
+ color: inherit;
108
+ font-size: 0.8rem;
109
+ padding: 0;
110
+ }
111
+ }
112
+
113
+ blockquote {
114
+ border-left: 3px solid var(--gray-3);
115
+ margin: 1.5rem 0;
116
+ padding-left: 1rem;
117
+ }
118
+
119
+ hr {
120
+ border: none;
121
+ border-top: 1px solid var(--gray-2);
122
+ margin: 2rem 0;
123
+ }
124
+
125
+ /* Placeholder (at the top) */
126
+ p.is-editor-empty:first-child::before {
127
+ color: var(--gray-4);
128
+ content: attr(data-placeholder);
129
+ float: left;
130
+ height: 0;
131
+ pointer-events: none;
132
+ }
133
+
134
+ .is-empty::before {
135
+ color: var(--gray-4);
136
+ content: attr(data-placeholder);
137
+ float: left;
138
+ height: 0;
139
+ pointer-events: none;
140
+ }
141
+ /* Table-specific styling */
142
+ table {
143
+ border-collapse: collapse;
144
+ margin: 0;
145
+ overflow: hidden;
146
+ table-layout: fixed;
147
+ width: 100%;
148
+
149
+ td,
150
+ th {
151
+ border: 1px solid var(--gray-3);
152
+ box-sizing: border-box;
153
+ min-width: 1em;
154
+ padding: 6px 8px;
155
+ position: relative;
156
+ vertical-align: top;
157
+
158
+ > * {
159
+ margin-bottom: 0;
160
+ }
161
+ }
162
+
163
+ th {
164
+ background-color: var(--gray-1);
165
+ font-weight: bold;
166
+ text-align: left;
167
+ }
168
+
169
+ .selectedCell:after {
170
+ background: var(--gray-2);
171
+ content: '';
172
+ left: 0;
173
+ right: 0;
174
+ top: 0;
175
+ bottom: 0;
176
+ pointer-events: none;
177
+ position: absolute;
178
+ z-index: 2;
179
+ }
180
+
181
+ .column-resize-handle {
182
+ background-color: var(--purple);
183
+ bottom: -2px;
184
+ pointer-events: none;
185
+ position: absolute;
186
+ right: -2px;
187
+ top: 0;
188
+ width: 4px;
189
+ }
190
+ }
191
+
192
+ .tableWrapper {
193
+ margin: 1.5rem 0;
194
+ overflow-x: auto;
195
+ }
196
+
197
+ &.resize-cursor {
198
+ cursor: ew-resize;
199
+ cursor: col-resize;
200
+ }
201
+ img {
202
+ max-width: 100%;
203
+ }
204
+ // @人的样式
205
+ .mention {
206
+ color: #c02537;
207
+ padding: 0 0.3em;
208
+ }
209
+ }
210
+
211
+ // animation
212
+ .animation-indent--right {
213
+ animation: indent-right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1 alternate-reverse;
214
+ }
215
+
216
+ @keyframes indent-right {
217
+ 0% {
218
+ -webkit-transform: translateX(0);
219
+ transform: translateX(0);
220
+ }
221
+
222
+ to {
223
+ -webkit-transform: translateX(12px);
224
+ transform: translateX(12px);
225
+ }
226
+ }
@@ -1,6 +1,6 @@
1
- declare module '*.vue' {
2
- // eslint-disable-next-line
3
- import { DefineComponent } from 'vue'
4
- const Component: DefineComponent
5
- export default Component
6
- }
1
+ declare module '*.vue' {
2
+ // eslint-disable-next-line
3
+ import { DefineComponent } from 'vue'
4
+ const Component: DefineComponent
5
+ export default Component
6
+ }
@@ -1,24 +1,24 @@
1
- import 'vue';
2
-
3
- type EventHandler = (...args: any[]) => void;
4
-
5
- declare module 'vue' {
6
- interface ComponentCustomProps {
7
- id?: string;
8
- role?: string;
9
- tabindex?: number;
10
- onClick?: EventHandler;
11
- onTouchend?: EventHandler;
12
- onTouchmove?: EventHandler;
13
- onTouchstart?: EventHandler;
14
- onTouchcancel?: EventHandler;
15
- onTouchmovePassive?: EventHandler;
16
- onTouchstartPassive?: EventHandler;
17
- }
18
-
19
- interface HTMLAttributes {
20
- onTouchmovePassive?: EventHandler;
21
- onTouchstartPassive?: EventHandler;
22
- onClickCapture?: EventHandler;
23
- }
24
- }
1
+ import 'vue';
2
+
3
+ type EventHandler = (...args: any[]) => void;
4
+
5
+ declare module 'vue' {
6
+ interface ComponentCustomProps {
7
+ id?: string;
8
+ role?: string;
9
+ tabindex?: number;
10
+ onClick?: EventHandler;
11
+ onTouchend?: EventHandler;
12
+ onTouchmove?: EventHandler;
13
+ onTouchstart?: EventHandler;
14
+ onTouchcancel?: EventHandler;
15
+ onTouchmovePassive?: EventHandler;
16
+ onTouchstartPassive?: EventHandler;
17
+ }
18
+
19
+ interface HTMLAttributes {
20
+ onTouchmovePassive?: EventHandler;
21
+ onTouchstartPassive?: EventHandler;
22
+ onClickCapture?: EventHandler;
23
+ }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgboiler/biz-basic",
3
- "version": "1.0.7",
3
+ "version": "1.0.10",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",