@bagelink/vue 0.0.996 → 0.0.998
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/dist/common-C_IH8b5S.cjs +12580 -0
- package/dist/common-DoeNgx31.js +12579 -0
- package/dist/components/Image.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
- package/dist/heic2any-8wMqMfB_.js +933 -0
- package/dist/heic2any-k9wDCKka.cjs +932 -0
- package/dist/index-DiG-xM9T.cjs +35016 -0
- package/dist/index-nGuSAiY2.js +35017 -0
- package/dist/index.cjs +99 -48508
- package/dist/index.mjs +99 -48508
- package/dist/style.css +90 -90
- package/package.json +1 -1
- package/src/components/Image.vue +1 -1
- package/src/components/form/inputs/CodeEditor/Index.vue +10 -4
package/dist/style.css
CHANGED
|
@@ -683,96 +683,7 @@ data[data-v-6c27f163] {
|
|
|
683
683
|
.bagel-input:focus-within.bgl-checkbox:not(:checked) label[data-v-03ed2982] {
|
|
684
684
|
color: var(--label-color) !important;
|
|
685
685
|
}
|
|
686
|
-
pre code.hljs {
|
|
687
|
-
display: block;
|
|
688
|
-
overflow-x: auto;
|
|
689
|
-
padding: 1em
|
|
690
|
-
}
|
|
691
|
-
code.hljs {
|
|
692
|
-
padding: 3px 5px
|
|
693
|
-
}
|
|
694
|
-
/*
|
|
695
|
-
|
|
696
|
-
Atom One Dark by Daniel Gamage
|
|
697
|
-
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
|
|
698
|
-
|
|
699
|
-
base: #282c34
|
|
700
|
-
mono-1: #abb2bf
|
|
701
|
-
mono-2: #818896
|
|
702
|
-
mono-3: #5c6370
|
|
703
|
-
hue-1: #56b6c2
|
|
704
|
-
hue-2: #61aeee
|
|
705
|
-
hue-3: #c678dd
|
|
706
|
-
hue-4: #98c379
|
|
707
|
-
hue-5: #e06c75
|
|
708
|
-
hue-5-2: #be5046
|
|
709
|
-
hue-6: #d19a66
|
|
710
|
-
hue-6-2: #e6c07b
|
|
711
686
|
|
|
712
|
-
*/
|
|
713
|
-
.hljs {
|
|
714
|
-
color: #abb2bf;
|
|
715
|
-
background: #282c34
|
|
716
|
-
}
|
|
717
|
-
.hljs-comment,
|
|
718
|
-
.hljs-quote {
|
|
719
|
-
color: #5c6370;
|
|
720
|
-
font-style: italic
|
|
721
|
-
}
|
|
722
|
-
.hljs-doctag,
|
|
723
|
-
.hljs-keyword,
|
|
724
|
-
.hljs-formula {
|
|
725
|
-
color: #c678dd
|
|
726
|
-
}
|
|
727
|
-
.hljs-section,
|
|
728
|
-
.hljs-name,
|
|
729
|
-
.hljs-selector-tag,
|
|
730
|
-
.hljs-deletion,
|
|
731
|
-
.hljs-subst {
|
|
732
|
-
color: #e06c75
|
|
733
|
-
}
|
|
734
|
-
.hljs-literal {
|
|
735
|
-
color: #56b6c2
|
|
736
|
-
}
|
|
737
|
-
.hljs-string,
|
|
738
|
-
.hljs-regexp,
|
|
739
|
-
.hljs-addition,
|
|
740
|
-
.hljs-attribute,
|
|
741
|
-
.hljs-meta .hljs-string {
|
|
742
|
-
color: #98c379
|
|
743
|
-
}
|
|
744
|
-
.hljs-attr,
|
|
745
|
-
.hljs-variable,
|
|
746
|
-
.hljs-template-variable,
|
|
747
|
-
.hljs-type,
|
|
748
|
-
.hljs-selector-class,
|
|
749
|
-
.hljs-selector-attr,
|
|
750
|
-
.hljs-selector-pseudo,
|
|
751
|
-
.hljs-number {
|
|
752
|
-
color: #d19a66
|
|
753
|
-
}
|
|
754
|
-
.hljs-symbol,
|
|
755
|
-
.hljs-bullet,
|
|
756
|
-
.hljs-link,
|
|
757
|
-
.hljs-meta,
|
|
758
|
-
.hljs-selector-id,
|
|
759
|
-
.hljs-title {
|
|
760
|
-
color: #61aeee
|
|
761
|
-
}
|
|
762
|
-
.hljs-built_in,
|
|
763
|
-
.hljs-title.class_,
|
|
764
|
-
.hljs-class .hljs-title {
|
|
765
|
-
color: #e6c07b
|
|
766
|
-
}
|
|
767
|
-
.hljs-emphasis {
|
|
768
|
-
font-style: italic
|
|
769
|
-
}
|
|
770
|
-
.hljs-strong {
|
|
771
|
-
font-weight: bold
|
|
772
|
-
}
|
|
773
|
-
.hljs-link {
|
|
774
|
-
text-decoration: underline
|
|
775
|
-
}
|
|
776
687
|
.code-editor-wrap{
|
|
777
688
|
background: #282c34;
|
|
778
689
|
overflow: scroll;
|
|
@@ -942,7 +853,7 @@ hue-6-2: #e6c07b
|
|
|
942
853
|
}
|
|
943
854
|
}
|
|
944
855
|
|
|
945
|
-
.img-web-kit[data-v-
|
|
856
|
+
.img-web-kit[data-v-3f8cf457] {
|
|
946
857
|
max-width: 100%;
|
|
947
858
|
vertical-align: middle;
|
|
948
859
|
border: 0;
|
|
@@ -14147,4 +14058,93 @@ input::-moz-focus-inner {
|
|
|
14147
14058
|
height: -webkit-fill-available;
|
|
14148
14059
|
|
|
14149
14060
|
}
|
|
14061
|
+
}pre code.hljs {
|
|
14062
|
+
display: block;
|
|
14063
|
+
overflow-x: auto;
|
|
14064
|
+
padding: 1em
|
|
14065
|
+
}
|
|
14066
|
+
code.hljs {
|
|
14067
|
+
padding: 3px 5px
|
|
14068
|
+
}
|
|
14069
|
+
/*
|
|
14070
|
+
|
|
14071
|
+
Atom One Dark by Daniel Gamage
|
|
14072
|
+
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
|
|
14073
|
+
|
|
14074
|
+
base: #282c34
|
|
14075
|
+
mono-1: #abb2bf
|
|
14076
|
+
mono-2: #818896
|
|
14077
|
+
mono-3: #5c6370
|
|
14078
|
+
hue-1: #56b6c2
|
|
14079
|
+
hue-2: #61aeee
|
|
14080
|
+
hue-3: #c678dd
|
|
14081
|
+
hue-4: #98c379
|
|
14082
|
+
hue-5: #e06c75
|
|
14083
|
+
hue-5-2: #be5046
|
|
14084
|
+
hue-6: #d19a66
|
|
14085
|
+
hue-6-2: #e6c07b
|
|
14086
|
+
|
|
14087
|
+
*/
|
|
14088
|
+
.hljs {
|
|
14089
|
+
color: #abb2bf;
|
|
14090
|
+
background: #282c34
|
|
14091
|
+
}
|
|
14092
|
+
.hljs-comment,
|
|
14093
|
+
.hljs-quote {
|
|
14094
|
+
color: #5c6370;
|
|
14095
|
+
font-style: italic
|
|
14096
|
+
}
|
|
14097
|
+
.hljs-doctag,
|
|
14098
|
+
.hljs-keyword,
|
|
14099
|
+
.hljs-formula {
|
|
14100
|
+
color: #c678dd
|
|
14101
|
+
}
|
|
14102
|
+
.hljs-section,
|
|
14103
|
+
.hljs-name,
|
|
14104
|
+
.hljs-selector-tag,
|
|
14105
|
+
.hljs-deletion,
|
|
14106
|
+
.hljs-subst {
|
|
14107
|
+
color: #e06c75
|
|
14108
|
+
}
|
|
14109
|
+
.hljs-literal {
|
|
14110
|
+
color: #56b6c2
|
|
14111
|
+
}
|
|
14112
|
+
.hljs-string,
|
|
14113
|
+
.hljs-regexp,
|
|
14114
|
+
.hljs-addition,
|
|
14115
|
+
.hljs-attribute,
|
|
14116
|
+
.hljs-meta .hljs-string {
|
|
14117
|
+
color: #98c379
|
|
14118
|
+
}
|
|
14119
|
+
.hljs-attr,
|
|
14120
|
+
.hljs-variable,
|
|
14121
|
+
.hljs-template-variable,
|
|
14122
|
+
.hljs-type,
|
|
14123
|
+
.hljs-selector-class,
|
|
14124
|
+
.hljs-selector-attr,
|
|
14125
|
+
.hljs-selector-pseudo,
|
|
14126
|
+
.hljs-number {
|
|
14127
|
+
color: #d19a66
|
|
14128
|
+
}
|
|
14129
|
+
.hljs-symbol,
|
|
14130
|
+
.hljs-bullet,
|
|
14131
|
+
.hljs-link,
|
|
14132
|
+
.hljs-meta,
|
|
14133
|
+
.hljs-selector-id,
|
|
14134
|
+
.hljs-title {
|
|
14135
|
+
color: #61aeee
|
|
14136
|
+
}
|
|
14137
|
+
.hljs-built_in,
|
|
14138
|
+
.hljs-title.class_,
|
|
14139
|
+
.hljs-class .hljs-title {
|
|
14140
|
+
color: #e6c07b
|
|
14141
|
+
}
|
|
14142
|
+
.hljs-emphasis {
|
|
14143
|
+
font-style: italic
|
|
14144
|
+
}
|
|
14145
|
+
.hljs-strong {
|
|
14146
|
+
font-weight: bold
|
|
14147
|
+
}
|
|
14148
|
+
.hljs-link {
|
|
14149
|
+
text-decoration: underline
|
|
14150
14150
|
}
|
package/package.json
CHANGED
package/src/components/Image.vue
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Skeleton, normalizeURL, normalizeDimension } from '@bagelink/vue'
|
|
3
|
-
import heic2any from 'heic2any'
|
|
4
3
|
import { watch } from 'vue'
|
|
5
4
|
|
|
6
5
|
const { height, width, alt = '', src } = defineProps<{
|
|
@@ -38,6 +37,7 @@ async function loadImage(src: string) {
|
|
|
38
37
|
try {
|
|
39
38
|
const response = await fetch(src)
|
|
40
39
|
const blob = await response.blob()
|
|
40
|
+
const { default: heic2any } = await import('heic2any')
|
|
41
41
|
const convertedBlob = await heic2any({ blob }) as Blob
|
|
42
42
|
imageSrc = URL.createObjectURL(convertedBlob)
|
|
43
43
|
// Only attempt to cache if the cache API is available
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
|
3
|
-
import { nextTick, watch } from 'vue'
|
|
4
|
-
import 'highlight.js/lib/common'
|
|
5
|
-
import 'highlight.js/styles/atom-one-dark.css'
|
|
3
|
+
import { nextTick, onMounted, watch } from 'vue'
|
|
6
4
|
|
|
7
5
|
const { readonly = false, language, modelValue = '' } = defineProps<{
|
|
8
6
|
language?: string
|
|
@@ -32,6 +30,14 @@ function setHeight() {
|
|
|
32
30
|
height = `${scrollHeight}px`
|
|
33
31
|
}
|
|
34
32
|
|
|
33
|
+
let loaded = $ref(false)
|
|
34
|
+
|
|
35
|
+
onMounted(async () => {
|
|
36
|
+
await import('highlight.js/lib/common')
|
|
37
|
+
await import('highlight.js/styles/atom-one-dark.css')
|
|
38
|
+
loaded = true
|
|
39
|
+
})
|
|
40
|
+
|
|
35
41
|
const Highlightjs = hljsVuePlugin.component
|
|
36
42
|
watch(() => code, setHeight, { immediate: true })
|
|
37
43
|
watch(() => modelValue, (value) => {
|
|
@@ -40,7 +46,7 @@ watch(() => modelValue, (value) => {
|
|
|
40
46
|
</script>
|
|
41
47
|
|
|
42
48
|
<template>
|
|
43
|
-
<div class="code-editor-wrap ltr radius-1">
|
|
49
|
+
<div v-if="loaded" class="code-editor-wrap ltr radius-1">
|
|
44
50
|
<div class="relative block h-100" :style="{ height }">
|
|
45
51
|
<div class="numbers absolute inset-0 py-1 px-05 txt16 line-height-15 overflow-hidden z-1 w50px txt-start opacity-3 color-gray">
|
|
46
52
|
<div
|