vuepress-plugin-md-power 1.0.0-rc.135 → 1.0.0-rc.137
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/lib/client/components/CodeRepl.vue +2 -2
- package/lib/client/components/VPCollapse.vue +31 -0
- package/lib/client/components/VPCollapseItem.vue +118 -0
- package/lib/client/components/VPFadeInExpandTransition.vue +154 -0
- package/lib/client/components/VPTimeline.vue +52 -0
- package/lib/client/components/VPTimelineItem.vue +330 -0
- package/lib/client/options.d.ts +3 -1
- package/lib/client/options.js +8 -0
- package/lib/client/styles/demo.css +2 -2
- package/lib/node/index.d.ts +40 -1
- package/lib/node/index.js +570 -359
- package/lib/shared/index.d.ts +37 -0
- package/package.json +21 -20
|
@@ -134,7 +134,7 @@ function runCode() {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.code-repl-title h4 {
|
|
137
|
-
flex: 1;
|
|
137
|
+
flex: 1 2;
|
|
138
138
|
padding: 0 12px;
|
|
139
139
|
margin: 0;
|
|
140
140
|
font-size: 14px;
|
|
@@ -175,7 +175,7 @@ function runCode() {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
.output-head .title {
|
|
178
|
-
flex: 1;
|
|
178
|
+
flex: 1 2;
|
|
179
179
|
margin-left: 10px;
|
|
180
180
|
font-size: 14px;
|
|
181
181
|
font-weight: 500;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provide, ref } from 'vue'
|
|
3
|
+
import { INJECT_COLLAPSE_KEY } from '../options.js'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
accordion?: boolean
|
|
7
|
+
index?: number
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
|
+
const currentIndex = ref<number | undefined>(props.index)
|
|
11
|
+
|
|
12
|
+
provide(INJECT_COLLAPSE_KEY, {
|
|
13
|
+
accordion: props.accordion ?? false,
|
|
14
|
+
index: currentIndex,
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="vp-collapse">
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.vp-collapse {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 16px;
|
|
29
|
+
margin: 16px 0;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Ref } from 'vue'
|
|
3
|
+
import { inject, ref, watch } from 'vue'
|
|
4
|
+
import { INJECT_COLLAPSE_KEY } from '../options.js'
|
|
5
|
+
import VPFadeInExpandTransition from './VPFadeInExpandTransition.vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
expand?: boolean
|
|
9
|
+
index: number
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const collapse = inject<{
|
|
13
|
+
accordion: boolean
|
|
14
|
+
index: Ref<number | undefined>
|
|
15
|
+
}>(INJECT_COLLAPSE_KEY)
|
|
16
|
+
|
|
17
|
+
if (__VUEPRESS_DEV__ && !collapse) {
|
|
18
|
+
throw new Error('<VPCollapseItem /> must be used inside <VPCollapse />')
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const expand = ref(
|
|
22
|
+
collapse?.accordion && typeof collapse.index.value !== 'undefined'
|
|
23
|
+
? props.index === collapse.index.value
|
|
24
|
+
: props.expand,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
if (collapse?.accordion) {
|
|
28
|
+
watch(collapse?.index, () => {
|
|
29
|
+
expand.value = collapse?.index.value === props.index
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function toggle() {
|
|
34
|
+
if (collapse?.accordion) {
|
|
35
|
+
if (collapse.index.value === props.index && expand.value) {
|
|
36
|
+
expand.value = false
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
collapse!.index.value = props.index!
|
|
40
|
+
expand.value = true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
expand.value = !expand.value
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div class="vp-collapse-item" :class="{ expand }">
|
|
51
|
+
<div class="vp-collapse-header" @click="toggle">
|
|
52
|
+
<span class="vpi-chevron-right" />
|
|
53
|
+
<p class="vp-collapse-title">
|
|
54
|
+
<slot name="title" />
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
<VPFadeInExpandTransition>
|
|
58
|
+
<div v-show="expand" class="vp-collapse-content">
|
|
59
|
+
<div class="vp-collapse-content-inner">
|
|
60
|
+
<slot />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</VPFadeInExpandTransition>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.vp-collapse-item {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
padding-top: 16px;
|
|
72
|
+
border-top: solid 1px var(--vp-c-divider);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vp-collapse-item:first-child {
|
|
76
|
+
border-top: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.vp-collapse-header {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: 6px;
|
|
82
|
+
align-items: center;
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vp-collapse-header .vpi-chevron-right {
|
|
89
|
+
align-self: baseline;
|
|
90
|
+
width: 20px;
|
|
91
|
+
height: 20px;
|
|
92
|
+
transition: transform var(--vp-t-color);
|
|
93
|
+
transform: rotate(0deg);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vp-collapse-item.expand .vpi-chevron-right {
|
|
97
|
+
transform: rotate(90deg);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.vp-collapse-header .vp-collapse-title {
|
|
101
|
+
flex: 1 2;
|
|
102
|
+
margin: 0;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.vp-collapse-content-inner {
|
|
107
|
+
padding-top: 12px;
|
|
108
|
+
padding-left: 24px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.vp-collapse-content-inner > *:first-child {
|
|
112
|
+
margin-top: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.vp-collapse-content-inner > *:last-child {
|
|
116
|
+
margin-bottom: 0;
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Transition, TransitionGroup } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
group?: boolean
|
|
6
|
+
appear?: boolean
|
|
7
|
+
mode?: 'in-out' | 'out-in' | 'default'
|
|
8
|
+
onLeave?: () => void
|
|
9
|
+
onAfterLeave?: () => void
|
|
10
|
+
onAfterEnter?: () => void
|
|
11
|
+
width?: boolean
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
function handleBeforeLeave(el: HTMLElement): void {
|
|
15
|
+
if (props.width) {
|
|
16
|
+
el.style.maxWidth = `${el.offsetWidth}px`
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
el.style.maxHeight = `${el.offsetHeight}px`
|
|
20
|
+
}
|
|
21
|
+
void el.offsetWidth
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function handleLeave(el: HTMLElement): void {
|
|
25
|
+
if (props.width) {
|
|
26
|
+
el.style.maxWidth = '0'
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
el.style.maxHeight = '0'
|
|
30
|
+
}
|
|
31
|
+
void el.offsetWidth
|
|
32
|
+
props.onLeave?.()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function handleAfterLeave(el: HTMLElement): void {
|
|
36
|
+
if (props.width) {
|
|
37
|
+
el.style.maxWidth = ''
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
el.style.maxHeight = ''
|
|
41
|
+
}
|
|
42
|
+
props.onAfterLeave?.()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function handleEnter(el: HTMLElement): void {
|
|
46
|
+
el.style.transition = 'none'
|
|
47
|
+
if (props.width) {
|
|
48
|
+
const memorizedWidth = el.offsetWidth
|
|
49
|
+
el.style.maxWidth = '0'
|
|
50
|
+
void el.offsetWidth
|
|
51
|
+
el.style.transition = ''
|
|
52
|
+
el.style.maxWidth = `${memorizedWidth}px`
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const memorizedHeight = el.offsetHeight
|
|
56
|
+
el.style.maxHeight = '0'
|
|
57
|
+
void el.offsetWidth
|
|
58
|
+
el.style.transition = ''
|
|
59
|
+
el.style.maxHeight = `${memorizedHeight}px`
|
|
60
|
+
}
|
|
61
|
+
void el.offsetWidth
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function handleAfterEnter(el: HTMLElement): void {
|
|
65
|
+
if (props.width) {
|
|
66
|
+
el.style.maxWidth = ''
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
el.style.maxHeight = ''
|
|
70
|
+
}
|
|
71
|
+
props.onAfterEnter?.()
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<component
|
|
77
|
+
:is="group ? TransitionGroup : Transition"
|
|
78
|
+
:name="width ? 'fade-in-width-expand' : 'fade-in-height-expand'"
|
|
79
|
+
:mode
|
|
80
|
+
:appear
|
|
81
|
+
@enter="handleEnter"
|
|
82
|
+
@after-enter="handleAfterEnter"
|
|
83
|
+
@before-leave="handleBeforeLeave"
|
|
84
|
+
@leave="handleLeave"
|
|
85
|
+
@after-leave="handleAfterLeave"
|
|
86
|
+
>
|
|
87
|
+
<slot />
|
|
88
|
+
</component>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<style>
|
|
92
|
+
.fade-in-height-expand-leave-from,
|
|
93
|
+
.fade-in-height-expand-enter-to,
|
|
94
|
+
.fade-in-width-expand-leave-from,
|
|
95
|
+
.fade-in-width-expand-enter-to {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.fade-in-height-expand-leave-to,
|
|
100
|
+
.fade-in-height-expand-enter-from {
|
|
101
|
+
padding-top: 0 !important;
|
|
102
|
+
padding-bottom: 0 !important;
|
|
103
|
+
margin-top: 0 !important;
|
|
104
|
+
margin-bottom: 0 !important;
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.fade-in-height-expand-leave-active {
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
transition:
|
|
111
|
+
max-height cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
112
|
+
opacity cubic-bezier(0, 0, 0.2, 1) 0.3s,
|
|
113
|
+
margin-top cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
114
|
+
margin-bottom cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
115
|
+
padding-top cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
116
|
+
padding-bottom cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.fade-in-height-expand-enter-active {
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
transition:
|
|
122
|
+
max-height cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
123
|
+
opacity cubic-bezier(0.4, 0, 1, 1) 0.3s,
|
|
124
|
+
margin-top cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
125
|
+
margin-bottom cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
126
|
+
padding-top cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
|
|
127
|
+
padding-bottom cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.fade-in-width-expand-leave-to,
|
|
131
|
+
.fade-in-width-expand-enter-from {
|
|
132
|
+
margin-right: 0 !important;
|
|
133
|
+
margin-left: 0 !important;
|
|
134
|
+
opacity: 0 !important;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.fade-in-width-expand-leave-active {
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
transition:
|
|
140
|
+
max-width cubic-bezier(0.4, 0, 0.2, 1) 0.2s 0.1s,
|
|
141
|
+
opacity cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
|
|
142
|
+
margin-right cubic-bezier(0.4, 0, 0.2, 1) 0.2s 0.1s,
|
|
143
|
+
margin-left cubic-bezier(0.4, 0, 0.2, 1) 0.2s 0.1s;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.fade-in-width-expand-enter-active {
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
transition:
|
|
149
|
+
max-width cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
|
|
150
|
+
opacity cubic-bezier(0.4, 0, 0.2, 1) 0.2s 0.1s,
|
|
151
|
+
margin-right cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
|
|
152
|
+
margin-left cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, provide } from 'vue'
|
|
3
|
+
import { INJECT_TIMELINE_KEY } from '../options.js'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
horizontal?: boolean
|
|
7
|
+
card?: boolean
|
|
8
|
+
placement?: 'left' | 'right' | 'between'
|
|
9
|
+
line?: 'solid' | 'dashed' | 'dotted'
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
provide(INJECT_TIMELINE_KEY, computed(() => ({
|
|
13
|
+
line: props.line || 'solid',
|
|
14
|
+
card: props.card ?? false,
|
|
15
|
+
horizontal: props.horizontal ?? false,
|
|
16
|
+
placement: props.placement || 'left',
|
|
17
|
+
})))
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="vp-timeline" :class="{ horizontal }">
|
|
22
|
+
<div class="vp-timeline-box">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.vp-timeline {
|
|
30
|
+
position: relative;
|
|
31
|
+
margin: 32px 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vp-timeline.horizontal {
|
|
35
|
+
padding-bottom: 7px;
|
|
36
|
+
overflow-x: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.vp-timeline-box {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: 24px 36px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.vp-timeline:not(.horizontal) .vp-timeline-box {
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vp-timeline.horizontal .vp-timeline-box {
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
width: max-content;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { ComputedRef } from 'vue'
|
|
3
|
+
import { useMediaQuery } from '@vueuse/core'
|
|
4
|
+
import { computed, inject } from 'vue'
|
|
5
|
+
import { INJECT_TIMELINE_KEY } from '../options.js'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
time?: string
|
|
9
|
+
type?: 'info' | 'tip' | 'success' | 'warning' | 'danger' | 'caution' | 'important' | (string & {})
|
|
10
|
+
card?: boolean
|
|
11
|
+
line?: 'solid' | 'dashed' | 'dotted'
|
|
12
|
+
icon?: string
|
|
13
|
+
color?: string
|
|
14
|
+
placement?: 'left' | 'right'
|
|
15
|
+
}>()
|
|
16
|
+
|
|
17
|
+
const is639 = useMediaQuery('(max-width: 639px)')
|
|
18
|
+
|
|
19
|
+
const defaultOptions = inject<ComputedRef<{
|
|
20
|
+
line?: 'solid' | 'dashed' | 'dotted'
|
|
21
|
+
card?: boolean
|
|
22
|
+
horizontal?: boolean
|
|
23
|
+
placement?: 'left' | 'right' | 'between'
|
|
24
|
+
}>>(INJECT_TIMELINE_KEY)
|
|
25
|
+
|
|
26
|
+
const timeline = computed(() => {
|
|
27
|
+
const between = defaultOptions?.value.placement === 'between' && !is639.value
|
|
28
|
+
const placement = defaultOptions?.value.placement === 'between' ? 'left' : defaultOptions?.value.placement
|
|
29
|
+
return {
|
|
30
|
+
time: props.time,
|
|
31
|
+
type: props.type || 'info',
|
|
32
|
+
line: props.line || defaultOptions?.value.line || 'solid',
|
|
33
|
+
icon: props.icon,
|
|
34
|
+
color: props.color,
|
|
35
|
+
horizontal: defaultOptions?.value.horizontal ?? false,
|
|
36
|
+
between: between ? props.placement || 'left' : false,
|
|
37
|
+
placement: between ? '' : (placement || 'left'),
|
|
38
|
+
card: props.card ?? defaultOptions?.value.card ?? false,
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div
|
|
45
|
+
class="vp-timeline-item" :class="{
|
|
46
|
+
card: timeline.card,
|
|
47
|
+
horizontal: timeline.horizontal,
|
|
48
|
+
[timeline.type]: true,
|
|
49
|
+
[`line-${timeline.line}`]: true,
|
|
50
|
+
[`placement-${timeline.placement}`]: !timeline.horizontal && timeline.placement,
|
|
51
|
+
between: timeline.between,
|
|
52
|
+
[`between-${timeline.between}`]: timeline.between,
|
|
53
|
+
}"
|
|
54
|
+
:style="timeline.color ? {
|
|
55
|
+
'--vp-timeline-c-line': timeline.color,
|
|
56
|
+
'--vp-timeline-c-point': timeline.color,
|
|
57
|
+
} : null"
|
|
58
|
+
>
|
|
59
|
+
<div class="vp-timeline-line" :class="{ 'has-icon': timeline.icon }">
|
|
60
|
+
<span class="vp-timeline-point">
|
|
61
|
+
<slot name="icon">
|
|
62
|
+
<VPIcon v-if="timeline.icon" :name="timeline.icon" />
|
|
63
|
+
</slot>
|
|
64
|
+
</span>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="vp-timeline-container">
|
|
67
|
+
<div class="vp-timeline-content">
|
|
68
|
+
<p class="vp-timeline-title">
|
|
69
|
+
<slot name="title" />
|
|
70
|
+
</p>
|
|
71
|
+
<slot />
|
|
72
|
+
</div>
|
|
73
|
+
<p v-if="timeline.time" class="vp-timeline-time">
|
|
74
|
+
{{ timeline.time }}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<style>
|
|
81
|
+
:root,
|
|
82
|
+
.vp-timeline-item.info {
|
|
83
|
+
--vp-timeline-c-line: var(--vp-c-border);
|
|
84
|
+
--vp-timeline-c-point: var(--vp-c-border);
|
|
85
|
+
--vp-timeline-c-title: var(--vp-c-text-1);
|
|
86
|
+
--vp-timeline-c-text: var(--vp-c-text-1);
|
|
87
|
+
--vp-timeline-c-time: var(--vp-c-text-3);
|
|
88
|
+
--vp-timeline-c-icon: var(--vp-c-bg);
|
|
89
|
+
--vp-timeline-bg-card: var(--vp-c-bg-soft);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.vp-timeline-item.tip {
|
|
93
|
+
--vp-timeline-c-line: var(--vp-c-tip-1);
|
|
94
|
+
--vp-timeline-c-point: var(--vp-c-tip-1);
|
|
95
|
+
--vp-timeline-bg-card: var(--vp-c-tip-soft);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.vp-timeline-item.success {
|
|
99
|
+
--vp-timeline-c-line: var(--vp-c-success-3);
|
|
100
|
+
--vp-timeline-c-point: var(--vp-c-success-3);
|
|
101
|
+
--vp-timeline-bg-card: var(--vp-c-success-soft);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vp-timeline-item.warning {
|
|
105
|
+
--vp-timeline-c-line: var(--vp-c-warning-3);
|
|
106
|
+
--vp-timeline-c-point: var(--vp-c-warning-3);
|
|
107
|
+
--vp-timeline-bg-card: var(--vp-c-warning-soft);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.vp-timeline-item.danger {
|
|
111
|
+
--vp-timeline-c-line: var(--vp-c-danger-3);
|
|
112
|
+
--vp-timeline-c-point: var(--vp-c-danger-3);
|
|
113
|
+
--vp-timeline-bg-card: var(--vp-c-danger-soft);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.vp-timeline-item.caution {
|
|
117
|
+
--vp-timeline-c-line: var(--vp-c-caution-3);
|
|
118
|
+
--vp-timeline-c-point: var(--vp-c-caution-3);
|
|
119
|
+
--vp-timeline-bg-card: var(--vp-c-caution-soft);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vp-timeline-item.important {
|
|
123
|
+
--vp-timeline-c-line: var(--vp-c-important-3);
|
|
124
|
+
--vp-timeline-c-point: var(--vp-c-important-3);
|
|
125
|
+
--vp-timeline-bg-card: var(--vp-c-important-soft);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.vp-timeline-item {
|
|
129
|
+
position: relative;
|
|
130
|
+
display: flex;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.vp-timeline-item:not(.horizontal).between {
|
|
134
|
+
width: calc(50% - 18px);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.vp-timeline-item.horizontal {
|
|
138
|
+
padding-top: 36px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.vp-timeline-item > .vp-timeline-line {
|
|
142
|
+
position: absolute;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.vp-timeline-item:not(.horizontal).placement-left {
|
|
146
|
+
justify-content: flex-start;
|
|
147
|
+
padding-left: 36px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.vp-timeline-item:not(.horizontal).placement-right,
|
|
151
|
+
.vp-timeline-item:not(.horizontal).between {
|
|
152
|
+
justify-content: flex-end;
|
|
153
|
+
padding-right: 36px;
|
|
154
|
+
text-align: right;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.vp-timeline-item:not(.horizontal) > .vp-timeline-line {
|
|
158
|
+
top: 0;
|
|
159
|
+
bottom: 0;
|
|
160
|
+
width: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vp-timeline-item.horizontal > .vp-timeline-line {
|
|
164
|
+
top: 12px;
|
|
165
|
+
right: 0;
|
|
166
|
+
left: 0;
|
|
167
|
+
height: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.vp-timeline-item:not(.horizontal).card > .vp-timeline-line {
|
|
171
|
+
top: 14px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.vp-timeline-item:not(.horizontal).placement-left > .vp-timeline-line {
|
|
175
|
+
left: 12px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.vp-timeline-item:not(.horizontal).placement-right > .vp-timeline-line,
|
|
179
|
+
.vp-timeline-item:not(.horizontal).between > .vp-timeline-line {
|
|
180
|
+
right: 12px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.vp-timeline-item > .vp-timeline-line::before {
|
|
184
|
+
position: absolute;
|
|
185
|
+
display: block;
|
|
186
|
+
content: "";
|
|
187
|
+
border: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.vp-timeline-item:not(.horizontal) > .vp-timeline-line::before {
|
|
191
|
+
top: 10px;
|
|
192
|
+
bottom: -48px;
|
|
193
|
+
border-left: 2px solid var(--vp-timeline-c-line);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.vp-timeline-item.horizontal > .vp-timeline-line::before {
|
|
197
|
+
right: -46px;
|
|
198
|
+
left: 8px;
|
|
199
|
+
border-top: 2px solid var(--vp-timeline-c-line);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.vp-timeline-item:not(.horizontal):last-of-type > .vp-timeline-line::before {
|
|
203
|
+
bottom: 0 !important;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.vp-timeline-item.horizontal:last-of-type > .vp-timeline-line::before {
|
|
207
|
+
right: 0 !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.vp-timeline-item:not(.horizontal).line-dashed > .vp-timeline-line::before {
|
|
211
|
+
border-left-style: dashed;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.vp-timeline-item:not(.horizontal).line-dotted > .vp-timeline-line::before {
|
|
215
|
+
border-left-style: dotted;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.vp-timeline-item.horizontal.line-dashed > .vp-timeline-line::before {
|
|
219
|
+
border-top-style: dashed;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.vp-timeline-item.horizontal.line-dotted > .vp-timeline-line::before {
|
|
223
|
+
border-top-style: dotted;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.vp-timeline-item > .vp-timeline-line .vp-timeline-point {
|
|
227
|
+
position: absolute;
|
|
228
|
+
width: 16px;
|
|
229
|
+
height: 16px;
|
|
230
|
+
background-color: var(--vp-timeline-c-point);
|
|
231
|
+
border-radius: 50%;
|
|
232
|
+
transition: background-color var(--vp-t-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.vp-timeline-item:not(.horizontal) > .vp-timeline-line .vp-timeline-point {
|
|
236
|
+
top: 4px;
|
|
237
|
+
left: -7px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.vp-timeline-item.horizontal > .vp-timeline-line .vp-timeline-point {
|
|
241
|
+
top: -7px;
|
|
242
|
+
left: 0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.vp-timeline-item > .vp-timeline-line.has-icon .vp-timeline-point {
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
justify-content: center;
|
|
249
|
+
width: 24px;
|
|
250
|
+
height: 24px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.vp-timeline-item:not(.horizontal) > .vp-timeline-line.has-icon .vp-timeline-point {
|
|
254
|
+
top: -1px;
|
|
255
|
+
left: -11px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.vp-timeline-item.horizontal > .vp-timeline-line.has-icon .vp-timeline-point {
|
|
259
|
+
top: -11px;
|
|
260
|
+
left: 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.vp-timeline-item > .vp-timeline-line.has-icon .vp-timeline-point .vp-icon {
|
|
264
|
+
width: 16px;
|
|
265
|
+
height: 16px;
|
|
266
|
+
margin: 0;
|
|
267
|
+
color: var(--vp-timeline-c-icon);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.vp-timeline-item .vp-timeline-container {
|
|
271
|
+
width: max-content;
|
|
272
|
+
max-width: 100%;
|
|
273
|
+
font-size: 16px;
|
|
274
|
+
line-height: 1.5;
|
|
275
|
+
color: var(--vp-timeline-c-text);
|
|
276
|
+
transition: color var(--vp-t-color);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.vp-timeline-item.horizontal .vp-timeline-container {
|
|
280
|
+
max-width: 240px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.vp-timeline-item:not(.horizontal).between-right .vp-timeline-container {
|
|
284
|
+
text-align: left;
|
|
285
|
+
transform: translateX(calc(100% + 48px));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.vp-timeline-item.card .vp-timeline-content {
|
|
289
|
+
padding: 16px;
|
|
290
|
+
background-color: var(--vp-timeline-bg-card);
|
|
291
|
+
border-radius: 6px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.vp-timeline-item .vp-timeline-content :where(p, ul, ol) {
|
|
295
|
+
margin: 8px 0;
|
|
296
|
+
line-height: 22px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.vp-doc .vp-timeline-item .vp-timeline-content div[class*="language-"] {
|
|
300
|
+
margin: 16px 0;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.vp-timeline-item .vp-timeline-content li + li {
|
|
304
|
+
margin-top: 4px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.vp-timeline-item .vp-timeline-content .vp-timeline-title {
|
|
308
|
+
margin: 0 0 8px;
|
|
309
|
+
font-size: 16px;
|
|
310
|
+
font-weight: 900;
|
|
311
|
+
color: var(--vp-timeline-c-title);
|
|
312
|
+
transition: color var(--vp-t-color);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.vp-timeline-item .vp-timeline-content > .vp-timeline-title + * {
|
|
316
|
+
margin-top: 0 !important;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.vp-timeline-item .vp-timeline-content > :last-child {
|
|
320
|
+
margin-bottom: 0 !important;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.vp-timeline-item .vp-timeline-time {
|
|
324
|
+
margin: 4px 0 0;
|
|
325
|
+
font-size: 14px;
|
|
326
|
+
font-weight: 500;
|
|
327
|
+
color: var(--vp-timeline-c-time);
|
|
328
|
+
transition: color var(--vp-t-color);
|
|
329
|
+
}
|
|
330
|
+
</style>
|
package/lib/client/options.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ declare const installed: {
|
|
|
7
7
|
mpegtsjs: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ART_PLAYER_SUPPORTED_VIDEO_TYPES: string[];
|
|
10
|
+
declare const INJECT_TIMELINE_KEY: unique symbol;
|
|
11
|
+
declare const INJECT_COLLAPSE_KEY: unique symbol;
|
|
10
12
|
|
|
11
|
-
export { ART_PLAYER_SUPPORTED_VIDEO_TYPES, installed, pluginOptions };
|
|
13
|
+
export { ART_PLAYER_SUPPORTED_VIDEO_TYPES, INJECT_COLLAPSE_KEY, INJECT_TIMELINE_KEY, installed, pluginOptions };
|