fulldev-ui 0.5.0-beta.11 → 0.5.0-beta.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.5.0-beta.11",
3
+ "version": "0.5.0-beta.12",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -30,9 +30,9 @@ const {
30
30
 
31
31
  const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') || 'index'
32
32
  const src = `/src/images/${images?.[0].id}`
33
- const gotImage = await getImage({ src, width: 200, height: 200 })
34
-
35
- console.log({ hoi: gotImage.src })
33
+ const allImages = import.meta.glob<{ default: ImageMetadata }>('/src/images/*')
34
+ const foundImage = allImages[src]
35
+ const gotImage = await getImage({ src: foundImage ? foundImage() : src })
36
36
  ---
37
37
 
38
38
  <Section
@@ -41,10 +41,11 @@ const { title, slug, image, price, variants, ...rest } = Astro.props
41
41
  name="url"
42
42
  value={Astro.site ? Astro.site.href + slug : undefined}
43
43
  />
44
+
44
45
  <Input
45
46
  type="hidden"
46
47
  name="image"
47
- value={Astro.url.origin ? Astro.url.origin + image : undefined}
48
+ value={image}
48
49
  />
49
50
  {
50
51
  Object.entries(variants ?? {}).map(([key, options]) => (
@@ -128,7 +128,7 @@ const { ...rest } = Astro.props
128
128
  currency: 'eur',
129
129
  product_data: {
130
130
  name: item.name,
131
- images: [window],
131
+ images: [Astro.site ? Astro.site.href + item.image : undefined],
132
132
  },
133
133
  unit_amount: Math.round(item.price * 100),
134
134
  },