@vunk/plus 1.11.10 → 1.12.1
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/components/broadcasting-markdown/src/index.vue.d.ts +1 -1
- package/components/bubble-list/index.mjs +1 -0
- package/components/metahuman-broadcasting/src/index.vue.d.ts +1 -1
- package/components/table-columns/src/ctx.d.ts +2 -2
- package/components/table-columns/src/el-ctx.d.ts +2 -2
- package/components/table-columns/src/index.vue.d.ts +4 -4
- package/components/tables-v1/src/ctx.d.ts +14 -14
- package/components/tables-v1/src/el-ctx.d.ts +6 -6
- package/components/tables-v1/src/index.vue.d.ts +40 -40
- package/components/tables-v1-checkbox/src/ctx.d.ts +12 -12
- package/components/tables-v1-checkbox/src/index.vue.d.ts +70 -70
- package/components/text/src/ctx.d.ts +1 -1
- package/components/text/src/index.vue.d.ts +1 -1
- package/components/thinking/index.css +125 -0
- package/components/thinking/index.d.ts +4 -0
- package/components/thinking/index.mjs +357 -0
- package/components/thinking/src/ctx.d.ts +121 -0
- package/components/thinking/src/index.vue.d.ts +2193 -0
- package/components/thinking/src/types.d.ts +46 -0
- package/index.css +126 -0
- package/package.json +8 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ThinkingStatus = 'start' | 'thinking' | 'end' | 'error' | 'cancel';
|
|
2
|
+
export interface ThinkingProps {
|
|
3
|
+
/** @description 展开/收起状态(v-model) */
|
|
4
|
+
modelValue?: boolean;
|
|
5
|
+
/** @description 思考内容文本 */
|
|
6
|
+
content?: string;
|
|
7
|
+
/** @description 当前思考状态 */
|
|
8
|
+
status?: ThinkingStatus;
|
|
9
|
+
/** @description 是否禁用交互 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** @description status=end 时是否自动收起 */
|
|
12
|
+
autoCollapse?: boolean;
|
|
13
|
+
/** @description 动画过渡时长 */
|
|
14
|
+
duration?: string;
|
|
15
|
+
/** @description 头部触发按钮最小宽度 */
|
|
16
|
+
buttonWidth?: string;
|
|
17
|
+
/** @description 内容区域最大高度(超过后滚动) */
|
|
18
|
+
maxHeight?: string;
|
|
19
|
+
/** @description 组件最大宽度 */
|
|
20
|
+
maxWidth?: string;
|
|
21
|
+
/** @description 卡片背景色 */
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
/** @description 正文字体颜色 */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** @description 标题文案 */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** @description 跳过按钮文案 */
|
|
28
|
+
skipText?: string;
|
|
29
|
+
/** @description 是否显示跳过按钮 */
|
|
30
|
+
showSkip?: boolean;
|
|
31
|
+
/** @description 卡片圆角 */
|
|
32
|
+
radius?: string;
|
|
33
|
+
/** @description 卡片边框颜色 */
|
|
34
|
+
borderColor?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ThinkingEmits {
|
|
37
|
+
(event: 'change', value: {
|
|
38
|
+
value: boolean;
|
|
39
|
+
status: ThinkingStatus;
|
|
40
|
+
}): void;
|
|
41
|
+
(event: 'update:modelValue', value: boolean): void;
|
|
42
|
+
(event: 'skip', value: {
|
|
43
|
+
value: boolean;
|
|
44
|
+
status: ThinkingStatus;
|
|
45
|
+
}): void;
|
|
46
|
+
}
|
package/index.css
CHANGED
|
@@ -383,6 +383,132 @@
|
|
|
383
383
|
background-color: var(--el-color-primary);
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
+
.vk-thinking {
|
|
387
|
+
width: 100%;
|
|
388
|
+
max-width: var(--vk-thinking-max-width);
|
|
389
|
+
color: var(--vk-thinking-color);
|
|
390
|
+
font-size: var(--vk-thinking-font-size-base);
|
|
391
|
+
}
|
|
392
|
+
.vk-thinking__card {
|
|
393
|
+
width: 100%;
|
|
394
|
+
border: 1px solid var(--vk-thinking-border-color);
|
|
395
|
+
border-radius: var(--vk-thinking-radius);
|
|
396
|
+
background: var(--vk-thinking-background-color);
|
|
397
|
+
box-sizing: border-box;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
}
|
|
400
|
+
.vk-thinking__header {
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
justify-content: space-between;
|
|
404
|
+
gap: 16px;
|
|
405
|
+
padding: 1.5em 1.75em;
|
|
406
|
+
}
|
|
407
|
+
.vk-thinking__card.is-expanded .vk-thinking__header {
|
|
408
|
+
padding-bottom: 0.75em;
|
|
409
|
+
}
|
|
410
|
+
.vk-thinking__toggle {
|
|
411
|
+
min-width: var(--vk-thinking-button-width);
|
|
412
|
+
flex: 1;
|
|
413
|
+
display: inline-flex;
|
|
414
|
+
align-items: center;
|
|
415
|
+
gap: 12px;
|
|
416
|
+
padding: 0;
|
|
417
|
+
border: 0;
|
|
418
|
+
background: transparent;
|
|
419
|
+
color: inherit;
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
text-align: left;
|
|
422
|
+
}
|
|
423
|
+
.vk-thinking__toggle:disabled {
|
|
424
|
+
cursor: not-allowed;
|
|
425
|
+
}
|
|
426
|
+
.vk-thinking__title {
|
|
427
|
+
position: relative;
|
|
428
|
+
display: inline-flex;
|
|
429
|
+
align-items: baseline;
|
|
430
|
+
color: var(--el-text-color-primary);
|
|
431
|
+
font-size: var(--vk-thinking-font-size-title);
|
|
432
|
+
font-weight: 700;
|
|
433
|
+
line-height: 1.5;
|
|
434
|
+
}
|
|
435
|
+
.vk-thinking__card.is-thinking .vk-thinking__title {
|
|
436
|
+
animation: vk-thinking-blink 1.6s ease-in-out infinite;
|
|
437
|
+
}
|
|
438
|
+
.vk-thinking__caret {
|
|
439
|
+
font-size: var(--vk-thinking-font-size-caret);
|
|
440
|
+
flex: none;
|
|
441
|
+
color: var(--el-text-color-secondary);
|
|
442
|
+
transform: rotate(0deg);
|
|
443
|
+
transform-origin: center;
|
|
444
|
+
transition: transform var(--vk-thinking-animation-duration) ease;
|
|
445
|
+
}
|
|
446
|
+
.vk-thinking__caret.is-expanded {
|
|
447
|
+
transform: rotate(90deg);
|
|
448
|
+
}
|
|
449
|
+
.vk-thinking__skip {
|
|
450
|
+
flex: none;
|
|
451
|
+
padding: 0;
|
|
452
|
+
border: 0;
|
|
453
|
+
background: transparent;
|
|
454
|
+
color: var(--el-text-color-secondary);
|
|
455
|
+
font-size: var(--vk-thinking-font-size-skip);
|
|
456
|
+
line-height: 1.5;
|
|
457
|
+
cursor: pointer;
|
|
458
|
+
white-space: nowrap;
|
|
459
|
+
}
|
|
460
|
+
.vk-thinking__skip:hover {
|
|
461
|
+
color: var(--el-text-color-primary);
|
|
462
|
+
}
|
|
463
|
+
.vk-thinking__body {
|
|
464
|
+
padding: 0 1.75em 1.5em;
|
|
465
|
+
}
|
|
466
|
+
.vk-thinking__content {
|
|
467
|
+
color: var(--vk-thinking-color);
|
|
468
|
+
font-size: var(--vk-thinking-font-size-content);
|
|
469
|
+
line-height: 2;
|
|
470
|
+
white-space: pre-wrap;
|
|
471
|
+
word-break: break-word;
|
|
472
|
+
}
|
|
473
|
+
.vk-thinking__content p,
|
|
474
|
+
.vk-thinking__content ul,
|
|
475
|
+
.vk-thinking__content ol {
|
|
476
|
+
margin: 0 0 12px;
|
|
477
|
+
}
|
|
478
|
+
.vk-thinking__content ul,
|
|
479
|
+
.vk-thinking__content ol {
|
|
480
|
+
padding-left: 24px;
|
|
481
|
+
}
|
|
482
|
+
.vk-thinking__content li{
|
|
483
|
+
margin-bottom: 8px;
|
|
484
|
+
}
|
|
485
|
+
.vk-thinking__card.is-disabled {
|
|
486
|
+
opacity: 0.7;
|
|
487
|
+
}
|
|
488
|
+
@keyframes vk-thinking-blink {
|
|
489
|
+
0%,
|
|
490
|
+
100% {
|
|
491
|
+
opacity: 1;
|
|
492
|
+
}
|
|
493
|
+
50% {
|
|
494
|
+
opacity: 0.58;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
@media (width <= 768px) {
|
|
498
|
+
.vk-thinking {
|
|
499
|
+
--vk-thinking-font-size-base: 14px;
|
|
500
|
+
}
|
|
501
|
+
.vk-thinking__header {
|
|
502
|
+
padding: 1.2857em 1.4286em;
|
|
503
|
+
}
|
|
504
|
+
.vk-thinking__card.is-expanded .vk-thinking__header {
|
|
505
|
+
padding-bottom: 0.7143em;
|
|
506
|
+
}
|
|
507
|
+
.vk-thinking__body {
|
|
508
|
+
padding: 0 1.4286em 1.2857em;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
386
512
|
.vk-typing-markdown.is-typing .is-last::after{
|
|
387
513
|
animation: blink 0.7s infinite;
|
|
388
514
|
content: '|';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"import": "./components/typing-markdown/index.mjs",
|
|
76
76
|
"types": "./components/typing-markdown/index.d.ts"
|
|
77
77
|
},
|
|
78
|
+
"./components/thinking": {
|
|
79
|
+
"import": "./components/thinking/index.mjs",
|
|
80
|
+
"types": "./components/thinking/index.d.ts"
|
|
81
|
+
},
|
|
78
82
|
"./components/text": {
|
|
79
83
|
"import": "./components/text/index.mjs",
|
|
80
84
|
"types": "./components/text/index.d.ts"
|
|
@@ -174,6 +178,9 @@
|
|
|
174
178
|
"./components/typing-markdown/index.css": {
|
|
175
179
|
"import": "./components/typing-markdown/index.css"
|
|
176
180
|
},
|
|
181
|
+
"./components/thinking/index.css": {
|
|
182
|
+
"import": "./components/thinking/index.css"
|
|
183
|
+
},
|
|
177
184
|
"./components/tables-v1-checkbox/index.css": {
|
|
178
185
|
"import": "./components/tables-v1-checkbox/index.css"
|
|
179
186
|
},
|