slidev-theme-neversink 0.2.0 → 0.3.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.
- package/assets/arrow.svg +12 -0
- package/assets/arrowheads.svg +20 -0
- package/components/ArrowDraw.vue +49 -0
- package/components/ArrowHeads.vue +76 -2
- package/components/Box.vue +101 -0
- package/components/Line.vue +71 -0
- package/components/SpeechBubble.vue +0 -3
- package/components/Thumb.vue +67 -0
- package/components/VDragLine.vue +42 -0
- package/docs/.vitepress/config.js +6 -1
- package/docs/.vitepress/theme/index.js +10 -0
- package/docs/colors.md +1 -1
- package/docs/components/arrowdraw.md +21 -0
- package/docs/components/arrowheads.md +15 -2
- package/docs/components/box.md +64 -0
- package/docs/components/line.md +26 -0
- package/docs/components/thumb.md +37 -0
- package/docs/components/vdragline.md +6 -0
- package/docs/components.md +10 -0
- package/docs/layouts/side-title.md +2 -2
- package/docs/markdown.md +1 -1
- package/docs/parts/layoutpicker.md +1 -1
- package/docs/public/screenshots/line.png +0 -0
- package/docs/styling.md +3 -1
- package/example.md +76 -76
- package/layoutHelper.ts +37 -0
- package/layouts/section.vue +3 -1
- package/layouts/side-title.vue +2 -2
- package/layouts/top-title-two-cols.vue +20 -16
- package/layouts/top-title.vue +2 -2
- package/layouts/two-cols-title.vue +6 -2
- package/package.json +5 -3
- package/styles/base.css +1 -2
- package/styles/neversink-c.css +6 -1
- package/uno.config.ts +5 -0
package/assets/arrow.svg
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 196 73">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: lime;
|
|
7
|
+
stroke-width: 0px;
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
</defs>
|
|
11
|
+
<path class="cls-1" d="M171.2,37.2c-12.8,0-25.6-.9-38.3.2-38.7,3.1-77.3,5.6-116.1,4.8-2.5,0-5.1.4-7.5,0-1.7-.4-3.2-1.9-4.8-2.9,1.6-1.3,3.1-3.6,4.8-3.7,7-.4,14-.2,21-.2,14.6,0,29.2.4,43.9,0,13.1-.4,26.2-1.5,39.3-2.4,18.2-1.3,36.4-2.7,54.6-4,.4,0,.8-.3,1.8-.6-5.6-5.8-12.3-8-19.5-9.4-1.3-.3-2.6-.5-3.8-.9-3.5-1.1-5.7-3.4-4.5-7.1,1.2-3.7,4.6-3.7,7.5-2.5,7.4,2.9,14.8,5.9,22,9.2,4.4,2,8.6,4.4,12.7,6.9,4.6,2.8,5.1,6.7.9,10.1-7.1,5.6-14.5,10.8-21.6,16.4-5.2,4.1-9.9,8.7-15,12.8-1.6,1.3-3.8,1.7-5.7,2.5,0-2.4-1-5.7.2-7,4.3-4.6,9.1-8.7,14-12.6,4.6-3.5,9.6-6.5,14-9.4Z"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 356 204">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: lime;
|
|
7
|
+
stroke-width: 0px;
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
</defs>
|
|
11
|
+
<path class="cls-1" d="M179.2,133.5c0-8.9.6-17.7-.1-26.5-2.1-26.8-3.9-53.5-3.3-80.4,0-1.7-.3-3.5,0-5.2.3-1.2,1.3-2.2,2-3.3.9,1.1,2.5,2.1,2.6,3.3.3,4.8.1,9.7.1,14.5,0,10.1-.3,20.2,0,30.4.3,9.1,1,18.1,1.7,27.2.9,12.6,1.9,25.2,2.8,37.8,0,.3.2.6.4,1.2,4-3.9,5.5-8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5.9.8,1.7,1.5,3.5,2.8,6,3.1-.1-.3-.1-.5-.2-.6-3.1-4.8-6.2-9.6-9.3-14.4-2.2-3.4-4.4-6.9-6.8-10.3-2.7-3.7-5.5-7.3-8.3-11-1.3-1.7-2.7-3.5-3.9-5.3-.3-.4,0-1.3,0-1.9.6.2,1.2.3,1.6.7.6.5.9,1.2,1.4,1.9,7.5,9.5,14.1,19.7,20.7,29.9,2.1,3.4,4.8,6.4,7.2,9.6h0Z"/>
|
|
20
|
+
</svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
color: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 'black',
|
|
8
|
+
},
|
|
9
|
+
width: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: '140px', // Default width in pixels
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const colorscheme = computed(() => {
|
|
16
|
+
return `neversink-${props.color}-scheme`
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<svg
|
|
22
|
+
version="1.1"
|
|
23
|
+
id="Layer_1"
|
|
24
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
26
|
+
x="0px"
|
|
27
|
+
y="0px"
|
|
28
|
+
viewBox="0 0 196 73"
|
|
29
|
+
style="enable-background: new 0 0 196 73"
|
|
30
|
+
xml:space="preserve"
|
|
31
|
+
:width="width"
|
|
32
|
+
>
|
|
33
|
+
<path
|
|
34
|
+
class="st0"
|
|
35
|
+
:class="colorscheme"
|
|
36
|
+
d="M171.2,37.2c-12.8,0-25.6-0.9-38.3,0.2c-38.7,3.1-77.3,5.6-116.1,4.8c-2.5,0-5.1,0.4-7.5-0.1
|
|
37
|
+
c-1.7-0.4-3.2-1.9-4.8-2.9c1.6-1.3,3.1-3.6,4.8-3.7c7-0.4,14-0.2,21-0.2c14.6,0,29.2,0.4,43.9,0c13.1-0.4,26.2-1.5,39.3-2.4
|
|
38
|
+
c18.2-1.3,36.4-2.7,54.6-4c0.4,0,0.8-0.3,1.8-0.6c-5.6-5.8-12.3-8-19.5-9.4c-1.3-0.3-2.6-0.5-3.8-0.9c-3.5-1.1-5.7-3.4-4.5-7.1
|
|
39
|
+
c1.2-3.7,4.6-3.7,7.5-2.5c7.4,2.9,14.8,5.9,22,9.2c4.4,2,8.6,4.4,12.7,6.9c4.6,2.8,5.1,6.7,0.9,10.1c-7.1,5.6-14.5,10.8-21.6,16.4
|
|
40
|
+
c-5.2,4.1-9.9,8.7-15,12.8c-1.6,1.3-3.8,1.7-5.7,2.5c0-2.4-1-5.7,0.2-7c4.3-4.6,9.1-8.7,14-12.6C161.8,43.1,166.8,40.1,171.2,37.2z"
|
|
41
|
+
/>
|
|
42
|
+
</svg>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.st0 {
|
|
47
|
+
fill: var(--neversink-bg-color);
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
color: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: 'black',
|
|
7
|
+
},
|
|
8
|
+
width: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: '140px', // Default width in pixels
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const colorscheme = computed(() => {
|
|
15
|
+
return `neversink-${props.color}-scheme`
|
|
16
|
+
})
|
|
3
17
|
</script>
|
|
4
18
|
<template>
|
|
5
|
-
<
|
|
19
|
+
<svg
|
|
20
|
+
id="Layer_1"
|
|
21
|
+
data-name="Layer 1"
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
version="1.1"
|
|
24
|
+
viewBox="0 0 356 204"
|
|
25
|
+
:width="width"
|
|
26
|
+
>
|
|
27
|
+
<path
|
|
28
|
+
class="cls-1"
|
|
29
|
+
:class="colorscheme"
|
|
30
|
+
d="M179.2,133.5c0-8.9.6-17.7-.1-26.5-2.1-26.8-3.9-53.5-3.3-80.4,0-1.7-.3-3.5,0-5.2.3-1.2,1.3-2.2,2-3.3.9,1.1,2.5,2.1,2.6,3.3.3,4.8.1,9.7.1,14.5,0,10.1-.3,20.2,0,30.4.3,9.1,1,18.1,1.7,27.2.9,12.6,1.9,25.2,2.8,37.8,0,.3.2.6.4,1.2,4-3.9,5.5-8.5,6.5-13.5.2-.9.3-1.8.6-2.6.8-2.4,2.4-3.9,4.9-3.1,2.6.8,2.6,3.2,1.7,5.2-2,5.1-4.1,10.3-6.4,15.2-1.4,3-3,6-4.8,8.8-1.9,3.2-4.6,3.5-7,.6-3.9-4.9-7.5-10-11.4-15-2.8-3.6-6-6.9-8.9-10.4-.9-1.1-1.2-2.6-1.7-3.9,1.7,0,3.9-.7,4.8.1,3.2,3,6,6.3,8.7,9.7,2.4,3.2,4.5,6.7,6.5,9.7h.1Z"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
class="cls-1"
|
|
34
|
+
:class="colorscheme"
|
|
35
|
+
d="M262.3,172c5.5-7,11.5-13.5,16.3-20.9,14.9-22.4,30.1-44.5,47.2-65.2,1.1-1.4,2-2.9,3.2-4.1.9-.8,2.4-.9,3.6-1.4,0,1.4.6,3.2,0,4.2-2.8,4-5.9,7.7-8.9,11.5-6.3,7.9-12.7,15.7-18.8,23.9-5.4,7.3-10.4,14.9-15.5,22.4-7.1,10.5-14.1,21-21.2,31.4-.2.2-.2.6-.4,1.2,5.6-.6,9.6-3.3,13.5-6.6.7-.6,1.4-1.2,2.1-1.7,2.1-1.4,4.3-1.6,5.8.6,1.5,2.2,0,4.1-1.9,5.2-4.8,2.8-9.6,5.5-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|
|
71
|
+
/>
|
|
72
|
+
</svg>
|
|
6
73
|
</template>
|
|
74
|
+
|
|
75
|
+
<style scoped>
|
|
76
|
+
.cls-1 {
|
|
77
|
+
fill: var(--neversink-bg-color);
|
|
78
|
+
stroke-width: 0px;
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { resolveColor } from '../layoutHelper'
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
shape: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 's-s-2-100',
|
|
8
|
+
},
|
|
9
|
+
color: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'white',
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: '150px', // Default width in pixels
|
|
16
|
+
},
|
|
17
|
+
custom: {
|
|
18
|
+
// add a custom class if you want
|
|
19
|
+
type: String,
|
|
20
|
+
default: '',
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
// -
|
|
25
|
+
// - s-d-3-10
|
|
26
|
+
// color: scheme
|
|
27
|
+
// width:
|
|
28
|
+
|
|
29
|
+
// - square vs rounded vs full
|
|
30
|
+
// - dashed, solid, no border
|
|
31
|
+
// - border width
|
|
32
|
+
// - fill opacity
|
|
33
|
+
|
|
34
|
+
// - fill color
|
|
35
|
+
// - border color
|
|
36
|
+
// - size
|
|
37
|
+
|
|
38
|
+
const size = computed(() => {
|
|
39
|
+
return props.size
|
|
40
|
+
})
|
|
41
|
+
const borderwidth = computed(() => {
|
|
42
|
+
return props.shape.split('-')[2] + 'px'
|
|
43
|
+
})
|
|
44
|
+
const borderstyle = computed(() => {
|
|
45
|
+
let parts = props.shape.split('-')
|
|
46
|
+
if (parts[1] == 'd') {
|
|
47
|
+
return 'dashed'
|
|
48
|
+
} else if (parts[1] == 'o') {
|
|
49
|
+
return 'dotted'
|
|
50
|
+
} else if (parts[1] == 's') {
|
|
51
|
+
return 'solid'
|
|
52
|
+
} else {
|
|
53
|
+
return 'none'
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const style = computed(() => {
|
|
58
|
+
let s = ''
|
|
59
|
+
let parts = props.shape.split('-')
|
|
60
|
+
console.log(parts)
|
|
61
|
+
console.log(parts[0])
|
|
62
|
+
// no validation currently!
|
|
63
|
+
|
|
64
|
+
// square versus rounded vs full
|
|
65
|
+
if (parts[0] == 'r') {
|
|
66
|
+
s += 'rounded-lg '
|
|
67
|
+
} else if (parts[0] == 'f') {
|
|
68
|
+
s += 'rounded-full '
|
|
69
|
+
} else {
|
|
70
|
+
s += 'rounded-none '
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// color scheme
|
|
74
|
+
s += `neversink-${props.color}-scheme binder `
|
|
75
|
+
|
|
76
|
+
// add custom class
|
|
77
|
+
s += props.custom
|
|
78
|
+
|
|
79
|
+
return s
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
const trans = computed(() => {
|
|
83
|
+
const val = parseInt(props.shape.split('-')[3])
|
|
84
|
+
return `${val}%`
|
|
85
|
+
})
|
|
86
|
+
</script>
|
|
87
|
+
<template>
|
|
88
|
+
<div :class="style"><slot></slot></div>
|
|
89
|
+
</template>
|
|
90
|
+
<style scoped>
|
|
91
|
+
.binder {
|
|
92
|
+
--new-color: color-mix(in srgb, var(--neversink-bg-color), v-bind(trans) transparent);
|
|
93
|
+
border-color: var(--neversink-border-color);
|
|
94
|
+
background-color: var(--new-color);
|
|
95
|
+
color: var(--neversink-text-color);
|
|
96
|
+
width: v-bind(size);
|
|
97
|
+
height: v-bind(size);
|
|
98
|
+
border-width: v-bind(borderwidth);
|
|
99
|
+
border-style: v-bind(borderstyle);
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
Simple line
|
|
4
|
+
|
|
5
|
+
<Line x1="10" y1="20" x2="100" y2="200" color="green" width="3" />
|
|
6
|
+
|
|
7
|
+
<Line v-bind="{ x1:10, y1:10, x2:200, y2:200 }"/>
|
|
8
|
+
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { ref, computed } from 'vue'
|
|
13
|
+
import { onClickOutside } from '@vueuse/core'
|
|
14
|
+
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
x1: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: 100,
|
|
19
|
+
},
|
|
20
|
+
y1: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: 100,
|
|
23
|
+
},
|
|
24
|
+
x2: {
|
|
25
|
+
type: [Number, String],
|
|
26
|
+
default: 100,
|
|
27
|
+
},
|
|
28
|
+
y2: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: 100,
|
|
31
|
+
},
|
|
32
|
+
width: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: 2, // Default width in pixels
|
|
35
|
+
},
|
|
36
|
+
color: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'black', // actually it is black
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const emit = defineEmits(['dblclick', 'clickOutside'])
|
|
43
|
+
const colorscheme = computed(() => {
|
|
44
|
+
return `neversink-${props.color}-scheme`
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const clickArea = ref()
|
|
48
|
+
onClickOutside(clickArea, () => emit('clickOutside'))
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<svg class="absolute left-0 top-0 z-100" :width="Math.max(+x1, +x2) + 50" :height="Math.max(+y1, +y2) + 50">
|
|
53
|
+
<line :x1 :y1 :x2 :y2 class="cls-1" :class="colorscheme" :stroke-width="width || 2" @dblclick="emit('dblclick')" />
|
|
54
|
+
<line
|
|
55
|
+
ref="clickArea"
|
|
56
|
+
:x1
|
|
57
|
+
:y1
|
|
58
|
+
:x2
|
|
59
|
+
:y2
|
|
60
|
+
stroke="transparent"
|
|
61
|
+
stroke-linecap="round"
|
|
62
|
+
:stroke-width="20"
|
|
63
|
+
@dblclick="emit('dblclick')"
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
</template>
|
|
67
|
+
<style scoped>
|
|
68
|
+
.cls-1 {
|
|
69
|
+
stroke: var(--neversink-bg-color);
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
//import { resolveColor } from '../layoutHelper'
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
color: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 'white',
|
|
8
|
+
},
|
|
9
|
+
dir: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'up',
|
|
12
|
+
},
|
|
13
|
+
width: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: '70px', // Default width in pixels
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const colorscheme = computed(() => {
|
|
20
|
+
return `neversink-${props.color}-scheme`
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const thumbRotation = computed(() => {
|
|
24
|
+
return props.dir === 'down' ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// const colorFill = computed(() => resolveColor(props.color))
|
|
28
|
+
// const colorEdge = computed(() => resolveColor(props.edge))
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<svg
|
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
34
|
+
version="1.1"
|
|
35
|
+
viewBox="0 0 800 800"
|
|
36
|
+
:width="width"
|
|
37
|
+
:style="{ transform: thumbRotation }"
|
|
38
|
+
>
|
|
39
|
+
<defs></defs>
|
|
40
|
+
<g id="bg">
|
|
41
|
+
<polygon
|
|
42
|
+
class="cls-1"
|
|
43
|
+
:class="colorscheme"
|
|
44
|
+
points="170 433 258 381 374 280 439 200 492 88 530 37 586 69 596 142 584 203 559 256 536 305 546 346 608 363 693 367 745 374 765 409 750 453 775 504 769 549 738 578 743 621 715 664 698 691 681 746 502 766 391 747 280 727 231 713 167 708 140 638 140 471 170 433"
|
|
45
|
+
/>
|
|
46
|
+
</g>
|
|
47
|
+
<g id="outline">
|
|
48
|
+
<path
|
|
49
|
+
class="cls-2"
|
|
50
|
+
:class="colorscheme"
|
|
51
|
+
d="M800,517.4c0-17.4-6-33.6-15.9-46.3-3.9-4.9-8.5-9.2-13.4-13.1,7.8-11.9,12.5-26.1,12.5-41.4,0-42-34-76-76-76h-105.3c-10.4-.5-20.9-1.6-29.3-3.9-8.6-2.2-14.4-5.5-16.9-8.3-4.3-4.9-5.2-8-5.4-13.2,0-4.4,1.3-10.3,4.2-17.1,4.2-10.2,11.6-21.8,19.1-33.1,3.7-5.6,7.5-11.2,10.8-16.8s6.4-11.1,8.7-17.3c7.1-19.8,22.5-55.9,22.5-100,0-18.5-2.7-38.6-10-59.1-6.2-17.6-15.7-31.8-27.8-41.6-12-9.8-26.6-15-41-15-17.2,0-33.9,7.3-46.7,19.9-12.8,12.6-21.8,30.4-25.3,51.7-1.1,7-4.6,19.5-10.3,34.2-8.5,22.2-21.7,50-38.6,77.2-16.8,27.2-37.5,53.8-60.1,73.8-28.7,25.4-56,46.8-79.3,65.6-23.3,19-42.6,34.9-55.9,51.3-2.8,3.6-7.9,7.5-14.2,10.9-9.4,5.1-21.3,8.9-30.6,11.1-4.6,1.1-8.6,1.9-11.4,2.4-.7.1-1.1.2-1.7.3v-8.1H57c-31.5,0-57,25.5-57,57v254.6c0,31.5,25.5,57,57,57h68c21,0,38-17,38-38v-1.9h60.8c8.4,0,25.1,2.5,44.9,6.9,29.9,6.4,67.7,16.3,104.5,25,36.9,8.6,72.4,16,100.4,17,29.8,1.1,51.7,1.6,69.1,1.6,37,0,54-2.3,79.3-5.1h.6c0,0,35.5-5.2,35.5-5.2h.3c36.1-5.9,63.7-37,63.7-74.9s-.6-9.6-1.6-14.2c9.7-4.2,18.6-10.2,25.6-17.8,12.5-13.4,20.2-31.6,20.2-51.4,0-11.4-2.6-22.2-7.1-31.9,24.1-12.6,40.8-37.6,40.8-66.8ZM80.1,713.4c-14.5,0-26.2-11.7-26.2-26.2s11.7-26.2,26.2-26.2,26.2,11.7,26.2,26.2-11.7,26.2-26.2,26.2ZM726.1,554.1c-7.9.5-14.8,5.6-17.3,13.2-2.5,7.5-.3,15.8,5.7,21,8.1,7.1,13,16.7,13,27.8,0,9.7-3.7,18.3-9.8,24.9-6.1,6.6-14.6,10.9-24.1,11.8-6.5.6-12.5,4.5-15.5,10.3-3.1,5.8-3,12.8.2,18.6,3.2,5.7,4.9,11.6,4.9,17.9,0,18.4-13.4,33.4-31,36.4l-34.9,5c-25.9,2.9-39.3,4.8-74.7,4.9-16.7,0-38.2-.5-67.7-1.6-14.8-.5-35.3-3.7-57.9-8.3-33.8-6.9-72.5-16.9-107.1-25.2-17.4-4.2-33.7-7.9-48.2-10.7-14.6-2.8-27.1-4.6-38-4.6h-41.3v-245.8c4.5-1,9.5-2.3,15-4,8.7-2.7,18.3-6.3,27.6-11.3,9.3-5,18.6-11.5,26-20.7,9.2-11.5,27.2-27,50.1-45.5,23-18.6,50.9-40.5,80.5-66.7,35.5-31.4,63.7-73.1,84.3-111.8,10.3-19.4,18.7-38,25-54.4,6.3-16.5,10.4-30.4,12.4-41.7,2.4-14.4,8-24.3,14.2-30.4,6.2-6.1,13-8.6,19.3-8.6,5.4,0,10.8,1.7,16.5,6.2,5.6,4.5,11.3,12.2,15.6,24.2,5.6,16.1,7.8,31.5,7.8,46.2,0,35.1-12.5,65.7-20.2,86.6-1,3-4.2,8.7-8.4,15.3-6.4,10.1-15.2,22.4-22.6,36-7.4,13.6-14.1,28.8-14.2,46.4-.1,13.5,5,28.4,15.9,39.8,10.1,10.7,22.9,16,35.4,19.4,12.7,3.3,25.8,4.6,38,5.1h.8s40.8,0,40.8,0h64.9c20.4,0,37,16.6,37,37.1,0,12.7-6.4,23.8-16.1,30.5-6.2,4.3-9.4,11.8-8.2,19.3,1.3,7.5,6.7,13.5,14,15.6,7.8,2.2,14.7,6.9,19.5,13.1,4.8,6.2,7.6,13.8,7.6,22.4,0,19.6-15.4,35.6-34.9,36.7Z"
|
|
52
|
+
/>
|
|
53
|
+
</g>
|
|
54
|
+
</svg>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style scoped>
|
|
58
|
+
.cls-1 {
|
|
59
|
+
fill: var(--neversink-bg-color);
|
|
60
|
+
stroke-miterlimit: 10;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cls-2 {
|
|
64
|
+
fill: var(--neversink-border-color);
|
|
65
|
+
stroke-width: 0px;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, onUnmounted } from 'vue'
|
|
3
|
+
import type { DragElementMarkdownSource } from '@slidev/client/composables/useDragElements.ts'
|
|
4
|
+
import { useDragElement } from '@slidev/client/composables/useDragElements.ts'
|
|
5
|
+
import Line from './Line.vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
pos?: string
|
|
9
|
+
markdownSource?: DragElementMarkdownSource
|
|
10
|
+
width?: number | string
|
|
11
|
+
color?: string
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
const { dragId, mounted, unmounted, startDragging, stopDragging, x0, y0, width, height } = useDragElement(
|
|
15
|
+
null,
|
|
16
|
+
props.pos ?? '100,100,300,300',
|
|
17
|
+
props.markdownSource,
|
|
18
|
+
true
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
onMounted(mounted)
|
|
22
|
+
onUnmounted(unmounted)
|
|
23
|
+
|
|
24
|
+
const x1 = computed(() => x0.value - width.value / 2)
|
|
25
|
+
const y1 = computed(() => y0.value - height.value / 2)
|
|
26
|
+
const x2 = computed(() => x0.value + width.value / 2)
|
|
27
|
+
const y2 = computed(() => y0.value + height.value / 2)
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<Line
|
|
32
|
+
:x1
|
|
33
|
+
:y1
|
|
34
|
+
:x2
|
|
35
|
+
:y2
|
|
36
|
+
:data-drag-id="dragId"
|
|
37
|
+
:width="props.width"
|
|
38
|
+
:color="props.color"
|
|
39
|
+
@dblclick="startDragging"
|
|
40
|
+
@click-outside="stopDragging"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
@@ -57,10 +57,15 @@ export default defineConfig({
|
|
|
57
57
|
{ text: 'Email', link: '/components/email' },
|
|
58
58
|
{ text: 'SpeechBubble', link: '/components/speechbubble' },
|
|
59
59
|
{ text: 'StickyNote', link: '/components/stickynote' },
|
|
60
|
-
{ text: 'CreditScroll', link: '/components/creditscroll' },
|
|
60
|
+
// { text: 'CreditScroll', link: '/components/creditscroll' },
|
|
61
61
|
{ text: 'QRCode', link: '/components/qrcode' },
|
|
62
62
|
{ text: 'Kawaii', link: '/components/kawaii' },
|
|
63
|
+
{ text: 'ArrowDraw', link: '/components/arrowdraw' },
|
|
63
64
|
{ text: 'ArrowHeads', link: '/components/arrowheads' },
|
|
65
|
+
{ text: 'Thumb', link: '/components/thumb' },
|
|
66
|
+
{ text: 'Line', link: '/components/line' },
|
|
67
|
+
{ text: 'VDragLine', link: '/components/vdragline' },
|
|
68
|
+
{ text: 'Box', link: '/components/box' },
|
|
64
69
|
],
|
|
65
70
|
},
|
|
66
71
|
{ text: 'Customizing', link: '/customizing' },
|
|
@@ -12,6 +12,11 @@ import StickyNote from '../../../components/StickyNote.vue'
|
|
|
12
12
|
import QrcodeVue from 'qrcode.vue'
|
|
13
13
|
import SpeechBubble from '../../../components/SpeechBubble.vue'
|
|
14
14
|
|
|
15
|
+
import ArrowDraw from '../../../components/ArrowDraw.vue'
|
|
16
|
+
import ArrowHeads from '../../../components/ArrowHeads.vue'
|
|
17
|
+
import Thumb from '../../../components/Thumb.vue'
|
|
18
|
+
import Line from '../../../components/Line.vue'
|
|
19
|
+
import Box from '../../../components/Box.vue'
|
|
15
20
|
import BackPack from '../../../components/vue3-kawaii/components/backpack/BackPack.vue'
|
|
16
21
|
import Browser from '../../../components/vue3-kawaii/components/browser/Browser.vue'
|
|
17
22
|
import Cat from '../../../components/vue3-kawaii/components/cat/Cat.vue'
|
|
@@ -37,6 +42,11 @@ export default {
|
|
|
37
42
|
app.component('StickyNote', StickyNote)
|
|
38
43
|
app.component('QRCode', QrcodeVue)
|
|
39
44
|
app.component('SpeechBubble', SpeechBubble)
|
|
45
|
+
app.component('ArrowDraw', ArrowDraw)
|
|
46
|
+
app.component('ArrowHeads', ArrowHeads)
|
|
47
|
+
app.component('Thumb', Thumb)
|
|
48
|
+
app.component('Line', Line)
|
|
49
|
+
app.component('Box', Box)
|
|
40
50
|
app.component('BackPack', BackPack)
|
|
41
51
|
app.component('Browser', Browser)
|
|
42
52
|
app.component('Cat', Cat)
|
package/docs/colors.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The project uses tailwind-like color schemes arranged in ==monochromatic pairs==.
|
|
4
4
|
Color schemes can be applied to several elements, perhaps most importantly to
|
|
5
|
-
slide [layouts](/layouts).
|
|
5
|
+
slide [layouts](/layouts) and some [components](/components).
|
|
6
6
|
|
|
7
7
|
These boxes show the options and names:
|
|
8
8
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ArrowDraw
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Draws a handdrawn arrow in a customizable color. Can be v-drag to size and position.
|
|
6
|
+
|
|
7
|
+
## `ArrowDraw` component
|
|
8
|
+
|
|
9
|
+
The `ArrowDraw` component is used to just draw a hand-drawn arrow. It can have the color
|
|
10
|
+
changed according to the [color schemes](/colors) in the theme. The ArrowDraw component has the following props:
|
|
11
|
+
|
|
12
|
+
- `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
|
|
13
|
+
- width (optional) the initial width of the image. Default is 140px
|
|
14
|
+
|
|
15
|
+
```md
|
|
16
|
+
<ArrowDraw color='red' v-drag/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Renders as:
|
|
20
|
+
|
|
21
|
+
<ArrowDraw color='red' />
|
|
@@ -6,10 +6,23 @@ Draws a set of hand drawn arrows that point to a central location. Useful to cal
|
|
|
6
6
|
|
|
7
7
|
## `ArrowHeads` component
|
|
8
8
|
|
|
9
|
+
The ArrowHeads component has the following props:
|
|
10
|
+
|
|
11
|
+
- `color` (optional) the color of the arrow stroke. Colors are from the themes. The background color is applied as the stroke so `red` is red, `black` is black. Default is 'black'.
|
|
12
|
+
- width (optional) the initial width of the image. Default is 140px
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
<ArrowHeads color='pink' width="300px" v-drag />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Renders as:
|
|
19
|
+
|
|
20
|
+
<ArrowHeads color='pink' width="300px"/>
|
|
21
|
+
|
|
9
22
|
```md
|
|
10
|
-
<ArrowHeads
|
|
23
|
+
<ArrowHeads v-drag />
|
|
11
24
|
```
|
|
12
25
|
|
|
13
26
|
Renders as:
|
|
14
27
|
|
|
15
|
-
<
|
|
28
|
+
<ArrowHeads />
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Box
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Draws an empty or filled box. Useful for highlighting and grouping things.
|
|
6
|
+
|
|
7
|
+
## `Box` component
|
|
8
|
+
|
|
9
|
+
The `Box` component is used to just draw a rectangle. It has the following props:
|
|
10
|
+
|
|
11
|
+
- `shape` (optional) the shape of the box. There are four values connected with a kebob style notation. The first element is the shape which can be `s` (square), `r` (rounded) or `f` (full) which is practically a circle. The second element is the border type which can be `s` (solid), `d` (dashed) or `o` (dotted). The third element is the border radius in pixels. The fourth element is the opacity of the fill (0 = opaque, 100=transparent). For example, the default is 's-s-2-100' which is a square rectangle with a 2px solid border and transparent fill. A few examples appear below.
|
|
12
|
+
- `size` (optional) the size of the square. The default is '150px'.
|
|
13
|
+
- `color` (optional) the color of the shape. It uses the color schemes in the theme. The default is 'white' (which means a black border and white fill).
|
|
14
|
+
- `custom` (optional) any custom classes you want to add to the box. The default is none. For example, opacity only applies to the fill not the border but you can change that using `custom` classes.
|
|
15
|
+
|
|
16
|
+
```md
|
|
17
|
+
<Box v-drag />
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Renders as:
|
|
21
|
+
|
|
22
|
+
<Box />
|
|
23
|
+
|
|
24
|
+
well a box, what did you expect.
|
|
25
|
+
|
|
26
|
+
But of course you can customise it:
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
<Box shape='r-d-8-0' width='200px' custom='m-10 ' />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Box shape='r-d-8-0' width='200px' custom='m-10 ' />
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
<Box shape='f-o-5-0' color='sky-light' custom='m-10' />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<Box shape='f-o-5-0' color='sky-light' custom='m-10' />
|
|
39
|
+
|
|
40
|
+
more transparent:
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
<Box shape='f-o-5-75' color='sky-light' custom='m-10' />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<Box shape='f-o-5-75' color='sky-light' custom='m-10' />
|
|
47
|
+
|
|
48
|
+
If can include text as well using a slot
|
|
49
|
+
|
|
50
|
+
```md
|
|
51
|
+
<Box>Hi there</Box>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
renders as:
|
|
55
|
+
|
|
56
|
+
<Box>Hi there</Box>
|
|
57
|
+
|
|
58
|
+
You might like to syle it a bit
|
|
59
|
+
|
|
60
|
+
```md
|
|
61
|
+
<Box custom='pt-10'>Hi there</Box>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
<Box custom='p-10'>Hi there</Box>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Line
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Draws a line
|
|
6
|
+
|
|
7
|
+
## `Line` component
|
|
8
|
+
|
|
9
|
+
The `Line` component is used to just draw a straight line. It has the following props:
|
|
10
|
+
|
|
11
|
+
- `x1` (required) starting x position
|
|
12
|
+
- `y1` (required) starting y postiion
|
|
13
|
+
- `x2` (required) the end x position
|
|
14
|
+
- `y2` (required) the end y position
|
|
15
|
+
- `width` (optional) the width of the line (default '2')
|
|
16
|
+
- `color` (optional) the color of the line. Colors can be any of the color schemes. the default is 'black'. The background color of the theme is applied to the stroke of the line so `black` is black line, `red` is red line, `red-light` is a light red line, etc.
|
|
17
|
+
|
|
18
|
+
```md
|
|
19
|
+
<Line :x1=0 :y1=0 :x2=200 :y2=200 :width=2 color='red' v-drag />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Renders as:
|
|
23
|
+
|
|
24
|
+
well, a red svg line, what did you want to see?
|
|
25
|
+
|
|
26
|
+
<img src="/screenshots/line.png" />
|