Skip to content

Commit 348c05d

Browse files
refactor!: rename LazyImage to UnLazyImage
1 parent fe0f84d commit 348c05d

File tree

13 files changed

+57
-35
lines changed

13 files changed

+57
-35
lines changed

docs/integrations/nuxt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ In both examples, the `sizes` attribute is automatically calculated.
6161

6262
```html
6363
<!-- Your placeholder image in `src` attribute (provided by your backend for example) -->
64-
<LazyImage
64+
<UnLazyImage
6565
src="data:image/svg+xml, ..."
6666
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
6767
auto-sizes

docs/integrations/react.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Install the `@unlazy/react` package using your favorite package manager:
1818
```
1919
:::
2020

21-
Import the `LazyImage` component in your component file:
21+
Import the `UnLazyImage` component in your component file:
2222

2323
```tsx
24-
import { LazyImage } from '@unlazy/react'
24+
import { UnLazyImage } from '@unlazy/react'
2525

2626
export default function MyComponent() {
2727
return (
28-
<LazyImage
28+
<UnLazyImage
2929
autoSizes
3030
src="data:image/svg+xml, ..."
3131
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
@@ -34,15 +34,15 @@ export default function MyComponent() {
3434
}
3535
```
3636

37-
## `LazyImage` Component
37+
## `UnLazyImage` Component
3838

39-
The `LazyImage` component allows you to easily implement unlazy in your React application, providing a smoother image loading experience.
39+
The `UnLazyImage` component allows you to easily implement unlazy in your React application, providing a smoother image loading experience.
4040

4141
The component supports automatic calculation of the `sizes` attribute with the `autoSizes` prop. It also enables you to specify a `blurhash` for the blurry placeholder image.
4242

4343
### Props
4444

45-
The `LazyImage` component accepts the following props:
45+
The `UnLazyImage` component accepts the following props:
4646

