@bagelink/vue 1.20.89 → 1.20.93
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/{StructuredEditor-BRvM93U6.cjs → StructuredEditor-qeR0lmPO.cjs} +1 -1
- package/dist/{StructuredEditor-B2m9G48O.js → StructuredEditor-yWtlPHRI.js} +1 -1
- package/dist/components/Image.vue.d.ts +5 -0
- package/dist/components/Image.vue.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-BB_6NiiK.js → src-BZuVp81N.js} +1524 -1517
- package/dist/{src-DtS93_Lv.cjs → src-C4MiRND-.cjs} +2 -2
- package/dist/src.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/Image.vue +14 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.93",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bagel Studio",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/signature_pad": "^4.0.0",
|
|
64
64
|
"vue": "^3.5.43",
|
|
65
65
|
"vue-component-type-helpers": "^2.2.12",
|
|
66
|
-
"@bagelink/sdk": "1.20.
|
|
66
|
+
"@bagelink/sdk": "1.20.93"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bagelink/sdk": "*",
|
package/src/components/Image.vue
CHANGED
|
@@ -32,6 +32,11 @@ interface ImageProps {
|
|
|
32
32
|
rounded?: boolean | number
|
|
33
33
|
/** Defer the download until the image nears the viewport. */
|
|
34
34
|
lazy?: boolean
|
|
35
|
+
/**
|
|
36
|
+
* Mark as the LCP / above-the-fold candidate. Sets `fetchpriority="high"`
|
|
37
|
+
* and disables lazy loading so the browser fetches it immediately.
|
|
38
|
+
*/
|
|
39
|
+
priority?: boolean
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
const props = defineProps<ImageProps>()
|
|
@@ -95,6 +100,9 @@ const radiusStyle = computed(() => {
|
|
|
95
100
|
return typeof props.rounded === 'number' ? `${props.rounded}px` : 'var(--bgl-card-radius, 12px)'
|
|
96
101
|
})
|
|
97
102
|
const imgFit = computed(() => props.fit ?? 'cover')
|
|
103
|
+
/** Priority images must never lazy-load — that delays LCP. */
|
|
104
|
+
const isLazy = computed(() => !!props.lazy && !props.priority)
|
|
105
|
+
const fetchPriority = computed(() => (props.priority ? 'high' as const : undefined))
|
|
98
106
|
</script>
|
|
99
107
|
|
|
100
108
|
<template>
|
|
@@ -118,7 +126,8 @@ const imgFit = computed(() => props.fit ?? 'cover')
|
|
|
118
126
|
v-if="imageSrc"
|
|
119
127
|
:src="deliveredSrc"
|
|
120
128
|
:alt="alt"
|
|
121
|
-
:loading="
|
|
129
|
+
:loading="isLazy ? 'lazy' : undefined"
|
|
130
|
+
:fetchpriority="fetchPriority"
|
|
122
131
|
decoding="async"
|
|
123
132
|
class="bgl-image-frame-img h-100p"
|
|
124
133
|
:class="[frameHasHeight ? 'absolute-fill' : 'bgl-image-frame-img--flow', { 'opacity-0': !imageLoaded }]"
|
|
@@ -140,7 +149,8 @@ const imgFit = computed(() => props.fit ?? 'cover')
|
|
|
140
149
|
:src="deliveredSrc"
|
|
141
150
|
v-bind="$attrs"
|
|
142
151
|
:alt="alt"
|
|
143
|
-
:loading="
|
|
152
|
+
:loading="isLazy ? 'lazy' : undefined"
|
|
153
|
+
:fetchpriority="fetchPriority"
|
|
144
154
|
decoding="async"
|
|
145
155
|
:width="normalizeDimension(width)"
|
|
146
156
|
:height="normalizeDimension(height)"
|
|
@@ -167,7 +177,8 @@ const imgFit = computed(() => props.fit ?? 'cover')
|
|
|
167
177
|
v-if="imageSrc"
|
|
168
178
|
:src="deliveredSrc"
|
|
169
179
|
:alt="alt"
|
|
170
|
-
:loading="
|
|
180
|
+
:loading="isLazy ? 'lazy' : undefined"
|
|
181
|
+
:fetchpriority="fetchPriority"
|
|
171
182
|
decoding="async"
|
|
172
183
|
class="w-100p h-100p"
|
|
173
184
|
:class="{ 'opacity-0': !imageLoaded }"
|