@manohub/ui 0.8.2 → 0.9.0

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.
@@ -0,0 +1,776 @@
1
+ import { type PropType, type SlotsType, type VNodeChild } from 'vue';
2
+ /** `CodeView` 的 props */
3
+ export interface CodeViewProps {
4
+ /** 代码文本(也可用默认插槽给复杂内容);**复制进剪贴板的就是它** */
5
+ code?: string;
6
+ /** 行内 chip(缺省是代码块) */
7
+ inline?: boolean;
8
+ /** 行内中性档(不强调的短标识) */
9
+ plain?: boolean;
10
+ /** 右上角语言角标(如 `sql` / `json` / `vue`);只做标注,**不做语法高亮** */
11
+ language?: string;
12
+ /** 代码块右上角的复制按钮 */
13
+ copyable?: boolean;
14
+ /** 最大高度(数字按 px):超出后**块内滚动**,用于长日志 / 长配置 */
15
+ maxHeight?: string | number;
16
+ /** 允许软换行(缺省保持 `pre` 的横向不换行 + 横向滚动) */
17
+ wrap?: boolean;
18
+ /** 复制结果回调:`true` = 真的写进剪贴板了 */
19
+ onCopy?: (ok: boolean) => void;
20
+ }
21
+ /**
22
+ * 代码视图(**只读展示件**):行内 chip / 代码块 / 语言角标 / 复制位。
23
+ *
24
+ * 三种形态:`inline`(行内 chip,如版本号、规则 ID)、`inline + plain`(中性档)、
25
+ * 缺省(代码块 + 右上角 hover / 聚焦显形的方形图标复制按钮 + 可选语言角标)。
26
+ * 代码块**缺省不折行**(横向滚动,缩进与列对齐不被破坏),`wrap` 才软换行。
27
+ *
28
+ * 通常不直接用本件:`CodeBlock.View` 是这个件在族里的位置,单独用也完全合法
29
+ * (要「只读看 + 就地改」用组合件 `CodeBlock`,要更强的编辑控制用 `CodeBlock.Editor`)。
30
+ *
31
+ * ## 高亮由消费方声明(本件不做语法高亮)
32
+ *
33
+ * 本件不认识任何语言:`language` 只画右上角的**角标**,**不做**分词着色。
34
+ * 需要高亮时走**默认插槽**传入已高亮过的节点(VNode / 已转义好的 HTML 片段皆可),
35
+ * 此时 `code` 仍应给**纯文本** —— 它是复制进剪贴板的内容(插槽内容是渲染结果,不能拿去复制)。
36
+ *
37
+ * ## 复制按钮的面归按钮族(`.mh-button--icon`)
38
+ *
39
+ * 本件只补定位与显隐(见 `styles/components/code-block.css`);按钮挂在**族根**上
40
+ * 而**不是代码面里** —— 代码面是 `overflow-x: auto` 的滚动容器,放进去会被裁掉。
41
+ *
42
+ * ## 复制动作与降级
43
+ *
44
+ * 走 `navigator.clipboard.writeText`(**唯一需要 JS 的部分**,按 copied 状态二选一图标)。
45
+ * 环境没有该 API(旧浏览器、非安全上下文)或写入被拒时:不谎报成功,`onCopy(false)` 交回结果
46
+ * 并 `console.warn` 一次 —— 消费方据此提示「请手动复制」(本件不自己弹提示,避免与页面的提示口径两套)。
47
+ *
48
+ * @example 行内
49
+ * <CodeBlock.View inline>v1.2.0</CodeBlock.View>
50
+ * <CodeBlock.View inline plain>RULE-1024</CodeBlock.View>
51
+ *
52
+ * @example 代码块 + 语言角标 + 复制
53
+ * <CodeBlock.View :code="sql" language="sql" copyable @copy="(ok) => ok || showManualTip()" />
54
+ */
55
+ export declare const CodeView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
56
+ code: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ inline: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ plain: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ language: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ copyable: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ maxHeight: {
77
+ type: PropType<string | number>;
78
+ default: undefined;
79
+ };
80
+ wrap: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ onCopy: {
85
+ type: PropType<(ok: boolean) => void>;
86
+ default: undefined;
87
+ };
88
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
89
+ code: {
90
+ type: StringConstructor;
91
+ default: string;
92
+ };
93
+ inline: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ plain: {
98
+ type: BooleanConstructor;
99
+ default: boolean;
100
+ };
101
+ language: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ copyable: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ maxHeight: {
110
+ type: PropType<string | number>;
111
+ default: undefined;
112
+ };
113
+ wrap: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ onCopy: {
118
+ type: PropType<(ok: boolean) => void>;
119
+ default: undefined;
120
+ };
121
+ }>> & Readonly<{}>, {
122
+ inline: boolean;
123
+ wrap: boolean;
124
+ plain: boolean;
125
+ code: string;
126
+ onCopy: (ok: boolean) => void;
127
+ language: string;
128
+ copyable: boolean;
129
+ maxHeight: string | number;
130
+ }, SlotsType<{
131
+ default?: () => VNodeChild;
132
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
133
+ /** 自适应高度的行数区间(`true` 等价于 `{ minRows: 3, maxRows: 12 }`) */
134
+ export interface CodeEditorAutoSize {
135
+ minRows?: number;
136
+ maxRows?: number;
137
+ }
138
+ /** `CodeEditor` 的 props */
139
+ export interface CodeEditorProps {
140
+ /** 受控值 */
141
+ modelValue?: string;
142
+ /** 非受控初始值 */
143
+ defaultValue?: string;
144
+ /** 空值提示 */
145
+ placeholder?: string;
146
+ /** 固定可见行数(`autoSize: false` 时生效;缺省 4) */
147
+ rows?: number;
148
+ /**
149
+ * 按内容行数自适应高度(**本件缺省开启**,与 `Textarea` 的缺省相反:
150
+ * 代码区按内容长高是常态,固定行数才是特例)。
151
+ */
152
+ autoSize?: boolean | CodeEditorAutoSize;
153
+ /** 最大高度(数字按 px):超出后**框内滚动** */
154
+ maxHeight?: string | number;
155
+ /** 只读态(原生 `readonly`:仍可选中、可滚动、可复制,只是不可改) */
156
+ readonly?: boolean;
157
+ /** 禁用态 */
158
+ disabled?: boolean;
159
+ /** 右上角语言角标(如 `sql` / `json`);只做标注,**不做语法高亮** */
160
+ language?: string;
161
+ /** 值变更回调(每次输入都调) */
162
+ onChange?: (v: string) => void;
163
+ }
164
+ /**
165
+ * 可编辑代码区:等宽多行 + 按行自适应 + 可限高内滚 + 只读 / 禁用态。
166
+ *
167
+ * 与 `CodeBlock.View` 是同一族的两半:**看**用 `View`(可按只读块观感渲染已高亮节点),
168
+ * **改**用本件。两件共用族根与面(同底 / 同圆角 / 同等宽字),互切时块体不跳。
169
+ *
170
+ * ## 与 `Textarea` 的分工(不要重复造)
171
+ *
172
+ * 表单里的普通多行文本用 `Input.Textarea`;本件服务**代码**:等宽字、去掉拼写检查与自动大写、
173
+ * 折行行为按代码区的口径来。两者共用同一套受控词表(`modelValue` / `onChange` / `readonly` / `disabled`)。
174
+ *
175
+ * ## 不做的事(有意)
176
+ *
177
+ * - **不做语法高亮**:编辑态就是原生 `textarea`,着色一律交给消费方(只读态用 `View` 的插槽接高亮);
178
+ * - **不内建动作按钮**(编辑 / 保存 / 取消 / 复制):动作条由消费方在外部摆放,本件只负责"能改";
179
+ * - 不做行号、不做 Tab 缩进接管(会与浏览器的焦点导航与粘贴行为打架)。
180
+ *
181
+ * ## 自适应高度怎么算
182
+ *
183
+ * 按 `\n` **计数行数**在 `minRows` / `maxRows` 间截断(同 `Input.Textarea`):不测 `scrollHeight`
184
+ * ——那要在每次输入后读布局(强制同步回流),且软换行 / 隐藏容器 / SSR 下都拿不到可靠值。
185
+ * 代价是**超长单行不会自己长高**(此时由 `maxHeight` + 框内滚动兜底,或由外层容器限宽)。
186
+ *
187
+ * @example 受控
188
+ * <CodeBlock.Editor v-model="sql" language="sql" placeholder="写一条 SQL" />
189
+ *
190
+ * @example 固定高度 + 限高内滚
191
+ * <CodeBlock.Editor v-model="config" :auto-size="false" :rows="6" :max-height="240" language="json" />
192
+ */
193
+ export declare const CodeEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
194
+ modelValue: {
195
+ type: StringConstructor;
196
+ default: undefined;
197
+ };
198
+ defaultValue: {
199
+ type: StringConstructor;
200
+ default: string;
201
+ };
202
+ placeholder: {
203
+ type: StringConstructor;
204
+ default: undefined;
205
+ };
206
+ rows: {
207
+ type: NumberConstructor;
208
+ default: undefined;
209
+ };
210
+ autoSize: {
211
+ type: PropType<boolean | CodeEditorAutoSize>;
212
+ default: boolean;
213
+ };
214
+ maxHeight: {
215
+ type: PropType<string | number>;
216
+ default: undefined;
217
+ };
218
+ readonly: {
219
+ type: BooleanConstructor;
220
+ default: boolean;
221
+ };
222
+ disabled: {
223
+ type: BooleanConstructor;
224
+ default: boolean;
225
+ };
226
+ language: {
227
+ type: StringConstructor;
228
+ default: string;
229
+ };
230
+ onChange: {
231
+ type: PropType<(v: string) => void>;
232
+ default: undefined;
233
+ };
234
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
235
+ 'update:modelValue': (v: string) => true;
236
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
237
+ modelValue: {
238
+ type: StringConstructor;
239
+ default: undefined;
240
+ };
241
+ defaultValue: {
242
+ type: StringConstructor;
243
+ default: string;
244
+ };
245
+ placeholder: {
246
+ type: StringConstructor;
247
+ default: undefined;
248
+ };
249
+ rows: {
250
+ type: NumberConstructor;
251
+ default: undefined;
252
+ };
253
+ autoSize: {
254
+ type: PropType<boolean | CodeEditorAutoSize>;
255
+ default: boolean;
256
+ };
257
+ maxHeight: {
258
+ type: PropType<string | number>;
259
+ default: undefined;
260
+ };
261
+ readonly: {
262
+ type: BooleanConstructor;
263
+ default: boolean;
264
+ };
265
+ disabled: {
266
+ type: BooleanConstructor;
267
+ default: boolean;
268
+ };
269
+ language: {
270
+ type: StringConstructor;
271
+ default: string;
272
+ };
273
+ onChange: {
274
+ type: PropType<(v: string) => void>;
275
+ default: undefined;
276
+ };
277
+ }>> & Readonly<{
278
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
279
+ }>, {
280
+ disabled: boolean;
281
+ onChange: (v: string) => void;
282
+ defaultValue: string;
283
+ placeholder: string;
284
+ rows: number;
285
+ modelValue: string;
286
+ readonly: boolean;
287
+ autoSize: boolean | CodeEditorAutoSize;
288
+ language: string;
289
+ maxHeight: string | number;
290
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
291
+ /** `CodeBlock` 的 props:**两形态的并集** + 切换开关(按 `editable` 分两组,见各条说明) */
292
+ export interface CodeBlockProps extends CodeViewProps, CodeEditorProps {
293
+ /**
294
+ * 编辑档:`true` 渲染 `Editor`(可改),缺省 `false` 渲染 `View`(只读展示)。
295
+ *
296
+ * 两形态的 props 都挂在本件上,但**按档生效**:只读档读 `code` / `inline` / `plain` / `copyable` /
297
+ * `wrap` / `onCopy`,编辑档读 `modelValue` / `defaultValue` / `placeholder` / `rows` / `autoSize` /
298
+ * `readonly` / `disabled` / `onChange`;`language` / `maxHeight` 两档共用。
299
+ */
300
+ editable?: boolean;
301
+ }
302
+ /**
303
+ * 族入口:`CodeBlock` 本体 + 两个成员件(`View` 只读 / `Editor` 可编辑)。
304
+ *
305
+ * `Object.assign` 是**原地**挂载(与 `Input.Textarea` 同一手法):运行时的 `CodeBlock` 就是它,
306
+ * 类型上也带成员(`typeof CodeBlock` 是交叉类型),故 TSX 与模板里 `CodeBlock.View` 都有提示。
307
+ */
308
+ export declare const CodeBlock: {
309
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
310
+ editable: {
311
+ type: BooleanConstructor;
312
+ default: boolean;
313
+ };
314
+ code: {
315
+ type: StringConstructor;
316
+ default: string;
317
+ };
318
+ inline: {
319
+ type: BooleanConstructor;
320
+ default: boolean;
321
+ };
322
+ plain: {
323
+ type: BooleanConstructor;
324
+ default: boolean;
325
+ };
326
+ copyable: {
327
+ type: BooleanConstructor;
328
+ default: boolean;
329
+ };
330
+ wrap: {
331
+ type: BooleanConstructor;
332
+ default: boolean;
333
+ };
334
+ onCopy: {
335
+ type: PropType<(ok: boolean) => void>;
336
+ default: undefined;
337
+ };
338
+ modelValue: {
339
+ type: StringConstructor;
340
+ default: undefined;
341
+ };
342
+ defaultValue: {
343
+ type: StringConstructor;
344
+ default: string;
345
+ };
346
+ placeholder: {
347
+ type: StringConstructor;
348
+ default: undefined;
349
+ };
350
+ rows: {
351
+ type: NumberConstructor;
352
+ default: undefined;
353
+ };
354
+ autoSize: {
355
+ type: PropType<boolean | CodeEditorAutoSize>;
356
+ default: boolean;
357
+ };
358
+ readonly: {
359
+ type: BooleanConstructor;
360
+ default: boolean;
361
+ };
362
+ disabled: {
363
+ type: BooleanConstructor;
364
+ default: boolean;
365
+ };
366
+ onChange: {
367
+ type: PropType<(v: string) => void>;
368
+ default: undefined;
369
+ };
370
+ language: {
371
+ type: StringConstructor;
372
+ default: string;
373
+ };
374
+ maxHeight: {
375
+ type: PropType<string | number>;
376
+ default: undefined;
377
+ };
378
+ }>> & Readonly<{
379
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
380
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
381
+ 'update:modelValue': (v: string) => true;
382
+ }, import("vue").PublicProps, {
383
+ inline: boolean;
384
+ wrap: boolean;
385
+ disabled: boolean;
386
+ plain: boolean;
387
+ code: string;
388
+ onCopy: (ok: boolean) => void;
389
+ onChange: (v: string) => void;
390
+ defaultValue: string;
391
+ placeholder: string;
392
+ rows: number;
393
+ modelValue: string;
394
+ readonly: boolean;
395
+ autoSize: boolean | CodeEditorAutoSize;
396
+ language: string;
397
+ copyable: boolean;
398
+ maxHeight: string | number;
399
+ editable: boolean;
400
+ }, true, {}, SlotsType<{
401
+ default?: () => VNodeChild;
402
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
403
+ P: {};
404
+ B: {};
405
+ D: {};
406
+ C: {};
407
+ M: {};
408
+ Defaults: {};
409
+ }, Readonly<import("vue").ExtractPropTypes<{
410
+ editable: {
411
+ type: BooleanConstructor;
412
+ default: boolean;
413
+ };
414
+ code: {
415
+ type: StringConstructor;
416
+ default: string;
417
+ };
418
+ inline: {
419
+ type: BooleanConstructor;
420
+ default: boolean;
421
+ };
422
+ plain: {
423
+ type: BooleanConstructor;
424
+ default: boolean;
425
+ };
426
+ copyable: {
427
+ type: BooleanConstructor;
428
+ default: boolean;
429
+ };
430
+ wrap: {
431
+ type: BooleanConstructor;
432
+ default: boolean;
433
+ };
434
+ onCopy: {
435
+ type: PropType<(ok: boolean) => void>;
436
+ default: undefined;
437
+ };
438
+ modelValue: {
439
+ type: StringConstructor;
440
+ default: undefined;
441
+ };
442
+ defaultValue: {
443
+ type: StringConstructor;
444
+ default: string;
445
+ };
446
+ placeholder: {
447
+ type: StringConstructor;
448
+ default: undefined;
449
+ };
450
+ rows: {
451
+ type: NumberConstructor;
452
+ default: undefined;
453
+ };
454
+ autoSize: {
455
+ type: PropType<boolean | CodeEditorAutoSize>;
456
+ default: boolean;
457
+ };
458
+ readonly: {
459
+ type: BooleanConstructor;
460
+ default: boolean;
461
+ };
462
+ disabled: {
463
+ type: BooleanConstructor;
464
+ default: boolean;
465
+ };
466
+ onChange: {
467
+ type: PropType<(v: string) => void>;
468
+ default: undefined;
469
+ };
470
+ language: {
471
+ type: StringConstructor;
472
+ default: string;
473
+ };
474
+ maxHeight: {
475
+ type: PropType<string | number>;
476
+ default: undefined;
477
+ };
478
+ }>> & Readonly<{
479
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
480
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
481
+ inline: boolean;
482
+ wrap: boolean;
483
+ disabled: boolean;
484
+ plain: boolean;
485
+ code: string;
486
+ onCopy: (ok: boolean) => void;
487
+ onChange: (v: string) => void;
488
+ defaultValue: string;
489
+ placeholder: string;
490
+ rows: number;
491
+ modelValue: string;
492
+ readonly: boolean;
493
+ autoSize: boolean | CodeEditorAutoSize;
494
+ language: string;
495
+ copyable: boolean;
496
+ maxHeight: string | number;
497
+ editable: boolean;
498
+ }>;
499
+ __isFragment?: never;
500
+ __isTeleport?: never;
501
+ __isSuspense?: never;
502
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
503
+ editable: {
504
+ type: BooleanConstructor;
505
+ default: boolean;
506
+ };
507
+ code: {
508
+ type: StringConstructor;
509
+ default: string;
510
+ };
511
+ inline: {
512
+ type: BooleanConstructor;
513
+ default: boolean;
514
+ };
515
+ plain: {
516
+ type: BooleanConstructor;
517
+ default: boolean;
518
+ };
519
+ copyable: {
520
+ type: BooleanConstructor;
521
+ default: boolean;
522
+ };
523
+ wrap: {
524
+ type: BooleanConstructor;
525
+ default: boolean;
526
+ };
527
+ onCopy: {
528
+ type: PropType<(ok: boolean) => void>;
529
+ default: undefined;
530
+ };
531
+ modelValue: {
532
+ type: StringConstructor;
533
+ default: undefined;
534
+ };
535
+ defaultValue: {
536
+ type: StringConstructor;
537
+ default: string;
538
+ };
539
+ placeholder: {
540
+ type: StringConstructor;
541
+ default: undefined;
542
+ };
543
+ rows: {
544
+ type: NumberConstructor;
545
+ default: undefined;
546
+ };
547
+ autoSize: {
548
+ type: PropType<boolean | CodeEditorAutoSize>;
549
+ default: boolean;
550
+ };
551
+ readonly: {
552
+ type: BooleanConstructor;
553
+ default: boolean;
554
+ };
555
+ disabled: {
556
+ type: BooleanConstructor;
557
+ default: boolean;
558
+ };
559
+ onChange: {
560
+ type: PropType<(v: string) => void>;
561
+ default: undefined;
562
+ };
563
+ language: {
564
+ type: StringConstructor;
565
+ default: string;
566
+ };
567
+ maxHeight: {
568
+ type: PropType<string | number>;
569
+ default: undefined;
570
+ };
571
+ }>> & Readonly<{
572
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
573
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
574
+ 'update:modelValue': (v: string) => true;
575
+ }, string, {
576
+ inline: boolean;
577
+ wrap: boolean;
578
+ disabled: boolean;
579
+ plain: boolean;
580
+ code: string;
581
+ onCopy: (ok: boolean) => void;
582
+ onChange: (v: string) => void;
583
+ defaultValue: string;
584
+ placeholder: string;
585
+ rows: number;
586
+ modelValue: string;
587
+ readonly: boolean;
588
+ autoSize: boolean | CodeEditorAutoSize;
589
+ language: string;
590
+ copyable: boolean;
591
+ maxHeight: string | number;
592
+ editable: boolean;
593
+ }, {}, string, SlotsType<{
594
+ default?: () => VNodeChild;
595
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
596
+ View: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
597
+ code: {
598
+ type: StringConstructor;
599
+ default: string;
600
+ };
601
+ inline: {
602
+ type: BooleanConstructor;
603
+ default: boolean;
604
+ };
605
+ plain: {
606
+ type: BooleanConstructor;
607
+ default: boolean;
608
+ };
609
+ language: {
610
+ type: StringConstructor;
611
+ default: string;
612
+ };
613
+ copyable: {
614
+ type: BooleanConstructor;
615
+ default: boolean;
616
+ };
617
+ maxHeight: {
618
+ type: PropType<string | number>;
619
+ default: undefined;
620
+ };
621
+ wrap: {
622
+ type: BooleanConstructor;
623
+ default: boolean;
624
+ };
625
+ onCopy: {
626
+ type: PropType<(ok: boolean) => void>;
627
+ default: undefined;
628
+ };
629
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
630
+ code: {
631
+ type: StringConstructor;
632
+ default: string;
633
+ };
634
+ inline: {
635
+ type: BooleanConstructor;
636
+ default: boolean;
637
+ };
638
+ plain: {
639
+ type: BooleanConstructor;
640
+ default: boolean;
641
+ };
642
+ language: {
643
+ type: StringConstructor;
644
+ default: string;
645
+ };
646
+ copyable: {
647
+ type: BooleanConstructor;
648
+ default: boolean;
649
+ };
650
+ maxHeight: {
651
+ type: PropType<string | number>;
652
+ default: undefined;
653
+ };
654
+ wrap: {
655
+ type: BooleanConstructor;
656
+ default: boolean;
657
+ };
658
+ onCopy: {
659
+ type: PropType<(ok: boolean) => void>;
660
+ default: undefined;
661
+ };
662
+ }>> & Readonly<{}>, {
663
+ inline: boolean;
664
+ wrap: boolean;
665
+ plain: boolean;
666
+ code: string;
667
+ onCopy: (ok: boolean) => void;
668
+ language: string;
669
+ copyable: boolean;
670
+ maxHeight: string | number;
671
+ }, SlotsType<{
672
+ default?: () => VNodeChild;
673
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
674
+ Editor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
675
+ modelValue: {
676
+ type: StringConstructor;
677
+ default: undefined;
678
+ };
679
+ defaultValue: {
680
+ type: StringConstructor;
681
+ default: string;
682
+ };
683
+ placeholder: {
684
+ type: StringConstructor;
685
+ default: undefined;
686
+ };
687
+ rows: {
688
+ type: NumberConstructor;
689
+ default: undefined;
690
+ };
691
+ autoSize: {
692
+ type: PropType<boolean | CodeEditorAutoSize>;
693
+ default: boolean;
694
+ };
695
+ maxHeight: {
696
+ type: PropType<string | number>;
697
+ default: undefined;
698
+ };
699
+ readonly: {
700
+ type: BooleanConstructor;
701
+ default: boolean;
702
+ };
703
+ disabled: {
704
+ type: BooleanConstructor;
705
+ default: boolean;
706
+ };
707
+ language: {
708
+ type: StringConstructor;
709
+ default: string;
710
+ };
711
+ onChange: {
712
+ type: PropType<(v: string) => void>;
713
+ default: undefined;
714
+ };
715
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
716
+ 'update:modelValue': (v: string) => true;
717
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
718
+ modelValue: {
719
+ type: StringConstructor;
720
+ default: undefined;
721
+ };
722
+ defaultValue: {
723
+ type: StringConstructor;
724
+ default: string;
725
+ };
726
+ placeholder: {
727
+ type: StringConstructor;
728
+ default: undefined;
729
+ };
730
+ rows: {
731
+ type: NumberConstructor;
732
+ default: undefined;
733
+ };
734
+ autoSize: {
735
+ type: PropType<boolean | CodeEditorAutoSize>;
736
+ default: boolean;
737
+ };
738
+ maxHeight: {
739
+ type: PropType<string | number>;
740
+ default: undefined;
741
+ };
742
+ readonly: {
743
+ type: BooleanConstructor;
744
+ default: boolean;
745
+ };
746
+ disabled: {
747
+ type: BooleanConstructor;
748
+ default: boolean;
749
+ };
750
+ language: {
751
+ type: StringConstructor;
752
+ default: string;
753
+ };
754
+ onChange: {
755
+ type: PropType<(v: string) => void>;
756
+ default: undefined;
757
+ };
758
+ }>> & Readonly<{
759
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
760
+ }>, {
761
+ disabled: boolean;
762
+ onChange: (v: string) => void;
763
+ defaultValue: string;
764
+ placeholder: string;
765
+ rows: number;
766
+ modelValue: string;
767
+ readonly: boolean;
768
+ autoSize: boolean | CodeEditorAutoSize;
769
+ language: string;
770
+ maxHeight: string | number;
771
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
772
+ };
773
+ /** 含成员的 `CodeBlock` 类型(与 `CodeBlockCompoundType` 同义,两个名字都为对齐本仓既有的 `XxxCompound` 口径) */
774
+ export type CodeBlockCompound = typeof CodeBlock;
775
+ /** 含成员的 `CodeBlock` 类型 */
776
+ export type CodeBlockCompoundType = typeof CodeBlock;