4747
| Prop | Type | Description |
4848
| --- | --- | --- |
@@ -58,14 +58,14 @@ In both examples, the `sizes` attribute is automatically calculated.
5858
return (
5959
<>
6060
{/* BlurHash in `blurhash` prop */}
61-
<LazyImage
61+
<UnLazyImage
6262
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
6363
autoSizes
6464
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
6565
/>
6666

6767
{/* Your placeholder image in `src` attribute (provided by your backend for example) */}
68-
<LazyImage
68+
<UnLazyImage
6969
autoSizes
7070
src="data:image/svg+xml, ..."
7171
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"

docs/integrations/solid.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Install the `@unlazy/solid` package using your favorite package manager:
1818
```
1919
:::
2020

21-
Import the `LazyImage` component in your component file:
21+
Import the `UnLazyImage` component in your component file:
2222

2323
```tsx
24-
import { LazyImage } from '@unlazy/solid'
24+
import { UnLazyImage } from '@unlazy/solid'
2525

2626
export default function MyComponent() {
2727
return (
28-
<LazyImage
28+
<UnLazyImage
2929
autoSizes
3030
src="data:image/svg+xml, ..."
3131
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
@@ -34,15 +34,15 @@ export default function MyComponent() {
3434
}
3535
```
3636

37-
## `LazyImage` Component
37+
## `UnLazyImage` Component
3838

39-
The `LazyImage` component allows you to easily implement unlazy in your Solid application, providing a smoother image loading experience.
39+
The `UnLazyImage` component allows you to easily implement unlazy in your Solid application, providing a smoother image loading experience.
4040

4141
The component supports automatic calculation of the `sizes` attribute with the `autoSizes` prop. It also enables you to specify a `blurhash` for the blurry placeholder image.
4242

4343
### Props
4444

45-
The `LazyImage` component accepts the following props:
45+
The `UnLazyImage` component accepts the following props:
4646

4747
| Prop | Type | Description |
4848
| --- | --- | --- |
@@ -58,14 +58,14 @@ In both examples, the `sizes` attribute is automatically calculated.
5858
return (
5959
<>
6060
{/* BlurHash in `blurhash` prop */}
61-
<LazyImage
61+
<UnLazyImage
6262
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
6363
autoSizes
6464
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
6565
/>
6666

6767
{/* Your placeholder image in `src` attribute (provided by your backend for example) */}
68-
<LazyImage
68+
<UnLazyImage
6969
autoSizes
7070
src="data:image/svg+xml, ..."
7171
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"

docs/integrations/vue.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Install the `@unlazy/vue` package using your favorite package manager:
2020

2121
### Local Import
2222

23-
Import the `LazyImage` component in your Vue single file component and use it in your template:
23+
Import the `UnLazyImage` component in your Vue single file component and use it in your template:
2424

2525
```vue
2626
<script setup lang="ts">
27-
import { LazyImage } from '@unlazy/vue/components'
27+
import { UnLazyImage } from '@unlazy/vue/components'
2828
</script>
2929
3030
<template>
31-
<LazyImage
31+
<UnLazyImage
3232
src="data:image/svg+xml, ..."
3333
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
3434
auto-sizes
@@ -51,13 +51,13 @@ app.use(Unlazy)
5151
app.mount('#app')
5252
```
5353

54-
## `LazyImage` Component
54+
## `UnLazyImage` Component
5555

56-
The `LazyImage` component allows you to easily implement unlazy in your Vue application, providing a smoother image loading experience. The component supports automatic calculation of the `sizes` attribute with the `autoSizes` prop. It also enables you to specify a `blurhash` for the blurry placeholder image.
56+
The `UnLazyImage` component allows you to easily implement unlazy in your Vue application, providing a smoother image loading experience. The component supports automatic calculation of the `sizes` attribute with the `autoSizes` prop. It also enables you to specify a `blurhash` for the blurry placeholder image.
5757

5858
### Props
5959

60-
The `LazyImage` component accepts the following props:
60+
The `UnLazyImage` component accepts the following props:
6161

6262
| Prop | Type | Description |
6363
| --- | --- | --- |
@@ -71,14 +71,14 @@ In both examples, the `sizes` attribute is automatically calculated.
7171

7272
```html
7373
<!-- BlurHash -->
74-
<LazyImage
74+
<UnLazyImage
7575
:blurhash="blurhash"
7676
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
7777
auto-sizes
7878
/>
7979

8080
<!-- Your placeholder image in `src` attribute (provided by your backend for example) -->
81-
<LazyImage
81+
<UnLazyImage
8282
src="data:image/svg+xml, ..."
8383
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"
8484
auto-sizes

packages/nuxt/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
"unlazy": "workspace:*"
5757
},
5858
"devDependencies": {
59+
"@nuxt/module-builder": "^0.3.0",
60+
"@nuxt/schema": "^3.4.2",
5961
"@types/node": "^18.15.12",
6062
"@unhead/vue": "^1.1.26",
6163
"@unocss/nuxt": "^0.51.5",

packages/react/playground/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { LazyImage } from '../src'
1+
import { UnLazyImage } from '../src'
22

33
function App() {
44
return (
5-
<LazyImage
5+
<UnLazyImage
66
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
77
autoSizes={true}
88
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"

packages/react/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface Props
1010
blurhash?: string
1111
}
1212

13-
export function LazyImage({
13+
export function UnLazyImage({
1414
autoSizes,
1515
blurhash,
1616
blurhashSize,

packages/solid/playground/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* @refresh granular */
2-
import { LazyImage } from '../src'
2+
import { UnLazyImage } from '../src'
33

44
function App() {
55
return (
6-
<LazyImage
6+
<UnLazyImage
77
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
88
autoSizes={true}
99
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"

packages/solid/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface Props
1212
blurhash?: string
1313
}
1414

15-
export function LazyImage(props: Props) {
15+
export function UnLazyImage(props: Props) {
1616
const [target, setTarget] = createSignal<HTMLImageElement | null>(null)
1717

1818
createEffect(() => {

packages/vue/playground/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
2-
import { LazyImage } from '../src/components'
2+
import { UnLazyImage } from '../src/components'
33
</script>
44

55
<template>
6-
<LazyImage
6+
<UnLazyImage
77
blurhash="LKO2:N%2Tw=w]~RBVZRi};RPxuwH"
88
auto-sizes
99
data-srcset="image-320w.jpg 320w, image-640w.jpg 640w"

0 commit comments

Comments
 (0)